| 652 | } |
| 653 | |
| 654 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 655 | |
| 656 | /* core requests updating one status field (or is indicating that it's time |
| 657 | to flush all updated fields); tty-style handling */ |
| 658 | static void |
| 659 | X11_status_update_tty( |
| 660 | int fld, |
| 661 | genericptr_t ptr, |
| 662 | int chg UNUSED, |
| 663 | int percent, |
| 664 | int color, |
| 665 | unsigned long *colormasks) /* bitmask of highlights for conditions */ |
| 666 | { |
| 667 | static int xtra_space[MAXBLSTATS]; |
| 668 | static unsigned long *cond_colormasks = (unsigned long *) 0; |
| 669 | |
| 670 | Arg args[6]; |
| 671 | Cardinal num_args; |
| 672 | Position lbl_x; |
| 673 | Dimension lbl_wid, brd_wid; |
| 674 | Widget label; |
| 675 | |
| 676 | struct status_info_t *si; |
| 677 | char goldbuf[40]; |
| 678 | const char *fmt; |
| 679 | const char *text; |
| 680 | unsigned long *condptr; |
| 681 | int f, x, y, dx; |
| 682 | |
| 683 | if (X11_status_fg == X11_status_bg || !X11_status_font) |
| 684 | tt_status_fixup(); |
| 685 | |
| 686 | if (fld == BL_RESET) { |
| 687 | #ifdef STATUS_HILITES |
| 688 | for (y = 0; y < X11_NUM_STATUS_LINES; y++) { |
| 689 | for (x = 0; x < X11_NUM_STATUS_FIELD; x++) { |
| 690 | f = X11_fieldorder[y][x]; |
| 691 | if (f <= BL_FLUSH) |
| 692 | continue; /* skip padding in the fieldorder[][] layout */ |
| 693 | if (f != BL_CONDITION) { |
| 694 | tt_reset_color(f, 0, (unsigned long *) 0); |
| 695 | } else { |
| 696 | int c_i; |
| 697 | |
| 698 | for (c_i = 0; c_i < SIZE(tt_condorder); ++c_i) |
| 699 | tt_reset_color(f, c_i, cond_colormasks); |
| 700 | } |
| 701 | } |
| 702 | } |
| 703 | #endif |
| 704 | fld = BL_FLUSH; |
| 705 | } |
| 706 | |
| 707 | if (fld == BL_CONDITION) { |
| 708 | condptr = (unsigned long *) ptr; |
| 709 | X11_condition_bits = *condptr; |
| 710 | cond_colormasks = colormasks; /* expected to be non-Null */ |
| 711 |
no test coverage detected