diff options
author | mannol <eniz_vukovic@hotmail.com> | 2013-10-13 16:16:47 +0200 |
---|---|---|
committer | BtbN <btbn@btbn.de> | 2013-10-13 16:16:47 +0200 |
commit | da727875ac954b13ecb16521d255499511bb7424 (patch) | |
tree | 551904f3738612e9c15d98f320c323aa325a5cf8 /toxrtp/toxrtp_error.h | |
parent | 1b971de651278429eea312f3240e1c5b8fbc67a4 (diff) |
tox A/V: RTP/MSI implementation
Diffstat (limited to 'toxrtp/toxrtp_error.h')
-rw-r--r-- | toxrtp/toxrtp_error.h | 25 |
1 files changed, 25 insertions, 0 deletions
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 @@ | |||
1 | #ifndef _RTP_ERROR_ | ||
2 | #define _RTP_ERROR_ | ||
3 | |||
4 | #define PRINT_FORMAT "Error %d: %s at %s:%d\n" | ||
5 | #define PRINT_ARGS( _errno ) _errno, t_rtperr(_errno), __FILE__, __LINE__ | ||
6 | |||
7 | |||
8 | const char* t_rtperr ( int _errno ); | ||
9 | void t_rtperr_register ( int _id, const char* _info ); | ||
10 | |||
11 | void t_invoke_error ( int _id ); | ||
12 | void t_rtperr_print ( const char* _val, ... ); | ||
13 | |||
14 | |||
15 | #ifdef _USE_ERRORS | ||
16 | #define t_perror( _errno ) t_rtperr_print ( PRINT_FORMAT, PRINT_ARGS ( _errno ) ) | ||
17 | #else | ||
18 | #define t_perror( _errno )do { } while(0) | ||
19 | #endif /* _USE_ERRORS */ | ||
20 | |||
21 | #ifdef _STDIO_H | ||
22 | #define t_errexit( _errno ) exit(-_errno) | ||
23 | #endif /* _STDIO_H */ | ||
24 | |||
25 | #endif /* _RTP_ERROR_ */ | ||