Commit 10b771eb authored by Robert David Graham's avatar Robert David Graham
Browse files

tcb timeouts

parent 2f18587b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ timeouts_add(struct Timeouts *timeouts, struct TimeoutEntry *entry,
    entry->next = timeouts->slots[index];
    timeouts->slots[index] = entry;
    entry->prev = &timeouts->slots[index];
    if (entry->next)
        entry->next->prev = &entry->next;
}

/***************************************************************************
+6 −2
Original line number Diff line number Diff line
@@ -22,16 +22,20 @@ struct TimeoutEntry {
static inline void
timeout_unlink(struct TimeoutEntry *entry)
{
    if (entry->prev == 0 && entry->next == 0)
        return;
    *(entry->prev) = entry->next;
    if (entry->next)
        entry->next->prev = entry->prev;
    entry->next = 0;
    entry->prev = &entry->next;
    entry->prev = 0;
}

static inline void
timeout_init(struct TimeoutEntry *entry)
{
    entry->next = 0;
    entry->prev = &entry->next;
    entry->prev = 0;
}


+1 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ open_rotate(struct Output *output, const char *filename)
#endif

    if (fp == NULL) {
        fprintf(stderr, "out: could not open file for %s\n", is_append?"appending":"writing");
        perror(filename);
        control_c_pressed = 1;
        return NULL;