From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 8 13:10:09 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 175B0106564A for ; Tue, 8 Mar 2011 13:10:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 088818FC0A for ; Tue, 8 Mar 2011 13:10:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p28DA8vH028807 for ; Tue, 8 Mar 2011 13:10:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p28DA8CB028804; Tue, 8 Mar 2011 13:10:08 GMT (envelope-from gnats) Date: Tue, 8 Mar 2011 13:10:08 GMT Message-Id: <201103081310.p28DA8CB028804@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Andy Farkas Cc: Subject: Re: bin/151663: games/grdc: -s does not scroll X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andy Farkas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 13:10:09 -0000 The following reply was made to PR bin/151663; it has been noted by GNATS. From: Andy Farkas To: bug-followup@FreeBSD.org, anatoly.borodin@gmail.com Cc: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Bruce Evans 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 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