From 9e4cf71371187927a6eb7cc4fe32b67d58a93010 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 4 Jun 2013 00:04:15 +0200 Subject: xutils: break out string handling and locking Break out all string handling functions and lockme stuff in order to further eliminate the big code blob in xutils, so that it can be easier maintained. Signed-off-by: Daniel Borkmann --- str.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 str.h (limited to 'str.h') diff --git a/str.h b/str.h new file mode 100644 index 0000000..7b8916c --- /dev/null +++ b/str.h @@ -0,0 +1,12 @@ +#ifndef STR_H +#define STR_H + +#include "built_in.h" + +extern size_t strlcpy(char *dest, const char *src, size_t size); +extern int slprintf(char *dst, size_t size, const char *fmt, ...) __check_format_printf(3, 4); +extern int slprintf_nocheck(char *dst, size_t size, const char *fmt, ...); +extern char *strtrim_right(char *p, char c); +extern noinline void *xmemset(void *s, int c, size_t n); + +#endif /* STR_H */ -- cgit v1.2.3-54-g00ecf