diff options
author | martin <martin@pkgsrc.org> | 2009-09-28 11:29:32 +0000 |
---|---|---|
committer | martin <martin@pkgsrc.org> | 2009-09-28 11:29:32 +0000 |
commit | 5b75156ec1db21e2e335094af519a2655dee18d1 (patch) | |
tree | 6a61d1c4f80ffd895474142c5ff70d0147aa703c /games/xsokoban/patches | |
parent | 20d94fd5fdcdceda77e5cc8eda6c25b63523c179 (diff) | |
download | pkgsrc-5b75156ec1db21e2e335094af519a2655dee18d1.tar.gz |
Rename getline() to scoregetline() to avoid a conflict on NetBSD-current
Diffstat (limited to 'games/xsokoban/patches')
-rw-r--r-- | games/xsokoban/patches/patch-ah | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/games/xsokoban/patches/patch-ah b/games/xsokoban/patches/patch-ah index cec20bb9652..c705c22dcbc 100644 --- a/games/xsokoban/patches/patch-ah +++ b/games/xsokoban/patches/patch-ah @@ -1,7 +1,7 @@ -$NetBSD: patch-ah,v 1.1.1.1 2009/04/08 16:31:56 drochner Exp $ +$NetBSD: patch-ah,v 1.2 2009/09/28 11:29:32 martin Exp $ --- score.c.orig 1996-08-27 21:23:58.000000000 +0200 -+++ score.c ++++ score.c 2009-09-28 13:15:32.000000000 +0200 @@ -633,10 +633,11 @@ static short WriteScore() char tempfile[MAXPATHLEN]; strcpy(tempfile, tempnm); @@ -17,3 +17,57 @@ $NetBSD: patch-ah,v 1.1.1.1 2009/04/08 16:31:56 drochner Exp $ scoreentries = htons(scoreentries); if (fwrite(SCORE_VERSION, 4, 1, scorefile) != 1) { +@@ -797,7 +798,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 *scoregetline(char *text, char *linebuf, int bufsiz) + { + if (*text == 0) { + *linebuf = 0; +@@ -938,7 +939,7 @@ char *skip_past_header(char *text) + { + char line[256]; + do { +- text = getline(text, line, sizeof(line)); ++ text = scoregetline(text, line, sizeof(line)); + if (!text) return 0; + } while (0 != strcmp(line, "")); + return text; +@@ -982,7 +983,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 = scoregetline(text, line, sizeof(line)); + if (!text) return E_READSCORE; + if (0 == strncmp(line, "Level: ", 7)) { + *lv = atoi(&line[7]); +@@ -999,7 +1000,7 @@ static void DeleteAllEntries() + } + + #define GRAB(tag, stmt) \ +- text = getline(text, line, sizeof(line)); \ ++ text = scoregetline(text, line, sizeof(line)); \ + if (!text) return E_READSCORE; \ + if (0 == strncmp(line, tag, strlen(tag))) { stmt; } \ + else return E_READSCORE; +@@ -1070,7 +1071,7 @@ static short ParseScoreText(char *text, + { + char line[256]; + do { +- text = getline(text, line, sizeof(line)); ++ text = scoregetline(text, line, sizeof(line)); + if (!text) return E_READSCORE; + } while (line[0] != '='); + scoreentries = 0; +@@ -1091,7 +1092,7 @@ static short ParseScoreLine(int i, char + int rank; + char rank_s[4]; + char line[256]; +- *text = getline(*text, line, sizeof(line)); ++ *text = scoregetline(*text, line, sizeof(line)); + if (!*text) return 0; + strncpy(rank_s, line, 4); + rank = atoi(rank_s); |