summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-04-29 17:10:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-04-29 17:10:29 (GMT)
commit1032b7c9d6cbd0ac109b72add26d47436eaca035 (patch)
tree1ace5ef998e63259f27836f8c4a08e7445b6b1a1 /hl
parentcc5b2ff93bc5b81993c104e64f3669a4d8f0c0a5 (diff)
downloadhdf5-1032b7c9d6cbd0ac109b72add26d47436eaca035.zip
hdf5-1032b7c9d6cbd0ac109b72add26d47436eaca035.tar.gz
hdf5-1032b7c9d6cbd0ac109b72add26d47436eaca035.tar.bz2
[svn-r12315] Purpose:
Code cleanup, etc. Description: Fix some inconsistent coding in the packet table examples Correct header file issues in C++ packet table wrapper Platforms tested: FreeBSD 4.11 (sleipnir) w/C++ Linux 2.4/64 (mir) w/C++ & FORTRAN
Diffstat (limited to 'hl')
-rw-r--r--hl/c++/src/H5PacketTable.cpp3
-rw-r--r--hl/c++/src/H5PacketTable.h4
-rw-r--r--hl/examples/ptExampleFL.c15
-rw-r--r--hl/examples/ptExampleVL.c3
4 files changed, 10 insertions, 15 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index 0cfdb59..fabe490 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -20,6 +20,9 @@
* February 2004
*/
+/* High-level library internal header file */
+#include "H5HLprivate2.h"
+
#include "H5PacketTable.h"
/********************************/
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index bd3d166..3ce24c4 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -23,8 +23,8 @@
#ifndef H5PTWRAP_H
#define H5PTWRAP_H
-/* High-level library internal header file */
-#include "H5HLprivate2.h"
+/* Public HDF5 header */
+#include "hdf5.h"
#include "H5PTpublic.h"
#include "H5api_adpt.h"
diff --git a/hl/examples/ptExampleFL.c b/hl/examples/ptExampleFL.c
index 9831dd6..87c0f59 100644
--- a/hl/examples/ptExampleFL.c
+++ b/hl/examples/ptExampleFL.c
@@ -38,8 +38,6 @@ int main(void)
/* Buffers to hold data */
int writeBuffer[5];
int readBuffer[5];
- hsize_t nrecords;
- hsize_t chunk_size=1;
/* Initialize buffers */
for(x=0; x<5; x++)
@@ -53,21 +51,17 @@ int main(void)
/* Create a fixed-length packet table within the file */
/* This table's "packets" will be simple integers. */
- ptable = H5PTcreate_fl(fid, "Packet Test Dataset", H5T_NATIVE_INT, chunk_size);
+ ptable = H5PTcreate_fl(fid, "Packet Test Dataset", H5T_NATIVE_INT, (hsize_t)1);
if(ptable == H5I_INVALID_HID)
goto out;
- nrecords=1;
-
/* Write one packet to the packet table */
- err = H5PTappend(ptable, nrecords, &(writeBuffer[0]) );
+ err = H5PTappend(ptable, (hsize_t)1, &(writeBuffer[0]) );
if(err < 0)
goto out;
- nrecords=4;
-
/* Write several packets to the packet table */
- err = H5PTappend(ptable, nrecords, &(writeBuffer[1]) );
+ err = H5PTappend(ptable, (hsize_t)4, &(writeBuffer[1]) );
if(err < 0)
goto out;
@@ -83,11 +77,10 @@ int main(void)
if(err < 0)
goto out;
- nrecords=1;
/* Iterate through packets, read each one back */
for(x=0; x<5; x++)
{
- err = H5PTget_next(ptable, nrecords, &(readBuffer[x]) );
+ err = H5PTget_next(ptable, (hsize_t)1, &(readBuffer[x]) );
if(err < 0)
goto out;
diff --git a/hl/examples/ptExampleVL.c b/hl/examples/ptExampleVL.c
index 183497e..f33a469 100644
--- a/hl/examples/ptExampleVL.c
+++ b/hl/examples/ptExampleVL.c
@@ -37,7 +37,6 @@ int main(void)
/* Buffers to hold data */
hvl_t writeBuffer[5];
hvl_t readBuffer[5];
- hsize_t chunk_size=1;
/* This example has two different sizes of "record": longs and shorts */
long longBuffer[5];
@@ -68,7 +67,7 @@ int main(void)
fid=H5Fcreate("packet_table_VLexample.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
/* Create a variable-length packet table within the file */
- ptable = H5PTcreate_vl(fid, "Packet Test Dataset", chunk_size);
+ ptable = H5PTcreate_vl(fid, "Packet Test Dataset", (hsize_t)1);
if(ptable == H5I_INVALID_HID)
goto out;