Subject: Re: proplib and comments (Re: proplib changes)
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/28/2007 13:46:28
--E/DnYTRukya0zdZ1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Jun 28, 2007 at 01:13:17PM -0500, Eric Haszlakiewicz wrote:
>=20
> Stuff like this has always bugged me. That a line is "just a comment"
> doesn't mean it is unimportant, or that it is unnecessary. If I take
> the time add a comment to a config file describing something about it,
> it really pisses me off if some tool wipes it out.
It kinda depends on the nature of the file. Even now, if you added a
comment to the dhcp.leases file and got upset when it disappeared, I don't
think you'd get much sympathy. :-)
In general, I don't think Unix has done well at preserving comments in=20
machine-rewritten files. So nothing new is happening here.
I think a place where things might be very different with this discussion=
=20
is where we translate from one proplib format to another. In that case, we=
=20
probably do want comments to translate over. That however would need a=20
more-featured parser, namely one that can encode comments. :-)
> Correct me if I'm wrong, but I got the impression that one of the features
> that proplib is supposed to provide is the ability to have extensions
> to a dictionary that don't necessarily need to be understood by every
> application that uses it. It seems that comments would simply be a
> case of this.
Kinda. You're right about the feature. The problem though is that=20
comments, specifically, are something that don't get internalized. They=20
get dropped on the floor on the way in. So thus it's not so easy for an=20
application to preserve something it never saw. :-)
What should work fine, though, is to add extra key/value pairs to a=20
dictionary and shove the comment in there. Such a thing would stick around=
=20
through internalization and externalization.
Take care,
Bill
--E/DnYTRukya0zdZ1
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
iD8DBQFGhB4kWz+3JHUci9cRAvOKAJ48QkRo9iCoVOC3scwBgush4D/PIwCcCRak
yCy0QqIf25oFRR8WWeemqaY=
=M4Gt
-----END PGP SIGNATURE-----
--E/DnYTRukya0zdZ1--