diff th_string.h @ 124:fe4d5f3b486c

Sync.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 29 Oct 2010 16:41:08 +0300
parents 69aed051f84d
children 9ae3d87a686f
line wrap: on
line diff
--- a/th_string.h	Fri Oct 29 10:58:39 2010 +0300
+++ b/th_string.h	Fri Oct 29 16:41:08 2010 +0300
@@ -15,6 +15,7 @@
 #include "th_util.h"
 #include <stdlib.h>
 #include <ctype.h>
+#include <stdarg.h>
 
 /* Macros
  */
@@ -41,23 +42,26 @@
 
 /* Normal NUL-terminated string functions
  */
-char    *th_stralloc(size_t);
-char    *th_strrealloc(char *, size_t);
 char    *th_strncpy(char *, const char *, size_t);
-int     th_strcasecmp(char *, char *);
-int     th_strncasecmp(char *, char *, size_t);
+int     th_strcasecmp(const char *, const char *);
+int     th_strncasecmp(const char *, const char *, size_t);
 void    th_strip_ctrlchars(char *);
 
+#ifdef STRDUP_PRINTF
+char    *th_strdup_vprintf(const char *, va_list);
+char    *th_strdup_printf(const char *, ...);
+#endif
+
 char    *th_strdup(const char *);
-int     th_pstrcpy(char **, char *);
-int     th_pstrcat(char **, char *);
+int     th_pstrcpy(char **, const char *);
+int     th_pstrcat(char **, const char *);
 
-char    *th_findnext(char *, size_t *);
-char    *th_findsep(char *, size_t *, char);
-char    *th_findseporspace(char *, size_t *, char);
+const char    *th_findnext(const char *, size_t *);
+const char    *th_findsep(const char *, size_t *, char);
+const char    *th_findseporspace(const char *, size_t *, char);
 
-BOOL    th_strmatch(char *, char *);
-BOOL    th_strcasematch(char *, char *);
+BOOL    th_strmatch(const char *, const char *);
+BOOL    th_strcasematch(const char *, const char *);
 
 
 #ifdef __cplusplus