RE: [xml] xmlShell usage on non-stdout
- From: "Vakoc, Mark" <Mark_Vakoc jdedwards com>
- To: "'veillard redhat com'" <veillard redhat com>
- Cc: "'xml gnome org'" <xml gnome org>
- Subject: RE: [xml] xmlShell usage on non-stdout
- Date: Tue, 8 Oct 2002 16:02:40 -0600
Please Note: this requires changing two public APIs to add the
xmlShellCtxtPtr parameter: xmlShellPrintNode and
xmlShellPrintXPathResult
Less okay, that is not possible, so I simply transformed them into 2
static internal only functions and made the public ones call
them with
a NULL context, so the API ain't changed and functionnality
should remain.
BTW I'm surprized, nothing seems to call the version of
xmlShellPrintXPathResult with a context in the patched file.
I just made it a requiremetn for xmlShellPrintXPathResult to have a ctxt
because it called xmlShellPrintNode. Your approach is better and maintains
the ABI.
Double check my
commit, I have the feeling something went through the cracks...
xmlShellPrintNodeCtxt(ctxt,node) has something like
if (!ctxt || !node)
return 0;
which was from my mods -- your method needs to handle a NULL ctxt, so
something like
xmlShellPrintNodeCtxt(ctxt,node)
{
FILE *fp;
if (!node)
return 0;
if (!ctxt)
fp = stdout;
else
fp = ctxt->output;
fprintf(fp,"print something");
}
I'd send a diff, but your changes have not replicated over to anoncvs yet.
I'm also going to add xmlShellUser() and xmlShellReadLineUser() that handle
passing in a void* ptr on the call to xmlShell() and is made available in
the xmlShellReadLineUser function. For my application I need to be able to
give the ReadLine function some context of where to read from -- it's
multi-threaded/multi-windowed.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]