~ubuntu-branches/ubuntu/vivid/gnome-color-manager/vivid

« back to all changes in this revision

Viewing changes to src/egg-debug.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya, Rodrigo Moya, Martin Pitt
  • Date: 2011-08-19 16:23:48 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110819162348-p0unefdt677j5ttj
Tags: 3.1.2-0ubuntu1
[ Rodrigo Moya ]
* New upstream release.
* debian/control:
  - Use GTK3 version build dependencies
* debian/rules:
  - Add autoreconf to the rules
* debian/patches/02-fix_build.patch:
  - Add upstream patch to fix build

[ Martin Pitt ]
* Drop 01-libnotify_0.7.patch, obsolete with new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2
 
 *
3
 
 * Copyright (C) 2007-2009 Richard Hughes <richard@hughsie.com>
4
 
 *
5
 
 * Licensed under the GNU General Public License Version 2
6
 
 *
7
 
 * This program is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 2 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
 
 */
21
 
 
22
 
#ifndef __EGG_DEBUG_H
23
 
#define __EGG_DEBUG_H
24
 
 
25
 
#include <stdarg.h>
26
 
#include <glib.h>
27
 
 
28
 
G_BEGIN_DECLS
29
 
 
30
 
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
31
 
/**
32
 
 * egg_debug:
33
 
 *
34
 
 * Non critical debugging
35
 
 */
36
 
#define egg_debug(...) egg_debug_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
37
 
 
38
 
/**
39
 
 * egg_warning:
40
 
 *
41
 
 * Important debugging
42
 
 */
43
 
#define egg_warning(...) egg_warning_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
44
 
 
45
 
/**
46
 
 * egg_error:
47
 
 *
48
 
 * Critical debugging, with exit
49
 
 */
50
 
#define egg_error(...) egg_error_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
51
 
 
52
 
#elif defined(__GNUC__) && __GNUC__ >= 3
53
 
#define egg_debug(...) egg_debug_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
54
 
#define egg_warning(...) egg_warning_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
55
 
#define egg_error(...) egg_error_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
56
 
#else
57
 
#define egg_debug(...)
58
 
#define egg_warning(...)
59
 
#define egg_error(...)
60
 
#endif
61
 
 
62
 
gboolean         egg_debug_init                 (gint           *argc,
63
 
                                                 gchar          ***argv);
64
 
GOptionGroup    *egg_debug_get_option_group     (void);
65
 
gboolean         egg_debug_is_verbose           (void);
66
 
void             egg_debug_backtrace            (void);
67
 
void             egg_debug_set_log_filename     (const gchar    *filename);
68
 
void             egg_debug_real                 (const gchar    *func,
69
 
                                                 const gchar    *file,
70
 
                                                 gint            line,
71
 
                                                 const gchar    *format, ...) __attribute__((format (printf,4,5)));
72
 
void             egg_warning_real               (const gchar    *func,
73
 
                                                 const gchar    *file,
74
 
                                                 gint            line,
75
 
                                                 const gchar    *format, ...) __attribute__((format (printf,4,5)));
76
 
void             egg_error_real                 (const gchar    *func,
77
 
                                                 const gchar    *file,
78
 
                                                 gint            line,
79
 
                                                 const gchar    *format, ...) G_GNUC_NORETURN __attribute__((format (printf,4,5)));
80
 
 
81
 
G_END_DECLS
82
 
 
83
 
#endif /* __EGG_DEBUG_H */