X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fstring.c;h=ced1ad8c78bfe71236b67242708ab82619fd799c;hb=d48326c00b228279a957da7f58b48a55f4b7823b;hp=288466113fe860303f72b8cdecfc31b13c2e45fb;hpb=aaabfafe3fb76b1e09a68317ef4b3d5bc94fa9be;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/string.c b/src/src/string.c index 288466113..ced1ad8c7 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -223,6 +223,8 @@ interpreted in strings. Arguments: pp points a pointer to the initiating "\" in the string; the pointer gets updated to point to the final character + If the backslash is the last character in the string, it + is not interpreted. Returns: the value of the character escape */ @@ -235,6 +237,7 @@ const uschar *hex_digits= CUS"0123456789abcdef"; int ch; const uschar *p = *pp; ch = *(++p); +if (ch == '\0') return **pp; if (isdigit(ch) && ch != '8' && ch != '9') { ch -= '0'; @@ -408,7 +411,7 @@ return ss; -#ifdef HAVE_LOCAL_SCAN +#if defined(HAVE_LOCAL_SCAN) && !defined(MACRO_PREDEF) && !defined(COMPILE_UTILITY) /************************************************* * Copy and save string * *************************************************/ @@ -429,7 +432,7 @@ As above, but explicitly specifying the result taint status */ uschar * -string_copy_taint(const uschar * s, BOOL tainted) +string_copy_taint_function(const uschar * s, BOOL tainted) { int len = Ustrlen(s) + 1; uschar *ss = store_get(len, tainted); @@ -1138,8 +1141,8 @@ memcpy(g->s + p, s, count); g->ptr = p + count; return g; } - - + + gstring * string_cat(gstring *string, const uschar *s) {