1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- 2 * 3 * Copyright (C) 2005 William Jon McCann <mccann@jhu.edu> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA 02110-1335, USA. 18 * 19 * Authors: William Jon McCann <mccann@jhu.edu> 20 * 21 */ 22 23 #ifndef __CINNAMON_SETTINGS_PROFILE_H 24 #define __CINNAMON_SETTINGS_PROFILE_H 25 26 #include <glib.h> 27 28 G_BEGIN_DECLS 29 30 #ifdef ENABLE_PROFILING 31 #ifdef G_HAVE_ISO_VARARGS 32 #define cinnamon_settings_profile_start(...) _cinnamon_settings_profile_log (G_STRFUNC, "start", __VA_ARGS__) 33 #define cinnamon_settings_profile_end(...) _cinnamon_settings_profile_log (G_STRFUNC, "end", __VA_ARGS__) 34 #define cinnamon_settings_profile_msg(...) _cinnamon_settings_profile_log (NULL, NULL, __VA_ARGS__) 35 #elif defined(G_HAVE_GNUC_VARARGS) 36 #define cinnamon_settings_profile_start(format...) _cinnamon_settings_profile_log (G_STRFUNC, "start", format) 37 #define cinnamon_settings_profile_end(format...) _cinnamon_settings_profile_log (G_STRFUNC, "end", format) 38 #define cinnamon_settings_profile_msg(format...) _cinnamon_settings_profile_log (NULL, NULL, format) 39 #endif 40 #else 41 #define cinnamon_settings_profile_start(...) 42 #define cinnamon_settings_profile_end(...) 43 #define cinnamon_settings_profile_msg(...) 44 #endif 45 46 void _cinnamon_settings_profile_log (const char *func, 47 const char *note, 48 const char *format, 49 ...) G_GNUC_PRINTF (3, 4); 50 51 G_END_DECLS 52 53 #endif /* __CINNAMON_SETTINGS_PROFILE_H */ 54