| 2480 | } |
| 2481 | |
| 2482 | staticfn timer_element * |
| 2483 | remove_timer( |
| 2484 | timer_element **base, |
| 2485 | short func_index, |
| 2486 | anything *arg) |
| 2487 | { |
| 2488 | timer_element *prev, *curr; |
| 2489 | |
| 2490 | for (prev = 0, curr = *base; curr; prev = curr, curr = curr->next) |
| 2491 | if (curr->func_index == func_index && curr->arg.a_void == arg->a_void) |
| 2492 | break; |
| 2493 | |
| 2494 | if (curr) { |
| 2495 | if (prev) |
| 2496 | prev->next = curr->next; |
| 2497 | else |
| 2498 | *base = curr->next; |
| 2499 | } |
| 2500 | |
| 2501 | return curr; |
| 2502 | } |
| 2503 | |
| 2504 | staticfn void |
| 2505 | write_timer(NHFILE *nhfp, timer_element *timer) |