[PATCH] Continuation lines
Ethan Galstad
nagios at nagios.org
Thu Dec 13 18:08:20 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.
>
> Holger
>
I'll get this changed to work as you mentioned. Thanks!
Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web: www.nagios.org
-------------------------------------------------------------------------
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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
More information about the Developers
mailing list