public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: screen-4.2.0-long_terminal_names.patch screen-4.2.0-incompatible-protocol.patch screen-4.2.0-tgetent.patch screen-4.2.0-check_for_altscreen.patch
@ 2014-04-20 18:32 Lars Wendler (polynomial-c)
  0 siblings, 0 replies; only message in thread
From: Lars Wendler (polynomial-c) @ 2014-04-20 18:32 UTC (permalink / raw
  To: gentoo-commits

polynomial-c    14/04/20 18:32:47

  Added:                screen-4.2.0-long_terminal_names.patch
                        screen-4.2.0-incompatible-protocol.patch
                        screen-4.2.0-tgetent.patch
                        screen-4.2.0-check_for_altscreen.patch
  Log:
  Revbump adding latest upstream fixes. Removed old
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

Revision  Changes    Path
1.1                  app-misc/screen/files/screen-4.2.0-long_terminal_names.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-long_terminal_names.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-long_terminal_names.patch?rev=1.1&content-type=text/plain

Index: screen-4.2.0-long_terminal_names.patch
===================================================================
From 44020241d033555e8e90fad3c88617dce1aed0bb Mon Sep 17 00:00:00 2001
From: Amadeusz Sławiński <amade@asmblr.net>
Date: Fri, 18 Apr 2014 14:01:21 +0000
Subject: fix screen to run on terminals with long $TERM

According to tic man page:
Terminal names exceeding the maximum alias length
(32 characters on systems with long filenames, 14 characters otherwise)
will  be  truncated  to  the maximum alias length and a warning message
will be printed.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
diff --git a/src/display.h b/src/display.h
index e8b3b80..a433e6d 100644
--- a/src/display.h
+++ b/src/display.h
@@ -73,7 +73,7 @@ struct display
   struct win *d_other;		/* pointer to other window */
   int   d_nonblock;		/* -1 don't block if obufmax reached */
 				/* >0: block after nonblock secs */
-  char  d_termname[20 + 1];	/* $TERM */
+  char  d_termname[MAXTERMLEN + 1];	/* $TERM */
   char	*d_tentry;		/* buffer for tgetstr */
   char	d_tcinited;		/* termcap inited flag */
   int	d_width, d_height;	/* width/height of the screen */
diff --git a/src/os.h b/src/os.h
index 5c17c83..f1d849c 100644
--- a/src/os.h
+++ b/src/os.h
@@ -45,6 +45,14 @@
 #define NAME_MAX 14
 #endif
 
+#if !defined(MAXTERMLEN)
+# if !defined(HAVE_LONG_FILE_NAMES)
+#  define MAXTERMLEN 14
+# else
+#  define MAXTERMLEN 32
+# endif
+#endif
+
 #ifdef ISC
 # ifdef ENAMETOOLONG
 #  undef ENAMETOOLONG
diff --git a/src/screen.h b/src/screen.h
index e74d711..01d678a 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -203,7 +203,7 @@ struct msg
 	  int nargs;
 	  char line[MAXPATHLEN];
 	  char dir[MAXPATHLEN];
-	  char screenterm[20];	/* is screen really "screen" ? */
+	  char screenterm[MAXTERMLEN];	/* is screen really "screen" ? */
 	}
       create;
       struct
@@ -215,7 +215,7 @@ struct msg
 	  char preselect[20];
 	  int esc;		/* his new escape character unless -1 */
 	  int meta_esc;		/* his new meta esc character unless -1 */
-	  char envterm[20 + 1];	/* terminal type */
+	  char envterm[MAXTERMLEN + 1];	/* terminal type */
 	  int encoding;		/* encoding of display */
 	  int detachfirst;      /* whether to detach remote sessions first */
 	}
--
cgit v0.9.0.2



1.1                  app-misc/screen/files/screen-4.2.0-incompatible-protocol.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-incompatible-protocol.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-incompatible-protocol.patch?rev=1.1&content-type=text/plain

Index: screen-4.2.0-incompatible-protocol.patch
===================================================================
From 14f23ca838b3d6daafbc23d14fa6aec13c382601 Mon Sep 17 00:00:00 2001
From: Jürgen Weigert <jnweiger@gmail.com>
Date: Fri, 18 Apr 2014 13:45:21 +0000
Subject: incompatible protocol

