From 3e2ce70f2860c0bf1da6f01ed8082bb257b68817 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sat, 12 Oct 2013 03:15:34 +0000 Subject: Rename to the right file. --- games/xrobots/files/patch-score.c | 91 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 games/xrobots/files/patch-score.c (limited to 'games/xrobots/files/patch-score.c') diff --git a/games/xrobots/files/patch-score.c b/games/xrobots/files/patch-score.c new file mode 100644 index 000000000000..87414fe10e96 --- /dev/null +++ b/games/xrobots/files/patch-score.c @@ -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