代码拉取完成,页面将自动刷新
#include "lp_lib.h"
#include "lp_report.h"
#define MALLOC(ptr, nr, type)\
((((nr) == 0) || ((ptr = (type *) malloc((size_t)((nr) * sizeof(*ptr)))) == NULL)) ? \
report(NULL, CRITICAL, "malloc of %d bytes failed on line %d of file %s\n",\
(nr) * sizeof(*ptr), __LINE__, __FILE__), (ptr = NULL /* (void *) 0 */) : \
ptr\
)
#define CALLOC(ptr, nr, type)\
((((nr) == 0) || ((ptr = (type *) calloc((size_t)(nr), sizeof(*ptr))) == NULL)) ? \
report(NULL, CRITICAL, "calloc of %d bytes failed on line %d of file %s\n",\
(nr) * sizeof(*ptr), __LINE__, __FILE__), (ptr = NULL /* (void *) 0 */) : \
ptr\
)
#define REALLOC(ptr, nr, type)\
((((nr) == 0) || ((ptr = (type *) realloc(ptr, (size_t)((nr) * sizeof(*ptr)))) == NULL)) ? \
report(NULL, CRITICAL, "realloc of %d bytes failed on line %d of file %s\n",\
(nr) * sizeof(*ptr), __LINE__, __FILE__), (ptr = NULL /* (void *) 0 */) : \
ptr\
)
#if defined FREE
# undef FREE
#endif
#define FREE(ptr) if (ptr != NULL) {free(ptr), ptr = NULL;} else
#define MALLOCCPY(nptr, optr, nr, type)\
(MALLOC(nptr, nr, type), (nptr != NULL) ? memcpy(nptr, optr, (size_t)((nr) * sizeof(*optr))) : 0, nptr)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。