Idź do dokumentacji tego pliku.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EKG_XMALLOC_H
00022 #define __EKG_XMALLOC_H
00023
00024 #include <sys/types.h>
00025 #include <stddef.h>
00026 #include <stdarg.h>
00027
00028 #define EXPORTNOT __attribute__ ((visibility("hidden")))
00029
00030 void *xcalloc(size_t nmemb, size_t size);
00031 void *xmalloc(size_t size);
00032 void *xmalloc2(size_t size);
00033 void xfree(void *ptr);
00034 void *xrealloc(void *ptr, size_t size);
00035 char *xstrdup(const char *s);
00036 char *xstrndup(const char *s, size_t n);
00037 void *xmemdup(void *ptr, size_t size);
00038
00039 int xstrcasecmp(const char *s1, const char *s2);
00040 char *xstrcat(char *dest, const char *src);
00041 char *xstrchr(const char *s, int c);
00042 int xstrcmp(const char *s1, const char *s2);
00043 char *xstrcpy(char *dest, const char *src);
00044 size_t xstrlen(const char *s);
00045 int xstrncasecmp_pl(const char *s1, const char *s2, size_t n);
00046 char *xstrncat(char *dest, const char *src, size_t n);
00047 int xstrncmp(const char *s1, const char *s2, size_t n);
00048 int xstrncasecmp(const char *s1, const char *s2, size_t n);
00049 char *xstrrchr(const char *s, int c);
00050 char *xstrstr(const char *haystack, const char *needle);
00051 char *xstrcasestr(const char *haystack, const char *needle);
00052
00053 char *vsaprintf(const char *format, va_list ap);
00054
00055
00056 #ifdef __GNUC__
00057 char *saprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
00058 #else
00059 char *saprintf(const char *format, ...);
00060 #endif
00061
00062 #endif
00063
00064
00065
00066
00067
00068
00069
00070
00071