*** acl.c.orig	Sun Jul 31 14:17:38 1994
--- acl.c	Wed Jul 27 20:26:18 1994
***************
*** 216,221 ****
--- 216,222 ----
    return 0;

  }

  

+ #ifndef MINT

  /* 

   * Remove a user from the list. 

   * Decrease reference count of all his groups

***************
*** 254,259 ****
--- 255,261 ----
    free(u);

    return 0;

  }

+ #endif

  

  /*

   * returns 0 if the copy buffer was really deleted.

*** comm.c.orig	Sun Aug 14 12:45:44 1994
--- comm.c	Sat Aug 13 16:07:10 1994
***************
*** 41,47 ****
--- 41,49 ----
    { "aka",		NEED_FORE|ARGS_ZEROONE },	/* TO BE REMOVED */

    { "allpartial",	ARGS_ONE },

    { "at",		ARGS_TWO|ARGS_ORMORE },

+ #ifndef MINT

    { "autodetach",	ARGS_ONE },

+ #endif

  #ifdef AUTO_NUKE

    { "autonuke",		NEED_DISPLAY|ARGS_ONE },

  #endif

***************
*** 78,84 ****
--- 80,88 ----
    { "defscrollback",	ARGS_ONE },

  #endif

    { "defwrap",		ARGS_ONE },

+ #ifndef MINT

    { "detach",		NEED_DISPLAY|ARGS_ZERO },

+ #endif

    { "displays",		NEED_DISPLAY|ARGS_ZERO },

    { "dumptermcap",	ARGS_ZERO },

    { "duplicate",	ARGS_ZERO|ARGS_ORMORE },

***************
*** 158,164 ****
--- 162,170 ----
    { "scrollback",	NEED_FORE|ARGS_ONE },

  #endif

    { "select",		ARGS_ZEROONE },

+ #ifndef MINT

    { "sessionname",	ARGS_ZEROONE },

+ #endif

    { "setenv",		ARGS_ZEROONETWO },

    { "shell",		ARGS_ONE },

    { "shellaka",		ARGS_ONE },			/* TO BE REMOVED */

***************
*** 169,176 ****
--- 175,184 ----
    { "slowpaste",	ARGS_ONE },

    { "startup_message",	ARGS_ONE },

  #ifdef BSDJOBS

+ #ifndef MINT

    { "suspend",		NEED_DISPLAY|ARGS_ZERO },

  #endif

+ #endif

    { "term",		ARGS_ONE },

    { "termcap",		ARGS_TWOTHREE },

    { "terminfo",		ARGS_TWOTHREE },

*** fileio.c.orig	Sun Jul 31 14:17:38 1994
--- fileio.c	Sat Jul 23 14:16:58 1994
***************
*** 47,53 ****
--- 47,55 ----
  extern int real_gid, eff_gid;

  extern char *extra_incap, *extra_outcap;

  extern char *home, *RcFileName;

+ #ifndef MINT

  extern char SockPath[], *SockNamePtr;

+ #endif

  #ifdef COPY_PASTE

  extern char *BufferFile;

  #endif

***************
*** 438,446 ****
--- 440,452 ----
    switch (dump)

      {

      case DUMP_TERMCAP:

+ #ifndef MINT

        i = SockNamePtr - SockPath;

        strncpy(fn, SockPath, i);

        strcpy(fn + i, ".termcap");

+ #else

+       sprintf(fn, "%s/.termcap", home);

+ #endif

        break;

      case DUMP_HARDCOPY:

        if (hardcopydir)

*** misc.c.orig	Sun Jul 31 14:17:38 1994
--- misc.c	Sat Aug 13 12:02:38 1994
***************
*** 93,102 ****
    if (p = strstr(nam,"/dev/"))

      return p + 5;

  #else /* apollo */

!   if (nam == NULL)

!     return NULL;

!   if (strncmp(nam, "/dev/", 5) == 0)

!     return nam + 5;

  #endif /* apollo */

    return nam;

  }

--- 93,108 ----
    if (p = strstr(nam,"/dev/"))

      return p + 5;

  #else /* apollo */

! # if defined(MINT) || defined(MINTFULL)

!    if (nam == NULL) return NULL;

!    if (strncmp(nam, "/dev/", 5) == 0) return nam + 5;

!    if (strncmp(nam, "u:\\dev\\", 7) == 0) return nam + 7;

! # else

!    if (nam == NULL)

!      return NULL;

!    if (strncmp(nam, "/dev/", 5) == 0)

!      return nam + 5;

! # endif

  #endif /* apollo */

    return nam;

  }

*** os.h.orig	Sun Jul 31 14:17:40 1994
--- os.h	Sun Aug 14 17:18:30 1994
***************
*** 145,151 ****
  # else /* SVR4 */

  #  include <utmp.h>

  # endif /* SVR4 */

! # if defined(apollo) || defined(linux)

     /* 

      * We don't have GETUTENT, so we dig into utmp ourselves.

      * But we save the permanent filedescriptor and

--- 145,151 ----
  # else /* SVR4 */

  #  include <utmp.h>

  # endif /* SVR4 */

! # if defined(apollo) || defined(linux) || defined(MINT) || defined(MINTFULL)

     /* 

      * We don't have GETUTENT, so we dig into utmp ourselves.

      * But we save the permanent filedescriptor and

***************
*** 312,318 ****
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WTERMSIG(status) (status & 0177)

  # else

! #  define WTERMSIG(status) status.w_T.w_Termsig 

  # endif

  #endif

  

--- 312,322 ----
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WTERMSIG(status) (status & 0177)

  # else

! #  if defined(MINT) || defined(MINTFULL)

! #   define WTERMSIG(status) status.w_termsig

! #  else

! #   define WTERMSIG(status) status.w_T.w_Termsig 

! #  endif

  # endif

  #endif

  

***************
*** 320,326 ****
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WSTOPSIG(status) ((status >> 8) & 0377)

  # else

! #  define WSTOPSIG(status) status.w_S.w_Stopsig 

  # endif

  #endif

  

--- 324,334 ----
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WSTOPSIG(status) ((status >> 8) & 0377)

  # else

! #  if defined(MINT) || defined(MINTFULL)

! #   define WSTOPSIG(status) status.w_stopsig

! #  else

! #   define WSTOPSIG(status) status.w_S.w_Stopsig

! #  endif

  # endif

  #endif

  

***************
*** 333,339 ****
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WIFCORESIG(status) (status & 0200)

  # else

! #  define WIFCORESIG(status) status.w_T.w_Coredump

  # endif

  #endif

  

--- 341,351 ----
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WIFCORESIG(status) (status & 0200)

  # else

! #  if defined(MINT) || defined(MINTFULL)

! #   define WIFCORESIG(status) status.w_coredump

! #  else

! #   define WIFCORESIG(status) status.w_T.w_Coredump

! #  endif

  # endif

  #endif

  

***************
*** 341,347 ****
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WEXITSTATUS(status) ((status >> 8) & 0377)

  # else

! #  define WEXITSTATUS(status) status.w_T.w_Retcode

  # endif

  #endif

  

--- 353,363 ----
  # ifndef BSDWAIT /* if wait is NOT a union: */

  #  define WEXITSTATUS(status) ((status >> 8) & 0377)

  # else

! #  if defined(MINT) || defined(MINTFULL)

! #   define WEXITSTATUS(status) status.w_retcode

! #  else

! #   define WEXITSTATUS(status) status.w_T.w_Retcode

! #  endif

  # endif

  #endif

  

*** osdef.sh.orig	Sun Jul 31 14:17:40 1994
--- osdef.sh	Sat Jul  9 13:41:42 1994
***************
*** 37,42 ****
  1i\\

   */

  EOF

! $CC -I. -I$srcdir -E osdef0.c | sed -n -f osdef1.sed >> osdef2.sed

  sed -f osdef2.sed < $srcdir/osdef.h.in > osdef.h

! rm osdef0.c osdef1.sed osdef2.sed

--- 37,43 ----
  1i\\

   */

  EOF

! $CC -I. -I$srcdir -E osdef0.c | cat > /tmp/make_screen.$$

! cat /tmp/make_screen.$$ | sed -n -f osdef1.sed >> osdef2.sed

  sed -f osdef2.sed < $srcdir/osdef.h.in > osdef.h

! rm osdef0.c osdef1.sed osdef2.sed /tmp/make_screen.$$

*** process.c.orig	Sun Jul 31 14:17:42 1994
--- process.c	Sat Aug 13 17:09:52 1994
***************
*** 47,53 ****
--- 47,55 ----
  extern char *hardcopydir, *screenlogdir;

  extern char *VisualBellString;

  extern int VBellWait, MsgWait, MsgMinWait, SilenceWait;

+ #ifndef MINT

  extern char SockPath[], *SockNamePtr;

+ #endif

  extern int TtyMode, auto_detach;

  extern int iflag;

  extern int default_wrap;

***************
*** 69,74 ****
--- 71,79 ----
  extern char *BufferFile, *PowDetachString;

  #endif

  extern time_t Now;

+ #ifdef MINT

+ extern int locked;

+ #endif

  

  static int  CheckArgNum __P((int, char **));

  static void FreeKey __P((int));

***************
*** 141,146 ****
--- 146,154 ----
  int CheckPassword;

  char Password[20];

  #endif

+ #ifdef MINT

+ char *lockargs[] = {"screenlock", NULL};

+ #endif

  

  struct plop plop_tab[MAX_PLOP_DEFS];

  

***************
*** 168,175 ****
--- 176,185 ----
  

    ktab['h'].nr = RC_HARDCOPY;

  #ifdef BSDJOBS

+ #ifndef MINT

    ktab['z'].nr = ktab[Ctrl('z')].nr = RC_SUSPEND;

  #endif

+ #endif

    ktab['c'].nr = ktab[Ctrl('c')].nr = RC_SCREEN;

    ktab[' '].nr = ktab[Ctrl(' ')].nr =

      ktab['n'].nr = ktab[Ctrl('n')].nr = RC_NEXT;

***************
*** 192,198 ****
--- 202,210 ----
    ktab['W'].nr = RC_WIDTH;

    ktab['.'].nr = RC_DUMPTERMCAP;

    ktab[Ctrl('\\')].nr = RC_QUIT;

+ #ifndef MINT

    ktab['d'].nr = ktab[Ctrl('d')].nr = RC_DETACH;

+ #endif

    ktab['r'].nr = ktab[Ctrl('r')].nr = RC_WRAP;

    ktab['f'].nr = ktab[Ctrl('f')].nr = RC_FLOW;

    ktab['C'].nr = RC_CLEAR;

