dovecot-1.2: settings parser: If line ends with '\' continuation...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Dec 8 20:35:39 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/b7f739902a47
changeset: 9496:b7f739902a47
user: Timo Sirainen <tss at iki.fi>
date: Tue Dec 08 13:35:34 2009 -0500
description:
settings parser: If line ends with '\' continuation, remove extra whitespace before it.
diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
src/lib-settings/settings.c | 7 +++++--
diffs (17 lines):
diff -r 24e48c1d7f79 -r b7f739902a47 src/lib-settings/settings.c
--- a/src/lib-settings/settings.c Thu Dec 03 11:14:45 2009 -0600
+++ b/src/lib-settings/settings.c Tue Dec 08 13:35:34 2009 -0500
@@ -246,8 +246,11 @@ prevfile:
if (len > 0 && line[len-1] == '\\') {
/* continues in next line */
- line[len-1] = '\0';
- str_append(full_line, line);
+ len--;
+ while (IS_WHITE(line[len-1]))
+ len--;
+ str_append_n(full_line, line, len);
+ str_append_c(full_line, ' ');
continue;
}
if (str_len(full_line) > 0) {
More information about the dovecot-cvs
mailing list