From owner-svn-ports-all@FreeBSD.ORG Sat Oct 12 03:15:35 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 29726D75; Sat, 12 Oct 2013 03:15:35 +0000 (UTC) (envelope-from edwin@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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F020724B5; Sat, 12 Oct 2013 03:15:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9C3FYrd009370; Sat, 12 Oct 2013 03:15:34 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9C3FYOm009369; Sat, 12 Oct 2013 03:15:34 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201310120315.r9C3FYOm009369@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 12 Oct 2013 03:15:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330113 - head/games/xrobots/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Oct 2013 03:15:35 -0000 Author: edwin Date: Sat Oct 12 03:15:34 2013 New Revision: 330113 URL: http://svnweb.freebsd.org/changeset/ports/330113 Log: Rename to the right file. Added: head/games/xrobots/files/patch-score.c - copied unchanged from r330112, head/games/xrobots/files/patch-aa Deleted: head/games/xrobots/files/patch-aa Copied: head/games/xrobots/files/patch-score.c (from r330112, head/games/xrobots/files/patch-aa) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xrobots/files/patch-score.c Sat Oct 12 03:15:34 2013 (r330113, copy of r330112, head/games/xrobots/files/patch-aa) @@ -0,0 +1,91 @@ +*** score.c.orig Thu Jan 22 09:58:52 1998 +--- score.c Sun Apr 12 14:00:32 1998 +*************** +*** 56,61 **** +--- 56,62 ---- + + #include /* brings in */ + #include ++ #include + #include "xrobots.h" + + /*----------------------------------------------------------------------*/ +*************** +*** 67,73 **** + + static SCORE scores[MAXSCORES]; + +! void show_scores(), + write_out_scores(); + + static void new_high_score(), +--- 68,74 ---- + + static SCORE scores[MAXSCORES]; + +! static void show_scores(), + write_out_scores(); + + static void new_high_score(), +*************** +*** 110,121 **** + #ifndef SYSV + flock(scorefile->_file, LOCK_EX); + #endif +! while( fgets(scores[i].score,6,scorefile) /* get score */ +! && fgets(scores[i].name,26,scorefile) /* get name */ +! && fgetc(scorefile)) /* and newline */ +! { +! i++; +! if( i > MAXSCORES ) break; + } + } + +--- 111,123 ---- + #ifndef SYSV + flock(scorefile->_file, LOCK_EX); + #endif +! for(i = 0; i < MAXSCORES; i++) { +! if(!fgets(scores[i].score, 6, scorefile)) /* get score */ +! break; +! if(!fgets(scores[i].name, 26, scorefile)) /* get name */ +! break; +! if(!fgetc(scorefile)) /* and newline */ +! break; + } + } + +*************** +*** 194,200 **** + + + /*ARGSUSED*/ +! static XtCallbackProc + popdown_callback(w, closure, call_data) + Widget w; + caddr_t closure; +--- 196,202 ---- + + + /*ARGSUSED*/ +! static void + popdown_callback(w, closure, call_data) + Widget w; + caddr_t closure; +*************** +*** 253,259 **** + show_scores() + { + int i; +! char tmp_str[31]; + Arg tmp_arg; + + for(i = 0;i