csldefs.h Source File

Main Page Compound List File List Compound Members File Members

# csldefs.h

Go to the documentation of this file.

    00001 /* CSL - Common Sound Layer
    00002  * Copyright (C) 2000-2001 Stefan Westerfeld and Tim Janik
    00003  *
    00004  * This library is free software; you can redistribute it and/or
    00005  * modify it under the terms of the GNU Lesser General Public
    00006  * License as published by the Free Software Foundation; either
    00007  * version 2 of the License, or (at your option) any later version.
    00008  *
    00009  * This library is distributed in the hope that it will be useful,
    00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012  * Lesser General Public License for more details.
    00013  *
    00014  * You should have received a copy of the GNU Lesser General
    00015  * Public License along with this library; if not, write to the
    00016  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
    00017  * Boston, MA 02111-1307, USA.
    00018  */
    00019 #ifndef __CSL_DEFS_H__
    00020 #define __CSL_DEFS_H__
    00021
    00022 #include <csl/cslconfig.h>
    00023
    00024 #ifdef __cplusplus
    00025 extern "C" {
    00026 #endif /* __cplusplus */
    00027
    00034 /* --- compat defines --- */
    00035
    00040 #ifndef NULL
    00041 #define NULL ((void*) 0)
    00042 #endif
    00043
    00048 #ifndef TRUE
    00049 #define TRUE    (!FALSE)
    00050 #endif
    00051
    00056 #ifndef FALSE
    00057 #define FALSE   (0)
    00058 #endif
    00059
    00067 #ifndef MAX
    00068 #define MAX(a, b)       ((a) > (b) ? (a) : (b))
    00069 #endif
    00070
    00078 #ifndef MIN
    00079 #define MIN(a, b)       ((a) > (b) ? (b) : (a))
    00080 #endif
    00081
    00092 #ifndef CLAMP
    00093 #define CLAMP(x, low, high)  (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
    00094 #endif
    00095
    00103 #define CSL_BREAKPOINT()   ((void)  raise (5 /* SIGTRAP */))
    00104
    00105 /* --- typedefs --- */
    00106
    00111 typedef int                       CslBool;
    00112
    00117 typedef int                       CslByte;
    00118
    00119 #ifdef __cplusplus
    00120 }
    00121 #endif /* __cplusplus */
    00122
    00123 #endif /* __CSL_DEFS_H__ */