annotate src/liblo-0.26/lo/lo_macros.h @ 5:e582a1ccd5fe

Add more mingw builds
author Chris Cannam
date Wed, 20 Mar 2013 14:01:32 +0000
parents e13257ea84a4
children
rev   line source
Chris@4 1 /*
Chris@4 2 * Copyright (C) 2004 Steve Harris
Chris@4 3 *
Chris@4 4 * This program is free software; you can redistribute it and/or
Chris@4 5 * modify it under the terms of the GNU Lesser General Public License
Chris@4 6 * as published by the Free Software Foundation; either version 2.1
Chris@4 7 * of the License, or (at your option) any later version.
Chris@4 8 *
Chris@4 9 * This program is distributed in the hope that it will be useful,
Chris@4 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@4 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@4 12 * GNU Lesser General Public License for more details.
Chris@4 13 *
Chris@4 14 * $Id$
Chris@4 15 */
Chris@4 16
Chris@4 17 #ifndef LO_MACROS_H
Chris@4 18 #define LO_MACROS_H
Chris@4 19
Chris@4 20 /* macros that have to be defined after function signatures */
Chris@4 21
Chris@4 22 #ifdef __cplusplus
Chris@4 23 extern "C" {
Chris@4 24 #endif
Chris@4 25
Chris@4 26 /* \brief Maximum length of UDP messages in bytes
Chris@4 27 */
Chris@4 28 #define LO_MAX_MSG_SIZE 32768
Chris@4 29
Chris@4 30 /* \brief A set of macros to represent different communications transports
Chris@4 31 */
Chris@4 32 #define LO_DEFAULT 0x0
Chris@4 33 #define LO_UDP 0x1
Chris@4 34 #define LO_UNIX 0x2
Chris@4 35 #define LO_TCP 0x4
Chris@4 36
Chris@4 37 /* an internal value, ignored in transmission but check against LO_MARKER in the
Chris@4 38 * argument list. Used to do primitive bounds checking */
Chris@4 39 #define LO_MARKER_A 0xdeadbeef
Chris@4 40 #define LO_MARKER_B 0xf00baa23
Chris@4 41 #define LO_ARGS_END LO_MARKER_A, LO_MARKER_B
Chris@4 42
Chris@4 43 #define lo_message_add_varargs(msg, types, list) \
Chris@4 44 lo_message_add_varargs_internal(msg, types, list, __FILE__, __LINE__)
Chris@4 45
Chris@4 46 #ifdef __GNUC__
Chris@4 47
Chris@4 48 #define lo_message_add(msg, types...) \
Chris@4 49 lo_message_add_internal(msg, __FILE__, __LINE__, types, \
Chris@4 50 LO_MARKER_A, LO_MARKER_B)
Chris@4 51
Chris@4 52 #define lo_send(targ, path, types...) \
Chris@4 53 lo_send_internal(targ, __FILE__, __LINE__, path, types, \
Chris@4 54 LO_MARKER_A, LO_MARKER_B)
Chris@4 55
Chris@4 56 #define lo_send_timestamped(targ, ts, path, types...) \
Chris@4 57 lo_send_timestamped_internal(targ, __FILE__, __LINE__, ts, path, \
Chris@4 58 types, LO_MARKER_A, LO_MARKER_B)
Chris@4 59
Chris@4 60 #define lo_send_from(targ, from, ts, path, types...) \
Chris@4 61 lo_send_from_internal(targ, from, __FILE__, __LINE__, ts, path, \
Chris@4 62 types, LO_MARKER_A, LO_MARKER_B)
Chris@4 63
Chris@4 64 #else
Chris@4 65
Chris@4 66 /* In non-GCC compilers, there is no support for variable-argument
Chris@4 67 * macros, so provide "internal" vararg functions directly instead. */
Chris@4 68
Chris@4 69 int lo_message_add(lo_message msg, const char *types, ...);
Chris@4 70 int lo_send(lo_address targ, const char *path, const char *types, ...);
Chris@4 71 int lo_send_timestamped(lo_address targ, lo_timetag ts, const char *path, const char *types, ...);
Chris@4 72 int lo_send_from(lo_address targ, lo_server from, lo_timetag ts, const char *path, const char *types, ...);
Chris@4 73
Chris@4 74 #endif
Chris@4 75
Chris@4 76 #ifdef __cplusplus
Chris@4 77 }
Chris@4 78 #endif
Chris@4 79
Chris@4 80 #endif