From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7954 invoked by alias); 7 Feb 2007 18:16:24 -0000 Received: (qmail 7946 invoked by uid 22791); 7 Feb 2007 18:16:23 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (213.8.233.22) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Feb 2007 18:16:15 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-70-73.inter.net.il [80.230.70.73]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FZS91600 (AUTH halo1); Wed, 7 Feb 2007 20:15:54 +0200 (IST) Date: Wed, 07 Feb 2007 18:16:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: gdb-patches@sourceware.org In-reply-to: <20070206124910.GA31162@nevyn.them.org> (message from Daniel Jacobowitz on Tue, 6 Feb 2007 07:49:10 -0500) Subject: Re: XML XInclude support Reply-to: Eli Zaretskii References: <20070129213229.GA17422@nevyn.them.org> <20070206124910.GA31162@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00058.txt.bz2 > Date: Tue, 6 Feb 2007 07:49:10 -0500 > From: Daniel Jacobowitz > Cc: gdb-patches@sourceware.org > > On Fri, Feb 02, 2007 at 08:53:32PM +0200, Eli Zaretskii wrote: > > > + /* Simple, portable version of dirname that does not modify its > > > + argument. */ > > > + base = lbasename (filename); > > > + while (base > filename && IS_DIR_SEPARATOR (base[-1])) > > > + --base; > > > > I'm glad to see portable file-name handling, but this loop needs a > > small extra to not fail in the case of "d:foo". > > Does it? lbasename ("d:foo") will return a pointer to the 'f'. At > that point base > filename is true, but IS_DIR_SEPARATOR is false, > so we use "d:" as the directory name. If that's wrong, I don't know > enough about DOS based filesystems to know why. "d:" is wrong because when you use it to construct a file name, you will get "d:/bar", which is generally not in the same directory as "d:foo". What you need is to produce "d:." from "d:foo", not "d:". > > I'd suggest to use @var{document} instead of @var{name}, and reword > > the last sentence like this: > > Is this better? > > @noindent > When @value{GDBN} encounters an element of this form, it will retrieve > the named XML @var{document}, and replace the inclusion directive with > the contents of that document. If the current description was read > using @samp{qXfer}, then so will be the included document; > @var{document} will be interpreted as the name of an annex. If the > current description was read from a file, @value{GDBN} will look for > @var{document} as a file in the same directory where it found the > original description. Yes, this is much better. Thanks.