This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: XML XInclude support
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 6 Feb 2007 07:49:10 -0500
- Subject: Re: XML XInclude support
- References: <20070129213229.GA17422@nevyn.them.org> <usldo1jdf.fsf@gnu.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.
> 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.
--
Daniel Jacobowitz
CodeSourcery