pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/xsokoban Rename getline() to scoregetline() to a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d828f9fb53ad
branches:  trunk
changeset: 399730:d828f9fb53ad
user:      martin <martin%pkgsrc.org@localhost>
date:      Mon Sep 28 11:29:32 2009 +0000

description:
Rename getline() to scoregetline() to avoid a conflict on NetBSD-current

diffstat:

 games/xsokoban/distinfo         |   4 +-
 games/xsokoban/patches/patch-ah |  58 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 58 insertions(+), 4 deletions(-)

diffs (86 lines):

diff -r a1e459f4568a -r d828f9fb53ad games/xsokoban/distinfo
--- a/games/xsokoban/distinfo   Mon Sep 28 02:08:04 2009 +0000
+++ b/games/xsokoban/distinfo   Mon Sep 28 11:29:32 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1.1.1 2009/04/08 16:31:56 drochner Exp $
+$NetBSD: distinfo,v 1.2 2009/09/28 11:29:32 martin Exp $
 
 SHA1 (xsokoban-3.3c.tar.gz) = d5a829a8a507c60458093baa431e4fe9ff619aed
 RMD160 (xsokoban-3.3c.tar.gz) = 394cc9663982004f27135baad4e26c18c2c6817c
@@ -10,4 +10,4 @@
 SHA1 (patch-ae) = 234e46167bf5b3786462488c99bf10de60736452
 SHA1 (patch-af) = 43b4abe82c6cb7d51ad65e3eb1ef05fc345916a4
 SHA1 (patch-ag) = 77a33b22e071637377e25636dd2df8ec45ac9d1e
-SHA1 (patch-ah) = 1d8cb6cf6c5e57c8bb4a019e73eca9c56c21306f
+SHA1 (patch-ah) = f8676279013c8f4be67bb4771fec3ed5b473a913
diff -r a1e459f4568a -r d828f9fb53ad games/xsokoban/patches/patch-ah
--- a/games/xsokoban/patches/patch-ah   Mon Sep 28 02:08:04 2009 +0000
+++ b/games/xsokoban/patches/patch-ah   Mon Sep 28 11:29:32 2009 +0000
@@ -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 @@
  
    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);



Home | Main Index | Thread Index | Old Index