Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

error.h

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)     
00044 const char *snd_strerror(int errnum);
00045 
00058 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))) */;
00059 extern snd_lib_error_handler_t snd_lib_error;
00060 extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
00061 
00062 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
00063 #define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__) 
00064 #define SYSERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, __VA_ARGS__) 
00065 #else
00066 #define SNDERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, ##args) 
00067 #define SYSERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, ##args) 
00068 #endif
00069 
00072 #ifdef __cplusplus
00073 }
00074 #endif
00075 
00076 #endif /* __ALSA_ERROR_H */
00077 

Generated on Thu Feb 20 16:45:40 2003 for ALSA project - the C library reference by doxygen1.2.18