SOURCES: screen-osc.patch (NEW) - support OSC 10 and 11 commands f...

wiget wiget at pld-linux.org
Fri Mar 21 22:43:25 CET 2008


Author: wiget                        Date: Fri Mar 21 21:43:25 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- support OSC 10 and 11 commands for xterm default fg/bg colour

---- Files affected:
SOURCES:
   screen-osc.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/screen-osc.patch
diff -u /dev/null SOURCES/screen-osc.patch:1.1
--- /dev/null	Fri Mar 21 22:43:25 2008
+++ SOURCES/screen-osc.patch	Fri Mar 21 22:43:20 2008
@@ -0,0 +1,89 @@
+diff -ur -x Makefile -x configure -x screen.info screen-4.0.3/ansi.c screen-4.0.3.wiget/ansi.c
+--- screen-4.0.3/ansi.c	2003-12-05 14:57:05.000000000 +0100
++++ screen-4.0.3.wiget/ansi.c	2008-03-21 22:19:42.000000000 +0100
+@@ -1496,12 +1496,14 @@
+ 	}
+ #endif
+ #ifdef RXVT_OSC
+-      if (typ == 0 || typ == 1 || typ == 20 || typ == 39 || typ == 49)
++      if (typ == 0 || typ == 1 || typ == 20 || typ == 39 || typ == 49 || typ == 10 || typ == 11 )
+ 	{
+ 	  int typ2;
+ 	  typ2 = typ / 10;
+ 	  if (--typ2 < 0)
+ 	    typ2 = 0;
++	  if (typ == 10) typ2 = 4;
++	  if (typ == 11) typ2 = 5;
+ 	  if (strcmp(curr->w_xtermosc[typ2], p))
+ 	    {
+ 	      strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1);
+@@ -1513,7 +1516,7 @@
+ 		    continue;
+ 		  if (D_forecv->c_layer->l_bottom == &curr->w_layer)
+ 		    SetXtermOSC(typ2, curr->w_xtermosc[typ2]);
+-		  if ((typ2 == 2 || typ2 == 3) && D_xtermosc[typ2])
++		  if ((typ2 == 2 || typ2 == 3 || typ2 == 4 || typ2 == 5) && D_xtermosc[typ2])
+ 		    Redisplay(0);
+ 		}
+ 	    }
+Tylko w screen-4.0.3.wiget: ansi.c~
+Tylko w screen-4.0.3.wiget: autom4te.cache
+Tylko w screen-4.0.3.wiget: config.h
+Tylko w screen-4.0.3.wiget: config.log
+Tylko w screen-4.0.3.wiget: config.status
+diff -ur -x Makefile -x configure -x screen.info screen-4.0.3/display.c screen-4.0.3.wiget/display.c
+--- screen-4.0.3/display.c	2003-12-05 14:45:41.000000000 +0100
++++ screen-4.0.3.wiget/display.c	2008-03-21 22:21:46.000000000 +0100
+@@ -3053,7 +3053,7 @@
+ int i;
+ char *s;
+ {
+-  static char oscs[] = "1;\000\00020;\00039;\00049;\000";
++  static char oscs[] = "1;\000\00020;\00039;\00049;\00010;\00011;\000";
+ 
+   ASSERT(display);
+   if (!D_CXT)
+@@ -3066,22 +3066,26 @@
+     s = "screen";		/* always set icon name */
+   if (i == 1 && !*s)
+     s = "";			/* no background */
+-  if (i == 2 && !*s)
++  if ((i == 2 || i == 4) && !*s)
+     s = "black";		/* black text */
+-  if (i == 3 && !*s)
++  if ((i == 3 || i == 5) && !*s)
+     s = "white";		/* on white background */
+   D_xtermosc[i] = 1;
+   AddStr("\033]");
+   AddStr(oscs + i * 4);
+   AddStr(s);
+-  AddChar(7);
++  if ((i == 4) || (i == 5)) {
++    AddStr("\033\\");
++  } else {
++    AddChar(7);
++  }
+ }
+ 
+ void
+ ClearAllXtermOSC()
+ {
+   int i;
+-  for (i = 3; i >= 0; i--)
++  for (i = 5; i >= 0; i--)
+     SetXtermOSC(i, 0);
+ }
+ #endif
+Tylko w screen-4.0.3.wiget: display.c~
+diff -ur -x Makefile -x configure -x screen.info screen-4.0.3/display.h screen-4.0.3.wiget/display.h
+--- screen-4.0.3/display.h	2003-07-01 16:01:42.000000000 +0200
++++ screen-4.0.3.wiget/display.h	2008-03-21 22:08:44.000000000 +0100
+@@ -113,7 +113,7 @@
+   int	d_lp_missing;		/* last character on bot line missing */
+   int   d_mouse;		/* mouse mode */
+ #ifdef RXVT_OSC
+-  int   d_xtermosc[4];		/* osc used */
++  int   d_xtermosc[6];		/* osc used */
+ #endif
+   struct mchar d_lpchar;	/* missing char */
+   struct timeval d_status_time;	/* time of status display */
================================================================


More information about the pld-cvs-commit mailing list