From b90f71ca2ab1b2eea7ca992b1e51a4b39afe0728 Mon Sep 17 00:00:00 2001 From: Scott Perry Date: Mon, 26 May 2008 12:38:15 +0200 Subject: Use strtok_r instead of strchr in IRC_JOIN. This patch does significant cleanup on the join code by using strtok_r instead of mangling strchr to parse channel names and keys in parallel when a JOIN command contains a list of channels and keys. Also adds an strtok_r implementation to libportab. --- src/portab/portab.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/portab/portab.h') diff --git a/src/portab/portab.h b/src/portab/portab.h index 2a133efc..83e11313 100644 --- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -148,6 +148,10 @@ extern size_t strlcpy PARAMS(( char *dst, const char *src, size_t size )); extern char * strdup PARAMS(( const char *s )); #endif +#ifndef HAVE_STRTOK_R +extern char * strtok_r PARAMS((char *str, const char *delim, char **saveptr)); +#endif + #ifndef HAVE_VSNPRINTF #include extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list args )); -- cgit 1.4.1