From 2fd5d5212570686d3aad16e19f7db98ef2cc7193 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 3 Sep 2015 17:20:08 +0200 Subject: [PATCH] src/Fortran/H5_modeul.c: - h5_hasstep(), h5_setstep(): decrement step number by 1 --- src/Fortran/H5_model.c | 8 ++++---- src/include/H5_const.f90 | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Fortran/H5_model.c b/src/Fortran/H5_model.c index 0f7881c..caaa487 100644 --- a/src/Fortran/H5_model.c +++ b/src/Fortran/H5_model.c @@ -21,15 +21,15 @@ int h5_hasstep ( const h5_int64_t* f, - const h5_int64_t* stepno + const h5_int64_t* step ) { h5_file_t fh = h5_filehandlefor2c(f); H5_API_ENTER ( int, "f=%p, stepno=%lld", - (h5_file_p)fh, (long long int)stepno); - H5_API_RETURN (h5_has_step (fh, *stepno)); + (h5_file_p)fh, (long long int)step); + H5_API_RETURN (h5_has_step (fh, (*step)-1)); } #define h5_setstep FC_MANGLING( \ @@ -42,7 +42,7 @@ h5_setstep ( h5_file_t fh = h5_filehandlefor2c(f); H5_API_ENTER (h5_int64_t, "f=%p, step=%lld", (h5_file_p)fh, (long long)*step); - H5_API_RETURN (h5_set_step (fh, *step)); + H5_API_RETURN (h5_set_step (fh, (*step)-1)); } #define h5_getstep FC_MANGLING( \ diff --git a/src/include/H5_const.f90 b/src/include/H5_const.f90 index 9c0b1ee..5db43ce 100644 --- a/src/include/H5_const.f90 +++ b/src/include/H5_const.f90 @@ -1,5 +1,5 @@ ! -! Copyright (c) 2006-2013, The Regents of the University of California, +! Copyright (c) 2006-2015, The Regents of the University of California, ! through Lawrence Berkeley National Laboratory (subject to receipt of any ! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer ! Institut (Switzerland). All rights reserved.! @@ -47,3 +47,10 @@ INTEGER*8, PARAMETER :: H5_ERR_INTERNAL = -253 INTEGER*8, PARAMETER :: H5_ERR_NOT_IMPLEMENTED = -254 + + INTEGER*8, PARAMETER :: H5_VERBOSE_NONE = 0 + INTEGER*8, PARAMETER :: H5_VERBOSE_ERROR = 1 + INTEGER*8, PARAMETER :: H5_VERBOSE_WARN = 2 + INTEGER*8, PARAMETER :: H5_VERBOSE_INFO = 3 + + INTEGER*8, PARAMETER :: H5_VERBOSE_DEFAULT = H5_VERBOSE_ERROR