diff options
author | billf <billf@FreeBSD.org> | 1999-12-12 06:17:25 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-12-12 06:17:25 +0000 |
commit | 9292b471d0966ad014fab7475444d565db490e08 (patch) | |
tree | f87822a4005db8633c9b25c0a8fb78da2d7a7522 /games/mille/save.c | |
parent | 1da218306142327914ba163494fe5569fc587d6d (diff) | |
download | FreeBSD-src-9292b471d0966ad014fab7475444d565db490e08.zip FreeBSD-src-9292b471d0966ad014fab7475444d565db490e08.tar.gz |
-Wall fixes.
Diffstat (limited to 'games/mille/save.c')
-rw-r--r-- | games/mille/save.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/games/mille/save.c b/games/mille/save.c index 3bd1887..c9c2951 100644 --- a/games/mille/save.c +++ b/games/mille/save.c @@ -41,8 +41,11 @@ static const char rcsid[] = #include <sys/types.h> #include <sys/stat.h> +#include <sys/uio.h> +#include <fcntl.h> #include <string.h> #include <termios.h> +#include <unistd.h> #include "mille.h" #include <unctrl.h> @@ -58,14 +61,11 @@ static const char rcsid[] = typedef struct stat STAT; -char *ctime(); - -int read(), write(); - /* * This routine saves the current game for use at a later date */ +bool save() { extern int errno; @@ -76,6 +76,7 @@ save() { time_t tme; STAT junk; + sp = NULL; tp = &tme; if (Fromfile && getyn(SAMEFILEPROMPT)) strcpy(buf, Fromfile); @@ -128,7 +129,8 @@ over: wrefresh(Score); time(tp); /* get current time */ strcpy(buf, ctime(tp)); - for (sp = buf; *sp != '\n'; sp++) + sp = buf; + for (; *sp != '\n'; sp++) continue; *sp = '\0'; varpush(outf, write); @@ -144,6 +146,7 @@ over: * backup was made on exiting, in which case certain things must * be cleaned up before the game starts. */ +bool rest_f(file) char *file; { |