28 lines
484 B
C
28 lines
484 B
C
#ifndef __NICKEL_XALLOC_H_
|
|
#define __NICKEL_XALLOC_H_
|
|
|
|
#include <sys/types.h>
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void* ni_xmalloc(size_t size);
|
|
void ni_free(void* ptr);
|
|
|
|
void* ni_xcalloc(size_t nmemb,size_t size);
|
|
void* ni_xrealloc(void* ptr, size_t size);
|
|
|
|
char* ni_xstrdup(const char *s);
|
|
char* ni_xstrndup(const char s[], size_t n);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __NICKEL_XALLOC_H_ */ |