Re: [Nagios-devel] [PATCH] 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] [PATCH] Continuation lines

Post by Guest »

* Ethan Galstad [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





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