00001 /* 00002 * This file is part of the ESO UVES Pipeline 00003 * Copyright (C) 2004,2005 European Southern Observatory 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00018 */ 00019 00020 /* 00021 * $Author: amodigli $ 00022 * $Date: 2010/09/24 09:32:04 $ 00023 * $Revision: 1.14 $ 00024 * $Name: uves-5_0_0 $ 00025 * $Log: uves_msg.h,v $ 00026 * Revision 1.14 2010/09/24 09:32:04 amodigli 00027 * put back QFITS dependency to fix problem spot by NRI on FIBER mode (with MIDAS calibs) data 00028 * 00029 * Revision 1.12 2006/02/28 09:15:22 jmlarsen 00030 * Minor update 00031 * 00032 * Revision 1.11 2006/02/21 14:26:54 jmlarsen 00033 * Minor changes 00034 * 00035 * Revision 1.10 2005/12/19 16:17:56 jmlarsen 00036 * Replaced bool -> int 00037 * 00038 */ 00039 #ifndef UVES_MSG_H 00040 #define UVES_MSG_H 00041 00042 #include <uves_utils.h> 00043 00044 /* Nothing bad happens if user also calls cpl_msg_info() 00045 * but maybe prevent it as a service to the user of this module 00046 #define cpl_msg_info(...) use__uves_msg__instead__of__cpl_msg_info 00047 #define cpl_msg_indent() 00048 */ 00049 00050 /*----------------------------------------------------------------------------*/ 00055 /*----------------------------------------------------------------------------*/ 00058 /*----------------------------------------------------------------------------*/ 00066 /*----------------------------------------------------------------------------*/ 00067 #define uves_msg_error(...) cpl_msg_error(__func__, __VA_ARGS__) 00068 00069 /*----------------------------------------------------------------------------*/ 00079 /*----------------------------------------------------------------------------*/ 00080 #define uves_msg_progress(i, iter, ...) cpl_msg_progress(__func__, (i), (iter), __VA_ARGS__) 00081 /*----------------------------------------------------------------------------*/ 00089 /*----------------------------------------------------------------------------*/ 00090 #define uves_msg_warning(...) uves_msg_warning_macro(__func__, __VA_ARGS__) 00091 /*----------------------------------------------------------------------------*/ 00099 /*----------------------------------------------------------------------------*/ 00100 #define uves_msg_debug(...) cpl_msg_debug(__func__, __VA_ARGS__) 00101 00102 /*----------------------------------------------------------------------------*/ 00107 /*----------------------------------------------------------------------------*/ 00108 #define uves_msg_low(...) do { \ 00109 uves_msg_softer(); \ 00110 uves_msg(__VA_ARGS__); \ 00111 uves_msg_louder(); \ 00112 } while (false) 00113 00114 /*----------------------------------------------------------------------------*/ 00121 /*----------------------------------------------------------------------------*/ 00122 #define uves_msg(...) uves_msg_macro(__func__, __VA_ARGS__) 00123 00124 /*----------------------------------------------------------------------------*/ 00128 /*----------------------------------------------------------------------------*/ 00129 #define uves_msg_softer() uves_msg_softer_macro(__func__) 00130 00131 /*----------------------------------------------------------------------------*/ 00135 /*----------------------------------------------------------------------------*/ 00136 #define uves_msg_louder() uves_msg_louder_macro(__func__) 00137 00138 00139 void uves_msg_init(int olevel, const char *dom); 00140 00141 00142 void uves_msg_set_level(int olevel); 00143 00144 const char *uves_msg_get_domain(void); 00145 void uves_msg_set_domain(const char *d); 00146 void uves_msg_macro(const char *fct, const char *format, ...) 00147 #ifdef __GNUC__ 00148 __attribute__((format (printf, 2, 3))) 00149 #endif 00150 ; 00151 00152 void uves_msg_warning_macro(const char *fct, const char *format, ...) 00153 #ifdef __GNUC__ 00154 __attribute__((format (printf, 2, 3))) 00155 #endif 00156 ; 00157 00158 int uves_msg_get_warnings(void); 00159 void uves_msg_add_warnings(int n); 00160 00161 void uves_msg_softer_macro(const char *fct); 00162 void uves_msg_louder_macro(const char *fct); 00163 00164 #endif /* UVES_MSG_H */ 00165