---
diff --git a/src/screen.h b/src/screen.h
index 5c93f32..e74d711 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -182,8 +182,9 @@ struct mode
  * 					 A few revisions after 8147d08 incorrectly
  * 					 carried version 1, but should have carried 2.
  * 2:	screen version 4.1.0devel	(revisions 8b46d8a upto YYYYYYY)
+ * 3:	screen version 4.2.0		(was incorrectly originally. Patched here)
  */
-#define MSG_VERSION	2
+#define MSG_VERSION	3
 
 #define MSG_REVISION	(('m'<<24) | ('s'<<16) | ('g'<<8) | MSG_VERSION)
 struct msg
--
cgit v0.9.0.2



1.1                  app-misc/screen/files/screen-4.2.0-tgetent.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-tgetent.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-tgetent.patch?rev=1.1&content-type=text/plain

Index: screen-4.2.0-tgetent.patch
===================================================================
From 937fcec34ba0d7ebfe0fb654c4106cc9c496f106 Mon Sep 17 00:00:00 2001
From: Amadeusz Sławiński <amade@asmblr.net>
Date: Fri, 18 Apr 2014 14:05:56 +0000
Subject: test more libraries for tgetent

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
diff --git a/src/configure.in b/src/configure.in
index e9ca223..139bba1 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -674,10 +674,16 @@ AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
 LIBS="-lncursesw $olibs"
 AC_CHECKING(libncursesw)
 AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+LIBS="-ltinfow $olibs"
+AC_CHECKING(libtinfow)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
 LIBS="-lncurses $olibs"
 AC_CHECKING(libncurses)
 AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
-AC_MSG_ERROR(!!! no tgetent - no screen)))))))
+LIBS="-ltinfo $olibs"
+AC_CHECKING(libtinfo)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+AC_MSG_ERROR(!!! no tgetent - no screen)))))))))
 
 AC_TRY_RUN([
 main()
--
cgit v0.9.0.2



1.1                  app-misc/screen/files/screen-4.2.0-check_for_altscreen.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-check_for_altscreen.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/screen/files/screen-4.2.0-check_for_altscreen.patch?rev=1.1&content-type=text/plain

Index: screen-4.2.0-check_for_altscreen.patch
===================================================================
From 049a3bfdfc59590a24dfeefa707abb64b74ae17b Mon Sep 17 00:00:00 2001
From: Amadeusz Sławiński <amade@asmblr.net>
Date: Fri, 18 Apr 2014 18:28:39 +0000
Subject: do proper checks if we are on altscreen or not

fixes screen segfaults with `altscreen on` when using applications making
use of altscreen like mc when resizing screen window

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
diff --git a/src/ansi.c b/src/ansi.c
index 04c9012..e76eef4 100644
--- a/src/ansi.c
+++ b/src/ansi.c
@@ -1436,14 +1436,17 @@ int c, intermediate;
 		{
 		  if (i)
 		    {
-		      if (!curr->w_alt.on)
+		      if (!curr->w_alt.on) {
 			SaveCursor(&curr->w_alt.cursor);
-		      EnterAltScreen(curr);
+			EnterAltScreen(curr);
+		      }
 		    }
 		  else
 		    {
-		      LeaveAltScreen(curr);
-		      RestoreCursor(&curr->w_alt.cursor);
+		      if (curr->w_alt.on) {
+		        LeaveAltScreen(curr);
+		        RestoreCursor(&curr->w_alt.cursor);
+		      }
 		    }
 		  if (a1 == 47 && !i)
 		    curr->w_saved.on = 0;
--
cgit v0.9.0.2





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-20 18:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-20 18:32 [gentoo-commits] gentoo-x86 commit in app-misc/screen/files: screen-4.2.0-long_terminal_names.patch screen-4.2.0-incompatible-protocol.patch screen-4.2.0-tgetent.patch screen-4.2.0-check_for_altscreen.patch Lars Wendler (polynomial-c)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox