ekg2  GIT master
Definicje | Funkcje
Dokumentacja pliku xmalloc.h
#include <sys/types.h>
#include <stddef.h>
#include <stdarg.h>
Wykres zależności załączania dla xmalloc.h:
Ten wykres pokazuje, które pliki bezpośrednio lub pośrednio załączają ten plik:

Idź do kodu źródłowego tego pliku.

Definicje

#define EXPORTNOT   __attribute__ ((visibility("hidden")))
 

Funkcje

void * xcalloc (size_t nmemb, size_t size)
 
void * xmalloc (size_t size)
 
void * xmalloc2 (size_t size)
 
void xfree (void *ptr)
 
void * xrealloc (void *ptr, size_t size)
 
char * xstrdup (const char *s)
 
char * xstrndup (const char *s, size_t n)
 
void * xmemdup (void *ptr, size_t size)
 
int xstrcasecmp (const char *s1, const char *s2)
 
char * xstrcat (char *dest, const char *src)
 
char * xstrchr (const char *s, int c)
 
int xstrcmp (const char *s1, const char *s2)
 
char * xstrcpy (char *dest, const char *src)
 
size_t xstrlen (const char *s)
 
int xstrncasecmp_pl (const char *s1, const char *s2, size_t n)
 
char * xstrncat (char *dest, const char *src, size_t n)
 
int xstrncmp (const char *s1, const char *s2, size_t n)
 
int xstrncasecmp (const char *s1, const char *s2, size_t n)
 
char * xstrrchr (const char *s, int c)
 
char * xstrstr (const char *haystack, const char *needle)
 
char * xstrcasestr (const char *haystack, const char *needle)
 
char * vsaprintf (const char *format, va_list ap)
 
char * saprintf (const char *format,...)
 

Dokumentacja definicji

#define EXPORTNOT   __attribute__ ((visibility("hidden")))

Dokumentacja funkcji

char* saprintf ( const char *  format,
  ... 
)
char* vsaprintf ( const char *  format,
va_list  ap 
)

vsaprintf()

Nota
Deprecated, please use g_strdup_vprintf() instead.
void* xcalloc ( size_t  nmemb,
size_t  size 
)

xcalloc()

Błąd:
same as in xmalloc()
Nota
Deprecated, please use g_new(), g_new0(), g_slice_new() or g_slice_new0() instead.
void xfree ( void *  ptr)

xfree()

Free memory pointed by ptr if ptr == NULL do nothing.
Equivalent to: if (ptr) free(ptr);

Zobacz również
xrealloc() - If you want change size of allocated memory.
Nota
Deprecated, please use g_free() (or g_slice_free()) instead.
void* xmalloc ( size_t  size)

xmalloc()

Allocate memory for size bytes, clears it [set it with \0], and returns pointer to allocated memory. If malloc() fails with NULL, ekg_oom_handler() kills program.
Wrapper to malloc()+memset()

Zobacz również
xcalloc()
xfree()
Parametry
size- the same as in malloc()
Zwraca
pointer to allocated memory
Nota
Deprecated, please use g_malloc(), g_malloc0(), g_new(), g_new0(), g_slice_new() or g_slice_new0() instead.
void* xmalloc2 ( size_t  size)
void* xmemdup ( void *  ptr,
size_t  size 
)
void* xrealloc ( void *  ptr,
size_t  size 
)

xrealloc()

Błąd:
same as in xmalloc()
Nota
Deprecated, please use g_realloc() instead.
int xstrcasecmp ( const char *  s1,
const char *  s2 
)
char* xstrcasestr ( const char *  haystack,
const char *  needle 
)
char* xstrcat ( char *  dest,
const char *  src 
)
char* xstrchr ( const char *  s,
int  c 
)
int xstrcmp ( const char *  s1,
const char *  s2 
)
char* xstrcpy ( char *  dest,
const char *  src 
)
char* xstrdup ( const char *  s)

xstrdup()

Nota
Deprecated, please use g_strdup() instead.
size_t xstrlen ( const char *  s)
int xstrncasecmp ( const char *  s1,
const char *  s2,
size_t  n 
)
int xstrncasecmp_pl ( const char *  s1,
const char *  s2,
size_t  n 
)
char* xstrncat ( char *  dest,
const char *  src,
size_t  n 
)
int xstrncmp ( const char *  s1,
const char *  s2,
size_t  n 
)
char* xstrndup ( const char *  s,
size_t  n 
)

xstrndup()

Nota
Deprecated, please use g_strndup() and g_strdup() instead.
char* xstrrchr ( const char *  s,
int  c 
)
char* xstrstr ( const char *  haystack,
const char *  needle 
)