data_structures
|
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
Go to the source code of this file.
Functions | |
void | ds_bzero (void *s, size_t n) |
Replicates behaviour of bzero from libc . More... | |
size_t | ds_strlen (const char *s) |
Replicates behaviour of strlen from libc . More... | |
int | ds_strcmp (const char *s1, const char *s2) |
Replicates strcmp from libc . More... | |
void * | ds_xcalloc (size_t count, size_t size) |
Replicates behaviour of calloc from libc , but fails on memory allocation errors. More... | |
void * | ds_xmalloc (size_t size) |
Replicates behaviour of malloc from libc , but fails on memory allocation errors. More... | |
char * | ds_strdup (const char *s1) |
Replicates behaviour of strdup from libc . More... | |
void | ds_exit (void) |
Print the error message, corresponding to errno , exit the process. More... | |
void | ds_exit_set (int err) |
Set errno to the specified value, print the error message, and exit the process. More... | |
void ds_bzero | ( | void * | s, |
size_t | n | ||
) |
Replicates behaviour of bzero
from libc
.
Definition at line 20 of file ds_bzero.c.
void ds_exit | ( | void | ) |
void ds_exit_set | ( | int | err | ) |
Set errno
to the specified value, print the error message, and exit the process.
err | The value to which set errno |
Definition at line 22 of file ds_exit_set.c.
int ds_strcmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Replicates strcmp
from libc
.
Definition at line 20 of file ds_strcmp.c.
char* ds_strdup | ( | const char * | s1 | ) |
Replicates behaviour of strdup
from libc
.
Definition at line 20 of file ds_strdup.c.
size_t ds_strlen | ( | const char * | s | ) |
Replicates behaviour of strlen
from libc
.
Definition at line 20 of file ds_strlen.c.
void* ds_xcalloc | ( | size_t | count, |
size_t | size | ||
) |
Replicates behaviour of calloc
from libc
, but fails on memory allocation errors.
Definition at line 22 of file ds_xcalloc.c.
void* ds_xmalloc | ( | size_t | size | ) |
Replicates behaviour of malloc
from libc
, but fails on memory allocation errors.
Definition at line 22 of file ds_xmalloc.c.