[PATCH] Continuation lines
Andreas Ericsson
ae at op5.se
Sun Dec 9 22:16:27 CET 2007
Holger Weiss wrote:
> * Ethan Galstad <nagios at nagios.org> [2007-12-09 10:53]:
>> Holger Weiss wrote:
>>> The attached patch adds support for using continuation lines throughout
>>> all configuration files: If the last character before a newline is a
>>> backslash, the backslash will be stripped, and if the second last
>>> character is not a backslash, the following line will be appended prior
>>> to parsing.
>>>
>>> base/utils.c (and cgi/cgiutils.c) had an mmap_fgets_multiline() function
>>> already, but the function wasn't used anywhere and it didn't work out of
>>> the box.
>> Thanks for the note and patch Holger. I must have forgotten to finish
>> implementing this in the past. I fixed the bug in the original function
>> and have posted the fixes to CVS.
>
> Thanks a lot, though the following line is now appended if and only if
> two backslashes are used. From the original function, I assumed the
> idea was to append the following line if the current line ends with a
> backslash _unless_ this backslash was escaped using another backslash.
> IMO, doing it this way round would be more intuitive as it's a common
> way to implement continuation lines.
>
What Holger said. ;-)
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
More information about the Developers
mailing list