***************
*** 267,272 ****
--- 279,287 ----
        s = ibuf;

        while (ilen > 0)

  	{

+ #ifdef MINT

+           if (locked == 0)

+ #endif

  	  if (*s++ == d_user->u_Esc)

  	    break;

  	  ilen--;

***************
*** 478,487 ****
--- 493,504 ----
        LogToggle(n);

        break;

  #ifdef BSDJOBS

+ #ifndef MINT

      case RC_SUSPEND:

        Detach(D_STOP);

        break;

  #endif

+ #endif

      case RC_NEXT:

        if (MoreWindows())

  	SwitchWindow(NextWindow());

***************
*** 523,531 ****
--- 540,550 ----
      case RC_QUIT:

        Finit(0);

        /* NOTREACHED */

+ #ifndef MINT

      case RC_DETACH:

        Detach(D_DETACH);

        break;

+ #endif

  #ifdef POW_DETACH

      case RC_POW_DETACH:

        if (key >= 0)

***************
*** 822,828 ****
--- 841,851 ----
        break;

  #ifdef LOCK

      case RC_LOCKSCREEN:

+ #ifndef MINT

        Detach(D_LOCK);

+ #else

+       DoScreen("key", lockargs);

+ #endif

        break;

  #endif

      case RC_WIDTH:

***************
*** 1378,1383 ****
--- 1401,1407 ----
  	Msg(0, "scrollback set to %d", fore->w_histheight);

        break;

  #endif

+ #ifndef MINT

      case RC_SESSIONNAME:

        if (*args == 0)

  	Msg(0, "This session is named '%s'\n", SockNamePtr);

***************
*** 1412,1417 ****
--- 1436,1442 ----
  	  MakeNewEnv();

  	}

        break;

+ #endif

      case RC_SETENV:

        if (!args[0] || !args[1])

          {

***************
*** 1511,1519 ****
--- 1536,1546 ----
        (void)ParseOnOff(act, &join_with_cr);

        break;

  #endif

+ #ifndef MINT

      case RC_AUTODETACH:

        (void)ParseOnOff(act, &auto_detach);

        break;

+ #endif

      case RC_STARTUP_MESSAGE:

        (void)ParseOnOff(act, &default_startup);

        break;

***************
*** 2815,2818 ****
      bzero(buf, strlen(buf));

  }

  #endif /* PASSWORD */

- 

--- 2842,2844 ----
*** pty.c.orig	Sun Jul 31 14:17:42 1994
--- pty.c	Sat Aug 13 12:11:04 1994
***************
*** 31,36 ****
--- 31,40 ----
  #include "config.h"

  #include "screen.h"

  

+ #if defined(MINT) || defined(MINTFULL)

+ #include <osbind.h>

+ #endif

+ 

  #ifndef sun

  #include <sys/ioctl.h>

  #endif

***************
*** 239,244 ****
--- 243,249 ----
  }

  

  #   else /* _AIX, RS6000 */

+ #    if !defined(MINT) && !defined(MINTFULL)

  

  int

  OpenPTY(ttyn)

***************
*** 293,298 ****
--- 298,347 ----
    return -1;

  }

  

+ #    else /* MINT || MINTFULL */

+ 

+ int

+ OpenPTY(ttyn)

+ char **ttyn;

+ {

+   register char *p, *q, *r, *l, *d;

+   register int f;

+   char line[] = "u:\\pipe\\ptyXY";

+   struct stat st;

+ 

+   debug("OpenPTY: Using Mint style ptys.\n");

+   strcpy(PtyName, PtyProto);

+   strcpy(TtyName, TtyProto);

+   for (p = PtyName; *p != 'X'; ++p)

+     ;

+   for (q = TtyName; *q != 'X'; ++q)

+     ;

+   for (r = line; *r != 'X'; ++r)

+     ;

+   for (l = PTYRANGE0; (r[0] = *l) != '\0'; ++l)

+     {

+       for (d = PTYRANGE1; (r[1] = *d) != '\0'; ++d)

+ 	{

+ 	  if (stat(line, &st) == 0) continue;

+ 	  debug1("OpenPTY tries '%s'\n", line);

+ 	  if ((f = Fcreate(line, FA_SYSTEM|FA_HIDDEN)) < 0)

+ 	    continue;

+ 	  p[0] = q[0] = *l;

+ 	  p[1] = q[1] = *d;

+ 	  unlink(PtyName); unlink(TtyName);

+ 	  symlink(line, PtyName);

+ 	  symlink(line, TtyName);

+ #ifdef LOCKPTY

+ 	  (void) ioctl(f, TIOCEXCL, (char *) 0);

+ #endif

+ 	  *ttyn = TtyName;

+ 	  return f;

+ 	}

+     }

+   return -1;

+ }

+ 

+ #    endif /* MINT || MINTFULL */

  #   endif /* _AIX, RS6000 */

  #  endif /* SVR4 */

  # endif /* MIPS */

*** screen.c.orig	Sun Aug 14 14:55:00 1994
--- screen.c	Sun Aug 14 14:54:42 1994
***************
*** 128,133 ****
--- 128,134 ----
  struct mode attach_Mode;

  

  

+ #ifndef MINT

  #ifdef SOCKDIR

  char *SockDir = SOCKDIR;

  #else

***************
*** 135,140 ****
--- 136,142 ----
  #endif

  extern char SockPath[], *SockNamePtr, *SockName;

  int ServerSocket = -1;

+ #endif

  char **NewEnv = NULL;

  

  char *RcFileName = NULL;

***************
*** 152,160 ****
--- 154,166 ----
  #ifdef POW_DETACH

  char *PowDetachString;

  #endif

+ #ifndef MINT

  int auto_detach = 1;

  int iflag, rflag, dflag, lsflag, quietflag, wipeflag, xflag;

  int adaptflag;

+ #else

+ int iflag, adaptflag, locked = 0;

+ #endif

  

  time_t Now;

  

***************
*** 169,175 ****
--- 175,183 ----
  #endif

  

  char HostName[MAXSTR];

+ #ifndef MINT

  int MasterPid;

+ #endif

  int real_uid, real_gid, eff_uid, eff_gid;

  int default_startup;

  int slowpaste;

***************
*** 303,309 ****
--- 311,319 ----
        FD_SET(p->w_ptyfd, rp);

  #endif /* PSEUDOS */

      }

+ #ifndef MINT

    FD_SET(ServerSocket, rp);

+ #endif

  }

  

  void

***************
*** 315,323 ****
--- 325,340 ----
    register struct win *p;

    char *ap;

    char *av0;

+ #ifdef MINTFULL

+   char **avsave;

+ #endif

+ #ifndef MINT

    char socknamebuf[2 * MAXSTR];

+ #endif

    fd_set r, w;

+ #ifndef MINT

    int mflag = 0;

+ #endif

    struct timeval tv;

    int nsel;

    char buf[IOSIZE], *myname = (ac == 0) ? "screen" : av[0];

***************
*** 332,343 ****
--- 349,366 ----
    struct utsname utsnam;

  #endif

    struct NewWindow nwin;

+ #ifndef MINT

    int detached = 0;		/* start up detached */

+ #endif

    struct display *ndisplay;

  #ifdef MULTIUSER

    char *sockp;

  #endif

  

+ #ifdef MINTFULL

+   avsave = av;

+ #endif

+ 

    /*

     *  First, close all unused descriptors

     *  (otherwise, we might have problems with the select() call)

***************
*** 431,440 ****
--- 454,465 ----
    /* if this is a login screen, assume -R */

    if (*av0 == '-')

      {

+ #ifndef MINT

        rflag = 2;

  #ifdef MULTI

        xflag = 1;

  #endif

+ #endif

        ShellProg = SaveStr(DefaultShell); /* to prevent nasty circles */

      }

    while (ac > 0)

***************
*** 535,540 ****
--- 560,566 ----
  		case '\0':

  		  nwin_options.lflag = 1;

  		  break;

+ #ifndef MINT

  		case 's':

  		case 'i':

  		  lsflag = 1;

***************
*** 544,563 ****
--- 570,594 ----
  		      ac--;

  		    }

  		  break;

+ #endif

  		default:

  		  exit_with_usage(myname);

  		}

  	      break;

+ #ifndef MINT

  	    case 'w':

  	      lsflag = 1;

  	      wipeflag = 1;

  	      break;

+ #endif

  	    case 'L':

  	      assume_LP = 1;

  	      break;

+ #ifndef MINT

  	    case 'm':

  	      mflag = 1;

  	      break;

+ #endif

  	    case 'O':

  	      force_vt = 0;

  	      break;

***************
*** 576,581 ****
--- 607,613 ----
                  }

  	      nwin_options.term = screenterm;

                break;

+ #ifndef MINT

  	    case 'q':

  	      quietflag = 1;

  	      break;

***************
*** 621,626 ****
--- 653,659 ----
  		}

  	      break;

  #endif

+ #endif /* MINT */

  	    case 's':

  	      if (ap[2])

  		{

***************
*** 638,643 ****
--- 671,677 ----
  		}

  	      debug1("ShellProg: '%s'\n", ShellProg);

  	      break;

+ #ifndef MINT

  	    case 'S':

  	      if (ap[2])

  		SockName = ap + 2;

***************
*** 650,655 ****
--- 684,690 ----
  		    exit_with_usage(myname);

  		}

  	      break;

+ #endif

  	    case 'v':

  	      Panic(0, "Screen version %s", version);

  	      /* NOTREACHED */

***************
*** 660,667 ****
--- 695,704 ----
        else

  	break;

      }

+ #ifndef MINT

    if (dflag && mflag && SockName && !(rflag || xflag))

      detached = 1;

+ #endif

    nwin = nwin_options;

    if (ac)

      nwin.args = av;

***************
*** 759,766 ****
--- 796,805 ----
    strcpy(Password, ppp->pw_passwd);

  #endif

  

+ #ifndef MINT

    if (!detached && !lsflag)

      {

+ #endif

        /* ttyname implies isatty */

        if (!(attach_tty = ttyname(0)))

  	{

***************
*** 791,797 ****
--- 830,838 ----
  #ifdef DEBUGGGGGGGGGGGGGGG

        DebugTTY(&attach_Mode);

  #endif /* DEBUG */

+ #ifndef MINT

      }

+ #endif

    

  #ifdef _MODE_T

    oumask = umask(0);		/* well, unsigned never fails? jw. */

***************
*** 799,804 ****
--- 840,846 ----
    if ((oumask = umask(0)) == -1)

      Panic(errno, "Cannot change umask to zero");

  #endif

+ #ifndef MINT

    if ((SockDir = getenv("ISCREENDIR")) == NULL)

      SockDir = getenv("SCREENDIR");

    if (SockDir)

***************
*** 903,910 ****
--- 945,955 ----
      }

    strcat(SockPath, "/");

    SockNamePtr = SockPath + strlen(SockPath);

