ALSA project - the C library reference: /builddir/build/BUILD/alsa-lib-1.1.0/include/error.h Source File

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

# /builddir/build/BUILD/alsa-lib-1.1.0/include/error.h

Go to the documentation of this file.

    00001
    00011 /*
    00012  *   This library is free software; you can redistribute it and/or modify
    00013  *   it under the terms of the GNU Lesser General Public License as
    00014  *   published by the Free Software Foundation; either version 2.1 of
    00015  *   the License, or (at your option) any later version.
    00016  *
    00017  *   This program is distributed in the hope that it will be useful,
    00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00020  *   GNU Lesser General Public License for more details.
    00021  *
    00022  *   You should have received a copy of the GNU Lesser General Public
    00023  *   License along with this library; if not, write to the Free Software
    00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    00025  *
    00026  */
    00027
    00028 #ifndef __ALSA_ERROR_H
    00029 #define __ALSA_ERROR_H
    00030
    00031 #ifdef __cplusplus
    00032 extern "C" {
    00033 #endif
    00034
    00041 #define SND_ERROR_BEGIN                         500000
    00042 #define SND_ERROR_INCOMPATIBLE_VERSION          (SND_ERROR_BEGIN+0)
    00043 #define SND_ERROR_ALISP_NIL                     (SND_ERROR_BEGIN+1)
    00045 const char *snd_strerror(int errnum);
    00046
    00059 typedef void (*snd_lib_error_handler_t)(const char *file, int line, const char *function, int err, const char *fmt, ...) /* __attribute__ ((format (printf, 5, 6))) */;
    00060 extern snd_lib_error_handler_t snd_lib_error;
    00061 extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
    00062
    00063 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
    00064 #define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__)
    00065 #define SYSERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, __VA_ARGS__)
    00066 #else
    00067 #define SNDERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, ##args)
    00068 #define SYSERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, ##args)
    00069 #endif
    00070
    00073 #ifdef __cplusplus
    00074 }
    00075 #endif
    00076
    00078 typedef void (*snd_local_error_handler_t)(const char *file, int line,
    00079                                           const char *func, int err,
    00080                                           const char *fmt, va_list arg);
    00081
    00082 snd_local_error_handler_t snd_lib_error_set_local(snd_local_error_handler_t func);
    00083
    00084 #endif /* __ALSA_ERROR_H */
    00085

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines