Subject: Re: proplib changes
To: None <tech-kern@NetBSD.org>
From: Pavel Cahyna <pavel@NetBSD.org>
List: tech-kern
Date: 06/13/2007 08:20:46
On Tue, Jun 12, 2007 at 09:14:10PM +0200, Jachym Holecek wrote:
> # Jason Thorpe 2007-06-12:
> > On Jun 11, 2007, at 4:11 AM, Jachym Holecek wrote:
> > >Add a "codec" argument to _externalize_to_file(), when NULL use the
> > >default? (This is source-incompatible change to proplib API -- I'd
> > >prefer that over coming up with an extra function to "externalize
> > >to file with codec".)
> >
> > No, it should be a separate API call that takes a codec argument.
> > Most applications don't care what codec is used and just want the
> > default. Applications that (pointlessly) care can bear the burden of
> > the more complex API call.
>
> In that case I'd prefer not to add the function, at least until there's
> real demand for it. Userland version of proplib can pick default codec
> for _externalize() calls based on an environment variable (except where
> plists are passed to kernel) so that the user can enforce his choice
> of favorite format.
More important than setting a favorite format by environment variable is
IMO preserving the format of a file which is read in an application,
modified and saved.
Pavel