ekg2  GIT master
Definicje | Funkcje | Zmienne
Dokumentacja pliku xmalloc.c
#include "ekg2-config.h"
#include <sys/types.h>
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <ctype.h>
#include "compat/strndup.h"
#include "xmalloc.h"
Wykres zależności załączania dla xmalloc.c:

Definicje

#define _GNU_SOURCE
 
#define __EXTENSIONS__
 
#define fix(s)   ((s) ? (s) : "")
 

Funkcje

static void ekg_oom_handler ()
 
void * xcalloc (size_t nmemb, size_t size)
 
void * xmalloc (size_t size)
 
 __attribute__ ((visibility("hidden")))
 
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)
 
char * xstrstr (const char *haystack, const char *needle)
 
char * xstrcasestr (const char *haystack, const char *needle)
 
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)
 
static int tolower_pl (const unsigned char c)
 
static int strncasecmp_pl (const char *cs, const char *ct, size_t count)
 
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)
 

Zmienne

int old_stderr
 

Dokumentacja definicji

#define __EXTENSIONS__
#define _GNU_SOURCE
#define fix (   s)    ((s) ? (s) : "")

Dokumentacja funkcji

__attribute__ ( (visibility("hidden"))  )
static void ekg_oom_handler ( )
static
static int strncasecmp_pl ( const char *  cs,
const char *  ct,
size_t  count 
)
static
static int tolower_pl ( const unsigned char  c)
static
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* 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 
)

Dokumentacja zmiennych

int old_stderr