mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-15 23:50:44 +00:00
92 lines
1.8 KiB
Plaintext
92 lines
1.8 KiB
Plaintext
|
*** score.c.orig Fri Nov 17 14:37:36 1989
|
||
|
--- score.c Mon Jan 2 23:09:32 1995
|
||
|
***************
|
||
|
*** 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(),
|
||
|
new_high_score(),
|
||
|
load_scores(),
|
||
|
write_out_scores();
|
||
|
--- 68,74 ----
|
||
|
|
||
|
static SCORE scores[MAXSCORES];
|
||
|
|
||
|
! static void show_scores(),
|
||
|
new_high_score(),
|
||
|
load_scores(),
|
||
|
write_out_scores();
|
||
|
***************
|
||
|
*** 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++) {
|