[Pkg-nethack-devel] Bug#215899: marked as done (nethack-lisp: LISP Windowing patch update)

Debian Bug Tracking System owner@bugs.debian.org
Thu, 16 Oct 2003 08:33:31 -0500


Your message dated Thu, 16 Oct 2003 09:18:03 -0400
with message-id <E1AA80x-0001ue-00@auric.debian.org>
and subject line Bug#215899: fixed in nethack 3.4.2-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 15 Oct 2003 10:36:22 +0000
>From mlang@lexx.delysid.org Wed Oct 15 05:36:19 2003
Return-path: <mlang@lexx.delysid.org>
Received: from chello080109223066.lancity.graz.surfer.at (lexx.delysid.org) [80.109.223.66] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1A9j0s-00024t-00; Wed, 15 Oct 2003 05:36:18 -0500
Received: from mlang by lexx.delysid.org with local (Exim 3.36 #1 (Debian))
	id 1A9j0u-0007yK-00
	for <submit@bugs.debian.org>; Wed, 15 Oct 2003 12:36:20 +0200
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nethack-lisp: LISP Windowing patch update
From: Mario Lang <mlang@debian.org>
Date: Wed, 15 Oct 2003 12:36:10 +0200
Message-ID: <87zng2wzxh.fsf@lexx.delysid.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Mario Lang <mlang@lexx.delysid.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-6.9 required=4.0
	tests=BAYES_60,HAS_PACKAGE,PATCH_UNIFIED_DIFF
	autolearn=ham version=2.53-bugs.debian.org_2003_10_13
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_13 (1.174.2.15-2003-03-30-exp)

Package: nethack-lisp
Version: 3.4.2-1
Severity: critical
Tags: patch

The following patch makes the nethack-lisp binary package work again.

It was generated based on the enh-342.patch from nethack-el-0.9.2.

I can do an NMU for nethack to integrate this if you prefer that.

--- /tmp/nethack-3.4.2/debian/patches/12_lisp_windowing.dpatch	2003-10-15 11:48:38.000000000 +0200
+++ 12_lisp_windowing.dpatch	2003-09-14 22:24:57.000000000 +0200
@@ -110,7 +126,7 @@
 +E void FDECL(lisp_outrip, (winid,int));
 +
 +#endif /* WINLISP_H */
---- nethack-3.4.1/src/windows.c	2003-02-23 06:43:31.000000000 -0800
+--- nethack-3.4.2/src/windows.c	2003-08-29 17:07:43.000000000 -0700
 +++ nethack/src/windows.c	2002-04-23 17:44:58.000000000 -0700
 @@ -40,6 +40,10 @@
  #ifdef MSWIN_GRAPHICS
@@ -133,8 +149,69 @@
      { 0, 0 }		/* must be last */
  };
  
