13#ifndef CAPTION_HELPER_H_
14#define CAPTION_HELPER_H_
35#define is_latin_iso8859_15(x) (((x) >= 0x20 && (x) <= 0x7e) || ((x) >= 0xa1 && (x) <= 0xfe))
41#define ARRAY_SIZE(x) ((unsigned)(sizeof(x)/sizeof((x)[0])))
44#define PRINT_BOOL(x) (((x) == TRUE)?"TRUE":(((x) == FALSE)?"FALSE":"UNKNOWN"))
48#define UNUSED(x) x __attribute__ ((__unused__))
60#ifdef DEBUG_CLOSEDCAPTION
63#define IS_PRINTABLE(a) ((a) >= 33 && (a) <= 126)
70# define DTV_DEBUG(fmt, ...) \
71 helper_print("DEBUG", __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
79# define DTV_HEXDUMP(buff, buffLen)\
80 helper_hexdump("DEBUG", __FILE__, __func__, __LINE__, #buff, #buffLen, (const char*)(buff), (buffLen))
100 const char *namebufflen,
114 const char *fileFull,
118 ...) __attribute__ ((format (printf, 5, 6)));
123# define DTV_DEBUG(fmt, ...) do { } while (0)
127# define DTV_HEXDUMP(buff, buffLen) do { } while (0)
void helper_hexdump(const char *platform, const char *fileFull, const char *func, uint32_t fileLine, const char *namebuff, const char *namebufflen, const char *buff, size_t buffLen)
void helper_print(const char *platform, const char *fileFull, const char *func, uint32_t line, const char *format,...) __attribute__((format(printf