Newlines in /proc/.../config

Eddie Kohler kohler at aciri.org
Wed Jun 20 09:37:34 EDT 2001


Hi Brecht --

> it's a detail, but does anyone know why in click 1.1 the config files in
> /proc contained the newlines as given in the configuration (e.g. for
> LookupIPRoute every entry was on a new line) when catting the config
> 'file' and now in the CVS version (and click 1.2.0) it is changed and
> the whole configuration is one line.

The newer Clicks reconstitute the configuration string from a Vector of
arguments. This loses any irrelevant whitespace, replacing it with single
spaces; thus, the missing newlines.

The relevant method is Element::configuration(). This method is here to
stay, I think. The reason: it greatly eases the implementation of generic
read/write handlers like read_positional_handler, read_keyword_handler,
reconfigure_positional_handler, and reconfigure_keyword_handler.

Nevertheless, I understand your problem. Current CVS has changes that will
preserve whitespace when possible.

love,
ed




More information about the click mailing list