comparison intercom/intercomd.h @ 2:13be24d74cd2

import intercom-0.4.1
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 09:57:52 +0200
parents
children
comparison
equal deleted inserted replaced
1:9cadc470e3da 2:13be24d74cd2
1 /* intercomd.h
2 *
3 * Copyright (C) DFS Deutsche Flugsicherung (2004, 2005).
4 * All Rights Reserved.
5 *
6 * Voice over IP Intercom with Telephone conference and Acoustic Echo
7 * Cancellation using unicast RTP messages (RFC3550)
8 *
9 * Version 0.2
10 */
11 #ifndef _INTERCOMD_H
12
13 #include <syslog.h>
14
15 #define ERROR (-1)
16 #define OKAY 0
17
18 #define NO 0
19 #define YES 1
20
21 /* Emit program info and abort the program if expr is false with errno */
22 #define assert_errno(expr) \
23 if(!(expr)) { \
24 syslog(LOG_WARNING, "%s:%d: %s: Assertion '%s' failed. errno=%s\n", \
25 __FILE__, __LINE__, __PRETTY_FUNCTION__, __STRING(expr), strerror(errno)); \
26 exit(1); \
27 }
28
29 /* Emit program info and return function if expr is true with retvalue */
30 #define return_if(expr, retvalue) \
31 if(expr) { \
32 syslog(LOG_WARNING, "%s:%d: %s: Check '%s' failed.\n", \
33 __FILE__, __LINE__, __PRETTY_FUNCTION__, __STRING(expr)); \
34 return(retvalue); \
35 }
36
37 int print_gui(const char *fmt, ...);
38
39 #define _INTERCOMD_H
40 #endif

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.