+ #endif /* MINT */

    (void) umask(oumask);

+ #ifndef MINT

    debug2("SockPath: %s  SockName: %s\n", SockPath, SockName ? SockName : "NULL");

+ #endif

  

  #if defined(SYSV) && !defined(ISC)

    if (uname(&utsnam) == -1)

***************
*** 922,927 ****
--- 967,973 ----
    if ((ap = index(HostName, '.')) != NULL)

      *ap = '\0';

  

+ #ifndef MINT

    if (lsflag)

      {

        int i;

***************
*** 991,999 ****
--- 1037,1052 ----
  	  /* NOTREACHED */

  	}

      }

+ #endif /* MINT */

    nwin_compose(&nwin_default, &nwin_options, &nwin_default);

+ #ifndef MINT

    if (SockName && !*SockName)

      SockName = NULL;

+ 

+ #ifdef MINTFULL

+   MasterPid = 0;

+   if (getenv("MINT_SCREEN_SERVER") != NULL) goto mint_screen_server;

+ #endif

    switch (MasterPid = fork())

      {

      case -1:

***************
*** 1006,1012 ****
--- 1059,1072 ----
        MasterPid = getppid();

  #else

      case 0:

+ # ifdef MINTFULL

+       setenv("MINT_SCREEN_SERVER=1");

+       execv(avsave[0], avsave);

+       Panic(errno, "execv");

+       /* NOTREACHED */

+ # else

        break;

+ # endif

      default:

  #endif

        if (detached)

***************
*** 1035,1040 ****
--- 1095,1105 ----
        Attacher();

        /* NOTREACHED */

      }

+ #ifdef MINTFULL

+ mint_screen_server:

+   unsetenv("MINT_SCREEN_SERVER");

+ #endif

+ #endif /* MINT */

  

    ap = av0 + strlen(av0) - 1;

    while (ap >= av0)

***************
*** 1062,1071 ****
--- 1127,1140 ----
        (void) chmod(buf, 0666);

    }

  #endif

+ #ifndef MINT

    if (!detached)

+ #endif

      n = dup(0);

+ #ifndef MINT

    else

      n = -1;

+ #endif

    freopen("/dev/null", "r", stdin);

    freopen("/dev/null", "w", stdout);

  #ifdef DEBUG

***************
*** 1074,1089 ****
--- 1143,1163 ----
    freopen("/dev/null", "w", stderr);

    debug("-- screen.back debug started\n");

  

+ #ifndef MINT

    if (!detached)

      {

+ #endif

  #ifdef FORKDEBUG

        if (MakeDisplay(LoginName, attach_tty, attach_term, n, MasterPid, &attach_Mode) == 0)

  #else

        if (MakeDisplay(LoginName, attach_tty, attach_term, n, getppid(), &attach_Mode) == 0)

  #endif

  	Panic(0, "Could not alloc display");

+ #ifndef MINT

      }

+ #endif

  

+ #ifndef MINT

    if (SockName)

      {

        /* user started us with -S option */

***************
*** 1099,1104 ****
--- 1173,1179 ----
        *ap = '-';

    SockName = socknamebuf;

    ServerSocket = MakeServerSocket();

+ #endif

  #ifdef ETCSCREENRC

  # ifdef ALLOW_SYSSCREENRC

    if ((ap = getenv("SYSSCREENRC")))

***************
*** 1120,1127 ****
--- 1195,1204 ----
  	  debug("Could not init termcap - exiting\n");

  	  fcntl(d_userfd, F_SETFL, 0);	/* Flush sets NDELAY */

  	  freetty();

+ #ifndef MINT

  	  if (d_userpid)

  	    Kill(d_userpid, SIG_BYE);

+ #endif

  	  eexit(1);

  	}

        InitTerm(0);

***************
*** 1184,1189 ****
--- 1261,1267 ----
    signal(SIGCHLD, SigChld);

    signal(SIGINT, SigInt);

    tv.tv_usec = 0;

+ #ifndef MINT

    if (rflag == 2)

      {

  #ifdef NETHACK

***************
*** 1194,1199 ****
--- 1272,1278 ----
        Msg(0, "New screen...");

        rflag = 0;

      }

+ #endif

  

    Now = time((time_t *)0);

  

***************
*** 1303,1308 ****
--- 1382,1388 ----
  	  InterruptPlease = 0;

  	}

  

+ #ifndef MINT

        /*

         *   Process a client connect attempt and message

         */

***************
*** 1313,1318 ****
--- 1393,1399 ----
  	  ReceiveMsg();

  	  continue;

  	}

+ #endif

  

        /*

         * Write the (already processed) user input to the window

***************
*** 1715,1720 ****
--- 1796,1802 ----
        signal(SIGCHLD, SigChld);

  #endif

      }

+ #ifndef MINT

    if (stat(SockPath, &st) == -1)

      {

        debug1("SigChldHandler: Yuck! cannot stat '%s'\n", SockPath);

***************
*** 1728,1733 ****
--- 1810,1816 ----
      }

    else

      debug2("SigChldHandler: stat '%s' o.k. (%03o)\n", SockPath, st.st_mode);

+ #endif

  }

  

  static sig_t

***************
*** 1751,1759 ****
--- 1834,1844 ----
        close(d_userfd);

        d_userfd = -1;

      }

+ #ifndef MINT

    if (auto_detach || displays->_d_next)

      Detach(D_DETACH);

    else

+ #endif

      Finit(0);

  #ifndef SIGVOID

    return((sig_t) 0);

***************
*** 1811,1817 ****
--- 1896,1904 ----
      {

        fcntl(disp->_d_userfd, F_SETFL, 0);

        write(disp->_d_userfd, buf, strlen(buf));

+ #ifndef MINT

        Kill(disp->_d_userpid, SIG_BYE);

+ #endif

      }

  #if defined(SHADOWPW) && !defined(DEBUG) && !defined(DUMPSHADOW)

    eexit(sig);

***************
*** 1927,1932 ****
--- 2014,2020 ----
        next = p->w_next;

        FreeWindow(p);

      }

+ #ifndef MINT

    if (ServerSocket != -1)

      {

        debug1("we unlink(%s)\n", SockPath);

***************
*** 1940,1945 ****
--- 2028,2034 ----
        setregid(real_gid, eff_gid);

  #endif

      }

+ #endif

    for (display = displays; display; display = display->_d_next)

      {

        if (d_status)

***************
*** 1953,1959 ****
--- 2042,2050 ----
        SetTTY(d_userfd, &d_OldMode);

        fcntl(d_userfd, F_SETFL, 0);

        freetty();

+ #ifndef MINT

        Kill(d_userpid, SIG_BYE);

+ #endif

      }

    /*

     * we _cannot_ call eexit(i) here, 

***************
*** 1969,1974 ****
--- 2060,2066 ----
  eexit(e)

  int e;

  {

+ #ifndef MINT

    if (ServerSocket != -1)

      {

        debug1("we unlink(%s)\n", SockPath);

***************
*** 1976,1985 ****
--- 2068,2079 ----
        setgid(real_gid);

        (void) unlink(SockPath);

      }

+ #endif

    exit(e);

  }

  

  

+ #ifndef MINT

  /*

   * Detach now has the following modes:

   *	D_DETACH	SIG_BYE		detach backend and exit attacher

***************
*** 2114,2119 ****
--- 2208,2214 ----
    debug("Detach returns, we are successfully detached.\n");

    signal(SIGHUP, SigHup);

  }

+ #endif /* MINT */

  

  static int

  IsSymbol(e, s)

***************
*** 2138,2147 ****
--- 2233,2246 ----
    NewEnv = np = (char **) malloc((unsigned) (op - environ + 7 + 1) * sizeof(char **));

    if (!NewEnv)

      Panic(0, strnomem);

+ #ifndef MINT

    SockName = SockNamePtr;

    if (strlen(SockNamePtr) > MAXSTR - 5)

      SockName = "?";

    sprintf(stybuf, "STY=%s", SockNamePtr);

+ #else

+   sprintf(stybuf, "STY=MiNT");

+ #endif

    *np++ = stybuf;	                /* NewEnv[0] */

    *np++ = Term;	                /* NewEnv[1] */

    np++;		/* room for SHELL */

***************
*** 2280,2287 ****
--- 2379,2388 ----
          write(d_userfd, buf, strlen(buf));

          write(d_userfd, "\n", 1);

          freetty();

+ #ifndef MINT

  	if (d_userpid)

  	  Kill(d_userpid, SIG_BYE);

+ #endif

        }

  #ifdef MULTIUSER

    if (tty_oldmode >= 0)

*** utmp.c.orig	Sun Jul 31 19:37:54 1994
--- utmp.c	Sat Aug 13 12:24:04 1994
***************
*** 278,288 ****
--- 278,297 ----
  

    (void) lseek(utmpfd, (off_t) (d_loginslot * sizeof u), 0);

    bzero((char *)&d_utmp_logintty, sizeof u);

+ #  if defined(MINT) || defined(MINTFULL)

+   read(utmpfd, (char *) &d_utmp_logintty, sizeof u);

+ #  else

+   /*

+   ** We don't want this warning. It occurs when the tty on which you

+   ** start screen is not registered in /etc/utmp.

+   ** Starting screen on /dev/aux would therefore always generate it!

+   */

    if (read(utmpfd, (char *) &d_utmp_logintty, sizeof u) != sizeof u)

      {

        Msg(errno, "cannot read %s ??", UTMPFILE);

        sleep(1);

      }

