diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-01-14 19:42:59 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-01-14 19:42:59 (GMT) |
commit | d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d (patch) | |
tree | 5b7750fffd98153d874bb28daad40c49ac977eeb /src/H5Dconv.c | |
parent | 1063eb8a1ea0cbdbdc4244f0627b94b3096d65ab (diff) | |
download | hdf5-d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d.zip hdf5-d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d.tar.gz hdf5-d70c7d7a64b821f9d3532cc01c7a7fa934f2a17d.tar.bz2 |
[svn-r153] Changes since 19980108
----------------------
./MANIFEST
./src/H5Dconv.c [REMOVED]
./src/H5Tconv.c [NEW]
./src/Makefile.in
Changed H5Dconv.c to H5Tconv.c
./html/Datatypes.html
Updated data type conversion section.
./html/H5.apiv2.html
Removed sections about datasets and data types since they're
covered in their own chapters.
./src/H5D.c
Supports data type conversion.
./src/H5Odtype.c
./src/H5Tpkg.h
Changed `lo_pad' and `hi_pad' to `lsb_pad' and `msb_pad'.
./src/H5T.c
./src/H5Tpkg.h
./src/H5Tprivate.h
./src/H5Tpublic.h
./src/H5detect.c
Added predefined data types. Added query/set more
properties. Added type conversion infrastructure.
./test/dsets.c
Tests data type conversion during read.
Diffstat (limited to 'src/H5Dconv.c')
-rw-r--r-- | src/H5Dconv.c | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/src/H5Dconv.c b/src/H5Dconv.c deleted file mode 100644 index 5f9ee36..0000000 --- a/src/H5Dconv.c +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -* NCSA HDF * -* Software Development Group * -* National Center for Supercomputing Applications * -* University of Illinois at Urbana-Champaign * -* 605 E. Springfield, Champaign IL 61820 * -* * -* For conditions of distribution and use, see the accompanying * -* hdf/COPYING file. * -* * -****************************************************************************/ - -#ifdef RCSID -static char RcsId[] = "@(#)$Revision$"; -#endif - -/* $Id$ */ - -/*LINTLIBRARY */ -/*+ - FILE - H5Dconv.c - HDF5 trivial datatype converion routines - - EXPORTED ROUTINES - - LIBRARY-SCOPED ROUTINES - - LOCAL ROUTINES - + */ - -#include <H5private.h> /* Generic Functions */ -#include <H5Dprivate.h> /* Dataset functions */ -#include <H5Eprivate.h> /* Error handling */ - -#define PABLO_MASK H5D_mask - -/*--------------------- Locally scoped variables -----------------------------*/ - -/* Interface initialization */ -static intn interface_initialize_g = FALSE; -#define INTERFACE_INIT NULL - -/*-------------------------------------------------------------------------- - NAME - H5D_convert_buf - PURPOSE - Byte-Swap a buffer of data - USAGE - herr_t H5D_convert_buf(dst, src, len, size) - VOIDP dst; OUT: Buffer to fill with converted data - VOIDP src; IN: Buffer to converted data from - uintn len; IN: Number of bytes to convert - uintn size; IN: Size of quantity to byte-swap - RETURNS - SUCCEED/FAIL - DESCRIPTION - This function is a byte-swapping memcpy. ---------------------------------------------------------------------------*/ -herr_t H5D_convert_buf(void *dst, const void *src, uintn len, uintn size) -{ - const char *s=(const char *)src; - char *d=(char *)dst; - herr_t ret_value = SUCCEED; - - FUNC_ENTER(H5D_convert_buf, FAIL); - - /* Clear errors and check args and all the boring stuff. */ - H5ECLEAR; - assert(dst); - assert(src); - assert(len>0); - assert(size==8 || size==4 || size==2 || size==1); - - switch(size) - { - case 1: /* straight memcpy() */ - HDmemcpy(d,s,len); - break; - - case 2: /* 2-byte swapping */ - while(len>0) - { - *d++=*(s+1); - *d++=*s; - s+=2; - len-=2; - } /* end while */ - break; - - case 4: /* 4-byte swapping */ - while(len>0) - { - *d++=*(s+3); - *d++=*(s+2); - *d++=*(s+1); - *d++=*s; - s+=4; - len-=4; - } /* end while */ - break; - - case 8: /* 8-byte swapping */ - while(len>0) - { - *d++=*(s+7); - *d++=*(s+6); - *d++=*(s+5); - *d++=*(s+4); - *d++=*(s+3); - *d++=*(s+2); - *d++=*(s+1); - *d++=*s; - s+=8; - len-=8; - } /* end while */ - break; - - default: - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, - "not implemented yet"); - } /* end switch */ - -done: - if(ret_value == FAIL) - { /* Error condition cleanup */ - - } /* end if */ - - /* Normal function cleanup */ - - FUNC_LEAVE(ret_value); -} /* end H5D_convert_buf() */ |