diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-04-04 14:25:07 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-04-04 14:27:57 +0100 |
commit | 137ae145e066dda8f9d81cf6d2c9f76c15929605 (patch) | |
tree | b7e3810d54d55d71b94a72a9cd724c920ab69794 /src/src/functions.h | |
parent | 6641ba45c04b15d2d565c6e9bc6d37e6e731c49c (diff) |
tidying: skip_whitespace
Diffstat (limited to 'src/src/functions.h')
-rw-r--r-- | src/src/functions.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/src/functions.h b/src/src/functions.h index f3877563d..28d6f26a6 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -13,6 +13,7 @@ are in in fact in separate headers. */ #ifndef _FUNCTIONS_H_ #define _FUNCTIONS_H_ +#include <ctype.h> #include <sys/time.h> @@ -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) |