X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/0d3d364b48292a4bd349b2dd096f060b1db21212..9515272fc0a92f82c056a9b8bca0633822e14d9c:/blast.c diff --git a/blast.c b/blast.c index c273a41..d032646 100644 --- a/blast.c +++ b/blast.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,7 @@ typedef struct blast { sel_timer t; } blast; +#define sin saddrin static struct sockaddr_in sin; static sel_state sel; static struct timeval ctv = { 0, 500000 }; @@ -94,8 +96,8 @@ static void timers(void) sel_timer *t = sel.timers; while (t) { struct tab *q; for (q = tab; q->func != t->func; q++) ; - assert(t->prev->next == t); - printf("%i.%06i %p %s\n", t->tv.tv_sec, t->tv.tv_usec, t->p, q->name); +/* assert(t->prev->next == t); */ + printf("%lu.%06lu %p %s\n", t->tv.tv_sec, t->tv.tv_usec, t->p, q->name); assert(t != t->next); t = t->next; } @@ -149,7 +151,7 @@ int main(int argc, char *argv[]) argv += optind; argc -= optind; if (argc != 2) { - pquis(stderr, "Usage: $ [-t time] [-n count] host port\n"); + pquis(stderr, "Usage: $ [-t TIME] [-n COUNT] HOST PORT\n"); exit(1); }