From da727875ac954b13ecb16521d255499511bb7424 Mon Sep 17 00:00:00 2001 From: mannol Date: Sun, 13 Oct 2013 16:16:47 +0200 Subject: tox A/V: RTP/MSI implementation --- toxrtp/toxrtp_error.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 toxrtp/toxrtp_error.h (limited to 'toxrtp/toxrtp_error.h') diff --git a/toxrtp/toxrtp_error.h b/toxrtp/toxrtp_error.h new file mode 100644 index 00000000..0e017246 --- /dev/null +++ b/toxrtp/toxrtp_error.h @@ -0,0 +1,25 @@ +#ifndef _RTP_ERROR_ +#define _RTP_ERROR_ + +#define PRINT_FORMAT "Error %d: %s at %s:%d\n" +#define PRINT_ARGS( _errno ) _errno, t_rtperr(_errno), __FILE__, __LINE__ + + +const char* t_rtperr ( int _errno ); +void t_rtperr_register ( int _id, const char* _info ); + +void t_invoke_error ( int _id ); +void t_rtperr_print ( const char* _val, ... ); + + +#ifdef _USE_ERRORS +#define t_perror( _errno ) t_rtperr_print ( PRINT_FORMAT, PRINT_ARGS ( _errno ) ) +#else +#define t_perror( _errno )do { } while(0) +#endif /* _USE_ERRORS */ + +#ifdef _STDIO_H +#define t_errexit( _errno ) exit(-_errno) +#endif /* _STDIO_H */ + +#endif /* _RTP_ERROR_ */ -- cgit v1.2.3