diff options
-rw-r--r-- | games/larn/Makefile | 4 | ||||
-rw-r--r-- | games/larn/larn.6 | 2 | ||||
-rw-r--r-- | games/larn/main.c | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/games/larn/Makefile b/games/larn/Makefile index 12280cd..b31c431 100644 --- a/games/larn/Makefile +++ b/games/larn/Makefile @@ -65,5 +65,9 @@ beforeinstall: (cd ${.CURDIR}/datfiles; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} \ -m ${NOBINMODE} larnmaze larnopts larn.help \ ${DESTDIR}${SHAREDIR}/games/larn) + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 /dev/null \ + ${DESTDIR}/var/games/larn/lscore12.0 + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 /dev/null \ + ${DESTDIR}/var/games/larn/llog12.0 .include <bsd.prog.mk> diff --git a/games/larn/larn.6 b/games/larn/larn.6 index e64ee6f..3734aa8 100644 --- a/games/larn/larn.6 +++ b/games/larn/larn.6 @@ -153,6 +153,8 @@ Noah Morgan .Bl -tag -width "/var/games/larn/lscore12.0" -compact .It Pa /var/games/larn/lscore12.0 Score file. +.It Pa /var/games/larn/llog12.0 +Log file. .It Pa ~/.larnopts Options file. .El diff --git a/games/larn/main.c b/games/larn/main.c index d75ee9b..2889625 100644 --- a/games/larn/main.c +++ b/games/larn/main.c @@ -1,5 +1,6 @@ /* main.c */ #include <sys/types.h> +#include <sys/stat.h> #include "header.h" #include <pwd.h> static char copyright[]="\nLarn is copyrighted 1986 by Noah Morgan.\n"; @@ -41,6 +42,7 @@ main(argc,argv) int hard; char *ptr=0,*ttype; struct passwd *pwe; + struct stat sb; /* * first task is to identify the player @@ -98,7 +100,7 @@ main(argc,argv) /* * now make scoreboard if it is not there (don't clear) */ - if (access(scorefile,0) == -1) /* not there */ + if (stat(scorefile,&sb) < 0 || sb.st_size == 0) /* not there */ makeboard(); /* |