/home/users/builder/rpm/BUILD/alsa-lib-1.0.13/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 
00077 #endif /* __ALSA_ERROR_H */
00078 

Generated on Sun Apr 1 18:36:41 2007 for ALSA project - the C library reference by  doxygen 1.5.1