From 98d698cd264646e278abff20e3e6040aa181bb03 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 24 Jul 2007 14:14:11 -0500 Subject: [svn-r14005] Description: Rename H5Titerate.c source file to H5Tvisit.c, which is more descriptive of routine(s) in file. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Mac OS X/32 10.4.10 (amazon) --- MANIFEST | 2 +- src/H5Titerate.c | 155 ------------------------------------------------------- src/H5Tvisit.c | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 4 +- src/Makefile.in | 10 ++-- 5 files changed, 163 insertions(+), 163 deletions(-) delete mode 100644 src/H5Titerate.c create mode 100644 src/H5Tvisit.c diff --git a/MANIFEST b/MANIFEST index 914dc61..a927847 100644 --- a/MANIFEST +++ b/MANIFEST @@ -684,7 +684,6 @@ ./src/H5Tfields.c ./src/H5Tfixed.c ./src/H5Tfloat.c -./src/H5Titerate.c ./src/H5Tnative.c ./src/H5Toffset.c ./src/H5Topaque.c @@ -696,6 +695,7 @@ ./src/H5Tprivate.h ./src/H5Tpublic.h ./src/H5Tstrpad.c +./src/H5Tvisit.c ./src/H5Tvlen.c ./src/H5TS.c ./src/H5TSprivate.h diff --git a/src/H5Titerate.c b/src/H5Titerate.c deleted file mode 100644 index 15a91e3..0000000 --- a/src/H5Titerate.c +++ /dev/null @@ -1,155 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * 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 files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * - * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * Module Info: This module contains most of the "core" functionality of - * the H5T interface, including the API initialization code, etc. - * Many routines that are infrequently used, or are specialized for - * one particular datatype class are in another module. - */ - -/*------------------------------------------------------------------------- - * - * Created: H5Tdbg.c - * Jul 19 2007 - * Quincey Koziol - * - * Purpose: Dump debugging information about a datatype - * - *------------------------------------------------------------------------- - */ - -/****************/ -/* Module Setup */ -/****************/ - -#define H5T_PACKAGE /*suppress error about including H5Tpkg */ - - -/***********/ -/* Headers */ -/***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Tpkg.h" /* Datatypes */ - - -/****************/ -/* Local Macros */ -/****************/ - - -/******************/ -/* Local Typedefs */ -/******************/ - - -/********************/ -/* Package Typedefs */ -/********************/ - - -/********************/ -/* Local Prototypes */ -/********************/ - - -/*********************/ -/* Package Variables */ -/*********************/ - - -/*****************************/ -/* Library Private Variables */ -/*****************************/ - - -/*******************/ -/* Local Variables */ -/*******************/ - - - -/*------------------------------------------------------------------------- - * Function: H5T_visit - * - * Purpose: Visit a datatype and all it's members and/or parents, making - * a callback for each. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Thursday, July 19, 2007 - * - *------------------------------------------------------------------------- - */ -herr_t -H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value) -{ - hbool_t is_complex; /* Flag indicating current datatype is "complex" */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5T_visit, FAIL) - - /* Sanity check */ - HDassert(dt); - HDassert(op); - - /* Check for complex datatype */ - is_complex = H5T_IS_COMPLEX(dt->shared->type); - - /* If the callback is to be made on the datatype first, do that */ - if(is_complex && (visit_flags & H5T_VISIT_COMPLEX_FIRST)) - if(op(dt, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") - - /* Make callback for each member/child, if requested */ - switch(dt->shared->type) { - case H5T_COMPOUND: - { - unsigned u; /* Local index variable */ - - /* Visit each member of the compound datatype */ - for(u = 0; u < dt->shared->u.compnd.nmembs; u++) - if(H5T_visit(dt->shared->u.compnd.memb[u].type, visit_flags, op, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit member datatype") - } /* end case */ - break; - - case H5T_ARRAY: - case H5T_VLEN: - case H5T_ENUM: - /* Visit parent type */ - if(H5T_visit(dt->shared->parent, visit_flags, op, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype") - break; - - default: - /* Visit "simple" datatypes here */ - if(visit_flags & H5T_VISIT_SIMPLE) - if(op(dt, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") - break; - } /* end switch */ - - /* If the callback is to be made on the datatype last, do that */ - if(is_complex && (visit_flags & H5T_VISIT_COMPLEX_LAST)) - if(op(dt, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5T_iterate() */ - diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c new file mode 100644 index 0000000..bd30a43 --- /dev/null +++ b/src/H5Tvisit.c @@ -0,0 +1,155 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Module Info: This module contains most of the "core" functionality of + * the H5T interface, including the API initialization code, etc. + * Many routines that are infrequently used, or are specialized for + * one particular datatype class are in another module. + */ + +/*------------------------------------------------------------------------- + * + * Created: H5Tvisit.c + * Jul 19 2007 + * Quincey Koziol + * + * Purpose: Visit all the components of a datatype + * + *------------------------------------------------------------------------- + */ + +/****************/ +/* Module Setup */ +/****************/ + +#define H5T_PACKAGE /*suppress error about including H5Tpkg */ + + +/***********/ +/* Headers */ +/***********/ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Tpkg.h" /* Datatypes */ + + +/****************/ +/* Local Macros */ +/****************/ + + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Package Typedefs */ +/********************/ + + +/********************/ +/* Local Prototypes */ +/********************/ + + +/*********************/ +/* Package Variables */ +/*********************/ + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/*******************/ +/* Local Variables */ +/*******************/ + + + +/*------------------------------------------------------------------------- + * Function: H5T_visit + * + * Purpose: Visit a datatype and all it's members and/or parents, making + * a callback for each. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * Thursday, July 19, 2007 + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value) +{ + hbool_t is_complex; /* Flag indicating current datatype is "complex" */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_visit, FAIL) + + /* Sanity check */ + HDassert(dt); + HDassert(op); + + /* Check for complex datatype */ + is_complex = H5T_IS_COMPLEX(dt->shared->type); + + /* If the callback is to be made on the datatype first, do that */ + if(is_complex && (visit_flags & H5T_VISIT_COMPLEX_FIRST)) + if(op(dt, op_value) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") + + /* Make callback for each member/child, if requested */ + switch(dt->shared->type) { + case H5T_COMPOUND: + { + unsigned u; /* Local index variable */ + + /* Visit each member of the compound datatype */ + for(u = 0; u < dt->shared->u.compnd.nmembs; u++) + if(H5T_visit(dt->shared->u.compnd.memb[u].type, visit_flags, op, op_value) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit member datatype") + } /* end case */ + break; + + case H5T_ARRAY: + case H5T_VLEN: + case H5T_ENUM: + /* Visit parent type */ + if(H5T_visit(dt->shared->parent, visit_flags, op, op_value) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype") + break; + + default: + /* Visit "simple" datatypes here */ + if(visit_flags & H5T_VISIT_SIMPLE) + if(op(dt, op_value) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") + break; + } /* end switch */ + + /* If the callback is to be made on the datatype last, do that */ + if(is_complex && (visit_flags & H5T_VISIT_COMPLEX_LAST)) + if(op(dt, op_value) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5T_iterate() */ + diff --git a/src/Makefile.am b/src/Makefile.am index b52afbc..a00dc05 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,10 +82,10 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c H5Tcompound.c H5Tconv.c \ H5Tcset.c H5Tdbg.c H5Tdeprec.c H5Tenum.c H5Tfields.c \ H5Tfixed.c \ - H5Tfloat.c H5Tinit.c H5Titerate.c H5Tnative.c H5Toffset.c H5Toh.c \ + H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c \ H5Topaque.c \ H5Torder.c \ - H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TS.c H5V.c H5WB.c H5Z.c \ + H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c H5Tvlen.c H5TS.c H5V.c H5WB.c H5Z.c \ H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zszip.c \ H5Zscaleoffset.c H5Ztrans.c diff --git a/src/Makefile.in b/src/Makefile.in index ce657cf..89f99bf 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -113,8 +113,8 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5SMcache.lo H5SMtest.lo H5ST.lo H5T.lo H5Tarray.lo H5Tbit.lo \ H5Tcommit.lo H5Tcompound.lo H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo \ H5Tenum.lo H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo \ - H5Titerate.lo H5Tnative.lo H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo \ - H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo H5Tvlen.lo H5TS.lo H5V.lo \ + H5Tnative.lo H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo \ + H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo H5V.lo \ H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo H5Znbit.lo \ H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo H5Ztrans.lo libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS) @@ -436,9 +436,9 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5SMcache.c H5SMtest.c H5ST.c H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c \ H5Tcompound.c H5Tconv.c H5Tcset.c H5Tdbg.c H5Tdeprec.c H5Tenum.c H5Tfields.c \ H5Tfixed.c \ - H5Tfloat.c H5Tinit.c H5Titerate.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ + H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \ H5Torder.c \ - H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TS.c H5V.c H5WB.c H5Z.c \ + H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvisit.c H5Tvlen.c H5TS.c H5V.c H5WB.c H5Z.c \ H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zszip.c \ H5Zscaleoffset.c H5Ztrans.c @@ -752,7 +752,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tfixed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tfloat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Titerate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tnative.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Toffset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Toh.Plo@am__quote@ @@ -761,6 +760,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tpad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tprecis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tstrpad.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvisit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tvlen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ -- cgit v0.12