compat#

auxiliary compatibility functions

Note that the declarations for the functions found in the compat-src/ subdirectory are provided in config.h.in.

Defines

snprintf#

setenv() - change or add an environment variable realpath() - return the canonicalized absolute pathname snprintf() - write formatted output to sized buffer

asprintf#

asprintf() - write formatted output to allocated buffer

vsnprintf#

vsnprintf() - write formatted output to sized buffer

vasprintf#

vasprintf() - write formatted output to allocated buffer

asnprintf#

asnprintf() - print to allocated string

vasnprintf#

asnprintf() - print to allocated string using va_list

asnpprintf#

asnprintf() - print to position pos in allocated string

vasnpprintf#

asnprintf() - print to position pos in allocated string using va_list

Functions

int rpl_snprintf(char *str, size_t size, const char *fmt, ...)#
int rpl_asprintf(char **buf, const char *fmt, ...)#
int rpl_vsnprintf(char *str, size_t size, const char *fmt, va_list ap)#
int rpl_vasprintf(char **buf, const char *fmt, va_list ap)#
size_t strlcpy(char *dst, const char *src, size_t size)#

strdup() - duplicate a string strndup() - duplicate a string with a maximal size strcasecmp() - case insensitive string comparison strncasecmp() - case insensitive, length-limited string comparison strlcpy() - like strncpy(), but guarantees that dst is NUL-terminated

size_t strlcat(char *dst, const char *src, size_t size)#

strlcat() - like strncat(), but guarantees that dst is NUL-terminated

int rpl_asnprintf(char **buf, size_t *size, const char *fmt, ...)#
int rpl_vasnprintf(char **buf, size_t *size, const char *fmt, va_list ap)#
int rpl_asnpprintf(char **buf, size_t *size, size_t pos, const char *fmt, ...)#
int rpl_vasnpprintf(char **buf, size_t *size, size_t pos, const char *fmt, va_list ap)#