Hello community,

here is the log from the commit of package screen for openSUSE:Factory checked 
in at 2013-09-14 19:09:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/screen (Old)
 and      /work/SRC/openSUSE:Factory/.screen.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "screen"

Changes:
--------
--- /work/SRC/openSUSE:Factory/screen/screen.changes    2013-04-02 
13:12:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.screen.new/screen.changes       2013-09-14 
19:09:11.000000000 +0200
@@ -1,0 +2,14 @@
+Fri Sep 13 15:17:12 CEST 2013 - [email protected]
+
+- update to current 4.0.4 git to get support for non-bmp unicode
+  * remove no longer needed mappedcmd.diff
+  * remove no longer needed styroptcrash.diff
+- fix potential buffer overrun in show_all_active.patch
+- redo combine screen_enhance_windows_list_1_3.patch,
+  screen_enhance_windows_list_2_3.patch,
+  screen_fix_wW_string_escapes_to_nearly_old_behavior.patch
+  into screen_enhance_windows_list.patch.
+  Do not mess with the old %w behaviour, just add support for the
+  windows command argument. Fixes bnc#808565.
+
+-------------------------------------------------------------------

Old:
----
  mappedcmd.diff
  screen_enhance_windows_list_1_3.patch
  screen_enhance_windows_list_2_3.patch
  screen_fix_wW_string_escapes_to_nearly_old_behavior.patch
  styroptcrash.diff

New:
----
  screen_enhance_windows_list.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ screen.spec ++++++
--- /var/tmp/diff_new_pack.37fjFt/_old  2013-09-14 19:09:13.000000000 +0200
+++ /var/tmp/diff_new_pack.37fjFt/_new  2013-09-14 19:09:13.000000000 +0200
@@ -45,14 +45,10 @@
 Patch4:         term_too_long.diff
 Patch5:         sort_command.patch
 Patch6:         libtinfo.diff
-Patch7:         mappedcmd.diff
-Patch8:         styroptcrash.diff
 Patch9:         use_locale.diff
 Patch10:        screen-poll-zombies.patch
-Patch11:        screen_enhance_windows_list_1_3.patch
-Patch12:        screen_enhance_windows_list_2_3.patch
-Patch13:        show_all_active.patch
-Patch14:        screen_fix_wW_string_escapes_to_nearly_old_behavior.patch
+Patch11:        show_all_active.patch
+Patch12:        screen_enhance_windows_list.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -71,14 +67,10 @@
 %patch4 -p1
 %patch5
 %patch6
-%patch7 -p2
-%patch8 -p2
 %patch9 -p1
 %patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
+%patch11
+%patch12
 
 %build
 CFLAGS="-DMAXWIN=1000 $RPM_OPT_FLAGS" %configure --prefix=/usr 
--infodir=%{_infodir} \

++++++ screen-4.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/acls.c new/screen-4.0.4/acls.c
--- old/screen-4.0.4/acls.c     2012-06-08 17:20:17.000000000 +0200
+++ new/screen-4.0.4/acls.c     2013-04-08 17:53:51.000000000 +0200
@@ -455,6 +455,16 @@
   return gp;                           /* *gp is NULL */
 }
 
+static int
+PasswordMatches(pw, password)
+const char *pw, *password;
+{
+  if (!*password)
+    return 0;
+  char *buf = crypt((char *)pw, (char *)password);
+  return (buf && !strcmp(buf, password));
+}
+
 /* 
  * Returns nonzero if failed or already linked.
  * Both users are created on demand. 
@@ -544,8 +554,7 @@
 
       if (pw2 && *pw2 && *pw2 != '\377')       /* provided a system password */
         {
-         if (!*pass ||                         /* but needed none */
-             strcmp(crypt(pw2, pass), pass))
+         if (!PasswordMatches(pw2, pass))
            {
              debug("System password mismatch\n");
              sorry++;
@@ -554,11 +563,10 @@
       else                                     /* no pasword provided */
         if (*pass)                             /* but need one */
          sorry++;
-#endif
+#endif /* CHECKLOGIN */
       if (pw1 && *pw1 && *pw1 != '\377')       /* provided a screen password */
        {
-         if (!*u->u_password ||                /* but needed none */
-             strcmp(crypt(pw1, u->u_password), u->u_password))
+         if (!PasswordMatches(pw1, u->u_password))
            {
              debug("screen password mismatch\n");
               sorry++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/ansi.c new/screen-4.0.4/ansi.c
--- old/screen-4.0.4/ansi.c     2012-06-08 17:20:17.000000000 +0200
+++ new/screen-4.0.4/ansi.c     2013-05-13 11:57:20.000000000 +0200
@@ -683,6 +683,7 @@
                      mc.image = c;
                      mc.mbcs = 0;
                      mc.font = '0';
+                     mc.fontx = 0;
                      mcp = recode_mchar(&mc, 0, UTF8);
                      debug2("%02x %02x\n", mcp->image, mcp->font);
                      c = mcp->image | mcp->font << 8;
@@ -708,7 +709,7 @@
                  if (oy < 0)
                    oy = 0;
                  copy_mline2mchar(&omc, &curr->w_mlines[oy], ox);
-                 if (omc.image == 0xff && omc.font == 0xff)
+                 if (omc.image == 0xff && omc.font == 0xff && omc.fontx == 0)
                    {
                      ox--;
                      if (ox >= 0)
@@ -839,7 +840,10 @@
              curr->w_rend.image = c;
 #ifdef UTF8
              if (curr->w_encoding == UTF8)
-               curr->w_rend.font = c >> 8;
+               {
+                 curr->w_rend.font = c >> 8;
+                 curr->w_rend.fontx = c >> 16;
+               }
 #endif
 #ifdef DW_CHARS
              curr->w_rend.mbcs = curr->w_mbcs;
@@ -2378,10 +2382,18 @@
          ml->font = null;
          p->w_FontL = p->w_charsets[p->w_ss ? p->w_ss : p->w_Charset] = 0;
          p->w_FontR = p->w_charsets[p->w_ss ? p->w_ss : p->w_CharsetR] = 0;
-         mc->font = p->w_rend.font  = 0;
+         mc->font = mc->fontx = p->w_rend.font  = 0;
          WMsg(p, 0, "Warning: no space for font - turned off");
        }
     }
+  if (mc->fontx && ml->fontx == null)
+    {
+      if ((ml->fontx = (unsigned char *)calloc(p->w_width + 1, 1)) == 0)
+       {
+         ml->fontx = null;
+         mc->fontx = 0;
+       }
+    }
 #endif
 #ifdef COLOR
   if (mc->color && ml->color == null)
@@ -2519,6 +2531,9 @@
          if (ml->font != null)
            free(ml->font);
          ml->font = null;
+         if (ml->fontx != null)
+           free(ml->fontx);
+         ml->fontx = null;
 #endif
 #ifdef COLOR
          if (ml->color != null)
@@ -2564,6 +2579,9 @@
          if (ml->font != null)
            free(ml->font);
          ml->font = null;
+         if (ml->fontx != null)
+           free(ml->fontx);
+         ml->fontx = null;
 #endif
 #ifdef COLOR
          if (ml->color != null)
@@ -2680,7 +2698,10 @@
       if (p->w_encoding != UTF8)
        ml->font[x + 1] |= 0x80;
       else if (p->w_encoding == UTF8 && c->mbcs)
-       ml->font[x + 1] = c->mbcs;
+       {
+         ml->font[x + 1] = c->mbcs;
+         ml->fontx[x + 1] = 0;
+       }
 # else
       ml->font[x + 1] |= 0x80;
 # endif
@@ -2711,7 +2732,10 @@
       if (p->w_encoding != UTF8)
        ml->font[x + 1] |= 0x80;
       else if (p->w_encoding == UTF8 && c->mbcs)
-       ml->font[x + 1] = c->mbcs;
+       {
+         ml->font[x + 1] = c->mbcs;
+         ml->fontx[x + 1] = 0;
+       }
 # else
       ml->font[x + 1] |= 0x80;
 # endif
@@ -2767,22 +2791,40 @@
   MKillDwRight(p, ml, x);
   MKillDwLeft(p, ml, x + n - 1);
   bcopy(s, (char *)ml->image + x, n);
-  b = ml->attr + x;
-  for (i = n; i-- > 0;)
-    *b++ = r->attr;
+  if (ml->attr != null)
+    {
+      b = ml->attr + x;
+      for (i = n; i-- > 0;)
+       *b++ = r->attr;
+    }
 #ifdef FONT
-  b = ml->font + x;
-  for (i = n; i-- > 0;)
-    *b++ = r->font;
+  if (ml->font != null)
+    {
+      b = ml->font + x;
+      for (i = n; i-- > 0;)
+       *b++ = r->font;
+    }
+  if (ml->fontx != null)
+    {
+      b = ml->fontx + x;
+      for (i = n; i-- > 0;)
+       *b++ = r->fontx;
+    }
 #endif
 #ifdef COLOR
-  b = ml->color + x;
-  for (i = n; i-- > 0;)
-    *b++ = r->color;
+  if (ml->color != null)
+    {
+      b = ml->color + x;
+      for (i = n; i-- > 0;)
+       *b++ = r->color;
+    }
 # ifdef COLORS256
-  b = ml->colorx + x;
-  for (i = n; i-- > 0;)
-    *b++ = r->colorx;
+  if (ml->colorx != null)
+    {
+      b = ml->colorx + x;
+      for (i = n; i-- > 0;)
+       *b++ = r->colorx;
+    }
 # endif
 #endif
 }
@@ -2840,6 +2882,9 @@
   q = ml->font; o = hml->font; hml->font = q; ml->font = null;
   if (o != null)
     free(o);
+  q = ml->fontx; o = hml->fontx; hml->fontx = q; ml->fontx = null;
+  if (o != null)
+    free(o);
 #endif
 
 #ifdef COLOR
@@ -2881,6 +2926,15 @@
        break;
 # endif
 #endif
+#ifdef UTF8
+      if (p->w_encoding == UTF8)
+       {
+         if (ml->font != null && bcmp((char*)ml->font, null, p->w_width))
+           break;
+         if (ml->fontx != null && bcmp((char*)ml->fontx, null, p->w_width))
+           break;
+       }
+#endif
     }
   debug1("MFindUsedLine returning  %d\n", y);
   return y;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/attacher.c new/screen-4.0.4/attacher.c
--- old/screen-4.0.4/attacher.c 2012-06-08 17:20:17.000000000 +0200
+++ new/screen-4.0.4/attacher.c 2013-04-08 17:46:35.000000000 +0200
@@ -882,6 +882,12 @@
       salt[1] = 'A' + (int)((time(0) >> 6) % 26);
       salt[2] = 0;
       pass = crypt(mypass, salt);
+      if (!pass)
+       {
+          fprintf(stderr, "crypt() error.\007\n");
+          sleep(2);
+          return;
+       }
       pass = ppp->pw_passwd = SaveStr(pass);
     }
 #endif