+ #  endif

    (void) lseek(utmpfd, (off_t) (d_loginslot * sizeof u), 0);

  #  ifdef UTNOKEEP

    /* 

*** window.c.orig	Sun Jul 31 14:17:44 1994
--- window.c	Sat Aug 13 12:27:56 1994
***************
*** 50,55 ****
--- 50,58 ----
  extern int real_uid, real_gid;

  extern char Termcap[];

  extern char **NewEnv;

+ #ifdef MINT

+ extern int locked;

+ #endif

  

  #if defined(TIOCSWINSZ) || defined(TIOCGWINSZ)

  extern struct winsize glwz;

***************
*** 240,245 ****
--- 243,252 ----
  #endif

    SetForeWindow(p);

    Activate(p->w_norefresh);

+ #ifdef MINT

+   if ((p->w_pid > 0) && (strcmp(nwin.args[0], "screenlock") == 0))

+     locked = p->w_pid;

+ #endif

    return n;

  }

  

***************
*** 249,254 ****
--- 256,264 ----
  {

    struct display *d;

  

+ #ifdef MINT

+   if (wp->w_pid == locked) locked = 0;

+ #endif

  #ifdef PSEUDOS

    if (wp->w_pwin)

      FreePseudowin(wp);

***************
*** 258,265 ****
--- 268,282 ----
  #endif

    if (wp->w_ptyfd >= 0)

      {

+ #if defined(MINT) || defined(MINTFULL)

+       Kill(wp->w_pid, SIGHUP);	/* Somehow, Mint doesn't take care of this */

+       (void) unlink(wp->w_tty);

+       wp->w_tty[5] = 'p';

+       (void) unlink(wp->w_tty);

+ #else

        (void) chmod(wp->w_tty, 0666);

        (void) chown(wp->w_tty, 0, 0);

+ #endif

        close(wp->w_ptyfd);

        wp->w_ptyfd = -1;

      }

***************
*** 383,394 ****
--- 400,415 ----
  #endif

        if (setuid(real_uid) || setgid(real_gid))

  	{

+ #ifndef MINT

  	  SendErrorMsg("Setuid/gid: %s", sys_errlist[errno]);

+ #endif

  	  eexit(1);

  	}

        if (dir && *dir && chdir(dir) == -1)

  	{

+ #ifndef MINT

  	  SendErrorMsg("Cannot chdir to %s: %s", dir, sys_errlist[errno]);

+ #endif

  	  eexit(1);

  	}

  

***************
*** 436,443 ****
--- 457,466 ----
  		{

  		  if ((newfd = open(ttyn, O_RDWR)) < 0)

  		    {

+ #ifndef MINT

  		      SendErrorMsg("Cannot open %s: %s",

  				   ttyn, sys_errlist[errno]);

+ #endif

  		      eexit(1);

  		    }

  		}

***************
*** 457,469 ****
  	     * nonblocking filedescriptor. Poor Backend!

  	     */

  	    debug1("Clearing NDELAY on window-fd(%d)\n", win->w_ptyfd);

! 	    if (fcntl(win->w_ptyfd, F_SETFL, 0))

! 	      SendErrorMsg("Warning: ForkWindow clear NDELAY fcntl failed, %d", errno);

  	}

  #else /* PSEUDOS */

        if ((newfd = open(ttyn, O_RDWR)) != 0)

  	{

  	  SendErrorMsg("Cannot open %s: %s", ttyn, sys_errlist[errno]);

  	  eexit(1);

  	}

        dup(0);

--- 480,500 ----
  	     * nonblocking filedescriptor. Poor Backend!

  	     */

  	    debug1("Clearing NDELAY on window-fd(%d)\n", win->w_ptyfd);

! #ifndef MINT

! 	    if (

! #endif

! 		fcntl(win->w_ptyfd, F_SETFL, 0)

! #ifndef MINT

! 	      ) SendErrorMsg("Warning: ForkWindow clear NDELAY fcntl failed, %d", errno)

! #endif

! 		;

  	}

  #else /* PSEUDOS */

        if ((newfd = open(ttyn, O_RDWR)) != 0)

  	{

+ #ifndef MINT

  	  SendErrorMsg("Cannot open %s: %s", ttyn, sys_errlist[errno]);

+ #endif

  	  eexit(1);

  	}

        dup(0);

***************
*** 477,498 ****
  #if defined(SVR4) && !defined(sgi)

  	  if (ioctl(newfd, I_PUSH, "ptem"))

  	    {

  	      SendErrorMsg("Cannot I_PUSH ptem %s %s", ttyn, sys_errlist[errno]);

  	      eexit(1);

  	    }

  	  if (ioctl(newfd, I_PUSH, "ldterm"))

  	    {

  	      SendErrorMsg("Cannot I_PUSH ldterm %s %s", ttyn, sys_errlist[errno]);

  	      eexit(1);

  	    }

  	  if (ioctl(newfd, I_PUSH, "ttcompat"))

  	    {

  	      SendErrorMsg("Cannot I_PUSH ttcompat %s %s", ttyn, sys_errlist[errno]);

  	      eexit(1);

  	    }

  #endif

! 	  if (fgtty(newfd))

! 	    SendErrorMsg("fgtty: %s (%d)", sys_errlist[errno], errno);

  	  if (display)

  	    {

  	      debug("ForkWindow: using display tty mode for new child.\n");

--- 508,541 ----
  #if defined(SVR4) && !defined(sgi)

  	  if (ioctl(newfd, I_PUSH, "ptem"))

  	    {

+ #ifndef MINT

  	      SendErrorMsg("Cannot I_PUSH ptem %s %s", ttyn, sys_errlist[errno]);

+ #endif

  	      eexit(1);

  	    }

  	  if (ioctl(newfd, I_PUSH, "ldterm"))

  	    {

+ #ifndef MINT

  	      SendErrorMsg("Cannot I_PUSH ldterm %s %s", ttyn, sys_errlist[errno]);

+ #endif

  	      eexit(1);

  	    }

  	  if (ioctl(newfd, I_PUSH, "ttcompat"))

  	    {

+ #ifndef MINT

  	      SendErrorMsg("Cannot I_PUSH ttcompat %s %s", ttyn, sys_errlist[errno]);

+ #endif

  	      eexit(1);

  	    }

  #endif

! #ifndef MINT

! 	  if (

! #endif

! 		fgtty(newfd)

! #ifndef MINT

! 	    ) SendErrorMsg("fgtty: %s (%d)", sys_errlist[errno], errno)

! #endif

! 		;

  	  if (display)

  	    {

  	      debug("ForkWindow: using display tty mode for new child.\n");

***************
*** 573,579 ****
--- 616,624 ----
        debug1("calling execvpe %s\n", proc);

        execvpe(proc, args, NewEnv);

        debug1("exec error: %d\n", errno);

+ #ifndef MINT

        SendErrorMsg("Cannot exec %s: %s", proc, sys_errlist[errno]);

+ #endif

        exit(1);

      default:

        return pid;

***************
*** 617,624 ****
--- 662,671 ----
  	  eaccess = 1;

  	  break;

  	case ENOMEM:

+ #if !defined(MINT) && !defined(MINTFULL)

  	case E2BIG:

  	case ETXTBSY:

+ #endif

  	  return;

  	}

      } while (*path++);

***************
*** 764,771 ****
--- 811,825 ----
    ASSERT(pwin);

    if (fcntl(w->w_ptyfd, F_SETFL, FNDELAY))

      Msg(errno, "Warning: FreePseudowin: NDELAY fcntl failed");

+ #if defined(MINT) || defined(MINTFULL)

+   Kill(pwin->p_pid, SIGHUP);	/* Somehow, Mint doesn't take care of this */

+   (void) unlink(pwin->p_tty);

+   pwin->p_tty[5] = 'p';

+   (void) unlink(pwin->p_tty);

+ #else

    (void) chmod(pwin->p_tty, 0666);

    (void) chown(pwin->p_tty, 0, 0);

+ #endif

    if (pwin->p_ptyfd >= 0)

      close(pwin->p_ptyfd);

    free(pwin);

***************
*** 824,830 ****
--- 878,886 ----
        d_usertty[0] = 0;		/* for SendErrorMsg */

        if (setuid(real_uid) || setgid(real_gid))

  	{

+ #ifndef MINT

  	  SendErrorMsg("Setuid/gid: %s", sys_errlist[errno]);

+ #endif

  	  eexit(1);

  	}

        closeallfiles(sf);

***************
*** 861,867 ****
--- 917,925 ----
        debug("\n");

  #endif

        execvpe(*av, av, environ);

+ #ifndef MINT

        SendErrorMsg("Cannot exec %s: %s", *av, sys_errlist[errno]);

+ #endif

        exit(1);

      default:

        break;

***************
*** 928,931 ****
  }

  

  #endif

- 

--- 986,988 ----
*** /dev/null	Sun Aug 14 14:58:08 1994
--- Makefile	Sun Aug 14 17:15:52 1994
***************
*** 0 ****
--- 1,317 ----
+ # Generated automatically from Makefile.in by configure.

+ #

+ # Makefile template for screen 

+ #

+ # See machine dependant config.h for more configuration options.

+ #

+ 

+ srcdir = .

+ VPATH = .

+ 

+ # Where to install screen.

+ 

+ prefix = /usr/local

+ exec_prefix = $(prefix)

+ 

+ bindir  = $(exec_prefix)/bin

+ mandir  = $(prefix)/man

+ 

+ VERSION = 3.5.2

+ 

+ ETCSCREENRC = `sed < config.h -n -e '/define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'`

+ 

+ # Defining -DMINT here is essential for e.g. comm.sh

+ CC = /dev/d/bin/gcc -mint -DMINT

+ CFLAGS = -O

+ LDFLAGS =

+ LIBS = -lmtermcap -llibusers.a

+ 

+ CPP_DEPEND=/lib/cpp -MM

+ 

+ INSTALL = /bin/install -c

+ INSTALL_PROGRAM = $(INSTALL)

+ INSTALL_DATA = $(INSTALL) -m 644

+ 

+ AWK = gawk

+ 

+ ### Chose some debug configuration options:

+ # -DDEBUG

+ #	Turn on really heavy debug output. This is written to 

+ #	/tmp/debug/screen.{front,back} Look at these files and quote 

+ #	questionable sections when sending bug-reports to the author.

+ # -DTMPTEST

+ #	Change the socket directory to a location that does not interfere

+ #	with the (suid-root) installed screen version. Use that in

+ #	combination with -DDEBUG

+ # -DDUMPSHADOW

+ #	With shadow-pw screen would never dump core. Use this option if you

+ #	still want to have a core. Use only for debugging.

+ # -DFORKDEBUG

+ #	Swap roles of father and son when forking the SCREEN process. 

+ #	Useful only for debugging.

+ OPTIONS= 

+ #OPTIONS= -DDEBUG -DTMPTEST

+ 

+ 

+ ######

+ ######

+ ###### The following lines should be obsolete because of the 'configure' script.

+ ######

+ ######

+ 

+ 

+ ### If you choose to compile with the tried and true:

+ #CC= cc

+ #CFLAGS= -O

+ #CFLAGS= -g 

+ ### gcc specific CFLAGS:

+ #CC= gcc

+ # If your system include files are bad, don't use -Wall

