[nethack] 08/31: Add LISP fixes for 3.6

James Cowgill jcowgill-guest at moszumanska.debian.org
Mon Mar 7 17:54:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch master
in repository nethack.

commit 585a0ee5beeb1496f3b170b9399f9b2588da4eb3
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Mon Mar 7 14:21:06 2016 +0000

    Add LISP fixes for 3.6
---
 debian/patches/0024-lisp-3.6.patch | 200 +++++++++++++++++++++++++++++++++++++
 debian/patches/series              |   1 +
 2 files changed, 201 insertions(+)

diff --git a/debian/patches/0024-lisp-3.6.patch b/debian/patches/0024-lisp-3.6.patch
new file mode 100644
index 0000000..be51f5d
--- /dev/null
+++ b/debian/patches/0024-lisp-3.6.patch
@@ -0,0 +1,200 @@
+Description: Fixes to the LISP window system for 3.6.0
+ These have not been extensively tested.
+Author: James Cowgill <jcowgill at debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/win/lisp/winlisp.c
++++ b/win/lisp/winlisp.c
+@@ -249,6 +249,7 @@ struct window_procs lisp_procs = {
+   lisp_destroy_nhwindow,
+   lisp_curs,
+   lisp_putstr,
++  genl_putmixed,
+   lisp_display_file,
+   lisp_start_menu,
+   lisp_add_menu,
+@@ -285,6 +286,19 @@ struct window_procs lisp_procs = {
+   lisp_end_screen,
+   lisp_outrip,
+   genl_preference_update,
++
++  genl_getmsghistory,
++  genl_putmsghistory,
++#ifdef STATUS_VIA_WINDOWPORT
++  genl_status_init,
++  genl_status_finish,
++  genl_status_enablefield,
++  genl_status_update,
++#ifdef STATUS_HILITES
++  genl_status_threshold,
++#endif
++#endif
++  genl_can_suspend_no,
+ };
+ 
+ /* macros for printing lisp output */
+@@ -335,7 +349,7 @@ struct window_procs lisp_procs = {
+ #define lisp_string(s)					\
+   do							\
+      {							\
+-       int nhi;						\
++       unsigned nhi;						\
+        printf ("\"");					\
+        if (s)						\
+ 	 for (nhi=0;nhi<strlen(s);nhi++)		\
+@@ -531,12 +545,6 @@ bail(mesg)
+ }
+ 
+ void
+-win_lisp_init ()
+-{
+-  /* Code to be executed on startup. */
+-}
+-
+-void
+ lisp_player_selection ()
+ {
+ 	int i, k, n;
+@@ -904,9 +912,7 @@ get_options()
+ {
+   lisp_cmd ("options",
+ 	    lisp_boolean(iflags.cbreak);	/* in cbreak mode, rogue format */
+-	    lisp_boolean(iflags.DECgraphics);	/* use DEC VT-xxx extended character set */
+ 	    lisp_boolean(iflags.echo);		/* 1 to echo characters */
+-	    lisp_boolean(iflags.IBMgraphics);	/* use IBM extended character set */
+ 	    lisp_int(iflags.msg_history);	/* hint: # of top lines to save */
+ 	    lisp_boolean(iflags.num_pad);	/* use numbers for movement commands */
+ 	    lisp_boolean(iflags.news);		/* print news */
+@@ -1004,7 +1010,7 @@ generate_status_line ()
+ 		 lisp_int (depth(&u.uz)););
+ 
+   lisp_list (lisp_string ("$");
+-	     lisp_int ((int)u.ugold););
++	     lisp_int ((int) money_cnt(invent)););
+   lisp_list (lisp_string ("HP");
+ 	     lisp_int (hp););
+   lisp_list (lisp_string ("HPmax");
+@@ -1229,7 +1235,7 @@ lisp_select_menu(window, how, menu_list)
+   if (*menu_list == NULL)
+     {
+       panic ("Memory allocation failure; cannot get %u bytes", 
+-	     sizeof (menu_item));
++	     (unsigned) sizeof (menu_item));
+     }
+   size = 0;
+ 
+@@ -1240,7 +1246,7 @@ lisp_select_menu(window, how, menu_list)
+       if ((*menu_list = realloc (*menu_list, size * sizeof (menu_item))) == NULL)
+ 	{
+ 	  panic ("Memory allocation failure; cannot get %u bytes", 
+-		 size * sizeof (menu_item));
++		 (unsigned) (size * sizeof (menu_item)));
+ 	}
+ 
+       /* assign the item ID */
+@@ -1844,10 +1850,11 @@ lisp_update_positionbar(features)
+ #define warn_color(n) def_warnsyms[n].color
+ 
+ void
+-lisp_print_glyph(window, x, y, glyph)
++lisp_print_glyph(window, x, y, glyph, bkglyph)
+     winid window;
+     xchar x, y;
+     int glyph;
++    int bkglyph UNUSED;
+ {
+     int ch;
+     boolean reverse_on = FALSE;
+@@ -1925,13 +1932,14 @@ get_death_text (buf)
+ }
+ 
+ void
+-lisp_outrip(window, how)
++lisp_outrip(window, how, when)
+      winid window;
+      int how;
++     time_t when UNUSED;
+ {
+   lisp_cmd ("outrip",
+ 	    lisp_int (window);	    
+ 	    lisp_string (plname);
+-	    lisp_int ((int)u.ugold);
++	    lisp_int ((int) money_cnt(invent));
+ 	    lisp_string ("Died while trying to finish nethack-el."));
+ }
+--- a/include/winlisp.h
++++ b/include/winlisp.h
+@@ -18,7 +18,6 @@
+ extern struct window_procs tty_procs;
+ 
+ /* ### winlisp.c ### */
+-E void NDECL(win_lisp_init);
+ E void FDECL(lisp_init_nhwindows, (int *, char **));
+ E void NDECL(lisp_player_selection);
+ E void NDECL(lisp_askname);
+@@ -48,7 +47,7 @@ E void FDECL(lisp_cliparound, (int, int)
+ #ifdef POSITIONBAR
+ E void FDECL(lisp_update_positionbar, (char *));
+ #endif
+-E void FDECL(lisp_print_glyph, (winid,XCHAR_P,XCHAR_P,int));
++E void FDECL(lisp_print_glyph, (winid,XCHAR_P,XCHAR_P,int,int));
+ E void FDECL(lisp_raw_print, (const char *));
+ E void FDECL(lisp_raw_print_bold, (const char *));
+ E int NDECL(lisp_nhgetch);
+@@ -65,6 +64,6 @@ E void NDECL(lisp_delay_output);
+ E void NDECL(lisp_start_screen);
+ E void NDECL(lisp_end_screen);
+ 
+-E void FDECL(lisp_outrip, (winid,int));
++E void FDECL(lisp_outrip, (winid,int,time_t));
+ 
+ #endif /* WINLISP_H */
+--- a/src/windows.c
++++ b/src/windows.c
+@@ -113,7 +113,7 @@ static struct win_choices {
+     { &mswin_procs, 0 CHAINR(0) },
+ #endif
+ #ifdef LISP_GRAPHICS
+-    { &lisp_procs, win_lisp_init CHAINR(0) },
++    { &lisp_procs, 0 CHAINR(0) },
+ #endif
+ #ifdef WINCHAIN
+     { &chainin_procs, chainin_procs_init, chainin_procs_chain },
+--- a/util/makedefs.c
++++ b/util/makedefs.c
+@@ -1466,6 +1466,9 @@ static struct win_info window_opts[] = {
+ #ifdef BEOS_GRAPHICS
+     { "BeOS", "BeOS InterfaceKit" },
+ #endif
++#ifdef LISP_GRAPHICS
++    { "lisp", "Lisp" },
++#endif
+     { 0, 0 }
+ };
+ 
+--- a/util/mdgrep.h
++++ b/util/mdgrep.h
+@@ -79,6 +79,11 @@ static struct grep_var grep_vars[] = { {
+ #else
+                                        { "LIFE", 0 },
+ #endif
++#if defined(LISP_GRAPHICS)
++                                       { "LISP_GRAPHICS", 1 },
++#else
++                                       { "LISP_GRAPHICS", 0 },
++#endif
+ #if defined(MAC)
+                                        { "MAC", 1 },
+ #else
+--- a/util/mdgrep.pl
++++ b/util/mdgrep.pl
+@@ -14,7 +14,7 @@
+ 
+ # Window Systems:
+ @win = qw/TTY_GRAPHICS MAC_GRAPHICS AMII_GRAPHICS MSWIN_GRAPHICS X11_GRAPHICS
+-	QT_GRAPHICS GNOME_GRAPHICS GEM_GRAPHICS/;
++	QT_GRAPHICS GNOME_GRAPHICS GEM_GRAPHICS LISP_GRAPHICS/;
+ 
+ # Game Features:
+ @feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR
diff --git a/debian/patches/series b/debian/patches/series
index bafdac0..ea58e42 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@
 0020-fix-64-bit-issues-in-lisp-code.patch
 0021-fix-kfreebsd-ftbfs.patch
 0023-gcc-warning-fixes.patch
+0024-lisp-3.6.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/nethack.git



More information about the Pkg-games-commits mailing list