if ((p = Ustrstr(buffer, "==")) != NULL)
{
- queue_item *qq = find_queue(id, queue_noop, 0);
+ queue_item * qq = find_queue(id, queue_noop, 0);
if (qq)
{
dest_item *d;
p += 2;
while (isspace(*p)) p++;
q = p;
- while (*p != 0 && !isspace(*p))
+ while (*p && !isspace(*p))
{
if (*p++ != '\"') continue;
- while (*p != 0)
- {
+ while (*p)
if (*p == '\\') p += 2;
- else if (*p++ == '\"') break;
- }
+ else if (*p++ == '\"') break;
}
*p++ = 0;
if ((r = strstric(q, qualify_domain, FALSE)) != NULL &&
check that the remaining length is 32. */
auth_vars[0] = expand_nstring[1] = clear;
-while (*clear && !isspace(*clear)) clear++;
+Uskip_nonwhite(&clear);
if (!isspace(*clear)) return FAIL;
*clear++ = 0;
Uskip_whitespace(&key);
data = key;
- while (*data && !isspace((uschar)*data)) data++;
- *data++ = 0;
+ Uskip_nonwhite(&data);
+ *data++ = '\0';
Uskip_whitespace(&data);
dbwait = (dbdata_wait *)(&structbuffer);
else
{
keystart = s;
- while (*s != 0 && *s != ':' && !isspace(*s)) s++;
+ while (*s && *s != ':' && !isspace(*s)) s++;
exim_datum_size_set(&key, s - keystart + add_zero);
}
keybuffer[i] = 0;
started = 1;
- while (isspace(*s))s++;
+ while (isspace(*s)) s++;
if (*s == ':')
{
s++;
- while (isspace(*s))s++;
+ while (isspace(*s)) s++;
}
if (*s != 0)
{
static inline uschar skip_whitespace(const uschar ** sp)
{ while (isspace(**sp)) (*sp)++; return **sp; }
+/* Ditto, non-whitespace */
+
+#define Uskip_nonwhite(sp) skip_nonwhite(CUSS sp)
+static inline uschar skip_nonwhite(const uschar ** sp)
+{ while (**sp && !isspace(**sp)) (*sp)++; return **sp; }
+
/******************************************************************************/
unsigned n;
const uschar * s = options;
- while (*options && !isspace(*options)) options++;
+ Uskip_nonwhite(&options);
n = options-s;
if (Ustrncmp(s, "randomize", n) == 0) randomize = TRUE;
if (*options)
{
options++;
- while (*options && isspace(*options)) options++;
+ Uskip_whitespace(&options);
}
}
rword = buffer;
Uskip_whitespace(&rword);
rdata = rword;
-while (*rdata && !isspace(*rdata)) rdata++;
+Uskip_nonwhite(&rdata);
if (*rdata) *rdata++ = '\0';
/* The word must be a known yield name. If it is "REDIRECT", the rest of the
if (*query == '/')
{
uschar * s = query;
- while (*query && !isspace(*query)) query++;
+ Uskip_nonwhite(&query);
*fnamep = string_copyn(s, query - s);
Uskip_whitespace(&query);
}
case HELP_CMD:
case NOOP_CMD:
case ETRN_CMD:
+#ifdef EXPERIMENTAL_WELLKNOWN
+ case WELLKNOWN_CMD:
+#endif
bsmtp_transaction_linecount = receive_linecount;
break;
if (where == ACL_WHERE_AUTH) /* avoid logging auth creds */
{
- uschar * s;
- for (s = smtp_cmd_data; *s && !isspace(*s); ) s++;
+ uschar * s = smtp_cmd_data;
+ Uskip_nonwhite(&s);
lim = s - smtp_cmd_data; /* atop after method */
}
what = string_sprintf("%s %.*s", acl_wherenames[where], lim, place);
case TOO_MANY_NONMAIL_CMD:
s = smtp_cmd_buffer;
- while (*s && !isspace(*s)) s++;
+ Uskip_nonwhite(&s);
incomplete_transaction_log(US"too many non-mail commands");
log_write(0, LOG_MAIN|LOG_REJECT, "SMTP call from %s dropped: too many "
"nonmail commands (last was \"%.*s\")", host_and_ident(FALSE),
{
p += 5;
Uskip_whitespace(&p);
- while (!isspace(*p)) p++;
+ Uskip_nonwhite(&p);
Uskip_whitespace(&p);
}
while (*p) *p++ = '*';
/* First find the end of the string */
if (*s != '\"')
- while (*s && !isspace(*s)) s++;
+ Uskip_nonwhite(&s);
else
{
s++;
return FALSE;
}
adding = *s++ == '+';
- for (end = s; *end && !isspace(*end); ) end++;
+ end = s;
+ Uskip_nonwhite(&end);
item_parsed = tls_openssl_one_option_parse(string_copyn(s, end-s), &item);
if (!item_parsed)
{
{
filename = semicolon + 1;
key = filename;
- while (*key != 0 && !isspace(*key)) key++;
+ Uskip_nonwhite(&key);
filename = string_copyn(filename, key - filename);
Uskip_whitespace(&key);
}
uschar * val;
word = ++s; /* skip the = */
- while (*s && !isspace(*s)) s++;
+ Uskip_nonwhite(&s);
len = s - word;
DEBUG(D_transport) debug_printf(" XCLIENT: \tvalue %.*s\n", len, word);