GIRAFFE Pipeline Reference Manual

gimessages.h
1 /* $Id$
2  *
3  * This file is part of the GIRAFFE Pipeline
4  * Copyright (C) 2002-2006 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author$
23  * $Date$
24  * $Revision$
25  * $Name$
26  */
27 
28 #ifndef GIMESSAGES_H
29 #define GIMESSAGES_H
30 
31 #include <stdarg.h>
32 
33 #include <cxtypes.h>
34 
35 #include <cpl_macros.h>
36 
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /*
43  * Macro to allow the compiler to type-check the arguments of printf like
44  * functions. The arguments of the macro are the position of the format and
45  * the first argument to be checked within the argument list of the function.
46  * The numbering of the arguments of the function start from one.
47  *
48  * It is only made available if gcc is used!
49  */
50 
51 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
52 # define GI_GNUC_PRINTF(format_idx, arg_idx) \
53  __attribute__((format(__printf__, (format_idx), (arg_idx))))
54 #else /* !GNUC */
55 # define GI_GNUC_PRINTF(format_idx, arg_idx)
56 #endif /* !GNUC */
57 
58 
59 #if !defined CX_LOG_DOMAIN
60 # define CX_LOG_DOMAIN "GiraffeLib"
61 #endif
62 
63 
64 void gi_error(const cxchar *, ...) GI_GNUC_PRINTF(1, 2);
65 void gi_critical(const cxchar *, ...) GI_GNUC_PRINTF(1, 2);
66 void gi_warning(const cxchar *, ...) GI_GNUC_PRINTF(1, 2);
67 void gi_message(const cxchar *, ...) GI_GNUC_PRINTF(1, 2);
68 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* GIMESSAGES_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.12.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Mon Mar 24 2014 11:43:52 by doxygen 1.8.2 written by Dimitri van Heesch, © 1997-2004