This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Don't append extra NUL to registry-strings.


On Sep  4 05:05, Bas van Gompel wrote:
> Op Mon, 29 Aug 2005 10:21:19 +0200 schreef Corinna Vinschen
> in <20050829082119.GA24845@calimero.vinschen.de>:
> :  On Aug 28 22:49, Bas van Gompel wrote:
> : > Hi,
> : >
> : > When RegQueryValueEx returns a string-type, the final NUL is included
> : > in the returned size. I suggest dropping it.
> :
> :  I see what you're up to, but there would be two reasons not to drop the
> :  trailing \0.  First, the \0 is part of the "file content" in a way.  
> 
> Don't file-systems have their own way of reporting ends (EOF)?

Er... that doesn't matter, does it?  What we have here is a virtual file
system which allows access to the "file" content of registry keys.  The
_SZ keys contain what the type name suggests, zero-terminated strings.
The trailing \0 is part of the "file" content as defined by MS.  There's
no gain in just removing it without notice.

> :  Second, it would break backward compatibility with applications using
> :  /proc/registry.  This latter point concerns me a bit, though it can
> :  naturally only affect Cygwin applications.
> 
> Hmmm... :( ... possibly the CYGWIN-environment-variable might have room
> for something like ``registry:raw,data'' (default, for  now) to mean
> ``as is'', and other options might cause various levels of verbosity/
> interpretation... (I know SHTDI, but would P be TC for such a thing?)

That sounds like a lot of trouble for... what exactly?  What are you
trying to accomplish which can't be handled by a simple filter, say,
tr(1)?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]