]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/functions.h
tidying: skip_whitespace
[user/henk/code/exim.git] / src / src / functions.h
index 90e6e6791f159a74d4f5d670ffcb905b0c1a6bd4..28d6f26a66c7d0a83bf1b6fbda26607ff75e03f8 100644 (file)
@@ -13,6 +13,7 @@ are in in fact in separate headers. */
 #ifndef _FUNCTIONS_H_
 #define _FUNCTIONS_H_
 
+#include <ctype.h>
 #include <sys/time.h>
 
 
@@ -439,10 +440,10 @@ extern void    route_show_supported(FILE *);
 extern void    route_tidyup(void);
 
 extern uschar *search_find(void *, const uschar *, uschar *, int,
-                const uschar *, int, int, int *);
+                const uschar *, int, int, int *, const uschar *);
 extern int     search_findtype(const uschar *, int);
 extern int     search_findtype_partial(const uschar *, int *, const uschar **, int *,
-                 int *);
+                 int *, const uschar **);
 extern void   *search_open(const uschar *, int, int, uid_t *, gid_t *);
 extern void    search_tidyup(void);
 extern void    set_process_info(const char *, ...) PRINTF_FUNCTION(1,2);
@@ -666,6 +667,15 @@ return US strncpy(CS dst, CCS src, n);
 /*XXX will likely need unchecked copy also */
 
 
+/* Advance the string pointer given over any whitespace.
+Return the next char as there's enought places using it to be useful. */
+
+#define Uskip_whitespace(sp) skip_whitespace(CUSS sp)
+
+static inline uschar skip_whitespace(const uschar ** sp)
+{ while (isspace(**sp)) (*sp)++; return **sp; }
+
+
 /******************************************************************************/
 
 #if !defined(MACRO_PREDEF) && !defined(COMPILE_UTILITY)