+ #CFLAGS= -O6 -g #-Wall 

+ #CFLAGS = -g -fstrength-reduce -fcombine-regs -finline-functions #-Wall

+ 

+ ### On some machines special CFLAGS are required:

+ #M_CFLAGS=

+ #M_CFLAGS= -Dapollo -A cpu,mathchip -A nansi	# Apollo DN3000/4000/4500

+ #M_CFLAGS= -DBSDI				# bsd386

+ #M_CFLAGS= -DISC -D_POSIX_SOURCE		# isc

+ #M_CFLAGS= -systype bsd43 -DMIPS		# mips

+ #M_CFLAGS= -fforce-mem -fforce-addr\

+ # -fomit-frame-pointer -finline-functions -bsd 	# NeXT

+ #M_CFLAGS= -qlanglvl=ansi			# RS6000/AIX

+ #M_CFLAGS= -qlanglvl=ansi -D_AIX32		# RS6000/AIX 3.2

+ #M_CFLAGS= -ansi				# sgi/IRIX 3.x ansi 

+ #M_CFLAGS= -xansi				# sgi/IRIX 4.x ext ansi 

+ #M_CFLAGS= -YBSD				# Ultrix 4.x

+ #M_CFLAGS= -DSVR4=1	# Bob Kline rvk@blink.att.com 80386 Unix SVR4.0

+ #M_CFLAGS= -D_CX_UX	# Ken Beal kbeal@amber.ssd.csd.harris.com Harris CX/UX

+ 

+ ### Choose one of the LIBS setting below:

+ #LIBS= -ltermcap -lc -lsocket -linet -lsec -lseq	# Sequent/ptx

+ #LIBS= -ltermcap 			# SunOS, Linux, Apollo,

+ #					  gould_np1, NeXT, Ultrix

+ #LIBS= -ltermcap -lelf			# SVR4

+ #LIBS= -ltermlib -linet -lcposix	# isc

+ #LIBS= -ltermcap -lmld			# mips (nlist is in mld)

+ #LIBS= -ltermlib -lsun -lmld #-lc_s	# sgi/IRIX

+ #LIBS= -lcurses				# RS6000/AIX

+ #LIBS= -lcrypt_d -ltinfo		# sco32

+ #LIBS= -lcrypt_i -ltinfo		# sco32

+ #LIBS= -lcrypt -lsec			# sco322 (msilano@sra.com)

+ #LIBS= -ltermcap -lcrypt.o -ldir -lx	# SCO XENIX 2.3.4

+ #LIBS= -ltermcap -lcrypt -ldir -l2.3 -lx	# SCO UNIX XENIX cross dev.

+ #LIBS= -ltermcap -lelf -lcrypt -lsocket -lnet -lnsl	# Bob Kline SVR4

+ 

+ ######

+ ######

+ ###### end of obsolete lines

+ ######

+ ######

+ 

+ 

+ SHELL=/bin/sh

+ 

+ CFILES=	screen.c ansi.c fileio.c mark.c misc.c resize.c socket.c \

+ 	search.c tty.c term.c window.c utmp.c loadav.c putenv.c help.c \

+ 	termcap.c input.c attacher.c pty.c process.c display.c comm.c acl.c

+ OFILES=	screen.o ansi.o fileio.o mark.o misc.o resize.o \

+ 	search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \

+ 	termcap.o input.o pty.o process.o display.o comm.o acl.o

+ 

+ all:	screen screenlock

+ 

+ screen:	$(OFILES)

+ 	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)

+ 

+ screenlock:	screenlock.o

+ 	$(CC) $(LDFLAGS) -o $@ screenlock.o $(LIBS)

+ 

+ .c.o:

+ 	$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<

+ 

+ install_bin: all

+ 	$(INSTALL_PROGRAM) screen $(bindir)/screen-$(VERSION)

+ 	$(INSTALL_PROGRAM) screenlock $(bindir)/screenlock

+ 	-chown root $(bindir)/screen-$(VERSION) && chmod 4755 $(bindir)/screen-$(VERSION)

+ # This doesn't work if $(bindir)/screen is a symlink

+ 	-if [ -f $(bindir)/screen ] && [ ! -f $(bindir)/screen.old ]; then mv $(bindir)/screen $(bindir)/screen.old; fi

+ 	rm -f $(bindir)/screen

+ 	ln -s $(bindir)/screen-$(VERSION) $(bindir)/screen

+ 

+ install: install_bin

+ 	-$(INSTALL_DATA) $(srcdir)/etcscreenrc $(ETCSCREENRC)

+ 	-$(INSTALL_DATA) $(srcdir)/doc/screen.1 $(mandir)/man1/screen.1

+ #	-tic ${srcdir}/terminfo/screeninfo.src

+ # Better do this by hand. E.g. under RCS...

+ #	cat ${srcdir}/terminfo/screencap >> /etc/termcap

+ 	@echo termcap entry not installed.

+ 

+ installdirs: mkinstalldirs

+ # Path leading to ETCSCREENRC and Socketdirectory not checked.

+ 	$(srcdir)/mkinstalldirs $(bindir) $(mandir)

+ 

+ uninstall:

+ 	rm -f $(bindir)/screen-$(VERSION)

+ 	rm -f $(bindir)/screen

+ 	mv $(bindir)/screen.old $(bindir)/screen

+ 	rm -f $(ETCSCREENRC)

+ 	rm -f $(mandir)/man1/screen.1

+ 

+ shadow:

+ 	mkdir shadow;

+ 	cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../configure ../doc ../terminfo .

+ 	rm -f shadow/term.h shadow/tty.c shadow/comm.h shadow/osdef.h

+ 

+ term.h: term.c term.sh

+ 	AWK=$(AWK) srcdir=$(srcdir) . $(srcdir)/term.sh

+ 

+ tty.c:	tty.sh 

+ 	sh $(srcdir)/tty.sh tty.c

+ 

+ comm.h: comm.c comm.sh config.h

+ 	AWK=$(AWK) CC="$(CC)" srcdir=${srcdir} . $(srcdir)/comm.sh

+ 

+ osdef.h: osdef.sh config.h osdef.h.in

+ 	CC="$(CC)" srcdir=${srcdir} . $(srcdir)/osdef.sh

+ 

+ docs:

+ 	cd doc; $(MAKE) dvi info

+ 

+ dvi info:

+ 	cd doc; $(MAKE) $@

+ 

+ mostlyclean:

+ 	rm -f $(OFILES) screenlock.o screen

+ 

+ clean celan: mostlyclean

+ 	rm -f tty.c term.h comm.h osdef.h

+ 

+ # Delete all files from the current directory that are created by 

+ # configuring or building the program.

+ # building of term.h/comm.h requires awk. Keep it in the distribution

+ # we keep config.h, as this file knows where 'make dist' finds the ETCSCREENRC.

+ distclean:	mostlyclean

+ 	rm -f screen-$(VERSION).tar screen-$(VERSION).TZ

+ 	rm -f config.status Makefile

+ 

+ # Delete everything from the current directory that can be

+ # reconstructed with this Makefile.

+ realclean:	distclean

+ 	rm -f config.h

+ 

+ TAGS: $(CFILES)

+ 	ctags $(CFILES) *.h

+ 	ctags -e $(CFILES) *.h

+ 

+ dist: screen-$(VERSION).tar.z

+ 

+ screen-$(VERSION).tar: term.h comm.h tty.c

+ 	-rm -rf dist

+ 	mkdir dist

+ 	mkdir dist/screen-$(VERSION)

+ 	ln acl.h ansi.h display.h extern.h mark.h os.h overlay.h \

+ 	   patchlevel.h rcs.h screen.h window.h osdef.h.in \

+ 	   term.sh tty.sh comm.sh osdef.sh newsyntax \

+ 	   acl.c ansi.c attacher.c comm.c display.c window.c fileio.c help.c \

+ 	   input.c loadav.c mark.c misc.c process.c pty.c putenv.c \

+ 	   screen.c search.c socket.c term.c termcap.c utmp.c resize.c \

+ 	   ChangeLog COPYING INSTALL NEWS \

+ 	   dist/screen-$(VERSION)

+ 	ln configure.in configure dist/screen-$(VERSION)

+ 	sed -e 's@"/local/screens@"/tmp/screens@' -e 's@"/local@"/usr/local@g' < config.h.in > dist/screen-$(VERSION)/config.h.in

+ 	sed -e 's@[	 ]/local@ /usr/local@g' -e 's/^CFLAGS = -g/CFLAGS = -O/' < Makefile.in > dist/screen-$(VERSION)/Makefile.in

+ 	ln term.h dist/screen-$(VERSION)/term.h.dist

+ 	ln comm.h dist/screen-$(VERSION)/comm.h.dist

+ 	ln tty.c dist/screen-$(VERSION)/tty.c.dist

+ 	ln README dist/screen-$(VERSION)/README

+ 	mkdir dist/screen-$(VERSION)/terminfo

+ 	cd terminfo; ln 8bits README checktc.c screen-sco.mail screencap \

+ 	  screeninfo.src test.txt tetris.c \

+ 	  ../dist/screen-$(VERSION)/terminfo

+ 	sed -e 's/^startup/#startup/' -e 's/^autodetach/#autodetach/' < $(ETCSCREENRC) > dist/screen-$(VERSION)/etcscreenrc 

+ 	cp $(HOME)/.iscreenrc dist/screen-$(VERSION)/.iscreenrc

+ 	mkdir dist/screen-$(VERSION)/doc

+ 	ln doc/fdpat.ips dist/screen-$(VERSION)/doc/fdpat.ps

+ 	sed -e 's@/local/emacs@/usr/local@g' < doc/Makefile.in > dist/screen-$(VERSION)/doc/Makefile.in

+ 	cd doc; ln screen.1 screen.texinfo \

+ 	  ../dist/screen-$(VERSION)/doc

+ 	cd dist; tar chf ../screen-$(VERSION).tar screen-$(VERSION)

+ 	rm -rf dist

+ 

+ screen-$(VERSION).tar.z: screen-$(VERSION).tar

+ 	gzip -f screen-$(VERSION).tar

+ 

+ # Perform self-tests (if any).

+ check:

+ 

+ lint:

+ 	lint -I. $(CFILES)

+ 

+ saber:

+ 	#load $(CFLAGS) screen.c ansi.c $(LIBS)

+ 

+ mdepend: $(CFILES) term.h

+ 	@rm -f DEPEND ; \

+ 	for i in ${CFILES} ; do \

+ 	  echo "$$i" ; \

+ 	  echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\

