XForms: fl_enumerate_font blocks stdout

moini@eleceng.adelaide.edu.au
Mon, 21 Sep 1998 12:22:19 +0930 (CST)

# To subscribers of the xforms list from moini@eleceng.adelaide.edu.au :

Goday,

I used fl_enumerate_font two times in a program, once to get the short
names and then to get the long names.

main()
{
/* lotsa code here */
fl_enumerate_fonts(add_fonts, 1);
fl_enumerate_fonts(add_fonts2, 0);
/* lotsa code here */

}
/**************************************************************/
void
add_fonts(const char *str)
{
char tmp_s[256];

sprintf(tmp_s,"%s%%r1",str);
fl_addto_choice(WP2->font_name, tmp_s);
}
/**************************************************************/
void
add_fonts2(const char *str)
{
sprintf(FONT[FONT_COUNTER],"%s",str);
FONT_COUNTER++;
}
/**************************************************************/

I use the long version as a back up, and in case the fl_set_font_name fails I
revert to the old name.
Anyway. It seems that the call with the long name, blocks the stdout and
nothing can be printed afterwards. I have seen this problem only in a
sun-solaris 2.6 ultra 5 machine. The code happily worked in a redhat5.1 box.

Cheers
Ali

_________________________________________________
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/