@@ -924,7 +930,8 @@
       if (pam_error == PAM_SUCCESS)
        break;
 #else
-      if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
+      char *buf = crypt(cp1, pass);
+      if (buf && !strncmp(buf, pass, strlen(pass)))
        break;
 #endif
       debug("screen_builtin_lck: NO!!!!!\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/comm.h.dist new/screen-4.0.4/comm.h.dist
--- old/screen-4.0.4/comm.h.dist        2012-06-11 17:24:53.000000000 +0200
+++ new/screen-4.0.4/comm.h.dist        2013-04-08 17:50:13.000000000 +0200
@@ -210,31 +210,32 @@
 #define RC_STARTUP_MESSAGE 153
 #define RC_STUFF 154
 #define RC_SU 155
-#define RC_TERM 156
-#define RC_TERMCAP 157
-#define RC_TERMCAPINFO 158
-#define RC_TERMINFO 159
-#define RC_TIME 160
-#define RC_TITLE 161
-#define RC_UMASK 162
-#define RC_UNBINDALL 163
-#define RC_UNSETENV 164
-#define RC_UTF8 165
-#define RC_VBELL 166
-#define RC_VBELL_MSG 167
-#define RC_VBELLWAIT 168
-#define RC_VERBOSE 169
-#define RC_VERSION 170
-#define RC_WALL 171
-#define RC_WIDTH 172
-#define RC_WINDOWLIST 173
-#define RC_WINDOWS 174
-#define RC_WRAP 175
-#define RC_WRITEBUF 176
-#define RC_WRITELOCK 177
-#define RC_XOFF 178
-#define RC_XON 179
-#define RC_ZMODEM 180
-#define RC_ZOMBIE 181
+#define RC_SUSPEND 156
+#define RC_TERM 157
+#define RC_TERMCAP 158
+#define RC_TERMCAPINFO 159
+#define RC_TERMINFO 160
+#define RC_TIME 161
+#define RC_TITLE 162
+#define RC_UMASK 163
+#define RC_UNBINDALL 164
+#define RC_UNSETENV 165
+#define RC_UTF8 166
+#define RC_VBELL 167
+#define RC_VBELL_MSG 168
+#define RC_VBELLWAIT 169
+#define RC_VERBOSE 170
+#define RC_VERSION 171
+#define RC_WALL 172
+#define RC_WIDTH 173
+#define RC_WINDOWLIST 174
+#define RC_WINDOWS 175
+#define RC_WRAP 176
+#define RC_WRITEBUF 177
+#define RC_WRITELOCK 178
+#define RC_XOFF 179
+#define RC_XON 180
+#define RC_ZMODEM 181
+#define RC_ZOMBIE 182
 
-#define RC_LAST 181
+#define RC_LAST 182
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/display.c new/screen-4.0.4/display.c
--- old/screen-4.0.4/display.c  2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/display.c  2013-04-09 12:27:38.000000000 +0200
@@ -594,7 +594,7 @@
 # ifdef UTF8
   if (D_encoding == UTF8)
     {
-      c = (c & 255) | (unsigned char)D_rend.font << 8;
+      c = (c & 255) | (unsigned char)D_rend.font << 8 | (unsigned 
char)D_rend.fontx << 16;
 #  ifdef DW_CHARS
       if (D_mbcs)
        {
@@ -1882,6 +1882,10 @@
 #ifdef FONT
   if (D_rend.font != mc->font)
     SetFont(mc->font);
+#ifdef UTF8
+  if (D_encoding == UTF8)
+    D_rend.fontx = mc->fontx;
+#endif
 #endif
 }
 
@@ -1934,6 +1938,10 @@
 #ifdef FONT
   if (D_rend.font != ml->font[x])
     SetFont(ml->font[x]);
+#ifdef UTF8
+  if (D_encoding == UTF8)
+    D_rend.fontx = ml->fontx[x];
+#endif
 #endif
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/doc/screen.1 
new/screen-4.0.4/doc/screen.1
--- old/screen-4.0.4/doc/screen.1       2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/doc/screen.1       2013-04-08 17:46:35.000000000 +0200
@@ -394,10 +394,12 @@
 But when cascading multiple screens, loops are not detected; take care.
 .TP 5
 .B \-X
-Send the specified command to a running screen session. You can use
-the \fB-d\fP or \fB-r\fP option to tell screen to look only for
-attached or detached screen sessions. Note that this command doesn't
-work if the session is password protected.
+Send the specified command to a running screen session. You may
+use the \fB-S\fP option to specify the screen session if you have
+several screen sessions running. You can use the \fB-d\fP or
+\fB-r\fP option to tell screen to look only for attached or
+detached screen sessions. Note that this command doesn't work if
+the session is password protected.
 
 .SH "DEFAULT KEY BINDINGS"
 .ta 12n 26n
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/doc/screen.texinfo 
new/screen-4.0.4/doc/screen.texinfo
--- old/screen-4.0.4/doc/screen.texinfo 2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/doc/screen.texinfo 2013-04-08 17:46:35.000000000 +0200
@@ -458,10 +458,11 @@
 
 
 @item -X
-Send the specified command to a running screen session. You can use
-the @code{-d} or @code{-r} option to tell screen to look only for 
-attached or detached screen sessions. Note that this command doesn't
-work if the session is password protected.
+Send the specified command to a running screen session. You may use
+the @code{-S} option to specify the screen session if you have several
+running. You can use the @code{-d} or @code{-r} option to tell screen
+to look only for attached or detached screen sessions. Note that this
+command doesn't work if the session is password protected.
 
 @end table
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/encoding.c new/screen-4.0.4/encoding.c
--- old/screen-4.0.4/encoding.c 2009-07-22 17:59:27.000000000 +0200
+++ new/screen-4.0.4/encoding.c 2013-09-02 13:26:49.000000000 +0200
@@ -514,6 +514,8 @@
   if (rmc.font == 0)   /* latin1 is the same in unicode */
     return mc;
   c = rmc.image | (rmc.font << 8);
+  if (from == UTF8)
+    c |= rmc.fontx << 16;
 #ifdef DW_CHARS
   if (rmc.mbcs)
     {
@@ -526,6 +528,8 @@
     c = recode_char_to_encoding(c, to);
   rmc.image = c & 255;
   rmc.font = c >> 8 & 255;
+  if (to == UTF8)
+    rmc.fontx = c >> 16 & 255;
   return &rmc;
 }
 
@@ -542,7 +546,7 @@
 
   if (from == to || (from != UTF8 && to != UTF8) || w == 0)
     return ml;
-  if (ml->font == null && encodings[from].deffont == 0)
+  if (ml->font == null && ml->fontx == null && encodings[from].deffont == 0)
     return ml;
   if (w > maxlen)
     {
@@ -556,7 +560,11 @@
            rml[i].font = malloc(w);
          else
            rml[i].font = realloc(rml[i].font, w);
-         if (rml[i].image == 0 || rml[i].font == 0)
+         if (rml[i].fontx == 0)
+           rml[i].fontx = malloc(w);
+         else
+           rml[i].fontx = realloc(rml[i].fontx, w);
+         if (rml[i].image == 0 || rml[i].font == 0 || rml[i].fontx == 0)
            {
              maxlen = 0;
              return ml;        /* sorry */
@@ -578,6 +586,12 @@
   for (i = 0; i < w; i++)
     debug1("%c", "0123456789abcdef"[(ml->font[i]     ) & 15]);
   debug("\n");
+  for (i = 0; i < w; i++)
+    debug1("%c", "0123456789abcdef"[(ml->fontx[i] >> 4) & 15]);
+  debug("\n");
+  for (i = 0; i < w; i++)
+    debug1("%c", "0123456789abcdef"[(ml->fontx[i]     ) & 15]);
+  debug("\n");
 
   rl = rml + last;
   rl->attr = ml->attr;
@@ -590,6 +604,8 @@
   for (i = 0; i < w; i++)
     {
       c = ml->image[i] | (ml->font[i] << 8);
+      if (from == UTF8)
+       c |= ml->fontx[i] << 16;
       if (from != UTF8 && c < 256)
        c |= encodings[from].deffont << 8;
 #ifdef DW_CHARS
@@ -603,6 +619,8 @@
              i++;
              c2 = ml->image[i] | (ml->font[i] << 8);
              c = recode_char_dw_to_encoding(c, &c2, to);
+             if (to == UTF8)
+               rl->fontx[i - 1]  = c >> 16 & 255;
              rl->font[i - 1]  = c >> 8 & 255;
              rl->image[i - 1] = c      & 255;
              c = c2;
@@ -613,6 +631,8 @@
         c = recode_char_to_encoding(c, to);
       rl->image[i] = c & 255;
       rl->font[i] = c >> 8 & 255;
+      if (to == UTF8)
+        rl->fontx[i] = c >> 16 & 255;
     }
   last ^= 1;
   debug("recode_mline: to\n");
@@ -628,14 +648,20 @@
   for (i = 0; i < w; i++)
     debug1("%c", "0123456789abcdef"[(rl->font[i]     ) & 15]);
   debug("\n");
+  for (i = 0; i < w; i++)
+    debug1("%c", "0123456789abcdef"[(rl->fontx[i] >> 4) & 15]);
+  debug("\n");
+  for (i = 0; i < w; i++)
+    debug1("%c", "0123456789abcdef"[(rl->fontx[i]     ) & 15]);
+  debug("\n");
   return rl;
 }
 
 struct combchar {
-  unsigned short c1;
-  unsigned short c2;
-  unsigned short next;
-  unsigned short prev;
+  unsigned int c1;
+  unsigned int c2;
+  unsigned int next;
+  unsigned int prev;
 };
 struct combchar **combchars;
 
@@ -649,10 +675,20 @@
       AddUtf8(combchars[c - 0xd800]->c1);
       c = combchars[c - 0xd800]->c2;
     }
+  if (c >= 0x10000)
+    {
+      if (c >= 0x200000)
+       {
+         AddChar((c & 0x3000000) >> 12 ^ 0xf8);
+         c = (c & 0xffffff) ^ ((0xf0 ^ 0x80) << 18);
+       }
+      AddChar((c & 0x1fc0000) >> 18 ^ 0xf0);
+      c = (c & 0x3ffff) ^ ((0xe0 ^ 0x80) << 12);
+    }
   if (c >= 0x800)
     {
-      AddChar((c & 0xf000) >> 12 | 0xe0);
-      c = (c & 0x0fff) | 0x1000; 
+      AddChar((c & 0x7f000) >> 12 ^ 0xe0);
+      c = (c & 0x0fff) ^ ((0xc0 ^ 0x80) << 6);
     }
   if (c >= 0x80)
     {
@@ -683,10 +719,24 @@
 int c;
 {
   int l = 1;
+  if (c >= 0x10000)
+    {
+      if (c >= 0x200000)
+       {
+         if (p)
+           *p++ = (c & 0x3000000) >> 12 ^ 0xf8;
+         l++;
+         c = (c & 0xffffff) ^ ((0xf0 ^ 0x80) << 18);
+       }
+      if (p)
+        *p++ = (c & 0x1fc0000) >> 18 ^ 0xf0;
+      l++;
+      c = (c & 0x3ffff) ^ ((0xe0 ^ 0x80) << 12);
+    }
   if (c >= 0x800)
     {
       if (p)
-       *p++ = (c & 0xf000) >> 12 | 0xe0; 
+       *p++ = (c & 0x7f000) >> 12 ^ 0xe0; 
       l++;
       c = (c & 0x0fff) | 0x1000; 
     }
@@ -758,8 +808,13 @@
   *utf8charp = utf8char = (c & 0x80000000) ? c : 0;
   if (utf8char)
     return -1;
+#if 0
   if (c & 0xffff0000)
     c = UCS_REPL;      /* sorry, only know 16bit Unicode */
+#else
+  if (c & 0xff800000)
+    c = UCS_REPL;      /* sorry, only know 23bit Unicode */
+#endif
   if (c >= 0xd800 && (c <= 0xdfff || c == 0xfffe || c == 0xffff))
     c = UCS_REPL;      /* illegal code */
   return c;
@@ -803,11 +858,13 @@
 #else
       ml = &p->w_mlines[j];
 #endif
-      if (ml->font == null && encodings[p->w_encoding].deffont == 0)
+      if (ml->font == null && ml->fontx == 0 && 
encodings[p->w_encoding].deffont == 0)
        continue;
       for (i = 0; i < p->w_width; i++)
        {
          c = ml->image[i] | (ml->font[i] << 8);
+         if (p->w_encoding == UTF8)
+           c |= ml->fontx[i] << 16;
          if (p->w_encoding != UTF8 && c < 256)
            c |= encodings[p->w_encoding].deffont << 8;
          if (c < 256)
@@ -829,8 +886,22 @@
                {
                  int c2;
                  i++;
-                 c2 = ml->image[i] | (ml->font[i] << 8);
+                 c2 = ml->image[i] | (ml->font[i] << 8) | (ml->fontx[i] << 16);
                  c = recode_char_dw_to_encoding(c, &c2, encoding);
+                 if (encoding == UTF8)
+                   {
+                     if (c > 0x10000 && ml->fontx == null)
+                       {
+                         if ((ml->fontx = (unsigned char *)calloc(p->w_width + 
1, 1)) == 0)
+                           {
+                             ml->fontx = null;
+                             break;
+                           }
+                       }
+                     ml->fontx[i - 1]  = c >> 16 & 255;
+                   }
+                 else
+                   ml->fontx = null;
                  ml->font[i - 1]  = c >> 8 & 255;
                  ml->image[i - 1] = c      & 255;
                  c = c2;
@@ -841,6 +912,20 @@
            c = recode_char_to_encoding(c, encoding);
          ml->image[i] = c & 255;
          ml->font[i] = c >> 8 & 255;
+         if (encoding == UTF8)
+           {
+             if (c > 0x10000 && ml->fontx == null)
+               {
+                 if ((ml->fontx = (unsigned char *)calloc(p->w_width + 1, 1)) 
== 0)
+                   {
+                     ml->fontx = null;
+                     break;
+                   }
+               }
+             ml->fontx[i]  = c >> 16 & 255;
+           }
+         else
+           ml->fontx = null;
        }
     }
   p->w_encoding = encoding;
@@ -1039,7 +1124,7 @@
   int root, i, c1;
   int isdouble;
 
-  c1 = mc->image | (mc->font << 8);
+  c1 = mc->image | (mc->font << 8) | mc->fontx << 16;
   isdouble = c1 >= 0x1100 && utf8_isdouble(c1);
   if (!combchars)
     {
@@ -1102,6 +1187,7 @@
   combchars[i]->c2 = c;
   mc->image = i & 0xff;
   mc->font  = (i >> 8) + 0xd8;
+  mc->fontx = 0;
   debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800);
   comb_tofront(root, i);
 }
@@ -1220,6 +1306,15 @@
     p->w_c1 = 0;
 }
 
+/* decoded char: 32-bit <fontx><font><c2><c>
+ * fontx: non-bmp utf8
+ * c2: multi-byte character
+ * font is always zero for utf8
+ * returns: -1 need more bytes
+ *          -2 decode error
+ */
+
+
 int
 DecodeChar(c, encoding, statep)
 int c;
@@ -1231,7 +1326,12 @@
   debug2("Decoding char %02x for encoding %d\n", c, encoding);
 #ifdef UTF8
   if (encoding == UTF8)
-    return FromUtf8(c, statep);
+    {
+      c = FromUtf8(c, statep);
+      if (c >= 0x10000)
+       c = (c & 0x7f0000) << 8 | (c & 0xffff);
+      return c;
+    }
 #endif
   if (encoding == SJIS)
     {
@@ -1345,7 +1445,7 @@
        }
       return 3;
     }
-  f = c >> 16;
+  f = (c >> 16) & 0xff;
 
 #ifdef UTF8
   if (encoding == UTF8)
@@ -1368,8 +1468,10 @@
         }
       return ToUtf8(bp, c);
     }
-  if ((c & 0xff00) && f == 0)  /* is_utf8? */
+  if (f == 0 && (c & 0x7f00ff00) != 0) /* is_utf8? */
     {
+      if (c >= 0x10000)
+       c = (c & 0x7f0000) >> 8 | (c & 0xffff);
 # ifdef DW_CHARS
       if (utf8_isdouble(c))
        {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/image.h new/screen-4.0.4/image.h
--- old/screen-4.0.4/image.h    2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/image.h    2013-04-08 17:46:39.000000000 +0200
@@ -33,8 +33,10 @@
 
 #ifdef FONT
 # define IFFONT(x) x
+# define IFFONTX(x) x
 #else
 # define IFFONT(x)
+# define IFFONTX(x)
 #endif
 
 #ifdef COLOR
@@ -59,6 +61,7 @@
         unsigned char image;
         unsigned char attr;
 IFFONT(  unsigned char font; )
+IFFONTX( unsigned char fontx; )
 IFCOLOR( unsigned char color; )
 IFCOLORX(unsigned char colorx; )
 IFDWCHAR(unsigned char mbcs; )
@@ -68,6 +71,7 @@
         unsigned char *image;
         unsigned char *attr;
 IFFONT(  unsigned char *font; )
+IFFONTX( unsigned char *fontx; )
 IFCOLOR( unsigned char *color; )
 IFCOLORX(unsigned char *colorx; )
 };
@@ -78,6 +82,7 @@
         bcopy((char *)(ml)->image, (char *)mline_old.image, (n));      \
         bcopy((char *)(ml)->attr,  (char *)mline_old.attr,  (n));      \
 IFFONT(         bcopy((char *)(ml)->font,  (char *)mline_old.font,  (n));    ) 
\
+IFFONTX( bcopy((char *)(ml)->fontx, (char *)mline_old.fontx, (n));    ) \
 IFCOLOR( bcopy((char *)(ml)->color, (char *)mline_old.color, (n));    ) \
 IFCOLORX(bcopy((char *)(ml)->colorx, (char *)mline_old.colorx, (n));  ) \
 } while (0)
@@ -86,6 +91,7 @@
         bcopy((char *)(ml)->image + (xf), (char *)(ml)->image + (xt), (n));   \
         bcopy((char *)(ml)->attr  + (xf), (char *)(ml)->attr  + (xt), (n));   \
 IFFONT(         bcopy((char *)(ml)->font  + (xf), (char *)(ml)->font  + (xt), 
(n)); ) \
+IFFONTX( bcopy((char *)(ml)->fontx + (xf), (char *)(ml)->fontx + (xt), (n)); ) 
\
 IFCOLOR( bcopy((char *)(ml)->color + (xf), (char *)(ml)->color + (xt), (n)); ) 
\
 IFCOLORX(bcopy((char *)(ml)->colorx + (xf), (char *)(ml)->colorx + (xt), 
(n));) \
 } while (0)
@@ -94,6 +100,7 @@
         bclear((char *)(ml)->image + (x), (n));                               \
         if ((ml)->attr != null) bzero((char *)(ml)->attr  + (x), (n));        \
 IFFONT(  if ((ml)->font != null) bzero((char *)(ml)->font  + (x), (n));      ) 
\
+IFFONTX( if ((ml)->fontx != null) bzero((char *)(ml)->fontx + (x), (n));      
) \
 IFCOLOR( if ((ml)->color!= null) bzero((char *)(ml)->color + (x), (n));      ) 
\
 IFCOLORX(if ((ml)->colorx!= null) bzero((char *)(ml)->colorx + (x), (n));    ) 
\
 } while (0)
@@ -102,6 +109,7 @@
            (ml1)->image[x] == (ml2)->image[x]                  \
         && (ml1)->attr[x]  == (ml2)->attr[x]                   \
 IFFONT(         && (ml1)->font[x]  == (ml2)->font[x]                 ) \
+IFFONTX( && (ml1)->fontx[x] == (ml2)->fontx[x]               ) \
 IFCOLOR( && (ml1)->color[x] == (ml2)->color[x]               ) \
 IFCOLORX(&& (ml1)->colorx[x] == (ml2)->colorx[x]             ) \
 )
@@ -110,6 +118,7 @@
            (mc1)->image == (mc2)->image                        \
         && (mc1)->attr  == (mc2)->attr                         \
 IFFONT(         && (mc1)->font  == (mc2)->font                       ) \
+IFFONTX( && (mc1)->fontx == (mc2)->fontx                     ) \
 IFCOLOR( && (mc1)->color == (mc2)->color                     ) \
 IFCOLORX(&& (mc1)->colorx == (mc2)->colorx                   ) \
 )
@@ -118,6 +127,7 @@
            (mc)->image == (ml)->image[x]                       \
         && (mc)->attr  == (ml)->attr[x]                        \
 IFFONT(         && (mc)->font  == (ml)->font[x]                      ) \
+IFFONTX( && (mc)->fontx == (ml)->fontx[x]                    ) \
 IFCOLOR( && (mc)->color == (ml)->color[x]                    ) \
 IFCOLORX(&& (mc)->colorx == (ml)->colorx[x]                  ) \
 )
@@ -126,6 +136,7 @@
         (ml)->image[x] = (mc)->image;                          \
         (ml)->attr[x]  = (mc)->attr;                           \
 IFFONT(         (ml)->font[x]  = (mc)->font;                         ) \
+IFFONTX( (ml)->fontx[x] = (mc)->fontx;                       ) \
 IFCOLOR( (ml)->color[x] = (mc)->color;                       ) \
 IFCOLORX((ml)->colorx[x] = (mc)->colorx;                     ) \
 } while (0)
@@ -134,6 +145,7 @@
         (mc)->image = (ml)->image[x];                          \
         (mc)->attr  = (ml)->attr[x];                           \
 IFFONT(         (mc)->font  = (ml)->font[x];                         ) \
+IFFONTX( (mc)->fontx = (ml)->fontx[x];                       ) \
 IFCOLOR( (mc)->color = (ml)->color[x];                       ) \
 IFCOLORX((mc)->colorx = (ml)->colorx[x];                     ) \
 IFDWCHAR((mc)->mbcs  = 0;                                    ) \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/layer.c new/screen-4.0.4/layer.c
--- old/screen-4.0.4/layer.c    2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/layer.c    2013-04-09 12:27:51.000000000 +0200
@@ -68,6 +68,7 @@
   mml.attr  = ml->attr  + off;
 #ifdef FONT
   mml.font  = ml->font  + off;
+  mml.fontx  = ml->fontx  + off;
 #endif
 #ifdef COLOR
   mml.color = ml->color + off;
@@ -409,7 +410,7 @@
        SetRendition(r);
        s2 = s + xs2 - x - vp->v_xoff;
 #ifdef UTF8
-       if (D_encoding == UTF8 && l->l_encoding != UTF8 && (r->font || 
l->l_encoding))
+       if (D_encoding == UTF8 && l->l_encoding != UTF8 && (r->font || r->fontx 
|| l->l_encoding))
          {
            struct mchar mc;
            mc = *r;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/mark.c new/screen-4.0.4/mark.c
--- old/screen-4.0.4/mark.c     2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/mark.c     2013-04-09 12:36:08.000000000 +0200
@@ -283,8 +283,8 @@
   unsigned char *im;
   struct mline *ml;
 #ifdef FONT
-  int cf, font;
-  unsigned char *fo;
+  int cf, cfx, font;
+  unsigned char *fo, *fox;
 #endif
 
   markdata->second = 0;
@@ -332,6 +332,7 @@
       im = ml->image + j;
 #ifdef FONT
       fo = ml->font + j;
+      fox = ml->fontx + j;
       font = ASCII;
 #endif
       for (; j <= to; j++)
@@ -339,10 +340,11 @@
          c = (unsigned char)*im++;
 #ifdef FONT
          cf = (unsigned char)*fo++;
+         cfx = (unsigned char)*fox++;
 # ifdef UTF8
          if (fore->w_encoding == UTF8)
            {
-             c |= cf << 8;
+             c |= cf << 8 | cfx << 16;
              if (c == UCS_HIDDEN)
                continue;
              c = ToUtf8_comb(pt, c);
@@ -1234,7 +1236,10 @@
              mc = mchar_so;
 #ifdef FONT
              if (pastefont)
-               mc.font = ml->font[x];
+               {
+                 mc.font = ml->font[x];
+                 mc.fontx = ml->fontx[x];
+               }
 #endif
              mc.image = ml->image[x];
            }
@@ -1354,7 +1359,10 @@
        break;
 #ifdef FONT
       if (pastefont)
-       mchar_marked.font = ml->font[x];
+       {
+         mchar_marked.font = ml->font[x];
+         mchar_marked.fontx = ml->fontx[x];
+       }
 #endif
       mchar_marked.image = ml->image[x];
 #ifdef DW_CHARS
@@ -1433,7 +1441,10 @@
         {
 #ifdef FONT
          if (pastefont)
-           mchar_marked.font = ml->font[x];
+           {
+             mchar_marked.font = ml->font[x];
+             mchar_marked.fontx = ml->fontx[x];
+           }
 #endif
          rend->image = mchar_marked.image;
          if (!cmp_mchar(rend, &mchar_marked))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/process.c new/screen-4.0.4/process.c
--- old/screen-4.0.4/process.c  2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/process.c  2013-04-08 17:46:35.000000000 +0200
@@ -6360,6 +6360,12 @@
       buf = crypt(u->u_password, salt);
       bzero(u->u_password, strlen(u->u_password));
       free((char *)u->u_password);
+      if (!buf)
+       {
+         Msg(0, "[ crypt() error - no secure ]");
+         u->u_password = NullStr;
+         return;
+       }
       u->u_password = SaveStr(buf);
       bzero(buf, strlen(buf));
 #ifdef COPY_PASTE
@@ -6472,6 +6478,7 @@
 {
   struct action *act;
   int discard = 0;
+  int keyno = i;
 
   debug1("StuffKey #%d", i);
 #ifdef DEBUG
@@ -6511,6 +6518,9 @@
 
   if (discard && (!act || act->nr != RC_COMMAND))
     {
+      /* if the input was just a single byte we let it through */
+      if (D_tcs[keyno + T_CAPS].str && strlen(D_tcs[keyno + T_CAPS].str) == 1)
+       return -1;
       if (D_ESCseen)
         {
           D_ESCseen = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/resize.c new/screen-4.0.4/resize.c
--- old/screen-4.0.4/resize.c   2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/resize.c   2013-04-08 17:51:24.000000000 +0200
@@ -428,6 +428,8 @@
 #ifdef FONT
   if (ml->font && ml->font != null)
     free(ml->font);
+  if (ml->fontx && ml->fontx != null)
+    free(ml->fontx);
 #endif
 #ifdef COLOR
   if (ml->color && ml->color != null)
@@ -449,6 +451,7 @@
   ml->attr  = null;
 #ifdef FONT
   ml->font  = null;
+  ml->fontx = null;
 #endif
 #ifdef COLOR
   ml->color = null;
@@ -485,6 +488,13 @@
     }
   if (mlt->font != null)
     bcopy((char *)mlf->font + xf, (char *)mlt->font + xt, l);
+  if (mlf->fontx != null && mlt->fontx == null)
+    {
+      if ((mlt->fontx = (unsigned char *)calloc(w, 1)) == 0)
+       mlt->fontx = null, r = -1;
+    }
+  if (mlt->fontx != null)
+    bcopy((char *)mlf->fontx + xf, (char *)mlt->fontx + xt, l);
 #endif
 #ifdef COLOR
   if (mlf->color != null && mlt->color == null)
@@ -531,6 +541,7 @@
   mline_old.attr = (unsigned char *)xrealloc((char *)mline_old.attr, maxwidth);
 #ifdef FONT
   mline_old.font = (unsigned char *)xrealloc((char *)mline_old.font, maxwidth);
+  mline_old.fontx = (unsigned char *)xrealloc((char *)mline_old.fontx, 
maxwidth);
 #endif
 #ifdef COLOR
   mline_old.color = (unsigned char *)xrealloc((char *)mline_old.color, 
maxwidth);
@@ -538,7 +549,7 @@
   mline_old.colorx = (unsigned char *)xrealloc((char *)mline_old.colorx, 
maxwidth);
 # endif
 #endif
-  if (!(blank && null && mline_old.image && mline_old.attr IFFONT(&& 
mline_old.font) IFCOLOR(&& mline_old.color) IFCOLORX(&& mline_old.colorx)))
+  if (!(blank && null && mline_old.image && mline_old.attr IFFONT(&& 
mline_old.font) IFFONTX(&& mline_old.fontx) IFCOLOR(&& mline_old.color) 
IFCOLORX(&& mline_old.colorx)))
     Panic(0, "%s", strnomem);
 
   MakeBlankLine(blank, maxwidth);
@@ -550,7 +561,9 @@
   mline_null.attr  = null;
 #ifdef FONT
   mline_blank.font  = null;
-  mline_null.font  = null;
+  mline_null.font   = null;
+  mline_blank.fontx = null;
+  mline_null.fontx  = null;
 #endif
 #ifdef COLOR
   mline_blank.color = null;
@@ -571,6 +584,7 @@
        RESET_AFC(ml->image, blank); \
        RESET_AFC(ml->attr, null); \
        IFFONT(RESET_AFC(ml->font, null)); \
+       IFFONT(RESET_AFC(ml->fontx, null)); \
        IFCOLOR(RESET_AFC(ml->color, null)); \
        IFCOLORX(RESET_AFC(ml->colorx, null)); \
       } \
@@ -966,14 +980,16 @@
     p->w_y = he - 1;
   if (p->w_saved.x > wi)
     p->w_saved.x = wi;
-  if (p->w_saved.y < 0)
-    p->w_saved.y = 0;
   if (p->w_saved.y >= he)
     p->w_saved.y = he - 1;
+  if (p->w_saved.y < 0)
+    p->w_saved.y = 0;
   if (p->w_alt.cursor.x > wi)
     p->w_alt.cursor.x = wi;
   if (p->w_alt.cursor.y >= he)
     p->w_alt.cursor.y = he - 1;
+  if (p->w_alt.cursor.y < 0)
+    p->w_alt.cursor.y = 0;
 
   /* reset scrolling region */
   p->w_top = 0;
@@ -1015,7 +1031,7 @@
       if (p->w_encoding == UTF8)
        {
          for (l = 0; l < p->w_width; l++)
-           ASSERT(ml->image[l] >= ' ' || ml->font[l]);
+           ASSERT(ml->image[l] >= ' ' || ml->font[l] || ml->fontx);
        }
       else
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/screen.c new/screen-4.0.4/screen.c
--- old/screen-4.0.4/screen.c   2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/screen.c   2013-04-09 12:27:38.000000000 +0200
@@ -988,7 +988,7 @@
     Panic(0, "$HOME too long - sorry.");
 
   attach_tty = "";
-  if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && 
!xflag) && !(!mflag && !SockMatch && sty && !xflag))
+  if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && 
!xflag) && !(sty && !SockMatch && !mflag && !rflag && !xflag))
     {
 #ifndef NAMEDPIPE
       int fl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/socket.c new/screen-4.0.4/socket.c
--- old/screen-4.0.4/socket.c   2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/socket.c   2013-04-08 17:46:35.000000000 +0200
@@ -1565,13 +1565,18 @@
       c = *(unsigned char *)ibuf++;
       if (c == '\r' || c == '\n')
        {
+         char *buf = NULL;
          up = D_user->u_password;
          pwdata->buf[l] = 0;
-         if (strncmp(crypt(pwdata->buf, up), up, strlen(up)))
+         buf = crypt(pwdata->buf, up);
+         if (!buf || strncmp(buf, up, strlen(up)))
            {
              /* uh oh, user failed */
              bzero(pwdata->buf, sizeof(pwdata->buf));
-             AddStr("\r\nPassword incorrect.\r\n");
+             if (!buf)
+               AddStr("\r\ncrypt() failed.\r\n");
+             else
+               AddStr("\r\nPassword incorrect.\r\n");
              D_processinputdata = 0;   /* otherwise freed by FreeDis */
              FreeDisplay();
              Msg(0, "Illegal reattach attempt from terminal %s.", 
pwdata->m.m_tty);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/screen-4.0.4/window.c new/screen-4.0.4/window.c
--- old/screen-4.0.4/window.c   2012-06-08 17:20:18.000000000 +0200
+++ new/screen-4.0.4/window.c   2013-04-08 17:46:39.000000000 +0200
@@ -403,6 +403,7 @@
   register unsigned char *p, *i;
 #ifdef FONT
   register unsigned char *f;
+  register unsigned char *fx;
 #endif
 #ifdef COLOR
   register unsigned char *c;
@@ -424,6 +425,7 @@
   p = fore->w_mlines[y].attr + x1;
 #ifdef FONT
   f = fore->w_mlines[y].font + x1;
+  fx = fore->w_mlines[y].fontx + x1;
 # ifdef DW_CHARS
   if (is_dw_font(rend->font))
     return EXPENSIVE;
@@ -448,6 +450,8 @@
 #ifdef FONT
       if (*f++ != rend->font)
        return EXPENSIVE;
+      if (*fx++ != rend->fontx)
+       return EXPENSIVE;
 #endif
 #ifdef COLOR
       if (*c++ != rend->color)

++++++ screen-poll-zombies.patch ++++++
--- /var/tmp/diff_new_pack.37fjFt/_old  2013-09-14 19:09:13.000000000 +0200
+++ /var/tmp/diff_new_pack.37fjFt/_new  2013-09-14 19:09:13.000000000 +0200
@@ -6,7 +6,7 @@
 connected to foreign machines through network connections.
 Once the network connection is cut for a while, all windows will
 enter the dead/zombie state and one has to go through all windows
-manually and hit the zombie resurrect key, once the network got
+manually and hit the zombie resurrect key, once the network got 
 set up again.
 
 This patch implements auto-reconnecting via zombie_timeout
@@ -15,21 +15,8 @@
 
 Signed-off-by: Thomas Renninger <[email protected]>
 
----
- comm.c             |    3 ++-
- comm.h.dist        |    3 ++-
- doc/screen.1       |    9 +++++++++
- doc/screen.texinfo |    9 +++++++++
- process.c          |   12 ++++++++++++
- screen.c           |    7 +++++++
- window.c           |   29 ++++++++++++++++++++++++++++-
- window.h           |    3 +++
- 8 files changed, 72 insertions(+), 3 deletions(-)
-
-Index: screen-4.0.4/comm.c
-===================================================================
---- screen-4.0.4.orig/comm.c
-+++ screen-4.0.4/comm.c
+--- ./comm.c.orig      2013-09-13 13:22:50.993279658 +0000
++++ ./comm.c   2013-09-13 13:23:15.264279615 +0000
 @@ -339,5 +339,6 @@ struct comm comms[RC_LAST + 1] =
  #ifdef ZMODEM
    { "zmodem",         ARGS_012 },
@@ -38,11 +25,19 @@
 +  { "zombie",         ARGS_012 },
 +  { "zombie_timeout", ARGS_1 }
  };
-Index: screen-4.0.4/doc/screen.1
-===================================================================
---- screen-4.0.4.orig/doc/screen.1
-+++ screen-4.0.4/doc/screen.1
-@@ -3545,6 +3545,15 @@ Optionally you can put the word \*Qonerr
+--- ./comm.h.dist.orig 2013-09-13 13:23:15.271279615 +0000
++++ ./comm.h.dist      2013-09-13 13:23:44.198279564 +0000
+@@ -237,5 +237,6 @@ struct action
+ #define RC_XON 180
+ #define RC_ZMODEM 181
+ #define RC_ZOMBIE 182
++#define RC_ZOMBIE_TIMEOUT 183
+ 
+-#define RC_LAST 182
++#define RC_LAST 183
+--- ./doc/screen.1.orig        2013-09-13 13:22:50.993279658 +0000
++++ ./doc/screen.1     2013-09-13 13:23:15.266279615 +0000
+@@ -3547,6 +3547,15 @@ Optionally you can put the word \*Qonerr
  to monitor exit status of the process running in the window. If it exits 
normally ('0'), 
  the window disappears. Any other exit value causes the window to become a 
zombie.
  
@@ -58,11 +53,9 @@
  .SH "THE MESSAGE LINE"
  .I Screen
  displays informational messages and other diagnostics in a \fImessage line\fP.
-Index: screen-4.0.4/doc/screen.texinfo
-===================================================================
---- screen-4.0.4.orig/doc/screen.texinfo
-+++ screen-4.0.4/doc/screen.texinfo
-@@ -1238,6 +1238,8 @@ Send an XON character.  @xref{XON/XOFF}.
+--- ./doc/screen.texinfo.orig  2013-09-13 13:22:50.985279658 +0000
++++ ./doc/screen.texinfo       2013-09-13 13:23:15.268279615 +0000
+@@ -1239,6 +1239,8 @@ Send an XON character.  @xref{XON/XOFF}.
  Define how screen treats zmodem requests.  @xref{Zmodem}.
  @item zombie [@var{keys} [onerror] ]
  Keep dead windows.  @xref{Zombie}.
@@ -71,7 +64,7 @@
  @end table
  
  @node New Window, Selecting, Commands, Top
-@@ -5222,6 +5224,8 @@ Display the version and modification dat
+@@ -5223,6 +5225,8 @@ Display the version and modification dat
  @section Zombie
  @deffn Command zombie [@var{keys} [onerror] ]
  @deffnx Command defzombie [@var{keys}]
@@ -80,7 +73,7 @@
  (none)@*
  Per default windows are removed from the window list as soon as the
  windows process (e.g. shell) exits. When a string of two keys is
-@@ -5241,6 +5245,11 @@ Optionally you can put the word @code{on
+@@ -5242,6 +5246,11 @@ Optionally you can put the word @code{on
  cause screen to monitor exit status of the process running in the window.
  If it exits normally ('0'), the window disappears. Any other exit value
  causes the window to become a zombie.
@@ -92,10 +85,8 @@
  @end deffn
  
  @node Printcmd, Rendition, Zombie, Miscellaneous
-Index: screen-4.0.4/process.c
-===================================================================
---- screen-4.0.4.orig/process.c
-+++ screen-4.0.4/process.c
+--- ./process.c.orig   2013-09-13 13:22:50.994279658 +0000
++++ ./process.c        2013-09-13 13:23:15.270279615 +0000
 @@ -3067,6 +3067,18 @@ int key;
        }
        WindowChanged((struct win *)0, 0);
@@ -115,10 +106,8 @@
      case RC_SILENCE:
        n = fore->w_silence != 0;
        i = fore->w_silencewait;
-Index: screen-4.0.4/screen.c
-===================================================================
---- screen-4.0.4.orig/screen.c
-+++ screen-4.0.4/screen.c
+--- ./screen.c.orig    2013-09-13 13:22:50.989279658 +0000
++++ ./screen.c 2013-09-13 13:23:15.270279615 +0000
 @@ -1557,6 +1557,13 @@ int wstat_valid;
        p->w_y = MFindUsedLine(p, p->w_bot, 1);
        sprintf(buf, "\n\r=== Command %s (%s) ===", reason, s ? s : "?");
@@ -133,10 +122,8 @@
        WindowChanged(p, 'f');
      }
    else
-Index: screen-4.0.4/window.c
-===================================================================
---- screen-4.0.4.orig/window.c
-+++ screen-4.0.4/window.c
+--- ./window.c.orig    2013-09-13 13:22:50.990279658 +0000
++++ ./window.c 2013-09-13 13:23:15.270279615 +0000
 @@ -87,6 +87,7 @@ static int  DoAutolf __P((char *, int *,
  static void ZombieProcess __P((char **, int *));
  static void win_readev_fn __P((struct event *, char *));
@@ -163,7 +150,7 @@
  #undef COMPOSE
  }
  
-@@ -838,6 +841,14 @@ struct NewWindow *newwin;
+@@ -842,6 +845,14 @@ struct NewWindow *newwin;
        DoStartLog(p, buf, sizeof(buf));
      }
  
@@ -178,7 +165,7 @@
    p->w_readev.fd = p->w_writeev.fd = p->w_ptyfd;
    p->w_readev.type = EV_READ;
    p->w_writeev.type = EV_WRITE;
-@@ -1060,6 +1071,7 @@ struct win *wp;
+@@ -1064,6 +1075,7 @@ struct win *wp;
    evdeq(&wp->w_readev);               /* just in case */
    evdeq(&wp->w_writeev);      /* just in case */
    evdeq(&wp->w_silenceev);
@@ -186,7 +173,7 @@
    evdeq(&wp->w_destroyev);
  #ifdef COPY_PASTE
    FreePaster(&wp->w_paster);
-@@ -1941,6 +1953,21 @@ char *data;
+@@ -1945,6 +1957,21 @@ char *data;
    return;
  }
  
@@ -208,10 +195,8 @@
  
  static void
  win_writeev_fn(ev, data)
-Index: screen-4.0.4/window.h
-===================================================================
---- screen-4.0.4.orig/window.h
-+++ screen-4.0.4/window.h
+--- ./window.h.orig    2013-09-13 13:22:50.990279658 +0000
++++ ./window.h 2013-09-13 13:23:15.270279615 +0000
 @@ -57,6 +57,7 @@ struct NewWindow
    int   encoding;
    char        *hstatus;
@@ -229,15 +214,3 @@
    int  w_ptyfd;               /* fd of the master pty */
    char         w_inbuf[IOSIZE];
    int  w_inlen;
-Index: screen-4.0.4/comm.h.dist
-===================================================================
---- screen-4.0.4.orig/comm.h.dist
-+++ screen-4.0.4/comm.h.dist
-@@ -236,5 +236,6 @@ struct action
- #define RC_XON 179
- #define RC_ZMODEM 180
- #define RC_ZOMBIE 181
-+#define RC_ZOMBIE_TIMEOUT 182
- 
--#define RC_LAST 181
-+#define RC_LAST 182

++++++ screen_enhance_windows_list_1_3.patch -> 
screen_enhance_windows_list.patch ++++++
--- /work/SRC/openSUSE:Factory/screen/screen_enhance_windows_list_1_3.patch     
2013-03-08 11:20:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.screen.new/screen_enhance_windows_list.patch    
2013-09-14 19:09:11.000000000 +0200
@@ -1,60 +1,121 @@
-screen: Remove foreground and other window marking workaround
+screen: Introduce argument to windows command
 
-and place it where it always should have been in the generic AddWindowsFlag
-function.
-
-The actual implementation when this workaround was added is beyond git
-history. This was needed to implement a very specific String Escape (wW)
-function:
-       w      all window numbers and names. With '-'  quailifier:  up  to  the
-              current  window;  with  '+'  qualifier: starting with the window
-              after the current one.
-
-       W      all window numbers and names except the current one
-
-But adding all windows to a String Escape does not make much sense and
-may only fit for a very specific special case.
-Better clean up the code, whoever needed wW String Escapes can use windows
-command nowadays.
-
-Later the whole wW String Escape should vanish in favor for the
-String Escaped windows command which can do the same but much more flexible.
+A string escape can be passed which makes the windows command
+much more flexible. The default string escape if no argument
+is passed is "%n%f %t " which is intended to rebuild
+the same output the windows command would give as good
+as possible (slight changes with the flags can happen).
+
+This command is also not be limited in output size
+(the windows command is limited to 1024 bytes).
+
+The windowsx command can be queried (-Q command) and
+this is its main purpose (be able to query the exact
+window list status of an active screen session from
+shell).
 
 Signed-off-by: Thomas Renninger <[email protected]>
 
-Index: screen-4.0.4/process.c
-===================================================================
----
- src/process.c |    6 ------
- 1 files changed, 0 insertions(+), 6 deletions(-)
-
-diff --git a/process.c b/process.c
-index bbc46e6..7370924 100644
---- a/process.c
-+++ b/process.c
-@@ -5507,12 +5507,8 @@ int where;
-       AddWinMsgRend(s, rend);
-       sprintf(s, "%d", p->w_number);
-       s += strlen(s);
--      if (display && p == D_fore)
--      *s++ = '*';
-       if (!(flags & 2))
-       {
--          if (display && p == D_other)
--          *s++ = '-';
-           s = AddWindowFlags(s, len, p);
-       }
-       *s++ = ' ';
-@@ -5537,12 +5533,10 @@ struct win *p;
-       *s = 0;
-       return s;
-     }
--#if 0
-   if (display && p == D_fore)
-     *s++ = '*';
-   if (display && p == D_other)
-     *s++ = '-';
--#endif
-   if (p->w_layer.l_cvlist && p->w_layer.l_cvlist->c_lnext)
-     *s++ = '&';
-   if (p->w_monitor == MON_DONE
+--- ./comm.c.orig      2013-09-13 13:37:01.440278153 +0000
++++ ./comm.c   2013-09-13 13:37:21.830278117 +0000
+@@ -328,7 +328,7 @@ struct comm comms[RC_LAST + 1] =
+   { "wall",           NEED_DISPLAY|ARGS_1},
+   { "width",          ARGS_0123 },
+   { "windowlist",     ARGS_012 },
+-  { "windows",                CAN_QUERY|ARGS_0 },
++  { "windows",                CAN_QUERY|ARGS_01 },
+   { "wrap",           NEED_FORE|ARGS_01 },
+ #ifdef COPY_PASTE
+   { "writebuf",               ARGS_0123 },
+--- ./doc/screen.1.orig        2013-09-13 13:39:15.327277916 +0000
++++ ./doc/screen.1     2013-09-13 13:38:46.391277967 +0000
+@@ -3435,7 +3435,7 @@ settings).
+ and 6 characters high in order to display.
+ .sp
+ .ne 3
+-.B windows
++.B windows [ string ]
+ .PP
+ Uses the message line to display a list of all the windows.
+ Each window is listed by number with the name of process that has been
+@@ -3451,6 +3451,9 @@ windows occupied by other users are mark
+ windows in the zombie state are marked with `Z'.
+ If this list is too long to fit on the terminal's status line only the
+ portion around the current window is displayed.
++The optional string parameter follows the \*QSTRING ESCAPES\*U format.
++If string parameter is passed, the output size is unlimited.
++The default command without any parameter is limited to a size of 1024 bytes.
+ .sp
+ .ne 3
+ .BR "wrap " [ on | off ]
+--- ./doc/screen.texinfo.orig  2013-09-13 13:38:53.376277955 +0000
++++ ./doc/screen.texinfo       2013-09-13 13:39:47.392277859 +0000
+@@ -2617,7 +2617,7 @@ before displaying a message. Default is
+ @section Windows
+ @kindex w
+ @kindex C-w
+-@deffn Command windows
++@deffn Command windows [string]
+ (@kbd{C-a w}, @kbd{C-a C-w})@*
+ Uses the message line to display a list of all the windows.  Each
+ window is listed by number with the name of the program running in the
+@@ -2636,6 +2636,11 @@ windows in the zombie state are marked w
+ 
+ If this list is too long to fit on the terminal's status line only the
+ portion around the current window is displayed.
++
++You can customize the output format to any string you like including
++string escapes (@pxref{String Escapes}).
++In this case, if the string parameter is passed, the maximum output
++size is unlimited (instead of 1024 bytes if no parameter is passed).
+ @end deffn
+ 
+ @node Hardstatus, Mousetrack, Windows, Window Settings
+--- ./process.c.orig   2013-09-13 13:39:55.192277845 +0000
++++ ./process.c        2013-09-13 13:53:18.672276423 +0000
+@@ -170,6 +170,7 @@ static void ResizeFin __P((char *, int,
+ static struct action *FindKtab __P((char *, int));
+ static void SelectFin __P((char *, int, char *));
+ static void SelectLayoutFin __P((char *, int, char *));
++static void ShowWindowsX __P((char *));
+ 
+ 
+ extern struct layer *flayer;
+@@ -1838,6 +1839,11 @@ int key;
+       Activate(-1);
+       break;
+     case RC_WINDOWS:
++      if (args[0])
++      {
++        ShowWindowsX(args[0]);
++        break;
++      }
+       ShowWindows(-1);
+       break;
+     case RC_VERSION:
+@@ -5637,6 +5643,25 @@ int where;
+   Msg(0, "%s", ss);
+ }
+ 
++/*
++ * String Escape based windows listing
++ * mls: currently does a Msg() call for each(!) window, dunno why
++ */
++static void
++ShowWindowsX(str)
++char *str;
++{
++  int i;
++  debug1("ShowWindowsX: string [%s]", string);
++  for (i = 0; i < maxwin ; i++)
++    {
++      if (!wtab[i])
++      continue;
++      Msg(0, "%s", MakeWinMsg(str, wtab[i], '%'));
++    }
++}
++
++
+ static void
+ ShowInfo()
+ {

++++++ show_all_active.patch ++++++
--- /var/tmp/diff_new_pack.37fjFt/_old  2013-09-14 19:09:13.000000000 +0200
+++ /var/tmp/diff_new_pack.37fjFt/_new  2013-09-14 19:09:13.000000000 +0200
@@ -5,11 +5,9 @@
 
 Signed-off-by: Thomas Renninger <[email protected]>
 
-diff --git a/doc/screen.1 b/doc/screen.1
-index 7a0c1de..57352f1 100644
---- a/doc/screen.1
-+++ b/doc/screen.1
-@@ -3750,6 +3750,10 @@ window; with '+' qualifier: starting with the window 
after the current
+--- ./doc/screen.1.orig        2013-09-13 13:26:28.055279274 +0000
++++ ./doc/screen.1     2013-09-13 13:26:41.385279250 +0000
+@@ -3747,6 +3747,10 @@ window; with '+' qualifier: starting wit
  one.
  .IP W
  all window numbers and names except the current one
@@ -20,29 +18,24 @@
  .IP y
  last two digits of the year number
  .IP Y
-diff --git a/screen.c b/screen.c
-index efb73d3..e8a553c 100644
---- a/screen.c
-+++ b/screen.c
-@@ -2681,6 +2681,23 @@ int rec;
+--- ./screen.c.orig    2013-09-13 13:26:28.057279274 +0000
++++ ./screen.c 2013-09-13 13:34:30.151278421 +0000
+@@ -2693,6 +2693,20 @@ int rec;
            }
          p += strlen(p) - 1;
          break;
 +      case 'X': case 'x':
-+        if (!win)
-+          break;
-+        if (win->w_cmdargs[0]) {
-+          sprintf(p, "%s", win->w_cmdargs[0]);
-+          p += strlen(p);
-+        }
-+        else
-+          break;
-+        if (*s == 'x') {
-+          for (i = 1; win->w_cmdargs[i]; i++) {
-+            sprintf(p, " %s", win->w_cmdargs[i]);
++        *p = 0;
++        for (i = 0; win && win->w_cmdargs[i]; i++)
++          {
++            if (l < strlen(win->w_cmdargs[i]) + 1)
++              break;
++            sprintf(p, i ? "%s" : " %s", win->w_cmdargs[i]);
++            l -= strlen(p);
 +            p += strlen(p);
++            if (i == 0 && *s == 'X')
++              break;
 +          }
-+        }
 +        p--;
 +        break;
        case 'l':

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to