#ifndef APLWC_INTERNAL_H #define APLWC_INTERNAL_H #define UNUSED_PARAMETER(arg) ((void)arg) #define RETURN_ERROR(aplwc, rc, msg) do{ \ Aplwc *_p = (aplwc); \ AplwcRc _r = APLWC_##rc; \ if(_p) _p->last_error = _r; \ return _r; \ }while(0) #define NELEM(x) (sizeof(x)/sizeof(x[0])) #include #include #include #include #include struct Aplwc { AplwcRc last_error; char last_error_msg[64]; }; /* errors.c */ const char *rc_to_string(AplwcRc); /* malloc.c */ void *malloc_zero(size_t); #endif /* APLWC_INTERNAL_H */