+             cc -E $$i |\

+             grep '^# .*"\./.*\.h"' |\

+             sort -t'"' -u +1 -2 |\

+             sed -e 's/.*"\.\/\(.*\)".*/\1/'\

+           ` >> DEPEND ; \

+ 	done

+ 

+ 

+ depend: $(CFILES) term.h

+ 	cp Makefile Makefile~

+ 	sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make

+ 	for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done 

+ 	mv tmp_make Makefile

+ 

+ screen.o socket.o: Makefile

+ 

+ ### Dependencies:

+ screen.o: screen.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h patchlevel.h extern.h osdef.h

+ ansi.o: ansi.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ fileio.o: fileio.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ mark.o: mark.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h mark.h extern.h osdef.h

+ misc.o: misc.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ resize.o: resize.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ socket.o: socket.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ search.o: search.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h mark.h extern.h osdef.h

+ tty.o: tty.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ term.o: term.c rcs.h term.h 

+ window.o: window.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ utmp.o: utmp.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ loadav.o: loadav.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ putenv.o: putenv.c rcs.h config.h 

+ help.o: help.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ termcap.o: termcap.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ input.o: input.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ attacher.o: attacher.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ pty.o: pty.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ process.o: process.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ display.o: display.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ comm.o: comm.c rcs.h config.h comm.h 

+ acl.o: acl.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h acl.h osdef.h

*** /dev/null	Sun Aug 14 14:58:08 1994
--- Makefile.full	Sun Aug 14 17:17:06 1994
***************
*** 0 ****
--- 1,313 ----
+ # Generated automatically from Makefile.in by configure.

+ #

+ # Makefile template for screen 

+ #

+ # See machine dependant config.h for more configuration options.

+ #

+ 

+ srcdir = .

+ VPATH = .

+ 

+ # Where to install screen.

+ 

+ prefix = /usr/local

+ exec_prefix = $(prefix)

+ 

+ bindir  = $(exec_prefix)/bin

+ mandir  = $(prefix)/man

+ 

+ VERSION = 3.5.2

+ 

+ ETCSCREENRC = `sed < config.h -n -e '/define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'`

+ 

+ # Defining -DMINTFULL here is essential for e.g. comm.sh

+ CC = /dev/d/bin/gcc -mint -DMINTFULL

+ CFLAGS = -O

+ LDFLAGS =

+ LIBS = -lsocket -lmtermcap -llibusers.a

+ 

+ CPP_DEPEND=/lib/cpp -MM

+ 

+ INSTALL = /bin/install -c

+ INSTALL_PROGRAM = $(INSTALL)

+ INSTALL_DATA = $(INSTALL) -m 644

+ 

+ AWK = gawk

+ 

+ ### Chose some debug configuration options:

+ # -DDEBUG

+ #	Turn on really heavy debug output. This is written to 

+ #	/tmp/debug/screen.{front,back} Look at these files and quote 

+ #	questionable sections when sending bug-reports to the author.

+ # -DTMPTEST

+ #	Change the socket directory to a location that does not interfere

+ #	with the (suid-root) installed screen version. Use that in

+ #	combination with -DDEBUG

+ # -DDUMPSHADOW

+ #	With shadow-pw screen would never dump core. Use this option if you

+ #	still want to have a core. Use only for debugging.

+ # -DFORKDEBUG

+ #	Swap roles of father and son when forking the SCREEN process. 

+ #	Useful only for debugging.

+ OPTIONS= 

+ #OPTIONS= -DDEBUG -DTMPTEST

+ 

+ 

+ ######

+ ######

+ ###### The following lines should be obsolete because of the 'configure' script.

+ ######

+ ######

+ 

+ 

+ ### If you choose to compile with the tried and true:

+ #CC= cc

+ #CFLAGS= -O

+ #CFLAGS= -g 

+ ### gcc specific CFLAGS:

+ #CC= gcc

+ # If your system include files are bad, don't use -Wall

+ #CFLAGS= -O6 -g #-Wall 

+ #CFLAGS = -g -fstrength-reduce -fcombine-regs -finline-functions #-Wall

+ 

+ ### On some machines special CFLAGS are required:

+ #M_CFLAGS=

+ #M_CFLAGS= -Dapollo -A cpu,mathchip -A nansi	# Apollo DN3000/4000/4500

+ #M_CFLAGS= -DBSDI				# bsd386

+ #M_CFLAGS= -DISC -D_POSIX_SOURCE		# isc

+ #M_CFLAGS= -systype bsd43 -DMIPS		# mips

+ #M_CFLAGS= -fforce-mem -fforce-addr\

+ # -fomit-frame-pointer -finline-functions -bsd 	# NeXT

+ #M_CFLAGS= -qlanglvl=ansi			# RS6000/AIX

+ #M_CFLAGS= -qlanglvl=ansi -D_AIX32		# RS6000/AIX 3.2

+ #M_CFLAGS= -ansi				# sgi/IRIX 3.x ansi 

+ #M_CFLAGS= -xansi				# sgi/IRIX 4.x ext ansi 

+ #M_CFLAGS= -YBSD				# Ultrix 4.x

+ #M_CFLAGS= -DSVR4=1	# Bob Kline rvk@blink.att.com 80386 Unix SVR4.0

+ #M_CFLAGS= -D_CX_UX	# Ken Beal kbeal@amber.ssd.csd.harris.com Harris CX/UX

+ 

+ ### Choose one of the LIBS setting below:

+ #LIBS= -ltermcap -lc -lsocket -linet -lsec -lseq	# Sequent/ptx

+ #LIBS= -ltermcap 			# SunOS, Linux, Apollo,

+ #					  gould_np1, NeXT, Ultrix

+ #LIBS= -ltermcap -lelf			# SVR4

+ #LIBS= -ltermlib -linet -lcposix	# isc

+ #LIBS= -ltermcap -lmld			# mips (nlist is in mld)

+ #LIBS= -ltermlib -lsun -lmld #-lc_s	# sgi/IRIX

+ #LIBS= -lcurses				# RS6000/AIX

+ #LIBS= -lcrypt_d -ltinfo		# sco32

+ #LIBS= -lcrypt_i -ltinfo		# sco32

+ #LIBS= -lcrypt -lsec			# sco322 (msilano@sra.com)

+ #LIBS= -ltermcap -lcrypt.o -ldir -lx	# SCO XENIX 2.3.4

+ #LIBS= -ltermcap -lcrypt -ldir -l2.3 -lx	# SCO UNIX XENIX cross dev.

+ #LIBS= -ltermcap -lelf -lcrypt -lsocket -lnet -lnsl	# Bob Kline SVR4

+ 

+ ######

+ ######

+ ###### end of obsolete lines

+ ######

+ ######

+ 

+ 

+ SHELL=/bin/sh

+ 

+ CFILES=	screen.c ansi.c fileio.c mark.c misc.c resize.c socket.c \

+ 	search.c tty.c term.c window.c utmp.c loadav.c putenv.c help.c \

+ 	termcap.c input.c attacher.c pty.c process.c display.c comm.c acl.c

+ OFILES=	screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \

+ 	search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \

+ 	termcap.o input.o attacher.o pty.o process.o display.o comm.o acl.o

+ 

+ all:	screen

+ 

+ screen:	$(OFILES)

+ 	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)

+ 

+ .c.o:

+ 	$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<

+ 

+ install_bin: all

+ 	$(INSTALL_PROGRAM) screen $(bindir)/screen-$(VERSION)

+ 	-chown root $(bindir)/screen-$(VERSION) && chmod 4755 $(bindir)/screen-$(VERSION)

+ # This doesn't work if $(bindir)/screen is a symlink

+ 	-if [ -f $(bindir)/screen ] && [ ! -f $(bindir)/screen.old ]; then mv $(bindir)/screen $(bindir)/screen.old; fi

+ 	rm -f $(bindir)/screen

+ 	ln -s $(bindir)/screen-$(VERSION) $(bindir)/screen

+ 

+ install: install_bin

+ 	-$(INSTALL_DATA) $(srcdir)/etcscreenrc $(ETCSCREENRC)

+ 	-$(INSTALL_DATA) $(srcdir)/doc/screen.1 $(mandir)/man1/screen.1

+ #	-tic ${srcdir}/terminfo/screeninfo.src

+ # Better do this by hand. E.g. under RCS...

+ #	cat ${srcdir}/terminfo/screencap >> /etc/termcap

+ 	@echo termcap entry not installed.

+ 

+ installdirs: mkinstalldirs

+ # Path leading to ETCSCREENRC and Socketdirectory not checked.

+ 	$(srcdir)/mkinstalldirs $(bindir) $(mandir)

+ 

+ uninstall:

+ 	rm -f $(bindir)/screen-$(VERSION)

+ 	rm -f $(bindir)/screen

+ 	mv $(bindir)/screen.old $(bindir)/screen

+ 	rm -f $(ETCSCREENRC)

+ 	rm -f $(mandir)/man1/screen.1

+ 

+ shadow:

+ 	mkdir shadow;

+ 	cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../configure ../doc ../terminfo .

+ 	rm -f shadow/term.h shadow/tty.c shadow/comm.h shadow/osdef.h

+ 

+ term.h: term.c term.sh

+ 	AWK=$(AWK) srcdir=$(srcdir) . $(srcdir)/term.sh

+ 

+ tty.c:	tty.sh 

+ 	sh $(srcdir)/tty.sh tty.c

+ 

+ comm.h: comm.c comm.sh config.h

+ 	AWK=$(AWK) CC="$(CC)" srcdir=${srcdir} . $(srcdir)/comm.sh

+ 

+ osdef.h: osdef.sh config.h osdef.h.in

+ 	CC="$(CC)" srcdir=${srcdir} . $(srcdir)/osdef.sh

+ 

+ docs:

+ 	cd doc; $(MAKE) dvi info

+ 

+ dvi info:

+ 	cd doc; $(MAKE) $@

+ 

+ mostlyclean:

+ 	rm -f $(OFILES) screen

+ 

+ clean celan: mostlyclean

+ 	rm -f tty.c term.h comm.h osdef.h

+ 

+ # Delete all files from the current directory that are created by 

+ # configuring or building the program.

+ # building of term.h/comm.h requires awk. Keep it in the distribution

+ # we keep config.h, as this file knows where 'make dist' finds the ETCSCREENRC.

+ distclean:	mostlyclean

+ 	rm -f screen-$(VERSION).tar screen-$(VERSION).TZ

+ 	rm -f config.status Makefile

+ 

+ # Delete everything from the current directory that can be

+ # reconstructed with this Makefile.

+ realclean:	distclean

+ 	rm -f config.h

+ 

+ TAGS: $(CFILES)

+ 	ctags $(CFILES) *.h

+ 	ctags -e $(CFILES) *.h

+ 

+ dist: screen-$(VERSION).tar.z

+ 

+ screen-$(VERSION).tar: term.h comm.h tty.c

+ 	-rm -rf dist

+ 	mkdir dist

+ 	mkdir dist/screen-$(VERSION)

+ 	ln acl.h ansi.h display.h extern.h mark.h os.h overlay.h \

+ 	   patchlevel.h rcs.h screen.h window.h osdef.h.in \

+ 	   term.sh tty.sh comm.sh osdef.sh newsyntax \

+ 	   acl.c ansi.c attacher.c comm.c display.c window.c fileio.c help.c \

+ 	   input.c loadav.c mark.c misc.c process.c pty.c putenv.c \

+ 	   screen.c search.c socket.c term.c termcap.c utmp.c resize.c \

+ 	   ChangeLog COPYING INSTALL NEWS \

+ 	   dist/screen-$(VERSION)

+ 	ln configure.in configure dist/screen-$(VERSION)

+ 	sed -e 's@"/local/screens@"/tmp/screens@' -e 's@"/local@"/usr/local@g' < config.h.in > dist/screen-$(VERSION)/config.h.in

+ 	sed -e 's@[	 ]/local@ /usr/local@g' -e 's/^CFLAGS = -g/CFLAGS = -O/' < Makefile.in > dist/screen-$(VERSION)/Makefile.in

+ 	ln term.h dist/screen-$(VERSION)/term.h.dist

+ 	ln comm.h dist/screen-$(VERSION)/comm.h.dist

+ 	ln tty.c dist/screen-$(VERSION)/tty.c.dist

+ 	ln README dist/screen-$(VERSION)/README

+ 	mkdir dist/screen-$(VERSION)/terminfo

+ 	cd terminfo; ln 8bits README checktc.c screen-sco.mail screencap \

+ 	  screeninfo.src test.txt tetris.c \

+ 	  ../dist/screen-$(VERSION)/terminfo

+ 	sed -e 's/^startup/#startup/' -e 's/^autodetach/#autodetach/' < $(ETCSCREENRC) > dist/screen-$(VERSION)/etcscreenrc 

+ 	cp $(HOME)/.iscreenrc dist/screen-$(VERSION)/.iscreenrc

+ 	mkdir dist/screen-$(VERSION)/doc

+ 	ln doc/fdpat.ips dist/screen-$(VERSION)/doc/fdpat.ps

+ 	sed -e 's@/local/emacs@/usr/local@g' < doc/Makefile.in > dist/screen-$(VERSION)/doc/Makefile.in

+ 	cd doc; ln screen.1 screen.texinfo \

+ 	  ../dist/screen-$(VERSION)/doc

+ 	cd dist; tar chf ../screen-$(VERSION).tar screen-$(VERSION)

+ 	rm -rf dist

+ 

+ screen-$(VERSION).tar.z: screen-$(VERSION).tar

+ 	gzip -f screen-$(VERSION).tar

+ 

+ # Perform self-tests (if any).

+ check:

+ 

+ lint:

+ 	lint -I. $(CFILES)

+ 

+ saber:

+ 	#load $(CFLAGS) screen.c ansi.c $(LIBS)

+ 

+ mdepend: $(CFILES) term.h

+ 	@rm -f DEPEND ; \

+ 	for i in ${CFILES} ; do \

+ 	  echo "$$i" ; \

+ 	  echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\

+             cc -E $$i |\

+             grep '^# .*"\./.*\.h"' |\

+             sort -t'"' -u +1 -2 |\

+             sed -e 's/.*"\.\/\(.*\)".*/\1/'\

+           ` >> DEPEND ; \

