6 #if defined(__WATCOMC__) || defined(_WIN32) || defined(__DJGPP__)
12 /* Non-failing versions of malloc/calloc/realloc. They never return 0, they call
13 * demo_abort on failure. Use the macros, don't call the *_impl functions.
15 #define malloc_nf(sz) malloc_nf_impl(sz, __FILE__, __LINE__)
16 void *malloc_nf_impl(size_t sz, const char *file, int line);
17 #define calloc_nf(n, sz) calloc_nf_impl(n, sz, __FILE__, __LINE__)
18 void *calloc_nf_impl(size_t num, size_t sz, const char *file, int line);
19 #define realloc_nf(p, sz) realloc_nf_impl(p, sz, __FILE__, __LINE__)
20 void *realloc_nf_impl(void *p, size_t sz, const char *file, int line);
21 #define strdup_nf(s) strdup_nf_impl(s, __FILE__, __LINE__)
22 char *strdup_nf_impl(const char *s, const char *file, int line);
24 int match_prefix(const char *str, const char *prefix);