Leading space in continuation lines
Ton Voon
ton.voon at opsera.com
Fri Jun 19 04:38:20 CEST 2009
On 17 Jun 2009, at 05:19, Ethan Galstad wrote:
> Holger Weiss wrote:
>> * Gerhard Lausser <Gerhard.Lausser at consol.de> [2009-05-02 13:49]:
>>> I attached a patch for base/utils.c(mmap_fgets_multiline) (v3.10)
>>> which cuts
>>> off leading white space from continuation lines.
>>
>> Of course, this breaks configurations which do stuff like
>>
>> command_line $USER1$/check_foo one\
>> two
>>
>> and expect to get this parsed with white space between "one" and
>> "two".
>> However, this incompatibility is probably negligible, and I guess
>> most
>> users would prefer if leading white space was stripped from
>> continuation
>> lines.
>>
>> So, I'd appreciate if the patch was committed. I've attached a
>> version
>> of the diff which updates cgi/cgiutils.c:mmap_fgets_multiline(), too,
>> and which simplifies the code a bit.
>>
>> Holger
>>
>
> Thanks - patch is in CVS.
While testing C code is pretty hard, testing configuration parsing is
very easy. See http://wiki.nagios.org/index.php/Developer_Guidelines#Configuration_file_tests
for instructions.
I've committed a test case for the config generation based on Gerhard
and Holger's examples.
So please consider this a little plea to add tests for patches when
doing changes around configuration files :)
Ton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090619/358c7a25/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list