+ 	done

+ 

+ 

+ depend: $(CFILES) term.h

+ 	cp Makefile Makefile~

+ 	sed -e '/\#\#\# Dependencies/q' < Makefile > tmp_make

+ 	for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done 

+ 	mv tmp_make Makefile

+ 

+ screen.o socket.o: Makefile

+ 

+ ### Dependencies:

+ screen.o: screen.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h patchlevel.h extern.h osdef.h

+ ansi.o: ansi.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ fileio.o: fileio.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ mark.o: mark.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h mark.h extern.h osdef.h

+ misc.o: misc.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ resize.o: resize.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ socket.o: socket.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ search.o: search.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h mark.h extern.h osdef.h

+ tty.o: tty.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ term.o: term.c rcs.h term.h 

+ window.o: window.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ utmp.o: utmp.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ loadav.o: loadav.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ putenv.o: putenv.c rcs.h config.h 

+ help.o: help.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ termcap.o: termcap.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ input.o: input.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ attacher.o: attacher.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ pty.o: pty.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h osdef.h

+ process.o: process.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ display.o: display.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h \

+   term.h display.h window.h extern.h osdef.h

+ comm.o: comm.c rcs.h config.h comm.h 

+ acl.o: acl.c rcs.h config.h screen.h os.h ansi.h comm.h overlay.h term.h \

+   display.h window.h extern.h acl.h osdef.h

*** /dev/null	Sun Aug 14 14:58:08 1994
--- config.h	Sun Aug 14 17:18:30 1994
***************
*** 0 ****
--- 1,416 ----
+ /* config.h.  Generated automatically by configure.  */

+ /* Copyright (c) 1993

+  *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)

+  *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)

+  * Copyright (c) 1987 Oliver Laumann

+  *

+  * This program is free software; you can redistribute it and/or modify

+  * it under the terms of the GNU General Public License as published by

+  * the Free Software Foundation; either version 2, or (at your option)

+  * any later version.

+  *

+  * This program is distributed in the hope that it will be useful,

+  * but WITHOUT ANY WARRANTY; without even the implied warranty of

+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+  * GNU General Public License for more details.

+  *

+  * You should have received a copy of the GNU General Public License

+  * along with this program (see the file COPYING); if not, write to the

+  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

+  *

+  ****************************************************************

+  * $Id: config.h.in,v 1.9 1993/08/16 14:48:53 mlschroe Exp $ FAU

+  */

+ 

+ 

+ 

+ 

+ 

+ /**********************************************************************

+  *

+  *	User Configuration Section

+  */

+ 

+ 

+ 

+ /*

+  * Define SOCKDIR to be the directory to contain the named sockets

+  * screen creates. This should be in a common subdirectory, such as

+  * /usr/local or /tmp. It makes things a little more secure if you

+  * choose a directory which is not writable by everyone or where the

+  * "sticky" bit is on, but this isn't required.

+  * If SOCKDIR is not defined screen will put the named sockets in

+  * the user's home directory. Notice that this can cause you problems

+  * if some user's HOME directories are NFS-mounted and don't support

+  * named sockets.

+  * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison).

+  * Do not define TMPTEST unless it's for debugging purpose.

+  */

+ 

+ #ifndef TMPTEST

+ # define SOCKDIR "/tmp/screens"

+ #else

+ # define SOCKDIR "/tmp/testscreens"

+ #endif

+ 

+ /*

+  * 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.

+  */

+ #ifndef ETCSCREENRC

+ # define ETCSCREENRC "/usr/local/etc/screenrc"

+ #endif

+ 

+ /*

+  * Screen can look for the environment variable $SYSSCREENRC and -if it

+  * exists- load the file specified in that variable as global screenrc.

+  * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1).

+  * Otherwise ETCSCREENRC is always loaded.

+  */

+ #define ALLOW_SYSSCREENRC 1

+ 

+ /* 

+  * define PTYMODE if you do not like the default of 0622, which allows 

+  * public write to your pty.

+  * define PTYGROUP to some numerical group-id if you do not want the

+  * tty to be in "your" group.

+  * Note, screen is unable to change mode or group of the pty if it

+  * is not installed with sufficient privilege. (e.g. set-uid-root)

+  */

+ #define PTYMODE 0620

+ #define PTYGROUP 4

+ 

+ /*

+  * If screen is NOT installed set-uid root, screen can provide tty

+  * security by exclusively locking the ptys.  While this keeps other

+  * users from opening your ptys, it also keeps your own subprocesses

+  * from being able to open /dev/tty.  Define LOCKPTY to add this

+  * exclusive locking.

+  */

+ /* #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 */

+ 

+ /*

+  * here come the erlangen extensions to screen:

+  * define LOCK if you want to use a lock program for a screenlock.

+  * define PASSWORD for secure reattach of your screen.

+  * define COPY_PASTE to use the famous hacker's treasure zoo.

+  * define POW_DETACH to have a detach_and_logout key.

+  * define REMOTE_DETACH (-d option) to move screen between terminals.

+  * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking

+  * define PSEUDOS to allow window input/output filtering

+  * define MULTI to allow multiple attaches.

+  * define MULTIUSER to allow other users attach to your session

+  *                  (if they are in the acl, of course)

+  * (jw)

+  */

+ /* #undef SIMPLESCREEN */

+ #ifndef SIMPLESCREEN

+ # define LOCK

+ # define COPY_PASTE

+ # define AUTO_NUKE

+ # define PSEUDOS

+ # ifndef MINT

+ #  define MULTI

+ #  define MULTIUSER

+ #  define REMOTE_DETACH

+ #  define POW_DETACH

+ #  define PASSWORD

+ # endif

+ #endif /* SIMPLESCREEN */

+ 

+ /*

+  * As error messages are mostly meaningless to the user, we

+  * try to throw out phrases that are somewhat more familiar

+  * to ...well, at least familiar to us NetHack players.

+  */

+ #ifndef NONETHACK

+ # define NETHACK

+ #endif /* NONETHACK */

+ 

+ /*

+  * If screen is installed with permissions to update /etc/utmp (such

+  * as if it is installed set-uid root), define UTMPOK.

+  */

+ #define UTMPOK

+ 

+ /* Set LOGINDEFAULT to one (1)

+  * if you want entries added to /etc/utmp by default, else set it to

+  * zero (0).

+  * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined!

+  */

+ #define LOGINDEFAULT	1

+ 

+ /* Set LOGOUTOK to one (1)

+  * if you want the user to be able to log her/his windows out.

+  * (Meaning: They are there, but not visible in /etc/utmp).

+  * Disabling this feature only makes sense if you have a secure /etc/utmp

+  * database. 

+  * Negative examples: suns usually have a world writable utmp file, 

+  * xterm will run perfectly without s-bit.

+  */

+ #define LOGOUTOK 1

+ 

