annotate src/liblo-0.26/lo/lo_macros.h @ 95:89f5e221ed7b

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