| 598 | } |
| 599 | |
| 600 | void |
| 601 | curses_putmixed(winid window, int attr, const char *str) |
| 602 | { |
| 603 | const char *substr = 0; |
| 604 | char buf[BUFSZ]; |
| 605 | boolean done_output = FALSE; |
| 606 | #ifdef ENHANCED_SYMBOLS |
| 607 | int utf8flag = 0; |
| 608 | #endif |
| 609 | |
| 610 | if (window == WIN_MESSAGE) { |
| 611 | str = mixed_to_glyphinfo(str, &mesg_gi); |
| 612 | mesg_mixed = 1; |
| 613 | } else { |
| 614 | if ((substr = strstri(str, "\\G")) != 0) { |
| 615 | #ifdef ENHANCED_SYMBOLS |
| 616 | if ((windowprocs.wincap2 & WC2_U_UTF8STR) && SYMHANDLING(H_UTF8)) { |
| 617 | mixed_to_utf8(buf, sizeof buf, str, &utf8flag); |
| 618 | } else { |
| 619 | #endif |
| 620 | decode_mixed(buf, str); |
| 621 | #ifdef ENHANCED_SYMBOLS |
| 622 | } |
| 623 | #endif |
| 624 | /* now send buf to the normal putstr */ |
| 625 | curses_putstr(window, attr, buf); |
| 626 | done_output = TRUE; |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | if (!done_output) { |
| 631 | /* just send str to the normal putstr */ |
| 632 | curses_putstr(window, attr, str); |
| 633 | } |
| 634 | if (window == WIN_MESSAGE) |
| 635 | mesg_mixed = 0; |
| 636 | } |
| 637 | |
| 638 | /* Display the file named str. Complain about missing files |
| 639 | iff complain is TRUE. |
nothing calls this directly
no test coverage detected