commit:     ef2f49832fc598fcdcb2ecaf0f09d9f93778b42a
Author:     Chris Gianelloni <wolf31o2 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 13 20:18:57 2008 +0000
Commit:     Pavlos Ratis <dastergon <AT> gentoo <DOT> org>
CommitDate: Thu Mar 13 20:18:57 2008 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/games.git;a=commit;h=ef2f4983

Added 3.4.3-topten-scanf-fix.patch patch from bug #125902.

svn path=/; revision=3

---
 games-roguelike/nethack/ChangeLog                  |  4 +++
 .../nethack/files/3.4.3-topten-scanf-fix.patch     | 31 ++++++++++++++++++++++
 games-roguelike/nethack/nethack-3.4.3-r2.ebuild    |  3 ++-
 3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/games-roguelike/nethack/ChangeLog 
b/games-roguelike/nethack/ChangeLog
index e47e777..1898f7a 100644
--- a/games-roguelike/nethack/ChangeLog
+++ b/games-roguelike/nethack/ChangeLog
@@ -3,6 +3,10 @@
 # $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/ChangeLog,v 1.28 
2008/03/07 20:15:59 wolf31o2 Exp $
 
   13 Mar 2008; Chris Gianelloni <wolf3...@gentoo.org>
+  +files/3.4.3-topten-scanf-fix.patch:
+  Added 3.4.3-topten-scanf-fix.patch patch from bug #125902.
+
+  13 Mar 2008; Chris Gianelloni <wolf3...@gentoo.org>
   +files/3.4.3-GNOME-support.patch, +files/3.4.3-QT-GNOME-support.patch,
   +files/3.4.3-QT-support.patch, +files/3.4.3-X-support.patch,
   +files/3.4.3-bison.patch, +files/3.4.3-macos.patch,

diff --git a/games-roguelike/nethack/files/3.4.3-topten-scanf-fix.patch 
b/games-roguelike/nethack/files/3.4.3-topten-scanf-fix.patch
new file mode 100644
index 0000000..d700b31
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.3-topten-scanf-fix.patch
@@ -0,0 +1,31 @@
+--- ../nethack-3.4.3-orig/src/topten.c 2003-12-08 08:39:13 +0900
++++ src/topten.c       2007-12-28 17:29:15 +0900
+@@ -30,6 +30,7 @@
+ 
+ #define newttentry() (struct toptenentry *) alloc(sizeof(struct toptenentry))
+ #define dealloc_ttentry(ttent) free((genericptr_t) (ttent))
++/* IMPORTANT: if you change any of these, update the scanf() strings below */
+ #define NAMSZ 10
+ #define DTHSZ 100
+ #define ROLESZ   3
+@@ -129,12 +130,16 @@
+ {
+ #ifdef NO_SCAN_BRACK /* Version_ Pts DgnLevs_ Hp___ Died__Born id */
+       static const char fmt[] = "%d %d %d %ld %d %d %d %d %d %d %ld %ld 
%d%*c";
+-      static const char fmt32[] = "%c%c %s %s%*c";
+-      static const char fmt33[] = "%s %s %s %s %s %s%*c";
++      /* NOTE: "3" in "%3s" here MUST be equal to ROLESZ */
++      static const char fmt32[] = "%c%c %3s %3s%*c";
++      /* NOTE: in order, ROLESZ ROLESZ ROLESZ ROLESZ NAMSZ DTHSZ */
++      static const char fmt33[] = "%3s %3s %3s %3s %10s %100s%*c";
+ #else
+       static const char fmt[] = "%d.%d.%d %ld %d %d %d %d %d %d %ld %ld %d ";
+-      static const char fmt32[] = "%c%c %[^,],%[^\n]%*c";
+-      static const char fmt33[] = "%s %s %s %s %[^,],%[^\n]%*c";
++      /* NOTE: "3" in "%3[...]" here MUST be equal to ROLESZ */
++      static const char fmt32[] = "%c%c %3[^,],%3[^\n]%*c";
++      /* NOTE: in order, ROLESZ ROLESZ ROLESZ ROLESZ NAMSZ DTHSZ */
++      static const char fmt33[] = "%3s %3s %3s %3s %10[^,],%100[^\n]%*c";
+ #endif
+ 
+ #ifdef UPDATE_RECORD_IN_PLACE

diff --git a/games-roguelike/nethack/nethack-3.4.3-r2.ebuild 
b/games-roguelike/nethack/nethack-3.4.3-r2.ebuild
index c8d754b..ab6af51 100644
--- a/games-roguelike/nethack/nethack-3.4.3-r2.ebuild
+++ b/games-roguelike/nethack/nethack-3.4.3-r2.ebuild
@@ -49,7 +49,8 @@ src_unpack() {
                "${FILESDIR}"/${PV}-gentoo-paths.patch \
                "${FILESDIR}"/${PV}-default-options.patch \
                "${FILESDIR}"/${PV}-bison.patch \
-               "${FILESDIR}"/${PV}-macos.patch
+               "${FILESDIR}"/${PV}-macos.patch \
+               "${FILESDIR}"/${PV}-topten-scanf-fix.patch
 
        sed -i \
                -e "s:GENTOO_STATEDIR:${GAMES_STATEDIR}/${PN}:" 
include/unixconf.h \

Reply via email to