X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=eggui.c;h=b369e863fbde01af7c4bdb55611eb4ce0dbe0ac8;hb=bb8632746deb59f3ab34fc99e79e58250a5da75d;hp=6404456b2fd1728fde9573b4c04d66fc6ef68e54;hpb=42336b017ba010d03c1db3c28c8549e5d97a1cd9;p=debian%2Fgcpegg diff --git a/eggui.c b/eggui.c index 6404456..b369e86 100644 --- a/eggui.c +++ b/eggui.c @@ -37,6 +37,8 @@ #include #include #include +#include +#include /* Curses takes it upon itself to define TRUE and FALSE, incompatibly, as it happens, with the definitions in @@ -55,11 +57,11 @@ #include "version.h" #ifndef NO_UI -static int32 inittm = 0; +static uint32 inittm = 0; #endif -extern int32 lastDataSent; -extern int32 time_latency, time_housekeeping; +extern uint32 lastDataSent; +extern uint32 time_latency, time_housekeeping; /* Initialize user interface, as needed. */ int32 UIInit(void) { @@ -110,10 +112,10 @@ int32 UIUpdate(int32 cres, CollectRecord *coll) { if (coll->sampct == 1) { line = 11; - move(line++, 5); printw("Samples per record: %3d", (int)coll->opts.samp_rec); - move(line++, 5); printw("Seconds per record: %3d", (int)coll->opts.sec_rec); - move(line++, 5); printw("Records per packet: %3d", (int)coll->opts.rec_pkt); - move(line++, 5); printw("Bits per trial: %3d", (int)coll->opts.trialsz); + move(line++, 5); printw("Samples per record: %3d", coll->opts.samp_rec); + move(line++, 5); printw("Seconds per record: %3d", coll->opts.sec_rec); + move(line++, 5); printw("Records per packet: %3d", coll->opts.rec_pkt); + move(line++, 5); printw("Bits per trial: %3d", coll->opts.trialsz); refresh(); } @@ -124,17 +126,20 @@ int32 UIUpdate(int32 cres, CollectRecord *coll) { printw("EGG %s ID %d REG %s %s", eggtable[0].name, eggtable[0].id, configuredREG->reg_name, Version); - tmstr = ctime(&inittm); tmstr[strlen(tmstr)-1] = 0; + time_t inittm_val = inittm; + tmstr = ctime(&inittm_val); tmstr[strlen(tmstr)-1] = 0; move(line++, 5); printw("Up since %25s", tmstr); move(line++, 5); now = getzulutime(NULL); - tmstr = ctime(&now); tmstr[strlen(tmstr)-1] = 0; + time_t now_val = now; + tmstr = ctime(&now_val); tmstr[strlen(tmstr)-1] = 0; printw("Last sample at %25s", tmstr); move(line++, 5); - tmstr = ctime(&lastDataSent); + time_t lastDataSent_val = lastDataSent; + tmstr = ctime(&lastDataSent_val); tmstr[strlen(tmstr)-1] = 0; printw("Last packet at %25s", lastDataSent == 0 ? "Never" : tmstr);