Debug: expansions: refactor ascii-art/UTF8; mark up space & nl
[exim.git] / src / src / os.c
index 5c52c6d4d44d509a4f223069f36d100506f2c36d..3b49e4b9e980755b418e45e534f79229b1d9fcbc 100644 (file)
@@ -12,7 +12,8 @@
 # include <stdio.h>
 # include <time.h>
 #else
-# define DEBUG(x) if (debug_selector & (x))
+# define IS_DEBUG(x) (debug_selector & (x))
+# define DEBUG(x) if (IS_DEBUG(x))
 #endif
 
 #ifndef CS
@@ -893,6 +894,21 @@ return buffer ? buffer : realloc(b, strlen(b) + 1);
 #endif
 
 /* ----------------------------------------------------------------------- */
+/***********************************************************
+*             strchrnul()                                  *
+***********************************************************/
+
+#if !defined(EXIM_HAVE_STRCHRNUL)
+char *
+strchrnul(const char * s, int c)
+{
+while (*s != c && *s) s++;
+return CS s;
+}
+#endif
+
+
+/* ----------------------------------------------------------------------- */