branches/gmyth-0.1b/src/gmyth_debug.h
author rosfran
Tue Feb 13 23:17:35 2007 +0000 (2007-02-13)
branchtrunk
changeset 358 06009f72d657
permissions -rw-r--r--
[svn r360] Removed a lot of GStaticMutex references.
renatofilho@320
     1
/**
renatofilho@320
     2
 * GMyth Library
renatofilho@320
     3
 *
renatofilho@320
     4
 * @file gmyth/gmyth_debug.h
renatofilho@320
     5
 * 
renatofilho@320
     6
 *
renatofilho@320
     7
 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
renatofilho@320
     8
 * @author Renato Filho <renato.filho@indt.org.br>
renatofilho@320
     9
 *
renatofilho@320
    10
 *//*
renatofilho@320
    11
 * 
renatofilho@320
    12
 * This program is free software; you can redistribute it and/or modify
renatofilho@320
    13
 * it under the terms of the GNU Lesser General Public License as published by
renatofilho@320
    14
 * the Free Software Foundation; either version 2 of the License, or
renatofilho@320
    15
 * (at your option) any later version.
renatofilho@320
    16
 *
renatofilho@320
    17
 * This program is distributed in the hope that it will be useful,
renatofilho@320
    18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
renatofilho@320
    19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
renatofilho@320
    20
 * GNU General Public License for more details.
renatofilho@320
    21
 *
renatofilho@320
    22
 * You should have received a copy of the GNU Lesser General Public License
renatofilho@320
    23
 * along with this program; if not, write to the Free Software
renatofilho@320
    24
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
renatofilho@320
    25
 */
renatofilho@320
    26
renatofilho@320
    27
#ifndef __GMYTH_DEBUG_H__
renatofilho@320
    28
#define __GMYTH_DEBUG_H__
renatofilho@320
    29
renatofilho@320
    30
#include <stdarg.h>
renatofilho@320
    31
#include <glib.h>
renatofilho@320
    32
#include <time.h>
renatofilho@320
    33
renatofilho@320
    34
G_BEGIN_DECLS
renatofilho@320
    35
renatofilho@320
    36
#ifdef GMYTH_USE_DEBUG
renatofilho@320
    37
#define gmyth_debug(...) gmyth_debug_real (__FUNCTION__, __FILE__, __LINE__, TRUE, __VA_ARGS__)
renatofilho@320
    38
#else
renatofilho@320
    39
#define gmyth_debug(...)
renatofilho@320
    40
#endif
renatofilho@320
    41
renatofilho@320
    42
void gmyth_debug_real (const char *func,
renatofilho@320
    43
                       const char *file,
renatofilho@320
    44
                       int line,
renatofilho@320
    45
                       gboolean newline,
renatofilho@320
    46
                       const char *format, ...) G_GNUC_PRINTF (5, 6);
renatofilho@320
    47
renatofilho@320
    48
G_END_DECLS
renatofilho@320
    49
#endif