diff -u screen-4.0.3/ansi.h screen-4.0.3-rzm2/ansi.h
--- screen-4.0.3/ansi.h	2003-02-24 17:55:08.000000000 +0100
+++ screen-4.0.3-rzm2/ansi.h	2014-03-24 15:36:46.432220973 +0100
@@ -108,11 +108,8 @@
 
 #define ASCII		 0
 
-#ifdef TOPSTAT
-#define STATLINE	 (0)
-#else
-#define STATLINE	 (D_height-1)
-#endif
+#define STATLINE()	 	(statuspos.row == STATUS_BOTTOM ? D_height-1 : 0)
+#define	STATCOL(width, len)	(statuspos.col == STATUS_LEFT ? 0 : D_width - D_status_len - 2)
 
 #ifdef ENCODINGS
 
diff -u screen-4.0.3/comm.c screen-4.0.3-rzm2/comm.c
--- screen-4.0.3/comm.c	2003-09-08 16:25:08.000000000 +0200
+++ screen-4.0.3-rzm2/comm.c	2014-03-24 15:36:46.445221044 +0100
@@ -282,10 +282,12 @@
   { "silencewait",	ARGS_1 },
   { "sleep",		ARGS_1 },
   { "slowpaste",	NEED_FORE|ARGS_01 },
+  { "sockdir",		ARGS_1 },
   { "sorendition",      ARGS_012 },
   { "source",		ARGS_1 },
   { "split",		NEED_DISPLAY|ARGS_0 },
   { "startup_message",	ARGS_1 },
+  { "status",		ARGS_12 },
   { "stuff",		NEED_LAYER|ARGS_12 },
 #ifdef MULTIUSER
   { "su",		NEED_DISPLAY|ARGS_012 },
diff -u screen-4.0.3/config.h.in screen-4.0.3-rzm2/config.h.in
--- screen-4.0.3/config.h.in	2006-10-23 15:06:32.000000000 +0200
+++ screen-4.0.3-rzm2/config.h.in	2014-03-24 15:36:46.454221091 +0100
@@ -54,11 +54,6 @@
 #undef SOCKDIR
 
 /*
- * Define this if the SOCKDIR is not shared between hosts.
- */
-#define SOCKDIR_IS_LOCAL_TO_HOST
-
-/*
  * Screen sources two startup files. First a global file with a path
  * specified here, second your local $HOME/.screenrc
  * Don't define this, if you don't want it.
@@ -119,12 +114,6 @@
 #undef LOCKPTY
 
 /*
- * If you'd rather see the status line on the first line of your
- * terminal rather than the last, define TOPSTAT.
- */
-#undef TOPSTAT
-
-/*
  * define DETACH can detach a session. An absolute 'must'.
  */
 #define DETACH
diff -u screen-4.0.3/display.c screen-4.0.3-rzm2/display.c
--- screen-4.0.3/display.c	2003-12-05 14:45:41.000000000 +0100
+++ screen-4.0.3-rzm2/display.c	2014-03-24 15:36:46.473221194 +0100
@@ -120,6 +120,7 @@
 #endif
 int captionalways;
 int hardstatusemu = HSTATUS_IGNORE;
+struct statusposstr statuspos = { STATUS_BOTTOM, STATUS_LEFT };
 
 /*
  *  Default layer management
@@ -2277,8 +2278,8 @@
   if (!use_hardstatus || D_has_hstatus == HSTATUS_IGNORE || D_has_hstatus == HSTATUS_MESSAGE)
     {
       D_status = STATUS_ON_WIN;
-      debug1("using STATLINE %d\n", STATLINE);
-      GotoPos(0, STATLINE);
+      debug2("using STATLINE/COL %d,%d\n", STATLINE(), STATCOL(D_width, D_status_len) );
+      GotoPos(STATCOL(D_width, D_status_len), STATLINE());
       SetRendition(&mchar_so);
       InsertMode(0);
       AddStr(msg);
@@ -2314,8 +2315,8 @@
       ASSERT(D_obuffree == D_obuflen);
       /* this is copied over from RemoveStatus() */
       D_status = 0;
-      GotoPos(0, STATLINE);
-      RefreshLine(STATLINE, 0, D_status_len - 1, 0);
+      GotoPos(STATCOL(D_width, D_status_len), STATLINE());
+      RefreshLine(STATLINE(), STATCOL(D_width, D_status_len), STATCOL(D_width, D_status_len) + D_status_len - 1, 0);
       GotoPos(D_status_lastx, D_status_lasty);
       flayer = D_forecv ? D_forecv->c_layer : 0;
       if (flayer)
@@ -2365,8 +2366,8 @@
   oldflayer = flayer;
   if (where == STATUS_ON_WIN)
     {
-      GotoPos(0, STATLINE);
-      RefreshLine(STATLINE, 0, D_status_len - 1, 0);
+      GotoPos(STATCOL(D_width, D_status_len), STATLINE());
+      RefreshLine(STATLINE(), STATCOL(D_width, D_status_len), STATCOL(D_width, D_status_len) + D_status_len - 1, 0);
       GotoPos(D_status_lastx, D_status_lasty);
     }
   else
@@ -2385,7 +2386,7 @@
 {
   int l, i, ox, oy, max;
 
-  if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE == D_height-1)
+  if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE() == D_height-1)
     return;	/* sorry, in use */
   if (D_blocked)
     return;
@@ -2519,7 +2520,7 @@
   debug2("RefreshLine %d %d", y, from);
   debug2(" %d %d\n", to, isblank);
 
-  if (D_status == STATUS_ON_WIN && y == STATLINE)
+  if (D_status == STATUS_ON_WIN && y == STATLINE())
     return;	/* can't refresh status */
 
   if (isblank == 0 && D_CE && to == D_width - 1 && from < to)
