Re: XForms: outb()) error:outb(inb(0x61) & ~3, 0x61); fl_finish(); produces: select: Bad file numbe

Steve Lamont (
Fri, 3 Apr 98 05:47:37 PST

# To subscribers of the xforms list from (Steve Lamont) :

> does anyone have experience talking to the hardware using an xforms app?
> I got a seg violation and wonder if this error is related to the forms library.
> [...]
> void s_cb(FL_OBJECT *ob, long c){
> if (c>=1 && c<=9) sound(f[c-1]);
> else { nosound(),
> #if 0
> fl_finish(); /* seg fault */
> #else
> exit(0); /* ok */
> #endif
> }
> }

I think the problem here is not related to hardware but to the fact
that you're calling fl_finish() from a callback function and then

The primary purpose of fl_finish() is to clean up any modifications
that XForms has made to the server defaults in the case of a callback
activated by a shortcut. The fl_finish() should be more or less
immediately followed by an exit(), since as a side effect the server
connection is also shut down.

You should not return to the XForms main loop from the callback.


exit( 0 );

To unsubscribe, send the message "unsubscribe" to or see
XForms Home Page:
List Archive: