Debian pushing upstream...

Jan Christoph Nordholz <[email protected]> Wed, 1 Aug 2007 21:04:59 +0200
Newsgroups gmane.comp.gnu.screen
Message-ID <[email protected]>
Hi,

I guess this is the first mail of a whole series (I started out with 109
bugs in the debian tracker), but let's start now so you only get a small pile
of patches each time.
Attached is an assortment of patches that all apply to the current CVS tree.
Some of them just make the build look nicer (i.e. fix warnings), but there
are also a few bugfixes and compatibility enhancements.

Let me tell you a few lines about each of them (references to the debian
bugtracker can be easily followed by browsing to http://bugs.debian.org/%d):

[patches to configure.in]

* 01configure_fix_alpha_vsprintf

A rather old patch. I don't know if this is (still) necessary to make configure
succeed on Alpha, but as I don't have an Alpha box to test it on yet, I'm
keeping it... it definitely doesn't hurt. See debian #213842 for the original
discussion.

* 02configure_use_ncursesw

Adds libncursesw to the list of checked curses-like libraries, and prefer it
over the other choices (esp. plain ncurses).

* 03fully_expand_screenencodings

Handles your ticket #20277 that Victor Hsieh reported a few days ago.

<insert re-autoconf-ing here>

[patches to the source]

* 05fix_osdef_include

Add a missing include to osdef.h.in to make screen build on kfreebsd-amd64
(rationale is in debian #357232). There is probably a better patch in your
tracker at #15921, but I haven't looked deeper into it yet. (It involves
autoconfing, and I was quite content with the "glibc available" -> "3-argument
setenv()" logic, especially as this is the only call to setenv())

* 13split_info_files

Cosmetical - your distributed info files are splitted this way, so this is
just for consistency.

* 15manpage_typos

There is a bit confusion about ixon/ixoff. ;) On a sidenote: Are the texinfo
and man documents still related or have they been forked at some point and
are now maintained separately? I was wondering because that typo is only in
one of them...

* 16fix_gcc_warnings

Missing declaration.

* 17manpage_sessionname_warning

Make the warning regarding 'sessionname' sound more persuasive. Cf. Michael's
statement on this command as recorded in debian #103771:
  <cite>'sessionname' sucks, don't use it.</cite>

* 20defmonitor

That (i < 0) test looks very strange. If at all, the Msg() call should depend
on its outcome, not the setting of fore->w_monitor. Just removing the test seems
to Do The Right Thing[tm], even in multiuser mode with several terminals attached
to the same virtual session and toggling monitor mode there.
The corresponding ticket is debian #310568.


Regards,

Jan
01configure_fix_alpha_vsprintf.dpatch (text/plain, 396 B)
--- screen-4.0.3.orig/configure.in
+++ screen-4.0.3/configure.in
@@ -1206,7 +1206,7 @@
 rm -f /tmp/conftest*
 
 AC_MSG_CHECKING(for vsprintf)
-AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
+AC_TRY_LINK([#include <stdarg.h>],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
 
 AC_HEADER_DIRENT
02configure_use_ncursesw.dpatch (text/plain, 840 B)
--- screen-4.0.3.orig/configure.in	2007-07-23 23:56:53.000000000 +0200
+++ screen-4.0.3/configure.in	2007-07-23 23:56:32.000000000 +0200
@@ -643,6 +643,12 @@
 AC_CHECKING(for tgetent)
 AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
 olibs="$LIBS"
+LIBS="-lncursesw $olibs"
+AC_CHECKING(libncursesw)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+LIBS="-lncurses $olibs"
+AC_CHECKING(libncurses)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
 LIBS="-lcurses $olibs"
 AC_CHECKING(libcurses)
 AC_TRY_LINK(,[
@@ -658,10 +664,7 @@
 LIBS="-ltermlib $olibs"
 AC_CHECKING(libtermlib)
 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))))))
+AC_MSG_ERROR(!!! no tgetent - no screen)))))))
 
 AC_TRY_RUN([
 main()
03fully_expand_screenencodings.dpatch (text/plain, 498 B)
--- screen-4.0.3.orig/configure.in	2007-07-31 13:15:03.000000000 +0200
+++ screen-4.0.3/configure.in	2007-07-31 13:15:56.000000000 +0200
@@ -1283,7 +1283,7 @@
 SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
 if test -n "$datadir"; then
 eval SCREENENCODINGS="$datadir/screen/utf8encodings"
-SCREENENCODINGS="\"$SCREENENCODINGS\""
+eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\""
 fi
 AC_MSG_CHECKING(for the utf8-encodings location)
 AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS)
05fix_osdef_include.dpatch (text/plain, 277 B)
--- screen-4.0.3.orig/osdef.h.in
+++ screen-4.0.3/osdef.h.in
@@ -107,6 +107,7 @@
 extern char *tgoto __P((char *, int, int));
 
 #ifdef POSIX
+#include <string.h>
 extern int   setsid __P((void));
 extern int   setpgid __P((int, int));
 extern int   tcsetpgrp __P((int, int));
13split_info_files.dpatch (text/plain, 436 B)
--- screen-4.0.3.orig/doc/Makefile.in	2007-07-23 23:32:50.000000000 +0200
+++ screen-4.0.3/doc/Makefile.in	2007-07-23 23:33:11.000000000 +0200
@@ -27,7 +27,7 @@
 
 info screen.info: screen.texinfo
 	@rm -f screen.info*
-	$(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info
+	$(MAKEINFO) --split 50000 $(srcdir)/screen.texinfo -o screen.info
 
 install: installdirs
 	$(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1
15manpage_typos.dpatch (text/plain, 509 B)
--- screen-4.0.3.orig/doc/screen.1	2007-07-24 01:37:18.000000000 +0200
+++ screen-4.0.3/doc/screen.1	2007-07-24 01:37:59.000000000 +0200
@@ -3172,7 +3172,7 @@
 Specify the transmission of eight (or seven) bits per byte.
 .IP "ixon or -ixon"
 Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data.
-.IP "ixoff or -ixon"
+.IP "ixoff or -ixoff"
 Enables (or disables) software flow-control for receiving data.
 .IP "istrip or -istrip"
 Clear (or keep) the eight bit in each received byte.
16fix_gcc_warnings.dpatch (text/plain, 289 B)
--- screen-4.0.3.orig/layer.c	2007-07-31 01:07:35.000000000 +0200
+++ screen-4.0.3/layer.c	2007-07-31 01:07:54.000000000 +0200
@@ -460,7 +460,7 @@
 void
 LClearLine(l, y, xs, xe, bce, ol)
 struct layer *l;
-int xs, xe, bce;
+int y, xs, xe, bce;
 struct mline *ol;
 {
   struct canvas *cv;
17manpage_sessionname_warning.dpatch (text/plain, 1.6 KB)
--- screen-4.0.3.orig/doc/screen.1	2007-07-31 17:17:00.000000000 +0200
+++ screen-4.0.3/doc/screen.1	2007-07-31 17:19:11.000000000 +0200
@@ -2595,9 +2595,10 @@
 .PP
 Rename the current session. Note, that for \*Qscreen -list\*U the
 name shows up with the process-id prepended. If the argument \*Qname\*U
-is omitted, the name of this session is displayed. Caution: The $STY 
-environment variables still reflects the old name. This may result in 
-confusion. 
+is omitted, the name of this session is displayed. Caution: Among other
+problems, the $STY environment variable still reflects the old name.
+Use of this command is strongly discouraged. Use the \*Q-S\*U commandline
+option if you need this feature.
 The default is constructed from the tty and host names.
 .sp
 .ne 3
--- screen-4.0.3.orig/doc/screen.texinfo	2007-08-01 20:11:43.000000000 +0200
+++ screen-4.0.3/doc/screen.texinfo	2007-08-01 20:13:19.000000000 +0200
@@ -1754,9 +1754,11 @@
 Rename the current session. Note that for @code{screen -list} the name
 shows up with the process-id prepended. If the argument @var{name} is
 omitted, the name of this session is displayed.@*
-@emph{Caution}: The @code{$STY}
-environment variable still reflects the old name. This may result in
-confusion.  The default is constructed from the tty and host names.
+@emph{Caution}: Among other problems, the @code{$STY}
+environment variable still reflects the old name. Use of this command
+is strongly discouraged. Use the @code{-S} commandline option if you
+need this feature.
+The default is constructed from the tty and host names.
 @end deffn
 
 @node Suspend, Quit, Session Name, Session Management
20defmonitor.dpatch (text/plain, 445 B)
--- screen-4.0.3.orig/process.c	2007-07-31 21:25:29.000000000 +0200
+++ screen-4.0.3/process.c	2007-07-31 21:25:41.000000000 +0200
@@ -2014,7 +2014,6 @@
 	  for (i = maxusercount - 1; i >= 0; i--)
 	    if (ACLBYTE(fore->w_mon_notify, i))
 	      break;
-	  if (i < 0)
 #endif
-	    fore->w_monitor = MON_OFF;
+	  fore->w_monitor = MON_OFF;
 	  Msg(0, "Window %d (%s) is no longer being monitored for activity.", fore->w_number, fore->w_title);
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGsNlbJnGRgaR03R4RAqa0AJsF/6tiu+bBGrN72TeDCD0kWFPw1QCgjo17
ABOHdwAFmx5u+qRGm4w1aZM=
=FqVz
-----END PGP SIGNATURE-----