Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20010714180801.41328.qmail@web9101.mail.yahoo.com> Date: Sat, 14 Jul 2001 11:08:01 -0700 (PDT) From: Chris Genly Reply-To: chgenly AT alum DOT mit DOT edu Subject: [Patch] regtool - Handle keys with only one subkey To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I was writing a small installer script using bash and regtool. I ran in to a bug in regtool which prevented it from creating top level keys. Below is the change log and unified diff patch. I do not subscribe to this list, so send email directly if you wish to talk to me about the change. cygwin is amazing. I'm glad to make a tiny contribution. 2001-07-14 Chris Genly * regtool.cc (find_key): Handle keys with only one subkey. For example /root/.roapi --- regtool.cc.orig Mon Jan 29 18:36:18 2001 +++ regtool.cc Fri Jul 13 20:59:46 2001 @@ -221,11 +221,15 @@ find_key (int howmanyparts, REGSAM acces e--; if (*e != '\\') { - fprintf (stderr, "Invalid key\n"); - exit (1); + key = wkprefixes[i].key; + value = n; + return; + } + else + { + *e = 0; + value = e + 1; } - *e = 0; - value = e + 1; } if (n[0] == 0) { ===== -------------------------------------------------------- Chris Genly Email: chgenly AT alum DOT mit DOT edu Speech, Distributed Objects and Renewable energy for all. __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/