Man page - libwget-mem(3)
Packages contas this manual
- libwget-random(3)
- libwget-console(3)
- libwget-dns(3)
- libwget-dns-caching(3)
- libwget-stringmap(3)
- libwget-utils(3)
- libwget-ip(3)
- libwget-io(3)
- libwget-net(3)
- libwget-printf(3)
- libwget-xalloc(3)
- libwget-thread(3)
- libwget-mem(3)
- libwget-error(3)
- libwget-bitmap(3)
- libwget-parse_sitemap(3)
- libwget-base64(3)
- libwget-robots(3)
- libwget-vector(3)
- libwget-xml(3)
- libwget-hash(3)
- libwget-parse_atom(3)
- libwget-hashmap(3)
- libwget-list(3)
apt-get install wget2-dev
Manual
| libwget-mem(3) | Library Functions Manual | libwget-mem(3) |
NAME
libwget-mem - Memory functions
SYNOPSIS
Functions
void * wget_memdup (const void *m, size_t n)
char * wget_strdup (const char *s)
char * wget_strmemdup (const void *m, size_t n)
size_t wget_strmemcpy (char *s, size_t ssize, const void *m, size_t n)
void * wget_strmemcpy_a (char *s, size_t ssize, const void *m, size_t
n)
Detailed Description
This is a collections of short memory function not available in standard libraries.
Function Documentation
void * wget_memdup (const void * m, size_t n)
Parameters
n Length of memory
Returns
Clone's the memory region m with length n. Returns NULL if m is NULL.
You should free() the returned pointer when not needed any more.
char * wget_strdup (const char * s)
Parameters
Returns
Clone's the string s like strdup() does. Returns NULL if s is NULL.
You should free() the returned string when not needed any more.
char * wget_strmemdup (const void * m, size_t n)
Parameters
n Length of memory
Returns
Convert the given memory region m with length n into a C string. Returns NULL if m is NULL.
You should free() the returned string when not needed any more.
size_t wget_strmemcpy (char * s, size_t ssize, const void * m, size_t n)
Parameters
ssize Size of the output buffer
m Memory to read from
n Length of memory
Returns
Convert the given memory region m with length n into a C string at s. A max. of ssize - 1 is copied into s.
void * wget_strmemcpy_a (char * s, size_t ssize, const void * m, size_t n)
Parameters
ssize Size of the output buffer
m Memory to read from
n Length of memory
Returns
Convert the given memory region m with length n into a C string at s or at freshly allocated memory, if the space in s was not sufficient.
If s was too small to hold n + 1 bytes, the result must be free'd after use, e.g. if (res != s) wget_free(res);
Author
Generated automatically by Doxygen for wget2 from the source code.
| Version 2.2.0 | wget2 |