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 »

On Sat, May 9, 2009 at 5:15 PM, 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
>
> =A0 =A0 =A0 =A0command_line $USER1$/check_foo one\
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 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.

We do this a lot for some of our check commands that take a long list
of arguments as I would think others do (wouldn't think it is so much
of an edge case if one is using long options in command lines for
readability). Most people would put a space between the last
character in the line and the continuation character as most (not all
of course) programming languages otherwise would treat the \ as a
character in the last word of the line :P.

We have lots of cases of

check_command path_to_file --switch1 --switch2 --switch-with-arg 1 \
--switch-with-arg 2 \
--switch-with-arg 3 \
--switch-with-arg 4

so just please don't allow someone to now add a patch to strip
trailing characters from before continuations too :) - hopefully a few
good test cases would ensure this does not happen.

Regards,
Max





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