+#else /*COMPILE_UTILITY*/
+uschar *
+xtextencode(uschar * clear, int len)
+{
+int enc_len = 1, i = len; /* enc_len includes space for terminating NUL */
+uschar * yield, * s;
+
+for (s = clear; i; i--, s++)
+ {
+ uschar ch = *s;
+ enc_len += ch < 33 || ch > 126 || ch == '+' || ch == '='
+ ? 3 : 1;
+ }
+if (!(yield = s = malloc(enc_len)))
+ return NULL;
+for(uschar ch; len > 0; len--, clear++)
+ if ((ch = *clear) < 33 || ch > 126 || ch == '+' || ch == '=')
+ s += sprintf(CS s, "+%.02X", ch);
+ else
+ *s++ = ch;
+*s = '\0';
+return yield;
+}
+
+#endif /*COMPILE_UTILITY*/