diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-11-16 15:29:54 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-11-16 15:29:54 (GMT) |
commit | 841e168a04f14d5ce79713c2937e4cadb543ef0e (patch) | |
tree | 0b9511e36bc033d97c06368fdf5f50c863203b3e /src | |
parent | c3570e984a10701abcef85f3ada67b76d602c4cf (diff) | |
download | hdf5-841e168a04f14d5ce79713c2937e4cadb543ef0e.zip hdf5-841e168a04f14d5ce79713c2937e4cadb543ef0e.tar.gz hdf5-841e168a04f14d5ce79713c2937e4cadb543ef0e.tar.bz2 |
[svn-r914] Changes since 19981113
----------------------
./config/conclude.in
./test/Makefile.in
./tools/Makefile.in
The Makefile $TESTS variable has finally been split into
$TEST_PROGS and $TEST_SCRIPTS with the latter being the names
of shell scripts that need to be run with `/bin/sh'. Now we
don't have to copy each shell script before we run it. NOTE:
THIS CHANGE DOES NOT AFFECT THE PABLO MAKEFILE SINCE THAT FILE
IS A COPY OF A PREVIOUSLY GENERATED MAKEFILE.
./src/Makefile.in
Added H5Snone.c to the source list.
./src/H5G.c
Plugged a memory leak by emptying the object type "isa" table
when the library is closed.
./src/H5Tconv.c
./src/H5Tpkg.h
Added 48 new type functions to take advantage of hardware for
integer type conversions. These functions are not registered
in the conversion table yet because I haven't fully tested
them.
./src/H5Tpkg.h
Removed __unused__ qualifiers from prototypes.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5G.c | 10 | ||||
-rw-r--r-- | src/H5Tconv.c | 1652 | ||||
-rw-r--r-- | src/H5Tpkg.h | 121 | ||||
-rw-r--r-- | src/Makefile.in | 6 |
4 files changed, 1779 insertions, 10 deletions
@@ -720,6 +720,16 @@ H5G_init_interface(void) static void H5G_term_interface(void) { + size_t i; + + /* Empty the object type table */ + for (i=0; i<H5G_ntypes_g; i++) { + H5MM_xfree(H5G_type_g[i].desc); + } + H5G_ntypes_g = H5G_atypes_g = 0; + H5G_type_g = H5MM_xfree(H5G_type_g); + + /* Destroy the group object id group */ H5I_destroy_group(H5I_GROUP); } diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 2e34c36..1c631e3 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -29,6 +29,364 @@ typedef struct H5T_conv_struct_t { static intn interface_initialize_g = FALSE; #define INTERFACE_INIT NULL +/* + * These macros are for the bodies of functions that convert buffers of one + * integer type to another using hardware. They all start with `H5T_CONV_' + * and end with two letters that represent the source and destination types, + * respectively. The letters `s' and `S' refer to signed values while the + * letters `u' and `U' refer to unsigned values. The letter which is + * capitalized indicates that the corresponding type (source or destination) + * is at least as large as the other type. Certain conversions may + * experience overflow conditions which arise when the source value has a + * magnitude that cannot be represented by the destination type. + * + * Suffix Description + * ------ ----------- + * sS: Signed integers to signed integers where the destination is + * at least as wide as the source. This case cannot generate + * overflows. + * + * sU: Signed integers to unsigned integers where the destination is + * at least as wide as the source. This case experiences + * overflows when the source value is negative. + * + * uS: Unsigned integers to signed integers where the destination is + * at least as wide as the source. This case can experience + * overflows when the source and destination are the same size. + * + * uU: Unsigned integers to unsigned integers where the destination + * is at least as wide as the source. Overflows are not + * possible in this case. + * + * Ss: Signed integers to signed integers where the source is at + * least as large as the destination. Overflows can occur when + * the destination is narrower than the source. + * + * Su: Signed integers to unsigned integers where the source is at + * least as large as the destination. Overflows occur when the + * source value is negative and can also occur if the + * destination is narrower than the source. + * + * Us: Unsigned integers to signed integers where the source is at + * least as large as the destination. Overflows can occur for + * all sizes. + * + * Uu: Unsigned integers to unsigned integers where the source is at + * least as large as the destination. Overflows can occur if the + * destination is narrower than the source. + * + * The macros take a subset of these arguments in the order listed here: + * + * CDATA: A pointer to the H5T_cdata_t structure that was passed to the + * conversion function. + * + * S_ID: The hid_t value for the source data type. + * + * D_ID: The hid_t value for the destination data type. + * + * BUF: A pointer to the conversion buffer. + * + * NELMTS: The number of values to be converted. + * + * ST: The C name for source data type (e.g., int) + * + * DT: The C name for the destination data type (e.g., signed char) + * + * D_MIN: The minimum possible destination value. For unsigned + * destination types this should be zero. For signed + * destination types it's a negative value with a magnitude that + * is usually one greater than D_MAX. Source values which are + * smaller than D_MIN generate overflows. + * + * D_MAX: The maximum possible destination value. Source values which + * are larger than D_MAX generate overflows. + * + */ + +#define H5T_CONV_sS(CDATA,BUF,NELMTS,ST,DT) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)<=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF)+(NELMTS); \ + d = (DT*)(BUF)+(NELMTS); \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++) { \ + *--d = *--s; \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_sU(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)<=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF)+(NELMTS)-1; \ + d = (DT*)(BUF)+(NELMTS)-1; \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++, --s, --d) { \ + if (*s<0) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = 0; \ + } \ + } else { \ + *d = *s; \ + } \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_uS(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)<=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF)+(NELMTS)-1; \ + d = (DT*)(BUF)+(NELMTS)-1; \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++, --s, --d) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = (D_MAX); \ + } \ + } else { \ + *d = *s; \ + } \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_uU(CDATA,BUF,NELMTS,ST,DT) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)<=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF)+(NELMTS); \ + d = (DT*)(BUF)+(NELMTS); \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++) { \ + *--d = *--s; \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_Ss(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MIN,D_MAX) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)>=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF); \ + d = (DT*)(BUF); \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = (D_MAX); \ + } \ + } else if (*s < (D_MIN)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = (D_MIN); \ + } \ + } else { \ + *d = *s; \ + } \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_Su(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)>=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF); \ + d = (DT*)(BUF); \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ + if (sizeof(ST)>sizeof(DT) && *s>(D_MAX)) {/*sign vs. unsign ok*/ \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = (D_MAX); \ + } \ + } else if (*s < 0) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = 0; \ + } \ + } else { \ + *d = *s; \ + } \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_Us(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)>=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF); \ + d = (DT*)(BUF); \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = (D_MAX); \ + } \ + } else { \ + *d = *s; \ + } \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + +#define H5T_CONV_Uu(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ + size_t elmtno; /*element number */ \ + ST *s; /*source buffer */ \ + DT *d; /*destination buffer */ \ + \ + assert(sizeof(ST)>=sizeof(DT)); \ + switch ((CDATA)->command) { \ + case H5T_CONV_INIT: \ + (CDATA)->need_bkg = H5T_BKG_NO; \ + break; \ + \ + case H5T_CONV_FREE: \ + break; \ + \ + case H5T_CONV_CONV: \ + s = (ST*)(BUF); \ + d = (DT*)(BUF); \ + \ + for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ + *d = (D_MAX); \ + } \ + } else { \ + *d = *s; \ + } \ + } \ + break; \ + \ + default: \ + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ + "unknown conversion command"); \ + } \ +} + /*------------------------------------------------------------------------- * Function: H5T_conv_noop * @@ -1532,7 +1890,1299 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, H5MM_xfree(dbuf); FUNC_LEAVE(ret_value); } - + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_short + * + * Purpose: Convertes `signed char' to `short' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_short(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_char_short, FAIL); + H5T_CONV_sS(cdata, buf, nelmts, signed char, short); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_ushort + * + * Purpose: Convertes `signed char' to `unsigned short' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_char_ushort, FAIL); + H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + signed char, unsigned short); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_short + * + * Purpose: Converts `unsigned char' to `short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uchar_short, FAIL); + H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, + unsigned char, short, SHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_ushort + * + * Purpose: Converts `unsigned char' to `unsigned short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_ushort(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uchar_ushort, FAIL); + H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned short); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_int + * + * Purpose: Converts `signed char' to `int' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_int(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_char_int, FAIL); + H5T_CONV_sS(cdata, buf, nelmts, signed char, int); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_uint + * + * Purpose: Convertes `signed char' to `unsigned int' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_char_uint, FAIL); + H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, signed char, unsigned); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_int + * + * Purpose: Convertes `unsigned char' to `int' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uchar_int, FAIL); + H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, + unsigned char, int, INT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_uint + * + * Purpose: Converts `unsigned char' to `unsigned int' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_uint(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uchar_uint, FAIL); + H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_long + * + * Purpose: Converts `signed char' to `long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_char_long, FAIL); + H5T_CONV_sS(cdata, buf, nelmts, signed char, long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_ulong + * + * Purpose: Convertes `signed char' to `unsigned long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_char_ulong, FAIL); + H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + signed char, unsigned long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_long + * + * Purpose: Convertes `unsigned char' to `long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uchar_long, FAIL); + H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, + unsigned char, long, LONG_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_ulong + * + * Purpose: Converts `unsigned char' to `unsigned long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uchar_ulong, FAIL); + H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_char + * + * Purpose: Converts `short' to `signed char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_short_char, FAIL); + H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, + short, signed char, CHAR_MIN, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_uchar + * + * Purpose: Converts `short' to `unsigned char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_short_uchar, FAIL); + H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, + short, unsigned char, UCHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_char + * + * Purpose: Converts `unsigned short' to `signed char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ushort_char, FAIL); + H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, + unsigned short, signed char, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_uchar + * + * Purpose: Converts `unsigned short' to `unsigned char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ushort_uchar, FAIL); + H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, + unsigned short, unsigned char, UCHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_int + * + * Purpose: Converts `short' to `int' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_int(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_short_int, FAIL); + H5T_CONV_sS(cdata, buf, nelmts, short, int); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_uint + * + * Purpose: Convertes `short' to `unsigned int' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_short_uint, FAIL); + H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, short, unsigned); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_int + * + * Purpose: Convertes `unsigned short' to `int' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ushort_int, FAIL); + H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, + unsigned short, int, INT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_uint + * + * Purpose: Converts `unsigned short' to `unsigned int' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_uint(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ushort_uint, FAIL); + H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_long + * + * Purpose: Converts `short' to `long' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_short_long, FAIL); + H5T_CONV_sS(cdata, buf, nelmts, short, long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_ulong + * + * Purpose: Convertes `short' to `unsigned long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_short_ulong, FAIL); + H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, short, unsigned long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_long + * + * Purpose: Convertes `unsigned short' to `long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ushort_long, FAIL); + H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, + unsigned short, long, LONG_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_ulong + * + * Purpose: Converts `unsigned short' to `unsigned long' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ushort_ulong, FAIL); + H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_char + * + * Purpose: Converts `int' to `signed char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_int_char, FAIL); + H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, + int, signed char, CHAR_MIN, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_uchar + * + * Purpose: Converts `int' to `unsigned char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_int_uchar, FAIL); + H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, + int, unsigned char, UCHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_char + * + * Purpose: Converts `unsigned int' to `signed char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uint_char, FAIL); + H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, + unsigned, signed char, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_uchar + * + * Purpose: Converts `unsigned int' to `unsigned char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uint_uchar, FAIL); + H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, + unsigned, unsigned char, UCHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_short + * + * Purpose: Converts `int' to `short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_int_short, FAIL); + H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, + int, short, SHRT_MIN, SHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_ushort + * + * Purpose: Converts `int' to `unsigned short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_int_ushort, FAIL); + H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, + int, unsigned short, USHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_short + * + * Purpose: Converts `unsigned int' to `short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uint_short, FAIL); + H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, + unsigned, short, SHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_ushort + * + * Purpose: Converts `unsigned int' to `unsigned short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uint_ushort, FAIL); + H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, + unsigned, unsigned short, USHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_long + * + * Purpose: Converts `int' to `long' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_int_long, FAIL); + H5T_CONV_sS(cdata, buf, nelmts, int, long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_ulong + * + * Purpose: Convertes `int' to `unsigned long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_int_ulong, FAIL); + H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, int, unsigned long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_long + * + * Purpose: Convertes `unsigned int' to `long' + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uint_long, FAIL); + H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, + unsigned, long, LONG_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_ulong + * + * Purpose: Converts `unsigned int' to `unsigned long' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, + H5T_cdata_t *cdata, size_t nelmts, void *buf, + void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_uint_ulong, FAIL); + H5T_CONV_uU(cdata, buf, nelmts, unsigned, unsigned long); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_char + * + * Purpose: Converts `long' to `signed char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_long_char, FAIL); + H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, + long, signed char, CHAR_MIN, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_uchar + * + * Purpose: Converts `long' to `unsigned char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_long_uchar, FAIL); + H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, + long, unsigned char, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_char + * + * Purpose: Converts `unsigned long' to `signed char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ulong_char, FAIL); + H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, + unsigned long, signed char, CHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_uchar + * + * Purpose: Converts `unsigned long' to `unsigned char' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ulong_uchar, FAIL); + H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, + unsigned long, unsigned char, UCHAR_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_short + * + * Purpose: Converts `long' to `short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_long_short, FAIL); + H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, + long, short, SHRT_MIN, SHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_ushort + * + * Purpose: Converts `long' to `unsigned short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_long_ushort, FAIL); + H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, + long, unsigned short, USHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_short + * + * Purpose: Converts `unsigned long' to `short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ulong_short, FAIL); + H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, + unsigned long, short, SHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_ushort + * + * Purpose: Converts `unsigned long' to `unsigned short' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ulong_ushort, FAIL); + H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, + unsigned long, unsigned short, USHRT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_int + * + * Purpose: Converts `long' to `int' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_long_int, FAIL); + H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, + long, int, INT_MIN, INT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_uint + * + * Purpose: Converts `long' to `unsigned int' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_long_uint, FAIL); + H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, + long, unsigned, UINT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_int + * + * Purpose: Converts `unsigned long' to `int' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ulong_int, FAIL); + H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, + unsigned long, int, INT_MAX); + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_uint + * + * Purpose: Converts `unsigned long' to `unsigned int' + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Robb Matzke + * Friday, November 13, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) +{ + FUNC_ENTER(H5T_conv_ulong_uint, FAIL); + H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, + unsigned long, unsigned, UINT_MAX); + FUNC_LEAVE(SUCCEED); +} + /*------------------------------------------------------------------------- * Function: H5T_conv_float_double diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 2c7621b..13fa389 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -135,17 +135,126 @@ herr_t H5T_conv_order (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, herr_t H5T_conv_struct (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *_buf, void *bkg); herr_t H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, void *_buf, void __unused__ *bkg); + size_t nelmts, void *_buf, void *bkg); herr_t H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, void *_buf, void __unused__ *bkg); + size_t nelmts, void *_buf, void *bkg); herr_t H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, void *_buf, void __unused__ *bkg); + size_t nelmts, void *_buf, void *bkg); + +herr_t H5T_conv_char_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_char_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_char_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_char_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_char_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_char_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_short_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ushort_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_int_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uint_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_long_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ulong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + +herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); +herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void *bkg); + herr_t H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, void *buf, void __unused__ *bkg); + size_t nelmts, void *buf, void *bkg); herr_t H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, void *buf, void __unused__ *bkg); + size_t nelmts, void *buf, void *bkg); herr_t H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, void *_buf, void __unused__ *bkg); + size_t nelmts, void *_buf, void *bkg); /* Bit twiddling functions */ void H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src, diff --git a/src/Makefile.in b/src/Makefile.in index d6629a6..d5c152e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -19,9 +19,9 @@ LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5E.c H5F.c H5Farray.c H5Fcore.c \ H5Fstdio.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c H5I.c H5MF.c \ H5MM.c H5O.c H5Oattr.c H5Ocomp.c H5Ocont.c H5Odtype.c H5Oefl.c H5Ofill.c \ H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c H5Osdspace.c H5Oshared.c \ - H5Ostab.c H5P.c H5R.c H5RA.c H5S.c H5Sall.c H5Shyper.c H5Smpio.c H5Snone.c \ - H5Spoint.c H5Sselect.c H5T.c H5Tbit.c H5Tconv.c H5Tinit.c H5TB.c H5V.c \ - H5Z.c + H5Ostab.c H5P.c H5R.c H5RA.c H5S.c H5Sall.c H5Shyper.c H5Smpio.c \ + H5Snone.c H5Spoint.c H5Sselect.c H5T.c H5Tbit.c H5Tconv.c H5Tinit.c \ + H5TB.c H5V.c H5Z.c LIB_OBJ=$(LIB_SRC:.c=.o) |