---- nethack-3.4.1/win/tty/termcap.c	2003-02-23 06:43:46.000000000 -0800
-+++ nethack/win/tty/termcap.c	2003-03-09 13:49:04.000000000 -0800
+--- nethack-3.4.2/sys/unix/Makefile.src	2003-08-29 17:08:04.000000000 -0700
++++ nethack/sys/unix/Makefile.src	2003-09-13 12:35:00.000000000 -0700
+@@ -213,9 +213,14 @@
+ #WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o
+ 
+ #
++# Files for the lisp port
++WINLISPSRC = ../win/lisp/winlisp.c tile.c
++WINLISPOBJ = winlisp.o tile.o
++
++#
+ #
+-WINSRC = $(WINTTYSRC)
+-WINOBJ = $(WINTTYOBJ)
++WINSRC = $(WINLISPSRC)
++WINOBJ = $(WINLISPOBJ)
+ 
+ # on some systems the termcap library is in -ltermcap or -lcurses
+ # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
+@@ -254,8 +259,11 @@
+ #
+ # libraries for BeOS 
+ WINBELIB = -lbe
++#
++# libraries for lisp port
++WINLISPLIB =
+ 
+-WINLIB = $(WINTTYLIB)
++WINLIB = $(WINLISPLIB)
+ 
+ # any other strange libraries your system needs (for Sysunix only -- the more
+ # specialized targets should already be right)
+@@ -338,7 +346,7 @@
+ GENCSRC = monstr.c vis_tab.c	#tile.c
+ 
+ # all windowing-system-dependent .c (for dependencies and such)
+-WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC)
++WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINLISPSRC)
+ # all windowing-system-dependent .cpp (for dependencies and such)
+ WINCXXSRC = $(WINQTSRC) $(WINBESRC)
+ 
+@@ -682,6 +690,9 @@
+ 	$(CC) $(CFLAGS) -c ../win/gem/load_img.c
+ gr_rect.o: ../win/gem/gr_rect.c ../include/gr_rect.h
+ 	$(CC) $(CFLAGS) -c ../win/gem/gr_rect.c
++winlisp.o: ../win/lisp/winlisp.c $(HACK_H) ../include/winlisp.h \
++		../include/func_tab.h ../include/dlb.h ../include/patchlevel.h
++	$(CC) $(CFLAGS) -c ../win/lisp/winlisp.c
+ tile.o: tile.c $(HACK_H)
+ qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) ../include/func_tab.h \
+ 		../include/dlb.h ../include/patchlevel.h ../include/tile2x11.h \
+@@ -802,7 +813,8 @@
+ weapon.o: weapon.c $(HACK_H)
+ were.o: were.c $(HACK_H)
+ wield.o: wield.c $(HACK_H)
+-windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h
++windows.o: windows.c $(HACK_H) ../include/wingem.h ../include/winGnome.h \
++	../include/winlisp.h
+ wizard.o: wizard.c $(HACK_H) ../include/qtext.h ../include/epri.h
+ worm.o: worm.c $(HACK_H) ../include/lev.h
+ worn.o: worn.c $(HACK_H)
+--- nethack-3.4.2/win/tty/termcap.c	2003-08-29 17:08:25.000000000 -0700
++++ nethack/win/tty/termcap.c	2003-03-09 13:50:46.000000000 -0800
 @@ -1161,6 +1161,11 @@
  	if (windowprocs.name != NULL &&
  	    !strcmpi(windowprocs.name, "Gem")) return TRUE;
@@ -147,9 +224,20 @@
  #ifdef QT_GRAPHICS
  	/* XXX has_color() should be added to windowprocs */
  	if (windowprocs.name != NULL &&
---- /dev/null	1969-12-31 16:00:00.000000000 -0800
-+++ nethack/win/lisp/ChangeLog	2002-09-19 21:15:20.000000000 -0700
-@@ -0,0 +1,293 @@
+--- /dev/null	2003-05-01 12:00:27.000000000 -0700
++++ nethack/win/lisp/ChangeLog	2003-06-03 02:04:26.000000000 -0700
+@@ -0,0 +1,304 @@
++2003-06-03  Shawn Betts  <sabetts@sfu.ca>
++
++	* winlisp.c (lisp_print_glyph): Pass special to the print-glyph
++	lisp function as a symbol. delete the MG_PET bit in special if
++	iflags.hilite_pet is not set.
++	(special_glyph_to_string): new function
++
++2003-05-14  Shawn Betts  <sabetts@sfu.ca>
++
++	* winlisp.c (lisp_string): Also escape the backslash character.
++
 +2002-09-19  Ryan Yeske  <rcyeske@vcn.bc.ca>
 +
 +	* winlisp.c (lisp_cmd): nethack-api-* renamed to nhapi-*.
@@ -443,9 +531,9 @@
 +	s/nethack-api-updated-inventory/nethack-api-update-inventory/
 +	(WINLISP_VOID_RETVAL): added macro, called for every void
 +	function.
---- /dev/null	1969-12-31 16:00:00.000000000 -0800
-+++ nethack/win/lisp/winlisp.c	2002-09-19 21:15:20.000000000 -0700
-@@ -0,0 +1,1820 @@
+--- /dev/null	2003-05-01 12:00:27.000000000 -0700
++++ nethack/win/lisp/winlisp.c	2003-09-13 12:38:18.000000000 -0700
+@@ -0,0 +1,1876 @@
 +/* Copyright (c) Shawn Betts, Ryan Yeske, 2001                    */
 +/* NetHack may be freely redistributed.  See license for details. */
 +
@@ -676,6 +764,7 @@
 +struct window_procs lisp_procs = {
 +  "lisp",
 +  WC_COLOR|WC_HILITE_PET,
++  0L,
 +  lisp_init_nhwindows,
 +  lisp_player_selection,
 +  lisp_askname,
@@ -770,19 +859,20 @@
 +    }						\
 +  while (0)
 +#define lisp_int(i) printf("%d ",i)
-+#define lisp_string(s)				\
-+  do 						\
-+     {						\
-+       int nhi;					\
-+       printf ("\"");				\
-+       if (s)					\
-+	 for (nhi=0;nhi<strlen(s);nhi++) 	\
-+	   {					\
-+	     if (s[nhi] == 34) putchar('\\');	\
-+	     putchar(s[nhi]);			\
-+	   }					\
-+       printf("\" ");				\
-+     } 						\
++#define lisp_string(s)					\
++  do							\
++     {							\
++       int nhi;						\
++       printf ("\"");					\
++       if (s)						\
++	 for (nhi=0;nhi<strlen(s);nhi++)		\
++	   {						\
++	     if (s[nhi] == 34 				\
++		 || s[nhi] == 92) putchar('\\');	\
++	     putchar(s[nhi]);				\
++	   }						\
++       printf("\" ");					\
++     }							\
 +  while (0)
 +
 +static const char*
@@ -810,6 +900,31 @@
 +}
 +
 +static const char*
