openbsd-ports/games/spider/patches/patch-movelog_c
sthen 035785ef7e a couple more missing prototypes needed for 64-bit arch,
from Michael Warmuth. regen PLIST while there.
2008-10-14 22:54:22 +00:00

39 lines
850 B
Plaintext

--- movelog.c.orig Sat Sep 28 19:46:17 1991
+++ movelog.c Sun Aug 3 09:33:25 2008
@@ -17,6 +17,7 @@
#include "defs.h"
#include "globals.h"
#include <string.h>
+#include <stdlib.h>
#include <sys/file.h>
#include <ctype.h>
#ifdef SVR4
@@ -745,6 +746,7 @@
FILE *fp;
char buf[1024], buf2[1024];
char *dp;
+int c;
fname = remove_newlines(fname);
if ((fp = fopen(fname, "r")) == NULL) {
@@ -756,7 +758,8 @@
/* read card string */
dp = buf;
- while ((*dp = (char)fgetc(fp)) != EOF) {
+ while ((c = fgetc(fp)) != EOF) {
+ *dp = c;
if (*dp == '\n') /* ignore any CR */
continue;
if (*dp == '.')
@@ -767,7 +770,8 @@
/* read moves string */
dp = buf2;
- while ((*dp = (char)fgetc(fp)) != EOF) {
+ while ((c = fgetc(fp)) != EOF) {
+ *dp = c;
if (*dp == '\n') /* ignore any CR */
continue;
if (*dp == '.')