for (;;)
{
while (isspace(*ptr))
- {
- if (*ptr == '\n') line_number++;
- ptr++;
- }
+ if (*ptr++ == '\n') line_number++;
if (comment_allowed && *ptr == '#')
- {
- while (*(++ptr) != '\n' && *ptr != 0);
- continue;
- }
- else break;
+ while (*++ptr != '\n' && *ptr) ;
+ else
+ break;
}
return ptr;
}
static const uschar *
nextword(const uschar *ptr, uschar *buffer, int size, BOOL bracket)
{
-uschar *bp = buffer;
-while (*ptr != 0 && !isspace(*ptr) &&
+uschar * bp = buffer;
+while (*ptr && !isspace(*ptr) &&
(!bracket || (*ptr != '(' && *ptr != ')')))
- {
- if (bp - buffer < size - 1) *bp++ = *ptr++; else
+ if (bp - buffer < size - 1)
+ *bp++ = *ptr++;
+ else
{
*error_pointer = string_sprintf("word is too long in line %d of "
"filter file (max = %d chars)", line_number, size);
break;
}
- }
-*bp = 0;
+
+*bp = '\0';
return nextsigchar(ptr, TRUE);
}
if (sscanf(CS s, "%i%n", &value, &count) != 1) return 0;
if (tolower(s[count]) == 'k') { value *= 1024; count++; }
if (tolower(s[count]) == 'm') { value *= 1024*1024; count++; }
-while (isspace((s[count]))) count++;
-if (s[count] != 0) return 0;
+while (isspace(s[count])) count++;
+if (s[count]) return 0;
*ok = TRUE;
return value;
}
if (subtype == TRUE)
{
- while (isspace(*s)) s++;
- if (*s)
+ if (Uskip_whitespace(&s))
{
header_add(htype_other, "%s%s", s,
s[Ustrlen(s)-1] == '\n' ? "" : "\n");
gstring * log_addr = NULL;
if (!to) to = expand_string(US"$reply_address");
- while (isspace(*to)) to++;
+ Uskip_whitespace(&to);
for (tt = to; *tt; tt++) /* Get rid of newlines */
if (*tt == '\n')
/* Move on past this address */
tt = ss + (*ss ? 1 : 0);
- while (isspace(*tt)) tt++;
+ Uskip_whitespace(&tt);
}
if (log_addr)
/* End of filter.c */
+/* vi: aw ai sw=2
+*/