| 2745 | } |
| 2746 | |
| 2747 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 2748 | |
| 2749 | /* reset all timers that are marked for resetting */ |
| 2750 | void |
| 2751 | relink_timers(boolean ghostly) |
| 2752 | { |
| 2753 | timer_element *curr; |
| 2754 | unsigned nid; |
| 2755 | |
| 2756 | for (curr = gt.timer_base; curr; curr = curr->next) { |
| 2757 | if (curr->needs_fixup) { |
| 2758 | if (curr->kind == TIMER_OBJECT) { |
| 2759 | if (ghostly) { |
| 2760 | if (!lookup_id_mapping(curr->arg.a_uint, &nid)) |
| 2761 | panic("relink_timers 1"); |
| 2762 | } else |
| 2763 | nid = curr->arg.a_uint; |
| 2764 | curr->arg.a_obj = find_oid(nid); |
| 2765 | if (!curr->arg.a_obj) |
| 2766 | panic("can't find o_id %d", nid); |
| 2767 | curr->needs_fixup = 0; |
| 2768 | } else if (curr->kind == TIMER_MONSTER) { |
| 2769 | panic("relink_timers: no monster timer implemented"); |
| 2770 | } else |
| 2771 | panic("relink_timers 2"); |
| 2772 | } |
| 2773 | } |
| 2774 | } |
| 2775 | #endif /* !SFCTOOL */ |
| 2776 | |
| 2777 | /*timeout.c*/ |
no test coverage detected