+ 

+ /*

+  * If UTMPOK is defined and your system (incorrectly) counts logins by

+  * counting non-null entries in /etc/utmp (instead of counting non-null

+  * entries with no hostname that are not on a pseudo tty), define USRLIMIT

+  * to have screen put an upper-limit on the number of entries to write

+  * into /etc/utmp.  This helps to keep you from exceeding a limited-user

+  * license.

+  */

+ /* #undef USRLIMIT */

+ 

+ 

+ 

+ /**********************************************************************

+  *

+  *	End of User Configuration Section

+  *

+  *      Rest of this file is modified by 'configure'

+  *      Change at your own risk!

+  *

+  */

+ 

+ /*

+  * Some defines to identify special unix variants

+  */

+ #ifndef SVR4

+ /* #undef SVR4 */

+ #endif

+ 

+ #ifndef OSF1

+ /* #undef OSF1 */

+ #endif

+ 

+ #ifndef MIPS

+ /* #undef MIPS */

+ #endif

+ 

+ /*

+  * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).

+  */

+ /* #undef POSIX */

+ 

+ /*

+  * Define BSDJOBS if you have BSD-style job control (both process

+  * groups and a tty that deals correctly with them).

+  */

+ #define BSDJOBS 1

+ 

+ /*

+  * Define TERMIO if you have struct termio instead of struct sgttyb.

+  * This is usually the case for SVID systems, where BSD uses sgttyb.

+  * POSIX systems should define this anyway, even though they use

+  * struct termios.

+  */

+ /* #define TERMIO 1 */

+ 

+ /*

+  * Define TERMINFO if your machine emulates the termcap routines

+  * with the terminfo database.

+  * Thus the .screenrc file is parsed for

+  * the command 'terminfo' and not 'termcap'.

+  */

+ /* #undef TERMINFO */

+ 

+ /*

+  * If your library does not define ospeed, define this.

+  */

+ #define NEED_OSPEED 1

+ 

+ /*

+  * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)

+  */

+ #ifndef SYSV

+ /* #define SYSV 1 */

+ #endif

+ 

+ /*

+  * Define SIGVOID if your signal handlers return void.  On older

+  * systems, signal returns int, but on newer ones, it returns void.

+  */

+ #define SIGVOID 1

+ 

+ /*

+  * Define USESIGSET if you have sigset for BSD 4.1 reliable signals.

+  */

+ /* #undef USESIGSET */

+ 

+ /*

+  * Define SYSVSIGS if signal handlers must be reinstalled after

+  * they have been called.

+  */

+ /* #undef SYSVSIGS */

+ 

+ /*

+  * Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h>

+  *

+  * Only allow BSDWAIT i.e. wait3 on nonposix systems, since

+  * posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl

+  * 

+  */

+ #ifndef POSIX

+ #define BSDWAIT 1

+ #endif

+ 

+ /*

+  * On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com 

+  */

+ #ifdef BSDWAIT

+ /* #undef USE_WAIT2 */

+ #endif

+ 

+ /*

+  * Define DIRENT if your system has <dirent.h> instead of <sys/dir.h>

+  */

+ #define DIRENT 1

+ 

+ /*

+  * If your system has getutent(), pututline(), etc. to write to the

+  * utmp file, define GETUTENT.

+  */

+ /* #undef GETUTENT */

+ 

+ /*

+  * Define UTHOST if the utmp file has a host field.

+  */

+ #define UTHOST 1

+ 

+ /*

+  * If ttyslot() breaks getlogin() by returning indexes to utmp entries

+  * of type DEAD_PROCESS, then our getlogin() replacement should be

+  * selected by defining BUGGYGETLOGIN.

+  */

+ /* #undef BUGGYGETLOGIN */

+ 

+ /*

+  * If your system does not have the calls setreuid() and setregid(),

+  * define NOREUID to force screen to use a forked process to safely

+  * create output files without retaining any special privileges.

+  * (Output logging will be disabled, however.)

+  */

+ /* #undef NOREUID */

+ 

+ /*

+  * If you want the "time" command to display the current load average

+  * define LOADAV. Maybe you must install screen with the needed

+  * privileges to read /dev/kmem.

+  * Note that NLIST_ stuff is only checked, when getloadavg() is not available.

+  */

+ #define LOADAV

+ 

+ #define LOADAV_NUM 3

+ #define LOADAV_TYPE double

+ #define LOADAV_SCALE 1

+ #define LOADAV_GETLOADAVG

+ /* #undef LOADAV_UNIX */

+ /* #undef LOADAV_AVENRUN */

+ 

+ /* #undef NLIST_DECLARED */

+ /* #undef NLIST_STRUCT */

+ /* #undef NLIST_NAME_UNION */

+ 

+ /*

+  * If your system has the new format /etc/ttys (like 4.3 BSD) and the

+  * getttyent(3) library functions, define GETTTYENT.

+  */

+ /* #undef GETTTYENT */

+ 

+ /*

+  * Define USEBCOPY if the bcopy/memcpy from your system's C library

+  * supports the overlapping of source and destination blocks.  When

+  * undefined, screen uses its own (probably slower) version of bcopy().

+  * 

+  * SYSV machines may have a working memcpy() -- Oh, this is 

+  * quite unlikely. Tell me if you see one. (Juergen)

+  * But then, memmove() should work, if at all available.

+  */

+ #define USEBCOPY 1

+ #define USEMEMCPY 1

+ #define USEMEMMOVE 1

+ 

+ /*

+  * If your system has vsprintf() and requires the use of the macros in

+  * "varargs.h" to use functions with variable arguments,

+  * define USEVARARGS.

+  */

+ /* #undef USEVARARGS */

+ 

+ /*

+  * If the select return value doesn't treat a descriptor that is

+  * usable for reading and writing as two hits, define SELECT_BROKEN.

+  */

+ #define SELECT_BROKEN 1

+ 

+ /*

+  * Define this if your system supports named pipes.

+  */

+ /* #define NAMEDPIPE 1 */

+ 

+ /*

+  * Define this if your system exits select() immediatly if a pipe is

+  * opened read-only and no writer has opened it.

+  */

+ /* #define BROKEN_PIPE 1 */

+ 

+ /*

+  * Define this if the unix-domain socket implementation doesn't

+  * create a socket in the filesystem.

+  */

+ /* #define SOCK_NOT_IN_FS 1 */

+ 

+ /*

+  * If your system has setenv() and unsetenv() define USESETENV

+  */

+ /* #undef USESETENV */

+ 

+ /*

+  * If your system does not come with a setenv()/putenv()/getenv()

+  * functions, you may bring in our own code by defining NEEDPUTENV.

+  */

+ #define NEEDPUTENV 1

+ 

+ /*

+  * If the passwords are stored in a shadow file and you want the

+  * builtin lock to work properly, define SHADOWPW.

+  */

+ /* #undef SHADOWPW */

+ 

+ /*

+  * If you are on a SYS V machine that restricts filename length to 14 

+  * characters, you may need to enforce that by setting NAME_MAX to 14

+  */

+ #undef NAME_MAX		/* KEEP_UNDEF_HERE override system value */

+ #define NAME_MAX 14     /* Restricted by the /pipe filesystem */

+ 

+ /*

+  * define HAVE_DEV_PTC if you have a /dev/ptc character special

+  * device.

+  */

+ /* #undef HAVE_DEV_PTC */

+ 

+ /* 

+  * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen

+  * to unusual environments. E.g. For SunOs the defaults are "qpr" and 

+  * "0123456789abcdef". For SunOs 4.1.2 

+  * #define PTYRANGE0 "pqrstuvwxyzPQRST" 

+  * is recommended by Dan Jacobson.

+  */

+ #define PTYRANGE0 "pqrs"

+ #define PTYRANGE1 "0123456789abcdef"

+ 

+ /*

+  * some defines to prevent retypedefs

+  */

+ /* #undef SIG_T_DEFINED */

+ #define PID_T_DEFINED 1

+ #define UID_T_DEFINED 1

+ 

*** /dev/null	Sun Aug 14 14:58:08 1994
--- screenlock.c	Sun Aug 14 17:21:44 1994
***************
*** 0 ****
--- 1,63 ----
+ /*

+ ** I made this program by combining the sources of the builtin lock program

+ ** of screen and the lock program of FreeBSD.

+ ** Since there's hardly any line that I didn't change, I don't think that the

+ ** original copyrights still apply. Please correct me if I'm wrong!

+ */

+ 

+ #include <sys/param.h>

+ #include <sys/stat.h>

+ #include <sys/signal.h>

+ #include <pwd.h>

+ #include <stdio.h>

+ #include <ctype.h>

+ #include <string.h>

+ #include <unistd.h>

+ 

+ main(argc, argv)

+ 	int argc;

+ 	char **argv;

+ {

+ 	struct passwd *pw;

+ 	int use_pw = 1;

+ 	char s1[BUFSIZ], s2[BUFSIZ];

+ 	char *crypt();

+ 

+ 	pw = getpwuid(getuid());	/* might be NULL */

+         if ((pw == NULL) || (*pw->pw_passwd == (char) 0)) use_pw = 0;

+ 

+ 	setuid(getuid());		/* discard privs */

+ 

+ 	fprintf(stderr, "\n");

+ 	if (!use_pw) {

+ 

+ 		/* get key and check again */

+ 		strcpy(s1, getpass("Key  : "));

+ 		strcpy(s2, getpass("Again: "));

+ 		(void) fprintf(stderr, "\n");

+ 		if (strcmp(s1, s2)) {

+ 			(void) fprintf(stderr, "screenlock: passwords didn't match.\007\n");

+ 			exit(1);

+ 		}

+ 	} else {

+ 		s1[0] = pw->pw_passwd[0];

+ 		s1[1] = pw->pw_passwd[1];

+ 		s1[2] = (char) 0;

+ 	}

+ 

+ 	/* set signal handlers */

+ 	(void)signal(SIGINT, SIG_IGN);

+ 	(void)signal(SIGQUIT, SIG_IGN);

+ 	(void)signal(SIGTSTP, SIG_IGN);

+ 

+ 	for (;;) {

+ 		if (use_pw) (void) fprintf(stderr, "Screen used by %s <%s>.\n",

+ 			pw->pw_gecos, pw->pw_name);

+ 		strcpy(s2, getpass("Password:\007"));

+ 		if (use_pw) {

+ 			if (!strcmp(pw->pw_passwd, crypt(s2, s1))) break;

+ 		} else {

+ 			if (!strcmp(s2, s1)) break;

+ 		}

+ 	}

+ }

