29#ifndef XCOM_STANDALONE
38#ifndef __STDC_FORMAT_MACROS
39#define __STDC_FORMAT_MACROS
45#ifndef XCOM_STANDALONE
55#define number_is_valid_port(n) ((n) > 0 && (n) <= (int)UINT16_MAX)
58#define MAX(x, y) ((x) > (y) ? (x) : (y))
61#define MIN(x, y) ((x) < (y) ? (x) : (y))
65#define idx_check_ret(x, limit, ret) \
66 if (x < 0 || x >= limit) { \
67 g_critical("index out of range " #x " < 0 || " #x " >= " #limit " %s:%d", \
68 __FILE__, __LINE__); \
71#define idx_check_fail(x, limit) \
72 if (x < 0 || x >= limit) { \
73 g_critical("index out of range " #x " < 0 || " #x " >= " #limit " %s:%d", \
74 __FILE__, __LINE__); \
Header for compiler-dependent features.
unsigned short xcom_port
Definition: xcom_common.h:46