[rescue] $ for repair to 35 line X11 complete program

George Wyche gw at citasystems.com
Thu Jul 22 22:14:42 CDT 2010


OK. Back from watching the TDF. Those guys are 2 peas in a pod when it 
comes to climbing. Watching it through the fog and cold made it all the 
more eerie. Those fans are FAN_atics. The time my wife and I watched a 
stage come through everyone was comatose by comparison to this stage.

Thank you, der Mouse. I got off on the wrong foot by following the code 
fragments of others. I was attracted to that come BECAUSE it "paid 
attention to return values", and was smug about later code that just 
seem to totally ignore return values! "Everything YOU know is wroooong". 
It wouldn't be the first time.

I'll catch my breath with your revelation. How about $100 Canadian?

Willing to let me have a copy of your X API that tags which do and which 
don't?

Thanks, also to Scott and Patrick for your attention. I'll go over to 
SunForums and razz them a little.

ggw

der Mouse wrote:
>> Same here.  I think this is it:
>> http://www.io.com/~cjwyche/2010/20100718/trouble.html
> 
> I think so.
> 
> And the problem is very simple: XStoreColor does not return anything
> useful.  Looking at XStoreColor's return value gives you meaningless
> trash, probably whatever was lying around in some machine register or
> other.
> 
> Most errors in X are not reported through return values (a few are, but
> they are specifically called out as such in the documentation); if an
> XStoreColor call provokes an error, then at some later point in the
> program your error handler (see XSetErrorHandler) will get called with
> an XErrorEvent giving the details.  The default error handler just
> prints out some basic information about the error and exits.
> 
> If the API were being designed today, XStoreColor would probably be
> declared as returning void.  But the X API predates the ability for
> functions to "return" void; I noticed this because one of the things I
> have done in the X tree I use is to go through and add such
> declarations to the functions that deserve them.  So when I tried to
> compile your program I got a "void value not ignored as it ought to be"
> error, which pointed me to the problem immediately.
> 
> /~\ The ASCII				  Mouse
> \ / Ribbon Campaign
>  X  Against HTML		mouse at rodents-montreal.org
> / \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
> _______________________________________________
> rescue list - http://www.sunhelp.org/mailman/listinfo/rescue



More information about the rescue mailing list