diff options
Diffstat (limited to 'games/xpipeman/files/patch-aa')
-rw-r--r-- | games/xpipeman/files/patch-aa | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/games/xpipeman/files/patch-aa b/games/xpipeman/files/patch-aa new file mode 100644 index 000000000000..00e13a694bee --- /dev/null +++ b/games/xpipeman/files/patch-aa @@ -0,0 +1,91 @@ +*** score.c.orig Fri Oct 11 11:35:59 1991 +--- score.c Mon Jan 2 23:46:28 1995 +*************** +*** 52,57 **** +--- 52,58 ---- + + #include <X11/Xos.h> /* brings in <sys/file.h> */ + #include <stdio.h> ++ #include <stdlib.h> + #include "xpipeman.h" + + /*----------------------------------------------------------------------*/ +*************** +*** 63,69 **** + + static SCORE scores[MAXSCORES]; + +! void show_scores(), + new_high_score(), + load_scores(), + write_out_scores(); +--- 64,70 ---- + + static SCORE scores[MAXSCORES]; + +! static void show_scores(), + new_high_score(), + load_scores(), + write_out_scores(); +*************** +*** 106,117 **** + #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; + } + } + +--- 107,119 ---- + #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; + } + } + +*************** +*** 190,196 **** + + + /*ARGSUSED*/ +! static XtCallbackProc + popdown_callback(w, closure, call_data) + Widget w; + caddr_t closure; +--- 192,198 ---- + + + /*ARGSUSED*/ +! static void + popdown_callback(w, closure, call_data) + Widget w; + caddr_t closure; +*************** +*** 249,255 **** + show_scores() + { + int i; +! char tmp_str[31]; + Arg tmp_arg; + + for(i = 0;i<MAXSCORES;i++) { +--- 251,257 ---- + show_scores() + { + int i; +! char tmp_str[64]; + Arg tmp_arg; + + for(i = 0;i<MAXSCORES;i++) { |