diff -u screen-4.0.3/display.h screen-4.0.3-rzm2/display.h
--- screen-4.0.3/display.h	2003-07-01 16:01:42.000000000 +0200
+++ screen-4.0.3-rzm2/display.h	2014-03-24 15:36:46.476221211 +0100
@@ -343,3 +343,13 @@
 #define HSTATUS_MESSAGE		2
 #define HSTATUS_HS		3
 #define HSTATUS_ALWAYS		(1<<2)
+
+struct statusposstr
+{
+	int	row, col;
+};
+
+#define STATUS_TOP		1
+#define STATUS_BOTTOM		0
+#define STATUS_LEFT		0
+#define STATUS_RIGHT		1
Wspólne podkatalogi: screen-4.0.3/doc i screen-4.0.3-rzm2/doc
Wspólne podkatalogi: screen-4.0.3/etc i screen-4.0.3-rzm2/etc
diff -u screen-4.0.3/extern.h screen-4.0.3-rzm2/extern.h
--- screen-4.0.3/extern.h	2003-08-22 14:27:57.000000000 +0200
+++ screen-4.0.3-rzm2/extern.h	2014-03-24 15:36:46.487221271 +0100
@@ -335,6 +335,7 @@
 extern void  ReceiveMsg __P((void));
 extern void  SendCreateMsg __P((char *, struct NewWindow *));
 extern int   SendErrorMsg __P((char *, char *));
+extern int   sockdir;
 
 /* misc.c */
 extern char *SaveStr __P((const char *));
diff -u screen-4.0.3/process.c screen-4.0.3-rzm2/process.c
--- screen-4.0.3/process.c	2003-09-18 14:53:54.000000000 +0200
+++ screen-4.0.3-rzm2/process.c	2014-03-24 15:36:46.492221298 +0100
@@ -60,6 +60,7 @@
 extern int TtyMode, auto_detach, use_altscreen;
 extern int iflag, maxwin;
 extern int use_hardstatus, visual_bell;
+extern struct statusposstr statuspos;
 #ifdef COLOR
 extern int attr2color[][4];
 extern int nattr2color;
@@ -2663,6 +2664,67 @@
       if (msgok)
         Msg(0, "messages displayed on %s", use_hardstatus ? "hardstatus line" : "window");
       break;
+    case RC_STATUS:
+      if (display)
+	{
+	  Msg(0, "%s", "");	/* wait till mintime (keep gcc quiet) */
+          RemoveStatus();
+	}
+      {
+	int	i = 0;
+	while ( (i <= 1) && args[i]) {
+          if ( (strcmp(args[i], "top") == 0) || (strcmp(args[i], "up") == 0) )
+	  {
+	    statuspos.row = STATUS_TOP;
+	  }
+	  else
+	  {
+            if ( (strcmp(args[i], "bottom") == 0) || (strcmp(args[i], "down") == 0) )
+	    {
+	      statuspos.row = STATUS_BOTTOM;
+	    }
+	    else
+	    {
+              if (strcmp(args[i], "left") == 0)
+	      {
+	        statuspos.col = STATUS_LEFT;
+	      }
+              else
+              {
+                if (strcmp(args[i], "right") == 0)
+	        {
+	          statuspos.col = STATUS_RIGHT;
+	        }
+		else
+		{
+	          Msg(0, "%s: usage: status [top|up|down|bottom] [left|right]", rc_name);
+	          break;
+		}
+              }
+	    }
+	  }
+	  i++;
+	}
+      }
+      break;
+    case RC_SOCKDIR:
+      if ( args[0] && (strcmp(args[0], "local") == 0) )
+      {
+        sockdir = SOCKDIR_LOCAL;
+      }
+      else
+      {
+        if ( args[0] && (strcmp(args[0], "shared") == 0) )
+	{
+	  sockdir = SOCKDIR_SHARED;
+	}
+	else
+	{
+	  Msg(0, "%s: usage: sockdir local|shared", rc_name);
+	  break;
+        }
+      }
+      break;
     case RC_CAPTION:
       if (strcmp(args[0], "always") == 0 || strcmp(args[0], "splitonly") == 0)
 	{
diff -u screen-4.0.3/screen.h screen-4.0.3-rzm2/screen.h
--- screen-4.0.3/screen.h	2003-08-22 14:28:43.000000000 +0200
+++ screen-4.0.3-rzm2/screen.h	2014-03-24 15:36:46.495221314 +0100
@@ -293,3 +293,7 @@
  */
 #define WLIST_NUM 0
 #define WLIST_MRU 1
+
+/* sockdir values */
+#define	SOCKDIR_LOCAL	0	/* single host, default */
+#define	SOCKDIR_SHARED	1	/* many hosts use the socket directory, e.g. via NFS */
diff -u screen-4.0.3/socket.c screen-4.0.3-rzm2/socket.c
--- screen-4.0.3/socket.c	2003-09-08 16:26:50.000000000 +0200
+++ screen-4.0.3-rzm2/socket.c	2014-03-24 15:36:46.497221324 +0100
@@ -54,6 +54,7 @@
 #endif
 static void  FinishAttach __P((struct msg *));
 static void  AskPassword __P((struct msg *));
+int sockdir = SOCKDIR_LOCAL;
 
 
 extern char *RcFileName, *extra_incap, *extra_outcap;
Wspólne podkatalogi: screen-4.0.3/terminfo i screen-4.0.3-rzm2/terminfo
Wspólne podkatalogi: screen-4.0.3/utf8encodings i screen-4.0.3-rzm2/utf8encodings
