Re: Bug in fl_set_object_lstyle

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 14 Mar 97 06:42:37 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> > The call "fl_set_object_lstyle(obj,FL_BOLD_STYLE+FL_SHADOW_STYLE);"
> ^^^
> > causes seg fault in 0.85 on Solaris and AIX (0.81 works fine).
> > It works, if only one attribute is specified.
>
> Change the '+' to a '|'.

`+' or `|' should produce the same numerical result in this case (0x0201).

This is just a wild guess but perhaps the original poster is picking
up the wrong version of either libforms.a or forms.h. The definitions
of FL_SHADOW_STYLE, FL_ENGRAVED_STYLE, and FL_EMBOSSED_STYLE changed
between 0.81 and 0.84 to allow them to fit into a short.

In 0.81 they were

FL_SHADOW_STYLE = (1 << 17),
FL_ENGRAVED_STYLE = (1 << 18),
FL_EMBOSSED_STYLE = (1 << 19)

and in 0.8[45] they are

/* modfier masks. Need to fit a short */
FL_SHADOW_STYLE = (1 << 9),
FL_ENGRAVED_STYLE = (1 << 10),
FL_EMBOSSED_STYLE = (1 << 11)

If you're picking up the 0.81 forms.h and the 0.85 library either at
link or run time this may cause heartburn (though in truth I'd just
expect that FL_SHADOW_STYLE would just be ignored).

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/