27 lines
1.1 KiB
C
27 lines
1.1 KiB
C
#ifndef LTM_COMMON
|
|
#define LTM_COMMON
|
|
|
|
#define LTM_RES(x) \
|
|
{ \
|
|
ltm_err res = x; \
|
|
if (res != ltm_err_ok) \
|
|
return res; \
|
|
}
|
|
|
|
#define LTM_RES2(x, e) \
|
|
{ \
|
|
ltm_err res = x; \
|
|
if (res != ltm_err_ok) { \
|
|
e; \
|
|
return res; \
|
|
} \
|
|
}
|
|
|
|
typedef enum ltm_err {
|
|
ltm_err_ok = 0,
|
|
ltm_invalid_template,
|
|
ltm_failed_alloc,
|
|
} ltm_err;
|
|
|
|
#endif
|