The following reply was made to PR bin/151663; it has been noted by GNATS. From: Andy Farkas <chuzzwa...@gmail.com> To: bug-follo...@freebsd.org, anatoly.boro...@gmail.com Cc: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= <u...@freebsd.org>, Bruce Evans <b...@optusnet.com.au> Subject: Re: bin/151663: games/grdc: -s does not scroll Date: Tue, 8 Mar 2011 22:41:39 +1000
On Sun, Oct 24, 2010 at 1:27 AM, Anatoly Borodin <anatoly.boro...@gmail.com> wrote: > grdc -s should scroll the digits, the manual says. But "grdc" and "grdc -s" > look just the same. It *is* scrolling, just too fast for the eye to see. If you add delays, it scrolls just fine: %%% --- /usr/src/games/grdc/grdc.c 2010-08-28 13:04:04.000000000 +1000 +++ ./scrolling-grdc.c 2011-03-08 18:47:50.000000000 +1000 @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) { - struct timespec delay; + struct timespec delay, scrold; time_t prev_sec; long t, a; int i, j, s, k; @@ -69,6 +69,8 @@ switch (ch) { case 's': scrol = 1; + scrold.tv_sec = 0; + scrold.tv_nsec = 40000000; break; case 't': t12 = 1; @@ -191,6 +193,7 @@ } if(!s) { refresh(); + nanosleep(&scrold, NULL); } } } %%% If you increase scrold.tv_nsec though, it seems to break the timing loop and grdc doesn't seem to DTRT. I have submitted a new PR (bin/155374) that fixes the problem once and for all. -andyf _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"