| 2781 | } |
| 2782 | |
| 2783 | staticfn void |
| 2784 | status_hilite_add_threshold(int fld, struct hilite_s *hilite) |
| 2785 | { |
| 2786 | struct hilite_s *new_hilite, *old_hilite; |
| 2787 | |
| 2788 | if (!hilite) |
| 2789 | return; |
| 2790 | |
| 2791 | /* alloc and initialize a new hilite_s struct */ |
| 2792 | new_hilite = (struct hilite_s *) alloc(sizeof (struct hilite_s)); |
| 2793 | *new_hilite = *hilite; /* copy struct */ |
| 2794 | |
| 2795 | new_hilite->set = TRUE; |
| 2796 | new_hilite->fld = fld; |
| 2797 | new_hilite->next = (struct hilite_s *) 0; |
| 2798 | /* insert new entry at the end of the list */ |
| 2799 | if (!gb.blstats[0][fld].thresholds) { |
| 2800 | gb.blstats[0][fld].thresholds = new_hilite; |
| 2801 | } else { |
| 2802 | for (old_hilite = gb.blstats[0][fld].thresholds; old_hilite->next; |
| 2803 | old_hilite = old_hilite->next) |
| 2804 | continue; |
| 2805 | old_hilite->next = new_hilite; |
| 2806 | } |
| 2807 | /* sort_hilites(fld) */ |
| 2808 | |
| 2809 | /* current and prev must both point at the same hilites */ |
| 2810 | gb.blstats[1][fld].thresholds = gb.blstats[0][fld].thresholds; |
| 2811 | } |
| 2812 | |
| 2813 | staticfn boolean |
| 2814 | parse_status_hl2(char (*s)[QBUFSZ], boolean from_configfile) |
no test coverage detected