HL-HDF
hlhdf_defines_private.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of HLHDF.
5
6HLHDF is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11HLHDF is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with HLHDF. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
19
26#ifndef HLHDF_DEFINES_PRIVATE_H
27#define HLHDF_DEFINES_PRIVATE_H
28#include "hdf5.h"
29
33#define HL_H5G_CLOSE(x) if (x>=0) {H5Gclose(x); x=-1;}
34
38#define HL_H5D_CLOSE(x) if (x>=0) {H5Dclose(x); x=-1;}
39
43#define HL_H5O_CLOSE(x) if (x>=0) {H5Oclose(x); x=-1;}
44
48#define HL_H5A_CLOSE(x) if (x>=0) {H5Aclose(x); x=-1;}
49
53#define HL_H5F_CLOSE(x) if (x>=0) {H5Fclose(x); x=-1;}
54
58#define HL_H5T_CLOSE(x) if (x>=0) {H5Tclose(x); x=-1;}
59
63#define HL_H5S_CLOSE(x) if (x>=0) {H5Sclose(x); x=-1;}
64
68#define HL_H5P_CLOSE(x) if (x>=0) {H5Pclose(x); x=-1;}
69
73#define HLHDF_ALIGN(A,Z) ((((A)+(Z)-1)/(Z))*(Z))
74
78#define DEFAULT_SIZE_NODELIST 20
79
80
81#endif