Dumb question I am sure but as I see at :
https://www.x.org/releases/X11R7.7/doc/man/man3/XCreateGC.3.xhtml
Where it says :
XCreateGC can generate BadAlloc, BadDrawable, BadFont,
BadMatch, BadPixmap, and BadValue errors.
Yes but where exactly are these errors returned? I see the
"DIAGNOSTICS" section at the bottom of that page but where does
one fetch the error state?
One may do :
gc = XCreateGC(dsp, win, valuemask, &values);
/* note that a 32-bit system will throw a warning about
* cast from pointer to integer of different size with
* (int64_t) type used on a pointer comparison. */
if ((int64_t)gc < 0) { /* just taser me */
fprintf(stderr, "XCreateGC failed\n");
exit(EXIT_FAILURE); /* clumsy */
}
However that just can't be right.
Where is the error state returned ?
dc
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel