Search
lxdream.org :: lxdream/src/dream.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/dream.h
changeset 31:495e480360d7
prev30:89b30313d757
next35:21a4be098304
author nkeynes
date Sun Dec 25 08:24:11 2005 +0000 (15 years ago)
permissions -rw-r--r--
last change Finish adding header blocks to all files
view annotate diff log raw
     1 /**
     2  * $Id: dream.h,v 1.6 2005-12-25 08:24:07 nkeynes Exp $
     3  *
     4  * Miscellaneous application-wide declarations (mainly logging atm)
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 #ifndef dream_H
    20 #define dream_H 1
    22 #include <stdlib.h>
    23 #include <stdint.h>
    24 #include <string.h>
    25 #include <glib/gtypes.h>
    27 #ifdef __cplusplus
    28 extern "C" {
    29 #if 0
    30 }
    31 #endif
    32 #endif
    34 #define EMIT_FATAL 0
    35 #define EMIT_ERR 1
    36 #define EMIT_WARN 2
    37 #define EMIT_INFO 3
    38 #define EMIT_DEBUG 4
    39 #define EMIT_TRACE 5
    41 #ifndef MODULE_ID
    42 #define MODULE_ID 0
    43 #endif
    45 void emit( void *, int level, int source, const char *msg, ... );
    47 #define FATAL( ... ) emit( NULL, EMIT_FATAL, MODULE_ID, __VA_ARGS__ )
    48 #define ERROR( ... ) emit( NULL, EMIT_ERR, MODULE_ID, __VA_ARGS__ )
    49 #define WARN( ... ) emit( NULL, EMIT_WARN, MODULE_ID, __VA_ARGS__ )
    50 #define INFO( ... ) emit( NULL, EMIT_INFO, MODULE_ID, __VA_ARGS__ )
    51 #define DEBUG( ... ) emit( NULL, EMIT_DEBUG, MODULE_ID, __VA_ARGS__ )
    52 #define TRACE( ... ) emit( NULL, EMIT_TRACE, MODULE_ID, __VA_ARGS__ )
    54 #define BIOS_PATH "../bios"
    56 #ifdef __cplusplus
    57 }
    58 #endif
    59 #endif
.