Re: [Nagios-devel] Leading space in continuation lines

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Leading space in continuation lines

Post by Guest »


--Apple-Mail-25-783927830
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit

On 17 Jun 2009, at 05:19, Ethan Galstad wrote:

> Holger Weiss wrote:
>> * Gerhard Lausser [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/Develo ... 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


--Apple-Mail-25-783927830
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On 17 Jun 2009, at =
05:19, Ethan Galstad wrote:Holger =
Weiss wrote:* Gerhard Lausser <[email protected]> =
[2009-05-02 13:49]:I attached a patch for base/utils.c(mmap_fgets_multiline) =
(v3.10) which cutsoff leading white space from =
continuation lines.Of course, this =
breaks configurations which do stuff like =
command_line $USER1$/check_foo one\ =
=
            &n=
bsp;           &nbs=
p;     twoand expect to =
get this parsed with white space between "one" and =
"two".However, this =
incompatibility is probably negligible, and I guess =
mostusers would prefer if =
leading white space was stripped from =
continuationlines.So, I'd =
appreciate if the patch was committed.  I've attached a =
versionof the diff which =
updates cgi/cgiutils.c:mmap_fgets_multiline(), =
too,and which simplifies the =
code a bit.HolgerThanks - patch is in =
CVS.While testing C code is =
pretty hard, testing configuration parsing is very easy. See <a =
href=3D"http://wiki.nagios.org/index.php/Develo

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked