Date: Sat, 12 Oct 2013 03:15:34 +0000 (UTC) From: Edwin Groothuis <edwin@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330113 - head/games/xrobots/files Message-ID: <201310120315.r9C3FYOm009369@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <X11/Xos.h> /* brings in <sys/file.h> */ + #include <stdio.h> ++ #include <stdlib.h> + #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<MAXSCORES;i++) { +--- 255,261 ---- + show_scores() + { + int i; +! char tmp_str[64]; + Arg tmp_arg; + + for(i = 0;i<MAXSCORES;i++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310120315.r9C3FYOm009369>