[Xastir] Print and/or screen dump
Tom Russo
russo at bogodyn.org
Tue Dec 28 12:57:31 EST 2004
On Tue, Dec 28, 2004 at 12:29:56PM -0500, we recorded a bogon-computron collision of the <kd1yv at arrl.net> flavor, containing:
> Tom Russo wrote:
>
> >On Tue, Dec 28, 2004 at 08:36:39AM -0800, we recorded a bogon-computron
> >collision of the <archer at eskimo.com> flavor, containing:
> >[SNIP]
> >
> >
> >>>#define XpmColorFailed -4
> >>>
> >>>Given the return value in the fprintf, you'd be able to see why it says
> >>>it's
> >>>failing. That might not tell you how to make it succeed, but if it's
> >>>OpenFailed or FileInvalid it might point the way. If it's ColorError,
> >>>NoMemory
> >>>or ColorFailed I don't know how to fix it.
> >>>
> >>>
> >>If you think the Xpm define's might be somewhat uniform across
> >>platforms, we could put in code that spits out the text to go along
> >>with the integers. If not, perhaps we could just dump out the int
> >>itself like you have above. No matter what it's good to tell the
> >>user more.
> >>
> >>
> >
> >Actually, there's apparently an XpmErrorMessage routine that interprets the
> >return codes and returns a string with an error message in it. I think
> >that's probably the way to go.
> >
> >If I have a chance today I'll do that. Of course I can't really test it
> >---
> >that routine never has failed for me.
> >
> Tom, Curt,
>
> It is still failing for me. I put in the earlier test that Tom
> suggested, and get a -1, although that still does not really tell me why
> it can't open the file. If you tell me where and how to splice in the
> code to get the xpm error message, I can give it a try.
I don't think it'll help you --- all it'll do is say "File Open Failed" instead
of "-1". If you still want to try it the easy thing to do would be to replace
the line:
fprintf(stderr,"ERROR %d writing %s\n", xpmretval, xpm_filename );
with:
fprintf(stderr,"ERROR writing %s: %s\n", xpm_filename,
XpmGetErrorString(xpmretval));
I think. That's just what the sparse online xpm documentation says, I haven't
tested it or even tried inserting that call --- caveat hacktor.
But at least you now know that the actual error is that the xpm library
can't open the file for output. That's not *much* help, but it narrows down
the search area.
--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://www.qsl.net/~km5vy/
"When life gives you lemons, find someone with a paper cut."
More information about the Xastir
mailing list