From owner-svn-src-all@FreeBSD.ORG Tue Jun 2 20:53:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79AD9D52; Tue, 2 Jun 2015 20:53:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 687C91C07; Tue, 2 Jun 2015 20:53:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52KrICV046681; Tue, 2 Jun 2015 20:53:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52KrIuk046680; Tue, 2 Jun 2015 20:53:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506022053.t52KrIuk046680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jun 2015 20:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283929 - head/games/grdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 20:53:18 -0000 Author: emaste Date: Tue Jun 2 20:53:17 2015 New Revision: 283929 URL: https://svnweb.freebsd.org/changeset/base/283929 Log: Correct grdc(1) 12-hour display between 12:00 and 13:00 PM starts at 12:00, not 13:00. PR: 194291, 200133 Submitted by: Nick Price MFC after: 1 week Modified: head/games/grdc/grdc.c Modified: head/games/grdc/grdc.c ============================================================================== --- head/games/grdc/grdc.c Tue Jun 2 20:29:58 2015 (r283928) +++ head/games/grdc/grdc.c Tue Jun 2 20:53:17 2015 (r283929) @@ -150,14 +150,14 @@ main(int argc, char *argv[]) set(tm->tm_min/10, 14); if (t12) { - if (tm->tm_hour > 12) { - tm->tm_hour -= 12; - mvaddstr(YBASE + 5, XBASE + 52, "PM"); - } else { + if (tm->tm_hour < 12) { if (tm->tm_hour == 0) tm->tm_hour = 12; - mvaddstr(YBASE + 5, XBASE + 52, "AM"); + } else { + if (tm->tm_hour > 12) + tm->tm_hour -= 12; + mvaddstr(YBASE + 5, XBASE + 52, "PM"); } }