From cc861f7325ad1d219b127d86cc02aac67231f95add3f04f715628a474f237d5c Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 7 Jul 2011 12:27:16 +0000 Subject: [PATCH 1/2] Updating link to change in openSUSE:Factory/screen revision 23.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/screen?expand=0&rev=3fd9e2b525e36dfff6cb80e377dad928 --- screen.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screen.spec b/screen.spec index 15ea9cd..2b3617d 100644 --- a/screen.spec +++ b/screen.spec @@ -31,7 +31,7 @@ Group: System/Console PreReq: %install_info_prereq AutoReqProv: on Version: 4.0.3 -Release: 10 +Release: 17 Summary: A program to allow multiple screens on a VT100/ANSI Terminal Source: %{name}-%{version}.tar.bz2 Source1: screen.conf From e59f5110655d1659dca7890d1f18da77af548932f5934cdfb2607d89739c490f Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Mon, 19 Sep 2011 20:30:01 +0000 Subject: [PATCH 2/2] Accepting request 83586 from home:trenn - Add sort command - convert maxwin99bug.patch into a patch format quilt understands OBS-URL: https://build.opensuse.org/request/show/83586 OBS-URL: https://build.opensuse.org/package/show/Base:System/screen?expand=0&rev=22 --- maxwin99bug.patch | 36 +++++++-------- screen.changes | 6 +++ screen.spec | 2 + sort_command.patch | 107 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 19 deletions(-) create mode 100644 sort_command.patch diff --git a/maxwin99bug.patch b/maxwin99bug.patch index 3296d27..5f95bb2 100644 --- a/maxwin99bug.patch +++ b/maxwin99bug.patch @@ -1,19 +1,17 @@ -*** screen-4.0.2/window.c Fri Dec 5 14:45:41 2003 ---- screen-4.0.2/window.c Mon Jan 31 12:32:18 2011 -*************** -*** 1117,1123 **** - { - int pid; - char tebuf[25]; -! char ebuf[10]; - char shellbuf[7 + MAXPATHLEN]; - char *proc; - #ifndef TIOCSWINSZ ---- 1117,1123 ---- - { - int pid; - char tebuf[25]; -! char ebuf[25]; // WINDOW=%d needs to be at least 3 digit! - char shellbuf[7 + MAXPATHLEN]; - char *proc; - #ifndef TIOCSWINSZ +--- + window.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: screen-4.0.3/window.c +=================================================================== +--- screen-4.0.3.orig/window.c ++++ screen-4.0.3/window.c +@@ -1121,7 +1121,7 @@ char **args, *ttyn; + { + int pid; + char tebuf[25]; +- char ebuf[10]; ++ char ebuf[25]; // WINDOW=%d needs to be at least 3 digit! + char shellbuf[7 + MAXPATHLEN]; + char *proc; + #ifndef TIOCSWINSZ diff --git a/screen.changes b/screen.changes index 3b786cb..d210ad6 100644 --- a/screen.changes +++ b/screen.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 19 14:00:10 UTC 2011 - trenn@suse.de + +- Add sort command +- convert maxwin99bug.patch into a patch format quilt understands + ------------------------------------------------------------------- Wed Jul 6 08:13:07 UTC 2011 - aj@suse.de diff --git a/screen.spec b/screen.spec index 2b3617d..37176a1 100644 --- a/screen.spec +++ b/screen.spec @@ -43,6 +43,7 @@ Patch5: screen-4.0.3-ipv6.patch # upstream savannah#30880 Patch6: term_too_long.diff Patch7: maxwin99bug.patch +Patch8: sort_command.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -61,6 +62,7 @@ Documentation: man page %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build CFLAGS="-DMAXWIN=1000 $RPM_OPT_FLAGS" ./configure --prefix=/usr --infodir=%{_infodir} \ diff --git a/sort_command.patch b/sort_command.patch new file mode 100644 index 0000000..f2f9e45 --- /dev/null +++ b/sort_command.patch @@ -0,0 +1,107 @@ +screen: Introduce sort command + +:sort +will sort all active screen windows ordered by title. +Limitations: + - Will only work in overview window (CTRL-a-") + - For unknown reasons does not always work. + Encountered on a screen session with about 100 active + windows and several users active, that the sorting + does not always take place. + +Still, this command is very helpful for users who use +screen sessions with a huge amount of active windows. + +Might apply with line offset to latest screen sources. +Got tested intensively with our screen over the last +years. + +Please apply. + +Signed-off-by: Thomas Renninger + + comm.c | 1 + + doc/screen.1 | 5 +++++ + process.c | 41 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 47 insertions(+) + +Index: screen-4.0.3/comm.c +=================================================================== +--- screen-4.0.3.orig/comm.c ++++ screen-4.0.3/comm.c +@@ -283,6 +283,7 @@ struct comm comms[RC_LAST + 1] = + { "sleep", ARGS_1 }, + { "slowpaste", NEED_FORE|ARGS_01 }, + { "sorendition", ARGS_012 }, ++ { "sort", ARGS_0 }, + { "source", ARGS_1 }, + { "split", NEED_DISPLAY|ARGS_0 }, + { "startup_message", ARGS_1 }, +Index: screen-4.0.3/process.c +=================================================================== +--- screen-4.0.3.orig/process.c ++++ screen-4.0.3/process.c +@@ -2794,6 +2794,47 @@ int key; + WindowChanged((struct win *)0, 0); + } + break; ++ case RC_SORT: ++ if (fore) ++ { ++ /* Better do not allow this. Not sure what the utmp stuff in number ++ command above is for (you get four entries in e.g. /var/log/wtmp ++ per number switch). But I don't know enough about this.*/ ++ Msg(0, "Sorting inside a window is not allowed. Push CTRL-a \" " ++ "and try again\n"); ++ break; ++ } ++ i = 0; ++ if (!wtab[i] || !wtab[i+1]) ++ { ++ Msg(0, "Less than two windows, sorting makes no sense.\n"); ++ break; ++ } ++ for (i = 0; wtab[i+1] != NULL; i++) ++ { ++ for (n = i, nr = i; wtab[n+1] != NULL; n++) ++ { ++ if (strcmp(wtab[nr]->w_title,wtab[n+1]->w_title) > 0) ++ { ++ nr = n+1; ++ } ++ } ++ if (nr != i) ++ { ++ debug2("Exchange window %d and %d.\n", i, nr); ++ p = wtab[nr]; ++ wtab[nr] = wtab[i]; ++ wtab[i] = p; ++ wtab[nr]->w_number = nr; ++ wtab[i]->w_number = i; ++#ifdef MULTIUSER ++ /* exchange the acls for these windows. */ ++ AclWinSwap(i, nr); ++#endif ++ } ++ } ++ WindowChanged((struct win *)0, 0); ++ break; + case RC_SILENCE: + n = fore->w_silence != 0; + i = fore->w_silencewait; +Index: screen-4.0.3/doc/screen.1 +=================================================================== +--- screen-4.0.3.orig/doc/screen.1 ++++ screen-4.0.3/doc/screen.1 +@@ -2678,6 +2678,11 @@ underlying system exposes flow control p + text. + .sp + .ne 3 ++.B sort ++.PP ++Sort the windows in alphabetical order of the window tiles. ++.sp ++.ne 3 + .BI "source " file + .PP + Read and execute commands from file \fIfile\fP. Source commands may