screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plans


From: John Davidorff Pell
Subject: Re: plans
Date: Sat, 17 Dec 2005 13:26:46 -0800

A long ago discussion resulted in the following being supplied to me. I have used when building screen ever since, but it is not in 4.0.2. Please include is in HEAD? :-)

Basically the last "if else" is new. Its only a few lines, and I love it.

Thanks!

JP

Begin forwarded message:

From: Michael Schroeder <address@hidden>
Date: 24 September 2004 07:17:28 GMT-07:00
To: John Davidorff Pell <address@hidden>
Cc: Screen <address@hidden>, Tom Huckstep <address@hidden>, Kyle Thomas Miller <address@hidden>
Subject: Re: action upon re-attach

On Fri, Sep 24, 2004 at 02:18:40AM -0700, John Davidorff Pell wrote:
Anyone out there want to offer some tips... or code? :-D

Creating new windows when attaching is not hard, the next screen
version will support it if you use '-p +'. Here's the part of
the code:

socket.c, in FinishAttach:

  if (*m->m.attach.preselect)
    {
      if (!strcmp(m->m.attach.preselect, "="))
        fore = 0;
      else if (!strcmp(m->m.attach.preselect, "-"))
        {
          fore = 0;
          noshowwin = 1;
        }
      else if (!strcmp(m->m.attach.preselect, "+"))
        {
          struct action newscreen;
          char *na = 0;
          newscreen.nr = RC_SCREEN;
          newscreen.args = &na;
          DoAction(&newscreen, -1);
        }
      else
        fore = FindNiceWindow(fore, m->m.attach.preselect);
    }
  else
    fore = FindNiceWindow(fore, 0);

Cheers,
  Michael.

--
Michael Schroeder           address@hidden
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]