* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: irc_string.h 3532 2007-07-14 13:32:18Z jilles $
+ * $Id: irc_string.h 3538 2007-07-26 14:21:57Z jilles $
*/
#ifndef INCLUDED_irc_string_h
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
-#ifdef HAVE_STRDUP
-#define DupString(x,y) do { x = strdup(y); if(x == NULL) outofmemory(); } while(0)
-#else
-#define DupString(x,y) do { x = malloc(strlen(y) + 1); if(x == NULL) outofmemory(); strcpy(x, y); } while(0)
-#endif
-
#ifdef HAVE_STRNDUP
#define DupNString(x, y, len) do { x = strndup(y, len); if(x == NULL) outofmemory(); } while (0)
#else
const char *myctime(time_t);
-#define EmptyString(x) (!(x) || (*(x) == '\0'))
+#define EmptyString(x) ((x) == NULL || *(x) == '\0')
#define CheckEmpty(x) EmptyString(x) ? "" : x
char *strtoken(char **save, char *str, const char *fs);