--- multiplexer/en300468ts.c 2010/09/29 21:30:28 1.15 +++ multiplexer/en300468ts.c 2010/09/29 21:31:24 1.16 @@ -219,6 +219,7 @@ struct sitab { long freqmsec; enum enumsi esi; unsigned long *tab; + struct timeval soon; union { struct { int tablen; @@ -234,9 +235,6 @@ struct sitab { int ibuf; char buf[256]; } a; - struct { - struct timeval next; - } s; } u; unsigned char descrnum[DESCR_LAST-DESCR_FIRST+1]; }; @@ -2080,8 +2078,8 @@ static void argloop(int f0) tabinold[i] = tabin[i]; if (tmo != 0) { if (tabin[i] == 0) { - i = (st->u.s.next.tv_sec - tv.tv_sec) * 1000 - + (st->u.s.next.tv_usec - tv.tv_usec) / 1000; + i = (st->soon.tv_sec - tv.tv_sec) * 1000 + + (st->soon.tv_usec - tv.tv_usec) / 1000; if (i <= 0) { tmo = 0; } else if ((tmo < 0) || (i < tmo)) { @@ -2136,20 +2134,20 @@ static void argloop(int f0) i = st->pid - TABLE_PID_FIRST; if ((tabinold[i] == 0) && (tabin[i] < (TABBUF_SIZE-MAX_PSI_SIZE+1-2)) - && ((st->u.s.next.tv_sec < tv.tv_sec) - || ((st->u.s.next.tv_sec == tv.tv_sec) - && (st->u.s.next.tv_usec <= tv.tv_usec)))) { + && ((st->soon.tv_sec < tv.tv_sec) + || ((st->soon.tv_sec == tv.tv_sec) + && (st->soon.tv_usec <= tv.tv_usec)))) { if (st->freqmsec > 0) { - i = (st->u.s.next.tv_sec - tv.tv_sec) * 1000 - + (st->u.s.next.tv_usec - tv.tv_usec) / 1000; + i = (st->soon.tv_sec - tv.tv_sec) * 1000 + + (st->soon.tv_usec - tv.tv_usec) / 1000; if (i < -st->freqmsec) { - st->u.s.next = tv; + st->soon = tv; } else { - st->u.s.next.tv_sec += st->freqmsec / 1000; - st->u.s.next.tv_usec += (st->freqmsec % 1000) * 1000; - if (st->u.s.next.tv_usec > 1000000) { - st->u.s.next.tv_usec -= 1000000; - st->u.s.next.tv_sec += 1; + st->soon.tv_sec += st->freqmsec / 1000; + st->soon.tv_usec += (st->freqmsec % 1000) * 1000; + if (st->soon.tv_usec > 1000000) { + st->soon.tv_usec -= 1000000; + st->soon.tv_sec += 1; } } } @@ -2212,7 +2210,7 @@ static void argloop(int f0) free(newtab); newtab = NULL; } else { - newtab->u.s.next = tv; + newtab->soon = tv; newtab->next = runtab; runtab = newtab; newtab = NULL;