aboutsummaryrefslogtreecommitdiff
path: root/games/xsokoban
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-05-11 21:58:08 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-05-11 21:58:08 +0000
commit663b30961567ec7d9cc83ea94166df6abedef0de (patch)
treee5b21b0eb26086d280d26a01ac0d4c945280a3b9 /games/xsokoban
parente408d35ede5e92ea23233b3d4e0861e0f44c64f1 (diff)
downloadports-663b30961567ec7d9cc83ea94166df6abedef0de.tar.gz
ports-663b30961567ec7d9cc83ea94166df6abedef0de.zip
Notes
Diffstat (limited to 'games/xsokoban')
-rw-r--r--games/xsokoban/files/patch-score.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/games/xsokoban/files/patch-score.c b/games/xsokoban/files/patch-score.c
new file mode 100644
index 000000000000..a6bb9bf2f692
--- /dev/null
+++ b/games/xsokoban/files/patch-score.c
@@ -0,0 +1,56 @@
+--- score.c.orig 1996-08-27 19:23:58 UTC
++++ score.c
+@@ -797,7 +797,7 @@ static void CopyEntry(short i1, short i2
+ }
+
+ /* Extract one line from "text". Return 0 if there is no line to extract. */
+-char *getline(char *text, char *linebuf, int bufsiz)
++char *get_line(char *text, char *linebuf, int bufsiz)
+ {
+ if (*text == 0) {
+ *linebuf = 0;
+@@ -938,7 +938,7 @@ char *skip_past_header(char *text)
+ {
+ char line[256];
+ do {
+- text = getline(text, line, sizeof(line));
++ text = get_line(text, line, sizeof(line));
+ if (!text) return 0;
+ } while (0 != strcmp(line, ""));
+ return text;
+@@ -982,7 +982,7 @@ static short ParseUserLevel(char *text,
+ char line[256];
+ text = skip_past_header(text);
+ if (!text) return E_READSCORE;
+- text = getline(text, line, sizeof(line));
++ text = get_line(text, line, sizeof(line));
+ if (!text) return E_READSCORE;
+ if (0 == strncmp(line, "Level: ", 7)) {
+ *lv = atoi(&line[7]);
+@@ -999,7 +999,7 @@ static void DeleteAllEntries()
+ }
+
+ #define GRAB(tag, stmt) \
+- text = getline(text, line, sizeof(line)); \
++ text = get_line(text, line, sizeof(line)); \
+ if (!text) return E_READSCORE; \
+ if (0 == strncmp(line, tag, strlen(tag))) { stmt; } \
+ else return E_READSCORE;
+@@ -1070,7 +1070,7 @@ static short ParseScoreText(char *text,
+ {
+ char line[256];
+ do {
+- text = getline(text, line, sizeof(line));
++ text = get_line(text, line, sizeof(line));
+ if (!text) return E_READSCORE;
+ } while (line[0] != '=');
+ scoreentries = 0;
+@@ -1091,7 +1091,7 @@ static short ParseScoreLine(int i, char
+ int rank;
+ char rank_s[4];
+ char line[256];
+- *text = getline(*text, line, sizeof(line));
++ *text = get_line(*text, line, sizeof(line));
+ if (!*text) return 0;
+ strncpy(rank_s, line, 4);
+ rank = atoi(rank_s);