2 /*--------------------------------------------------------------------+
4 |--------------------------------------------------------------------|
6 |--------------------------------------------------------------------|
7 | First version: 03/04/2012 |
8 +--------------------------------------------------------------------+
10 +--------------------------------------------------------------------------+
11 | / __)( ) /__\ ( \/ ) |
12 | ( (__ )(__ /(__)\ \ / Chunky Loop Alteration wizardrY |
13 | \___)(____)(__)(__)(__) |
14 +--------------------------------------------------------------------------+
15 | Copyright (C) 2012 University of Paris-Sud |
17 | This library is free software; you can redistribute it and/or modify it |
18 | under the terms of the GNU Lesser General Public License as published by |
19 | the Free Software Foundation; either version 2.1 of the License, or |
20 | (at your option) any later version. |
22 | This library is distributed in the hope that it will be useful but |
23 | WITHOUT ANY WARRANTY; without even the implied warranty of |
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser |
25 | General Public License for more details. |
27 | You should have received a copy of the GNU Lesser General Public License |
28 | along with this software; if not, write to the Free Software Foundation, |
29 | Inc., 51 Franklin Street, Fifth Floor, |
30 | Boston, MA 02110-1301 USA |
32 | Clay, the Chunky Loop Alteration wizardrY |
33 | Written by Cedric Bastoul, Cedric.Bastoul@u-psud.fr |
34 +--------------------------------------------------------------------------*/
36 /*--------------------------------------------------------------------------+
37 | THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM macros.h.in BY configure |
38 +--------------------------------------------------------------------------*/
41 # define CLAY_MACROS_H
43 # define CLAY_VERSION "@PACKAGE_VERSION@"
49 /*--------------------------------------------------------------------------+
51 +--------------------------------------------------------------------------*/
53 # define CLAY_info(msg) \
55 fprintf(stderr,"[Clay] Info: "msg" (%s).\n", __func__); \
58 # define CLAY_debug(msg) \
61 fprintf(stderr,"[Clay] Debug: "msg" (%s).\n", __func__); \
64 # define CLAY_debug_call(function_call) \
70 # define CLAY_warning(msg) \
72 fprintf(stderr,"[Clay] Warning: "msg" (%s).\n", __func__); \
75 # define CLAY_error(msg) \
77 fprintf(stderr,"[Clay] Error: "msg" (%s).\n", __func__); \
81 # define CLAY_malloc(ptr, type, size) \
83 if (((ptr) = (type)malloc(size)) == NULL) \
84 CLAY_error("memory overflow"); \
87 # define CLAY_realloc(ptr, type, size) \
89 if (((ptr) = (type)realloc(ptr, size)) == NULL) \
90 CLAY_error("memory overflow"); \
93 # define CLAY_strdup(destination, source) \
95 if (source != NULL) { \
96 if (((destination) = strdup(source)) == NULL) \
97 CLAY_error("memory overflow"); \
100 destination = NULL; \
101 CLAY_debug("strdup of a NULL string"); \
105 # define CLAY_max(x,y) ((x) > (y)? (x) : (y))
107 # define CLAY_min(x,y) ((x) < (y)? (x) : (y))
109 #endif /* define CLAY_MACROS_H */