++special_glyph_to_string(special)
++     unsigned special;
++{
++  switch (special)
++    {
++    case MG_CORPSE:
++      return "corpse";
++    case MG_INVIS:
++      return "invis";
++    case MG_DETECT:
++      return "detect";
++    case MG_PET:
++      return "pet";
++    case MG_RIDDEN:
++      return "ridden";
++    }
++  
++  /* If it's a combination, just return special. */
++  if (special)
++    return "special";
++  else
++    return "none";
++}
++
++static const char*
 +wintype_to_string(type)
 +     int type;
 +{
@@ -2217,14 +2332,43 @@
 +    /* map glyph to character and color */
 +    mapglyph(glyph, &ch, &color, &special, x, y);
 +
++    /* If the user doesn't want to highlight the pet, then we erase
++       the PET bit from special. In the lisp code the special argument
++       will be 'pet if the glyph is a pet and will be printed in the
++       color of the pet highlight face. But we don't want this if the
++       user hasn't turned on hilite_pet. */
++    if (!iflags.hilite_pet)
++      {
++	special &= ~MG_PET;
++      }
++
 +    if (window == WIN_MAP)
-+      lisp_cmd ("print-glyph",
-+		lisp_int (x);
-+		lisp_int (y);
-+		lisp_int (color);
-+		lisp_int (glyph);
-+		lisp_int (glyph2tile[glyph]);
-+		lisp_int (ch););
++      {
++	/* The last parameter, special, is optional. It is only
++	   present when the tile is special in some way. FIXME: This
++	   duplicate code is a bit gross. */
++	if (special)
++	  {
++	    lisp_cmd ("print-glyph",
++		      lisp_int (x);
++		      lisp_int (y);
++		      lisp_int (color);
++		      lisp_int (glyph);
++		      lisp_int (glyph2tile[glyph]);
++		      lisp_int (ch);
++		      lisp_literal (special_glyph_to_string (special)););
++	  }
++	else
++	  {
++	    lisp_cmd ("print-glyph",
++		      lisp_int (x);
++		      lisp_int (y);
++		      lisp_int (color);
++		      lisp_int (glyph);
++		      lisp_int (glyph2tile[glyph]);
++		      lisp_int (ch););
++	  }
++      }
 +    else
 +      lisp_cmd ("error",
 +		lisp_string ("lisp_print_glyph bad window");



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux lexx 2.4.22-speakup #1 Sun Oct 12 18:38:48 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages nethack-lisp depends on:
ii  libc6                         2.3.2-8    GNU C Library: Shared libraries an
ii  nethack-common                3.4.2-1    Common files for Nethack dungeon c

-- no debconf information


-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang@db.debian.org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44

---------------------------------------
Received: (at 215899-close) by bugs.debian.org; 16 Oct 2003 13:27:29 +0000
>From katie@auric.debian.org Thu Oct 16 08:27:29 2003
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AA8A5-0007VC-00; Thu, 16 Oct 2003 08:27:29 -0500
Received: from katie by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 1AA80x-0001ue-00; Thu, 16 Oct 2003 09:18:03 -0400
From: Joshua Kwan <joshk@triplehelix.org>
To: 215899-close@bugs.debian.org
X-Katie: $Revision: 1.40 $
Subject: Bug#215899: fixed in nethack 3.4.2-2
Message-Id: <E1AA80x-0001ue-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Thu, 16 Oct 2003 09:18:03 -0400
Delivered-To: 215899-close@bugs.debian.org

Source: nethack
Source-Version: 3.4.2-2

We believe that the bug you reported is fixed in the latest version of
nethack, which is due to be installed in the Debian FTP archive:

nethack-common_3.4.2-2_i386.deb
  to pool/main/n/nethack/nethack-common_3.4.2-2_i386.deb
nethack-console_3.4.2-2_i386.deb
  to pool/main/n/nethack/nethack-console_3.4.2-2_i386.deb
nethack-gnome_3.4.2-2_i386.deb
  to pool/main/n/nethack/nethack-gnome_3.4.2-2_i386.deb
nethack-lisp_3.4.2-2_i386.deb
  to pool/main/n/nethack/nethack-lisp_3.4.2-2_i386.deb
nethack-qt_3.4.2-2_i386.deb
  to pool/main/n/nethack/nethack-qt_3.4.2-2_i386.deb
nethack-x11_3.4.2-2_i386.deb
  to pool/main/n/nethack/nethack-x11_3.4.2-2_i386.deb
nethack_3.4.2-2.diff.gz
  to pool/main/n/nethack/nethack_3.4.2-2.diff.gz
nethack_3.4.2-2.dsc
  to pool/main/n/nethack/nethack_3.4.2-2.dsc
nethack_3.4.2-2_all.deb
  to pool/main/n/nethack/nethack_3.4.2-2_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 215899@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joshua Kwan <joshk@triplehelix.org> (supplier of updated nethack package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 15 Oct 2003 09:03:15 -0700
Source: nethack
Binary: nethack-gnome nethack-x11 nethack nethack-qt nethack-console nethack-common nethack-lisp
Architecture: source i386 all
Version: 3.4.2-2
Distribution: unstable
Urgency: low
Maintainer: Debian Nethack Maintainers <pkg-nethack-devel@lists.alioth.debian.org>
Changed-By: Joshua Kwan <joshk@triplehelix.org>
Description: 
 nethack    - Overhead dungeon-crawler game (dummy package)
 nethack-common - Common files for Nethack dungeon crawl game
 nethack-console - Text-based overhead view D&D-style adventure game
 nethack-gnome - Text-based/Gnome overhead view D&D-style adventure game
 nethack-lisp - Text-based overhead view D&D-style adventure game
 nethack-qt - Text-based/Qt overhead view D&D-style adventure game
 nethack-x11 - Text-based/X11 overhead view D&D-style adventure game
Closes: 62361 147166 203229 215673 215899
Changes: 
 nethack (3.4.2-2) unstable; urgency=low
 .
   * Acknowledge a NMU we missed last time from Daniel Jacobwitz
     <dan@debian.org>, thanks! (Closes: #147166)
   * Ben Gertzfield <che@debian.org>:
     - Add symlink from /usr/lib/games/nethack/license to
       /usr/share/doc/nethack-common/copyright. (Closes: #215673)
     - Really include upstream source URL for LISP window system in
       copyright file.
     - Really include LISP windowing system patch from 0.9.2 upstream.
       (Closes: #215899)
     - Add 07_explore_mode_save.dpatch to use correct temporary
       buffer in sys/unix/unixmain.c when munging save file in
       explore mode. (Closes: #203229)
   * Joshua Kwan <joshk@triplehelix.org>:
     - Add 92_enh_paranoid_hit.dpatch to force user to say 'yes' when
       asked to hit a peaceful monster; disabled by default, in-game
       option. (Closes: #62361)
Files: 
 c4a25465bcc45c14aa8bbd4401a233e9 971 games optional nethack_3.4.2-2.dsc
 75e7538c85faa1e981043da922f3b244 287818 games optional nethack_3.4.2-2.diff.gz
 a695d51b1b690a966c2674a1eaa60b43 15568 games optional nethack_3.4.2-2_all.deb
 68ba904c28add6827820ac578721c4e3 444820 games optional nethack-common_3.4.2-2_i386.deb
 e26226895a402793e74c866c4ea20ef5 798520 games optional nethack-console_3.4.2-2_i386.deb
 813df520a50b71d3680961a3406e7d64 790624 games optional nethack-lisp_3.4.2-2_i386.deb
 22ba07f1d5f5ede9314c2798d6b2476b 842980 games optional nethack-x11_3.4.2-2_i386.deb
 efbadb17bcb679a1ff1da84e1623a197 942506 games optional nethack-qt_3.4.2-2_i386.deb
 3fc70400b0d3bbe705cbd54f28b0b366 1094140 gnome optional nethack-gnome_3.4.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/jkegerlouHKbEQ0RAh08AJ9vhshq/t5BM1M3xbcXLPyoUDeU6ACgmZDK
r83QEilTA41BZKUlwUessqY=
=9Km9
-----END PGP SIGNATURE-----