summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2001-06-09 05:05:30 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2001-06-09 05:05:30 (GMT)
commit0aa301010a62af416de9dc7b7f8504d98d5dae4e (patch)
tree6f55a41aec45679c864ec7e29d3ac1ea00617866
parent1bac62e0de74cdf9f251e8e833cddd483ad5159b (diff)
downloadhdf5-0aa301010a62af416de9dc7b7f8504d98d5dae4e.zip
hdf5-0aa301010a62af416de9dc7b7f8504d98d5dae4e.tar.gz
hdf5-0aa301010a62af416de9dc7b7f8504d98d5dae4e.tar.bz2
[svn-r3980] property list modification for image and palette
-rw-r--r--src/H5P.c36
-rw-r--r--src/H5Ppublic.h78
2 files changed, 77 insertions, 37 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 1262b7f..442f40c 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -27,6 +27,11 @@
/* Default file driver - see H5Pget_driver() */
#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
+#include "H5IMimage.h"
+#include "H5IMpalette.h"
+
+
+
#ifdef WANT_H5_V1_2_COMPAT
/* Other predefined file drivers */
#include "H5FDcore.h" /* Files stored entirely in memory */
@@ -341,6 +346,13 @@ H5Pcreate(H5P_class_t type)
case H5P_MOUNT:
src = &H5F_mount_dflt;
break;
+ /*pvn*/
+ case H5P_IMAGE:
+ src = &H5IM_create_dflt8bit;
+ break;
+ case H5P_PALETTE:
+ src = &H5IM_create_dfltpalette;
+ break;
default:
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"unknown property list class");
@@ -502,6 +514,13 @@ H5P_close(void *_plist)
case H5P_MOUNT:
break;
+ case H5P_IMAGE:
+ break;
+
+ case H5P_PALETTE:
+ break;
+
+
default:
HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL,
"unknown property list class");
@@ -689,6 +708,15 @@ H5P_copy (H5P_class_t type, const void *src)
size = sizeof(H5F_mprop_t);
break;
+ /*pvn*/
+ case H5P_IMAGE:
+ size = sizeof(H5IM_imageinfo_t);
+ break;
+
+ case H5P_PALETTE:
+ size = sizeof(H5IM_paletteinfo_t);
+ break;
+
default:
HRETURN_ERROR(H5E_ARGS, H5E_BADRANGE, NULL,
"unknown property list class");
@@ -759,6 +787,14 @@ H5P_copy (H5P_class_t type, const void *src)
/* Nothing to do */
break;
+ case H5P_IMAGE:
+ /* Nothing to do */
+ break;
+
+ case H5P_PALETTE:
+ /* Nothing to do */
+ break;
+
default:
HRETURN_ERROR(H5E_ARGS, H5E_BADRANGE, NULL,
"unknown property list class");
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 60fe44f..d4749b0 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -29,15 +29,19 @@
#include "H5MMpublic.h"
#include "H5Zpublic.h"
+/*pvn*/
+
/* Property list classes */
typedef enum H5P_class_t {
H5P_NO_CLASS = -1, /*error return value */
H5P_FILE_CREATE = 0, /*file creation properties */
H5P_FILE_ACCESS = 1, /*file access properties */
H5P_DATASET_CREATE = 2, /*dataset creation properties */
- H5P_DATASET_XFER = 3, /*data transfer properties */
- H5P_MOUNT = 4, /*file mounting properties */
- H5P_NCLASSES = 5 /*this must be last! */
+ H5P_DATASET_XFER = 3, /*data transfer properties */
+ H5P_MOUNT = 4, /*file mounting properties */
+ H5P_IMAGE = 5, /*image properties */
+ H5P_PALETTE = 6, /*palette properties */
+ H5P_NCLASSES = 7 /*this must be last! */
} H5P_class_t;
/* H5P_DATASET_XFER was the name from the beginning through 1.2. It was
@@ -69,9 +73,9 @@ extern "C" {
/*
* The library created property list classes
*/
-#define H5P_NO_CLASS_NEW (H5open(), H5P_NO_CLASS_g)
+#define H5P_NO_CLASS_NEW (H5open(), H5P_NO_CLASS_g)
#define H5P_NO_CLASS_HASH_SIZE 1 /* 1, not 0, otherwise allocations get weird */
-#define H5P_FILE_CREATE_NEW (H5open(), H5P_FILE_CREATE_g)
+#define H5P_FILE_CREATE_NEW (H5open(), H5P_FILE_CREATE_g)
#define H5P_FILE_CREATE_HASH_SIZE 17
#define H5P_FILE_ACCESS_NEW (H5open(), H5P_FILE_ACCESS_g)
#define H5P_FILE_ACCESS_HASH_SIZE 17
@@ -121,18 +125,18 @@ __DLL__ herr_t H5Pclose(hid_t plist_id);
__DLL__ hid_t H5Pcopy(hid_t plist_id);
__DLL__ H5P_class_t H5Pget_class(hid_t plist_id);
__DLL__ herr_t H5Pget_version(hid_t plist_id, int *boot/*out*/,
- int *freelist/*out*/, int *stab/*out*/,
- int *shhdr/*out*/);
+ int *freelist/*out*/, int *stab/*out*/,
+ int *shhdr/*out*/);
__DLL__ herr_t H5Pset_userblock(hid_t plist_id, hsize_t size);
__DLL__ herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size);
__DLL__ herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold,
- hsize_t alignment);
+ hsize_t alignment);
__DLL__ herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
- hsize_t *alignment/*out*/);
+ hsize_t *alignment/*out*/);
__DLL__ herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr,
- size_t sizeof_size);
+ size_t sizeof_size);
__DLL__ herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr/*out*/,
- size_t *sizeof_size/*out*/);
+ size_t *sizeof_size/*out*/);
__DLL__ herr_t H5Pset_sym_k(hid_t plist_id, int ik, int lk);
__DLL__ herr_t H5Pget_sym_k(hid_t plist_id, int *ik/*out*/, int *lk/*out*/);
__DLL__ herr_t H5Pset_istore_k(hid_t plist_id, int ik);
@@ -142,13 +146,13 @@ __DLL__ H5D_layout_t H5Pget_layout(hid_t plist_id);
__DLL__ herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[]);
__DLL__ int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/);
__DLL__ herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset,
- hsize_t size);
+ hsize_t size);
__DLL__ int H5Pget_external_count(hid_t plist_id);
__DLL__ herr_t H5Pget_external(hid_t plist_id, int idx, size_t name_size,
- char *name/*out*/, off_t *offset/*out*/,
- hsize_t *size/*out*/);
+ char *name/*out*/, off_t *offset/*out*/,
+ hsize_t *size/*out*/);
__DLL__ herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id,
- const void *driver_info);
+ const void *driver_info);
#if defined(WANT_H5_V1_2_COMPAT) || defined(H5_WANT_H5_V1_2_COMPAT)
__DLL__ H5F_driver_t H5Pget_driver(hid_t plist_id);
__DLL__ herr_t H5Pset_stdio(hid_t plist_id);
@@ -158,13 +162,13 @@ __DLL__ herr_t H5Pget_sec2(hid_t plist_id);
__DLL__ herr_t H5Pset_core(hid_t plist_id, size_t increment);
__DLL__ herr_t H5Pget_core(hid_t plist_id, size_t *increment/*out*/);
__DLL__ herr_t H5Pset_split(hid_t plist_id, const char *meta_ext, hid_t meta_plist_id,
- const char *raw_ext, hid_t raw_plist_id);
+ const char *raw_ext, hid_t raw_plist_id);
__DLL__ herr_t H5Pget_split(hid_t plist_id, size_t meta_ext_size, char *meta_ext/*out*/,
- hid_t *meta_properties/*out*/, size_t raw_ext_size,
- char *raw_ext/*out*/, hid_t *raw_properties/*out*/);
+ hid_t *meta_properties/*out*/, size_t raw_ext_size,
+ char *raw_ext/*out*/, hid_t *raw_properties/*out*/);
__DLL__ herr_t H5Pset_family(hid_t plist_id, hsize_t memb_size, hid_t memb_plist_id);
__DLL__ herr_t H5Pget_family(hid_t plist_id, hsize_t *memb_size/*out*/,
- hid_t *memb_plist_id/*out*/);
+ hid_t *memb_plist_id/*out*/);
#ifdef HAVE_PARALLEL
__DLL__ herr_t H5Pset_mpi(hid_t plist_id, MPI_Comm comm, MPI_Info info);
__DLL__ herr_t H5Pget_mpi(hid_t plist_id, MPI_Comm *comm, MPI_Info *info);
@@ -176,39 +180,39 @@ __DLL__ hid_t H5Pget_driver(hid_t plist_id);
#endif /* WANT_H5_V1_2_COMPAT */
__DLL__ void *H5Pget_driver_info(hid_t plist_id);
__DLL__ herr_t H5Pset_buffer(hid_t plist_id, hsize_t size, void *tconv,
- void *bkg);
+ void *bkg);
__DLL__ hsize_t H5Pget_buffer(hid_t plist_id, void **tconv/*out*/,
- void **bkg/*out*/);
+ void **bkg/*out*/);
__DLL__ herr_t H5Pset_preserve(hid_t plist_id, hbool_t status);
__DLL__ int H5Pget_preserve(hid_t plist_id);
__DLL__ herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter,
- unsigned int flags, size_t cd_nelmts,
- const unsigned int c_values[]);
+ unsigned int flags, size_t cd_nelmts,
+ const unsigned int c_values[]);
__DLL__ int H5Pget_nfilters(hid_t plist_id);
__DLL__ H5Z_filter_t H5Pget_filter(hid_t plist_id, int filter,
- unsigned int *flags/*out*/,
- size_t *cd_nelmts/*out*/,
- unsigned cd_values[]/*out*/,
- size_t namelen, char name[]);
+ unsigned int *flags/*out*/,
+ size_t *cd_nelmts/*out*/,
+ unsigned cd_values[]/*out*/,
+ size_t namelen, char name[]);
__DLL__ herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression);
__DLL__ herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, int rdcc_nelmts,
- size_t rdcc_nbytes, double rdcc_w0);
+ size_t rdcc_nbytes, double rdcc_w0);
__DLL__ herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts/*out*/,
- int *rdcc_nelmts/*out*/,
- size_t *rdcc_nbytes/*out*/, double *rdcc_w0);
+ int *rdcc_nelmts/*out*/,
+ size_t *rdcc_nbytes/*out*/, double *rdcc_w0);
__DLL__ herr_t H5Pset_hyper_cache(hid_t plist_id, unsigned cache,
- unsigned limit);
+ unsigned limit);
__DLL__ herr_t H5Pget_hyper_cache(hid_t plist_id, unsigned *cache,
- unsigned *limit);
+ unsigned *limit);
__DLL__ herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle,
- double right);
+ double right);
__DLL__ herr_t H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/,
- double *middle/*out*/,
- double *right/*out*/);
+ double *middle/*out*/,
+ double *right/*out*/);
__DLL__ herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id,
- const void *value);
+ const void *value);
__DLL__ herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id,
- void *value/*out*/);
+ void *value/*out*/);
__DLL__ herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
__DLL__ herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref/*out*/);
__DLL__ herr_t H5Pset_vlen_mem_manager(hid_t plist_id,