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
file annotate diff log raw
nkeynes@31
     1
/**
nkeynes@31
     2
 * $Id: dream.h,v 1.6 2005-12-25 08:24:07 nkeynes Exp $
nkeynes@31
     3
 *
nkeynes@31
     4
 * Miscellaneous application-wide declarations (mainly logging atm)
nkeynes@31
     5
 *
nkeynes@31
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@31
     7
 *
nkeynes@31
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@31
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@31
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@31
    11
 * (at your option) any later version.
nkeynes@31
    12
 *
nkeynes@31
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@31
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@31
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@31
    16
 * GNU General Public License for more details.
nkeynes@1
    17
 */
nkeynes@31
    18
nkeynes@1
    19
#ifndef dream_H
nkeynes@1
    20
#define dream_H 1
nkeynes@1
    21
nkeynes@9
    22
#include <stdlib.h>
nkeynes@2
    23
#include <stdint.h>
nkeynes@9
    24
#include <string.h>
nkeynes@30
    25
#include <glib/gtypes.h>
nkeynes@2
    26
nkeynes@1
    27
#ifdef __cplusplus
nkeynes@1
    28
extern "C" {
nkeynes@1
    29
#if 0
nkeynes@1
    30
}
nkeynes@1
    31
#endif
nkeynes@1
    32
#endif
nkeynes@1
    33
nkeynes@1
    34
#define EMIT_FATAL 0
nkeynes@1
    35
#define EMIT_ERR 1
nkeynes@1
    36
#define EMIT_WARN 2
nkeynes@1
    37
#define EMIT_INFO 3
nkeynes@1
    38
#define EMIT_DEBUG 4
nkeynes@1
    39
#define EMIT_TRACE 5
nkeynes@1
    40
nkeynes@1
    41
#ifndef MODULE_ID
nkeynes@1
    42
#define MODULE_ID 0
nkeynes@1
    43
#endif
nkeynes@1
    44
nkeynes@26
    45
void emit( void *, int level, int source, const char *msg, ... );
nkeynes@1
    46
nkeynes@9
    47
#define FATAL( ... ) emit( NULL, EMIT_FATAL, MODULE_ID, __VA_ARGS__ )
nkeynes@9
    48
#define ERROR( ... ) emit( NULL, EMIT_ERR, MODULE_ID, __VA_ARGS__ )
nkeynes@9
    49
#define WARN( ... ) emit( NULL, EMIT_WARN, MODULE_ID, __VA_ARGS__ )
nkeynes@9
    50
#define INFO( ... ) emit( NULL, EMIT_INFO, MODULE_ID, __VA_ARGS__ )
nkeynes@9
    51
#define DEBUG( ... ) emit( NULL, EMIT_DEBUG, MODULE_ID, __VA_ARGS__ )
nkeynes@9
    52
#define TRACE( ... ) emit( NULL, EMIT_TRACE, MODULE_ID, __VA_ARGS__ )
nkeynes@1
    53
nkeynes@1
    54
#define BIOS_PATH "../bios"
nkeynes@1
    55
nkeynes@1
    56
#ifdef __cplusplus
nkeynes@1
    57
}
nkeynes@1
    58
#endif
nkeynes@1
    59
#endif
.