diff -Nur ../screen-3.6.1/INSTALL ./INSTALL --- ../screen-3.6.1/INSTALL Mon Jul 11 18:19:00 1994 +++ ./INSTALL Mon Apr 3 14:13:35 1995 @@ -1,26 +1,44 @@ -Installation of screen3.3 +Installation of screen3.6 jw 10.01.95 -0.) + +0.) This instruction is quite lengthy +------------------------------------- +.. and there are still important items near the end. Start here: Unpack. Screen comes as a compressed tar archive. You need gzip to uncompress. -But... you probably already managed that step, when you are reading this. +and... well, you probably already managed that step, when you are reading this. -1.) -Run configure. This should create a Makefile and a config.h file +1.) configure & config.status +----------------------------- +Run configure. This should create a reasonable Makefile and a config.h file suited for your machine. Rename config.status to reflect the architecture (hostname) where it was built. To reconfigure quickly for that architecture just run that config.status file. If this process fails, try to find out what configure did do and what it should have checked. Mail me. +Actually the initial Makefile that comes with the distribution just runs +configure -- thus you can start by typing 'make' right after unpacking. +You will be prompted to run 'make' again, which will really make screen. + +2.) Makefile & config.h +----------------------- +Look through the Makefile & user configuration section in config.h and check +pathnames. Change them to suit your installation requirements. Usually +sysadmins discuss the location of SOCKDIR, whether it should be in /tmp or +not. At least it must be on a filesystem that supports sockets/fifos. +The path for ETCSCREENRC needs also to be adapted. -2.) -Look through the Makefile & user configuration section in config.h and check the -pathnames. Change them to suit your installation requirements. - -3.) +3.) how to actually compile +--------------------------- Run 'make'. Screen should compile without too many warnings :) +The creation of term.h, comm.h, tty.c or osdef.h may fail on some machines +for some odd reason. (E.g. the sed under SCO-unix is known to be +case-insensitive and breaks term.h.) If so, please mail a short description +of the problem to screen@uni-erlangen.de and use the files ending in .dist +as a replacement (or in case of osdef.h retry with an empty file). You can then try 'make install' (if you dare). -4.) +4.) where to install +-------------------- You may well run screen from your private binary directory and with a private socket directory like $HOME/.screen. But to have a full featured screen and (from a users point of view) more secure pty's you should @@ -30,31 +48,52 @@ Consider this, when deciding whether you install screen setuid-root: - On some machines root priviliges are required to open pty's. - Pty's should be owned by the user, so that she can do chmod to prevent - intrudor attacks. + intrudor attacks. The PTYs used by screen will remain world read-writable + if screen is not installed setuid-root. +- Some commands only work properly when the pty is owned by the user. + These include mesg and biff. - The ^At feature may need to lseek and read the kernel file to retrieve the load average. - On most machines utmp slots can only be created/manipulated with root - privileges. + privileges. Users will appear to be logged on the primary terminal + instead of the screen windows, if screen is not installed setuid-root. - Multi-user screen sessions are only allowed when screen has a root-s-bit. - -5.) -The creation of term.h, comm.h, tty.c or osdef.h may fail on some machines -for some odd reason. (E.g. the sed under SCO-unix is known to be -case-insensitive and breaks term.h) If so, please mail a short description -of the problem to screen@uni-erlangen.de and use the files ending in .dist -as a replacement (or in case of osdef.h retry with an empty file). - -6.) -The man page screen.1 should go to /usr/local/man/man1, or some similar +- If screen sockets of multiple users are kept in one directory (e.g. + /tmp/screens), this directory must be world writeable when screen is not + installed setuid-root. Any user can remove or abuse any socket then. + + +5.) doc/screen.1 & doc/screen.texinfo +------------------------------------- +The man page doc/screen.1 should go to /usr/local/man/man1, or some similar directory. It should format nicely with nroff -man. If it does not, then try removing extra dots with: sed -e 's/^\.\././' < screen.1 | nroff -man -Look through the etcscreenrc file for system wide defaults that you like to -set. e.g. autodetach off, startup_message off, vbell on, ... -Install it to match the pathname specified in config.h - -7.) +The info page doc/screen.texinfo contains basically the same information as +the man-page, we may have missed one or another thing in one of the files. +If so, mail me. + +6.) etc/screenrc & etc/etcscreenrc +---------------------------------- +The files screenrc and etc/etcscreenrc are instructive samples that +demonstrate what can/should be done from your private .screenrc and from +$ETCSCREENRC -- do not just copy them. Read them. Look through the +etcscreenrc file for system wide defaults that you like to set. e.g. +autodetach off, startup_message off, vbell on, ... Since version 3.2.15 the screenrc file syntax changed slightly. All rc files from previous versions should be run through the newsyntax script that comes with this package. +If and only if you want to install screen as a console multiplexer, look +at the *.sample files and what 'make cscreen' suggests. + +7.) terminfo/screeninfo.src & terminfo/screencap +------------------------------------------------ +Every now and then we update the termcap/terminfo entries for screen. +E.g. keycodes were added in 3.6.0 -- thus you check that your termcap/terminfo +database is up to date. See the README in the terminfo subdirectory. + +8.) have fun +------------ +To get an idea what the basic screen commands are, read the file README. +Request snail mail address for liquid and solid donations. :-) -Juergen Weigert. (screen@uni-erlangen.de) +Juergen & Michael. (screen@uni-erlangen.de) diff -Nur ../screen-3.6.1/Makefile.in ./Makefile.in --- ../screen-3.6.1/Makefile.in Mon Jan 16 15:59:20 1995 +++ ./Makefile.in Tue Apr 4 01:20:20 1995 @@ -61,7 +61,7 @@ termcap.o input.o attacher.o pty.o process.o display.o comm.o \ kmapdef.o acl.o -all: screen info +all: screen screen.info screen: $(OFILES) $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) @@ -116,16 +116,16 @@ CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh docs: - cd doc; $(MAKE) dvi info + cd doc; $(MAKE) dvi screen.info -dvi info: +dvi info screen.info: -cd doc; $(MAKE) $@ mostlyclean: rm -f $(OFILES) screen clean celan: mostlyclean - rm -f tty.c term.h comm.h osdef.h doc/Makefile + 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. @@ -181,6 +181,8 @@ sed -e 's@/local/emacs@/usr/local@g' < doc/Makefile.in > dist/screen-$(VERSION)/doc/Makefile.in cd doc; ln FAQ screen.1 screen.texinfo fdpat.ps \ ../dist/screen-$(VERSION)/doc + cd doc; if test -f screen.info; then ln screen.info* \ + ../dist/screen-$(VERSION)/doc; fi cd dist/screen-$(VERSION)/doc; ln -s ../install.sh . cd dist/screen-$(VERSION); ln -s doc/FAQ . echo "install all Makefiles config:" > dist/screen-$(VERSION)/Makefile diff -Nur ../screen-3.6.1/NEWS ./NEWS --- ../screen-3.6.1/NEWS Sun Jan 15 23:55:44 1995 +++ ./NEWS Tue Apr 4 00:52:21 1995 @@ -41,8 +41,8 @@ make screen pass tek sequences. * List of new commands: - bindkey, c1, command, gr, kanji, mapdefault, mapnotnext, maptimeout, - pastefont, printcmd, readreg, stuff, zombie + bindkey, c1, command, defc1, defgr, defkanji, gr, kanji, mapdefault, + mapnotnext, maptimeout, pastefont, printcmd, readreg, stuff, zombie * Lots of other bugs fixed. diff -Nur ../screen-3.6.1/README ./README --- ../screen-3.6.1/README Fri Nov 25 00:41:35 1994 +++ ./README Mon Apr 3 14:38:05 1995 @@ -1,4 +1,8 @@ + [If you just got the screen package, it pays to read the file INSTALL] + [This intro only describes the most common features to get you started] + + Short introduction to screen (Version 3.6.0) lvirden 8-8-93 [note that this intro only describes the most common screen features] diff -Nur ../screen-3.6.1/acl.c ./acl.c --- ../screen-3.6.1/acl.c Mon Dec 12 21:00:26 1994 +++ ./acl.c Wed Mar 15 01:19:03 1995 @@ -133,8 +133,10 @@ *up = (struct user *)calloc(1, sizeof(struct user)); if (!*up) return -1; /* he still does not exist */ +#ifdef COPY_PASTE (*up)->u_copybuffer = NULL; (*up)->u_copylen = 0; +#endif (*up)->u_Esc = DefaultEsc; (*up)->u_MetaEsc = DefaultMetaEsc; strncpy((*up)->u_name, name, 20); @@ -256,11 +258,16 @@ AclSetPerm(u, default_c_bit[ACL_EXEC] ? "+x" : "-x", "?"); #endif debug1("FREEING user structure for %s\n", u->u_name); +#ifdef COPY_PASTE UserFreeCopyBuffer(u); +#endif free((char *)u); return 0; } + +#ifdef COPY_PASTE + /* * returns 0 if the copy buffer was really deleted. * Also removes any references into the users copybuffer @@ -290,6 +297,8 @@ u->u_copybuffer = NULL; return 0; } + +#endif /* COPY_PASTE */ /************************************************************************ * end of user managing code * diff -Nur ../screen-3.6.1/ansi.c ./ansi.c --- ../screen-3.6.1/ansi.c Thu Jan 5 21:56:11 1995 +++ ./ansi.c Mon Apr 3 23:47:44 1995 @@ -40,10 +40,11 @@ extern int force_vt; extern int all_norefresh; /* => display */ -extern int ZombieKey; +extern int ZombieKey_destroy, ZombieKey_resurrect; extern int real_uid, real_gid; extern time_t Now; extern struct NewWindow nwin_default; /* for ResetWindow() */ +extern int nversion; int maxwidth; /* maximum of all widths so far */ @@ -138,24 +139,42 @@ char **bufpp; int *lenp; { - int addlf, l2, f, *ilen, l = *lenp; + int addlf, l2 = 0, f, *ilen, l = *lenp; char *ibuf, *p, *buf = *bufpp; fore = D_fore; /* if w_wlock is set, only one user may write, else we check acls */ if (fore->w_ptyfd < 0) { - SetCurr(fore); - Special('\007'); while ((*lenp)-- > 0) { - if (*(*bufpp)++ == ZombieKey) + f = *(*bufpp)++; + if (f == ZombieKey_destroy) { debug2("Turning undead: %d(%s)\n", fore->w_number, fore->w_title); KillWindow(fore); + l2--; + break; + } + if (f == ZombieKey_resurrect) + { + SetCurr(fore); + + debug1("Resurrecting Zombie: %d\n", fore->w_number); + LineFeed(2); + RemakeWindow(fore); + l2++; break; } } + if (!l2) + { + char b1[10], b2[10]; + + b1[AddXChar(b1, ZombieKey_destroy)] = '\0'; + b2[AddXChar(b2, ZombieKey_resurrect)] = '\0'; + Msg(0, "Press %s to destroy or %s to resurrect window", b1, b2); + } *bufpp += *lenp; *lenp = 0; return; @@ -364,16 +383,47 @@ p->w_x = p->w_y = 0; p->w_state = LIT; p->w_StringType = NONE; - p->w_ss = 0; - p->w_Charset = G0; - p->w_CharsetR = G2; bzero(p->w_tabs, p->w_width); for (i = 8; i < p->w_width; i += 8) p->w_tabs[i] = 1; + ResetCharsets(p); +} + +void +ResetCharsets(p) +register struct win *p; +{ + int i; + + p->w_Charset = G0; + p->w_CharsetR = G2; for (i = G0; i <= G3; i++) p->w_charsets[i] = ASCII; - p->w_gr = 0; - p->w_c1 = 1; + p->w_gr = nwin_default.gr; + p->w_c1 = nwin_default.c1; + p->w_ss = 0; +#ifdef KANJI + switch(p->w_kanji) + { + case SJIS: + p->w_CharsetR = G1; + p->w_charsets[G1] = KANA; + p->w_gr = 1; + p->w_c1 = 0; + break; + case EUC: + p->w_CharsetR = G1; + p->w_charsets[G1] = KANJI; + p->w_charsets[G2] = KANA; + p->w_gr = 1; + p->w_c1 = 1; + break; + default: + break; + } +#endif + p->w_Font = p->w_charsets[p->w_Charset]; + p->w_FontR = p->w_charsets[p->w_CharsetR]; } static void @@ -700,7 +750,10 @@ break; default: if (Special(c)) - break; + { + curr->w_state = LIT; + break; + } debug1("not special. c = %x\n", c); if (c >= ' ' && c <= '/') { @@ -1426,6 +1479,15 @@ /* case 42: NRCM: 7bit NRC character mode */ /* case 44: margin bell enable */ } + } + break; + case '>': + switch (c) + { + case 'c': /* secondary DA */ + if (a1 == 0) + Report("\033[>%d;%d;0c", 83, nversion); /* 83 == 'S' */ + break; } break; } diff -Nur ../screen-3.6.1/comm.c ./comm.c --- ../screen-3.6.1/comm.c Tue Dec 6 21:46:17 1994 +++ ./comm.c Thu Mar 30 22:55:13 1995 @@ -39,8 +39,8 @@ #endif { "activity", ARGS_ONE }, { "aka", NEED_FORE|ARGS_ZEROONE }, /* TO BE REMOVED */ - { "allpartial", ARGS_ONE }, - { "at", ARGS_TWO|ARGS_ORMORE }, + { "allpartial", NEED_DISPLAY|ARGS_ONE }, + { "at", NEED_DISPLAY|ARGS_TWO|ARGS_ORMORE }, { "autodetach", ARGS_ONE }, #ifdef AUTO_NUKE { "autonuke", NEED_DISPLAY|ARGS_ONE }, @@ -55,7 +55,7 @@ #ifdef COPY_PASTE { "bufferfile", ARGS_ZEROONE }, #endif - { "c1", ARGS_ZEROONE }, + { "c1", NEED_FORE|ARGS_ZEROONE }, { "chdir", ARGS_ZEROONE }, { "clear", NEED_FORE|ARGS_ZERO }, #ifdef MULTI @@ -72,8 +72,13 @@ #ifdef AUTO_NUKE { "defautonuke", ARGS_ONE }, #endif + { "defc1", ARGS_ONE }, { "defescape", ARGS_ONE }, { "defflow", ARGS_ONETWO }, + { "defgr", ARGS_ONE }, +#ifdef KANJI + { "defkanji", ARGS_ONE }, +#endif #if defined(UTMPOK) && defined(LOGOUTOK) { "deflogin", ARGS_ONE }, #endif @@ -87,9 +92,9 @@ { "defwritelock", ARGS_ONE }, { "detach", NEED_DISPLAY|ARGS_ZERO }, { "displays", NEED_DISPLAY|ARGS_ZERO }, - { "dumptermcap", ARGS_ZERO }, + { "dumptermcap", NEED_FORE|ARGS_ZERO }, { "echo", ARGS_ONETWO }, - { "escape", ARGS_ONE }, + { "escape", NEED_DISPLAY|ARGS_ONE }, #ifdef PSEUDOS { "exec", NEED_FORE|ARGS_ZERO|ARGS_ORMORE }, #endif @@ -98,7 +103,7 @@ { "hardcopy", NEED_FORE|ARGS_ZERO }, { "hardcopy_append", ARGS_ONE }, { "hardcopydir", ARGS_ONE }, - { "hardstatus", ARGS_ZEROONE }, + { "hardstatus", NEED_DISPLAY|ARGS_ZEROONE }, { "height", NEED_DISPLAY|ARGS_ZEROONE }, { "help", NEED_DISPLAY|ARGS_ZERO }, #ifdef COPY_PASTE @@ -137,16 +142,16 @@ #ifdef NETHACK { "nethack", ARGS_ONE }, #endif - { "next", ARGS_ZERO }, + { "next", NEED_DISPLAY|NEED_FORE|ARGS_ZERO }, { "number", NEED_FORE|ARGS_ZEROONE }, { "obuflimit", NEED_DISPLAY|ARGS_ZEROONE }, - { "other", NEED_DISPLAY|ARGS_ZERO }, + { "other", NEED_DISPLAY|NEED_FORE|ARGS_ZERO }, { "partial", NEED_FORE|ARGS_ZEROONE }, #ifdef PASSWORD { "password", ARGS_ZEROONE }, #endif #ifdef COPY_PASTE - { "paste", ARGS_ZEROONETWO }, + { "paste", NEED_DISPLAY|ARGS_ZEROONETWO }, { "pastefont", ARGS_ZEROONE }, #endif { "pow_break", NEED_FORE|ARGS_ZEROONE }, @@ -154,7 +159,7 @@ { "pow_detach", NEED_DISPLAY|ARGS_ZERO }, { "pow_detach_msg", ARGS_ZEROONE }, #endif - { "prev", ARGS_ZERO }, + { "prev", NEED_DISPLAY|NEED_FORE|ARGS_ZERO }, { "printcmd", ARGS_ZEROONE }, { "process", NEED_DISPLAY|ARGS_ZEROONE }, { "quit", ARGS_ZERO }, @@ -162,7 +167,7 @@ { "readbuf", NEED_DISPLAY|ARGS_ZERO }, #endif { "readreg", ARGS_ZEROONETWO }, - { "redisplay", ARGS_ZERO }, + { "redisplay", NEED_DISPLAY|ARGS_ZERO }, { "register", ARGS_TWO }, #ifdef COPY_PASTE { "removebuf", ARGS_ZERO }, @@ -199,7 +204,7 @@ { "version", ARGS_ZERO }, { "wall", NEED_DISPLAY|ARGS_ONE|ARGS_ORMORE }, { "width", NEED_DISPLAY|ARGS_ZEROONE }, - { "windows", ARGS_ZERO }, + { "windows", NEED_DISPLAY|ARGS_ZERO }, { "wrap", NEED_FORE|ARGS_ZEROONE }, #ifdef COPY_PASTE { "writebuf", NEED_DISPLAY|ARGS_ZERO }, diff -Nur ../screen-3.6.1/comm.h.dist ./comm.h.dist --- ../screen-3.6.1/comm.h.dist Mon Jan 16 00:49:52 1995 +++ ./comm.h.dist Sat Apr 1 23:35:16 1995 @@ -66,103 +66,106 @@ #define RC_CRLF 24 #define RC_DEBUG 25 #define RC_DEFAUTONUKE 26 -#define RC_DEFESCAPE 27 -#define RC_DEFFLOW 28 -#define RC_DEFLOGIN 29 -#define RC_DEFMODE 30 -#define RC_DEFMONITOR 31 -#define RC_DEFOBUFLIMIT 32 -#define RC_DEFSCROLLBACK 33 -#define RC_DEFWRAP 34 -#define RC_DEFWRITELOCK 35 -#define RC_DETACH 36 -#define RC_DISPLAYS 37 -#define RC_DUMPTERMCAP 38 -#define RC_ECHO 39 -#define RC_ESCAPE 40 -#define RC_EXEC 41 -#define RC_FLOW 42 -#define RC_GR 43 -#define RC_HARDCOPY 44 -#define RC_HARDCOPY_APPEND 45 -#define RC_HARDCOPYDIR 46 -#define RC_HARDSTATUS 47 -#define RC_HEIGHT 48 -#define RC_HELP 49 -#define RC_HISTORY 50 -#define RC_INFO 51 -#define RC_KANJI 52 -#define RC_KILL 53 -#define RC_LASTMSG 54 -#define RC_LICENSE 55 -#define RC_LOCKSCREEN 56 -#define RC_LOG 57 -#define RC_LOGDIR 58 -#define RC_LOGIN 59 -#define RC_MAPDEFAULT 60 -#define RC_MAPNOTNEXT 61 -#define RC_MAPTIMEOUT 62 -#define RC_MARKKEYS 63 -#define RC_META 64 -#define RC_MONITOR 65 -#define RC_MSGMINWAIT 66 -#define RC_MSGWAIT 67 -#define RC_MULTIUSER 68 -#define RC_NETHACK 69 -#define RC_NEXT 70 -#define RC_NUMBER 71 -#define RC_OBUFLIMIT 72 -#define RC_OTHER 73 -#define RC_PARTIAL 74 -#define RC_PASSWORD 75 -#define RC_PASTE 76 -#define RC_PASTEFONT 77 -#define RC_POW_BREAK 78 -#define RC_POW_DETACH 79 -#define RC_POW_DETACH_MSG 80 -#define RC_PREV 81 -#define RC_PRINTCMD 82 -#define RC_PROCESS 83 -#define RC_QUIT 84 -#define RC_READBUF 85 -#define RC_READREG 86 -#define RC_REDISPLAY 87 -#define RC_REGISTER 88 -#define RC_REMOVEBUF 89 -#define RC_RESET 90 -#define RC_SCREEN 91 -#define RC_SCROLLBACK 92 -#define RC_SELECT 93 -#define RC_SESSIONNAME 94 -#define RC_SETENV 95 -#define RC_SHELL 96 -#define RC_SHELLAKA 97 -#define RC_SHELLTITLE 98 -#define RC_SILENCE 99 -#define RC_SILENCEWAIT 100 -#define RC_SLEEP 101 -#define RC_SLOWPASTE 102 -#define RC_STARTUP_MESSAGE 103 -#define RC_STUFF 104 -#define RC_SUSPEND 105 -#define RC_TERM 106 -#define RC_TERMCAP 107 -#define RC_TERMINFO 108 -#define RC_TIME 109 -#define RC_TITLE 110 -#define RC_UNSETENV 111 -#define RC_VBELL 112 -#define RC_VBELL_MSG 113 -#define RC_VBELLWAIT 114 -#define RC_VERSION 115 -#define RC_WALL 116 -#define RC_WIDTH 117 -#define RC_WINDOWS 118 -#define RC_WRAP 119 -#define RC_WRITEBUF 120 -#define RC_WRITELOCK 121 -#define RC_XOFF 122 -#define RC_XON 123 -#define RC_ZOMBIE 124 +#define RC_DEFC1 27 +#define RC_DEFESCAPE 28 +#define RC_DEFFLOW 29 +#define RC_DEFGR 30 +#define RC_DEFKANJI 31 +#define RC_DEFLOGIN 32 +#define RC_DEFMODE 33 +#define RC_DEFMONITOR 34 +#define RC_DEFOBUFLIMIT 35 +#define RC_DEFSCROLLBACK 36 +#define RC_DEFWRAP 37 +#define RC_DEFWRITELOCK 38 +#define RC_DETACH 39 +#define RC_DISPLAYS 40 +#define RC_DUMPTERMCAP 41 +#define RC_ECHO 42 +#define RC_ESCAPE 43 +#define RC_EXEC 44 +#define RC_FLOW 45 +#define RC_GR 46 +#define RC_HARDCOPY 47 +#define RC_HARDCOPY_APPEND 48 +#define RC_HARDCOPYDIR 49 +#define RC_HARDSTATUS 50 +#define RC_HEIGHT 51 +#define RC_HELP 52 +#define RC_HISTORY 53 +#define RC_INFO 54 +#define RC_KANJI 55 +#define RC_KILL 56 +#define RC_LASTMSG 57 +#define RC_LICENSE 58 +#define RC_LOCKSCREEN 59 +#define RC_LOG 60 +#define RC_LOGDIR 61 +#define RC_LOGIN 62 +#define RC_MAPDEFAULT 63 +#define RC_MAPNOTNEXT 64 +#define RC_MAPTIMEOUT 65 +#define RC_MARKKEYS 66 +#define RC_META 67 +#define RC_MONITOR 68 +#define RC_MSGMINWAIT 69 +#define RC_MSGWAIT 70 +#define RC_MULTIUSER 71 +#define RC_NETHACK 72 +#define RC_NEXT 73 +#define RC_NUMBER 74 +#define RC_OBUFLIMIT 75 +#define RC_OTHER 76 +#define RC_PARTIAL 77 +#define RC_PASSWORD 78 +#define RC_PASTE 79 +#define RC_PASTEFONT 80 +#define RC_POW_BREAK 81 +#define RC_POW_DETACH 82 +#define RC_POW_DETACH_MSG 83 +#define RC_PREV 84 +#define RC_PRINTCMD 85 +#define RC_PROCESS 86 +#define RC_QUIT 87 +#define RC_READBUF 88 +#define RC_READREG 89 +#define RC_REDISPLAY 90 +#define RC_REGISTER 91 +#define RC_REMOVEBUF 92 +#define RC_RESET 93 +#define RC_SCREEN 94 +#define RC_SCROLLBACK 95 +#define RC_SELECT 96 +#define RC_SESSIONNAME 97 +#define RC_SETENV 98 +#define RC_SHELL 99 +#define RC_SHELLAKA 100 +#define RC_SHELLTITLE 101 +#define RC_SILENCE 102 +#define RC_SILENCEWAIT 103 +#define RC_SLEEP 104 +#define RC_SLOWPASTE 105 +#define RC_STARTUP_MESSAGE 106 +#define RC_STUFF 107 +#define RC_SUSPEND 108 +#define RC_TERM 109 +#define RC_TERMCAP 110 +#define RC_TERMINFO 111 +#define RC_TIME 112 +#define RC_TITLE 113 +#define RC_UNSETENV 114 +#define RC_VBELL 115 +#define RC_VBELL_MSG 116 +#define RC_VBELLWAIT 117 +#define RC_VERSION 118 +#define RC_WALL 119 +#define RC_WIDTH 120 +#define RC_WINDOWS 121 +#define RC_WRAP 122 +#define RC_WRITEBUF 123 +#define RC_WRITELOCK 124 +#define RC_XOFF 125 +#define RC_XON 126 +#define RC_ZOMBIE 127 -#define RC_LAST 124 +#define RC_LAST 127 diff -Nur ../screen-3.6.1/comm.sh ./comm.sh --- ../screen-3.6.1/comm.sh Thu Jan 20 19:59:36 1994 +++ ./comm.sh Sun Mar 19 16:02:38 1995 @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh if test -z "$AWK"; then AWK=awk diff -Nur ../screen-3.6.1/config.h.in ./config.h.in --- ../screen-3.6.1/config.h.in Mon Jan 16 15:59:19 1995 +++ ./config.h.in Tue Apr 4 01:20:19 1995 @@ -197,6 +197,14 @@ #undef OSX #endif +#ifndef ISC +#undef ISC +#endif + +#ifndef _POSIX_SOURCE +#undef _POSIX_SOURCE +#endif + /* * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX). */ diff -Nur ../screen-3.6.1/configure ./configure --- ../screen-3.6.1/configure Thu Jan 5 21:57:09 1995 +++ ./configure Tue Feb 7 00:07:33 1995 @@ -992,7 +992,7 @@ int main() { return 0; } int t() { -#if defined(linux) || defined(NeXT) || defined(ultrix) || (defined(sun) && defined(SVR4)) +#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) seteuid_is_broken(0); #else seteuid(0); @@ -1636,19 +1636,18 @@ if (!(x = ttyname(0))) exit(1); if (stat(x, &sb)) exit(1); om = sb.st_mode; - if (chmod(x, om | 002)) exit(1); + if (om & 002) exit(0); m = system("mesg y"); if (m == -1 || m == 127) exit(1); if (stat(x, &sb)) exit(1); m = sb.st_mode; if (chmod(x, om)) exit(1); - if (!(m & 002)) - { - if (!(fp=fopen("conftest_grp", "w"))) - exit(1); - fprintf(fp, "%d\n", sb.st_gid); - fclose(fp); - } + if (m & 002) exit(0); + if (sb.st_gid == getgid()) exit(1); + if (!(fp=fopen("conftest_grp", "w"))) + exit(1); + fprintf(fp, "%d\n", sb.st_gid); + fclose(fp); exit(0); } @@ -1976,7 +1975,7 @@ main() { -#ifndef _AUX_SOURCE +#if !defined(_AUX_SOURCE) && !defined(AUX) # ifdef NLIST_NAME_UNION nl[0].n_un.n_name = "$av"; # else @@ -2027,9 +2026,9 @@ _CUT_HERE_ -#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(__alpha) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(m88k)) +#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(__alpha) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) loadtype=long -# if defined(apollo) || defined(_IBMR2) ||defined(_AUX_SOURCE) +# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) loadscale=65536 # else # if defined(FSCALE) && !defined(__osf__) @@ -2059,7 +2058,7 @@ #endif EOF -eval "$CPP $DEFS conftest.c 2>/dev/null | sed -e '1,/_CUT_HERE_/d' > conftest.out" +$CPP $DEFS conftest.c 2>/dev/null | sed -e '1,/_CUT_HERE_/d' > conftest.out . ./conftest.out rm -f conftest* diff -Nur ../screen-3.6.1/configure.in ./configure.in --- ../screen-3.6.1/configure.in Thu Jan 5 21:57:35 1995 +++ ./configure.in Tue Feb 7 00:06:32 1995 @@ -18,7 +18,7 @@ _CUT_HERE_ [$2] EOF -eval "$CPP $DEFS conftest.c 2>/dev/null | sed -e '1,/_CUT_HERE_/d' > conftest.out" +$CPP $DEFS conftest.c 2>/dev/null | sed -e '1,/_CUT_HERE_/d' > conftest.out . ./conftest.out rm -f conftest* ])dnl @@ -195,11 +195,11 @@ dnl dnl seteuid() check: dnl linux seteuid was broken before V1.1.11 -dnl NeXT and ultrix are still broken (no saved uid support) +dnl NeXT, AUX and ultrix are still broken (no saved uid support) dnl Solaris seteuid doesn't change the saved uid, bad for dnl multiuser screen sessions AC_COMPILE_CHECK(seteuid, , [ -#if defined(linux) || defined(NeXT) || defined(ultrix) || (defined(sun) && defined(SVR4)) +#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) seteuid_is_broken(0); #else seteuid(0); @@ -587,19 +587,18 @@ if (!(x = ttyname(0))) exit(1); if (stat(x, &sb)) exit(1); om = sb.st_mode; - if (chmod(x, om | 002)) exit(1); + if (om & 002) exit(0); m = system("mesg y"); if (m == -1 || m == 127) exit(1); if (stat(x, &sb)) exit(1); m = sb.st_mode; if (chmod(x, om)) exit(1); - if (!(m & 002)) - { - if (!(fp=fopen("conftest_grp", "w"))) - exit(1); - fprintf(fp, "%d\n", sb.st_gid); - fclose(fp); - } + if (m & 002) exit(0); + if (sb.st_gid == getgid()) exit(1); + if (!(fp=fopen("conftest_grp", "w"))) + exit(1); + fprintf(fp, "%d\n", sb.st_gid); + fclose(fp); exit(0); } ],[ @@ -715,7 +714,7 @@ main() { -#ifndef _AUX_SOURCE +#if !defined(_AUX_SOURCE) && !defined(AUX) # ifdef NLIST_NAME_UNION nl[0].n_un.n_name = "$av"; # else @@ -745,9 +744,9 @@ #include #include ],[ -#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(__alpha) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(m88k)) +#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(__alpha) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) loadtype=long -# if defined(apollo) || defined(_IBMR2) ||defined(_AUX_SOURCE) +# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) loadscale=65536 # else # if defined(FSCALE) && !defined(__osf__) diff -Nur ../screen-3.6.1/display.c ./display.c --- ../screen-3.6.1/display.c Sun Jan 15 23:53:49 1995 +++ ./display.c Sat Apr 1 14:12:06 1995 @@ -359,6 +359,10 @@ ResizeDisplay(D_defwidth, D_defheight); DefRestore(); SetAttrFont(0, ASCII); +#ifdef MAPKEYS + PutStr(D_KE); + PutStr(D_CCE); +#endif if (D_hstatus) PutStr(D_DS); D_x = D_y = -1; diff -Nur ../screen-3.6.1/doc/Makefile.in ./doc/Makefile.in --- ../screen-3.6.1/doc/Makefile.in Mon Jan 16 15:59:26 1995 +++ ./doc/Makefile.in Tue Apr 4 01:20:24 1995 @@ -14,7 +14,7 @@ SHELL = /bin/sh -all: info +all: screen.info dvi screen.dvi: screen.texinfo mostlyclean $(TEXI2DVI) $(srcdir)/screen.texinfo @@ -28,7 +28,7 @@ -if test -f screen.info; then d=.; else d=$(srcdir); fi; \ if test -f $$d/screen.info; then \ for f in $$d/screen.info*; do $(INSTALL_DATA) -c $$f $(infodir)/$$f;done; \ - if install-info --version >/dev/null 2>&1; then \ + if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ install-info --infodir=$(infodir) $$d/screen.info; \ else true; fi; \ fi @@ -44,8 +44,10 @@ -rm -f *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.tp *.vr -rm -f *.log *.aux *.toc *~ -clean distclean realclean clobber: mostlyclean +clean distclean clobber: mostlyclean -rm -f *.dvi + +realclean: clean -rm -f *.info* check installcheck: diff -Nur ../screen-3.6.1/doc/install.sh ./doc/install.sh --- ../screen-3.6.1/doc/install.sh Fri May 6 12:18:38 1994 +++ ./doc/install.sh Sun Mar 19 16:02:43 1995 @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # # install - install a program, script, or datafile diff -Nur ../screen-3.6.1/doc/screen.1 ./doc/screen.1 --- ../screen-3.6.1/doc/screen.1 Mon Jan 16 15:54:46 1995 +++ ./doc/screen.1 Tue Apr 4 00:04:54 1995 @@ -834,7 +834,8 @@ the input characters between 128 and 159 as control functions. Such an 8-bit code is normally the same as ESC followed by the corresponding 7-bit code. The default setting is to process c1 -codes. Users with fonts that have usable characters in the +codes and can be changed with the \*Qdefc1\*U command. +Users with fonts that have usable characters in the c1 positions may want to turn this off. .sp .ne 3 @@ -1068,10 +1069,16 @@ \*QSCREEN\*U process. .sp .ne 3 +.BR "defc1 on" | off +.PP +Same as the \fBc1\fP command except that the default setting for new +windows is changed. Initial setting is `on'. +.sp +.ne 3 .BR "defautonuke on" | off .PP Same as the \fBautonuke\fP command except that the default setting for new displays is changed. Initial setting is `off'. -Note that you can use the special 'AN' terminal capability if you +Note that you can use the special `AN' terminal capability if you want to have a dependency on the terminal type. .sp .ne 3 @@ -1095,6 +1102,18 @@ .BR \-i . .sp .ne 3 +.BR "defgr on" | off +.PP +Same as the \fBgr\fP command except that the default setting for new +windows is changed. Initial setting is `off'. +.sp +.ne 3 +.BR "defkanji jis" | sjis | euc +.PP +Same as the \fBkanji\fP command except that the default setting for new +windows is changed. Initial setting is `off', i.e. `jis'. +.sp +.ne 3 .BR "deflogin on" | off .PP Same as the \fBlogin\fP command except that the default setting for new windows @@ -1140,6 +1159,12 @@ windows is changed. Initially writelocks will operate in automatic mode. .sp .ne 3 +.BR "defzombie " [\fIkeys\fP] +.PP +Synonym to the \fBzombie\fP command. Both currently change the default. +See there. +.sp +.ne 3 .B detach .PP Detach the @@ -1288,8 +1313,8 @@ Turn GR charset switching on/off. Whenever screens sees an input char with an 8th bit set, it will use the charset stored in the GR slot and print the character with the 8th bit stripped. The -default is not to process GR switching because otherwise the -ISO88591 charset would not work. +default (see also \*Qdefgr\*U) is not to process GR switching because +otherwise the ISO88591 charset would not work. .sp .ne 3 .B hardcopy @@ -1389,7 +1414,10 @@ sets the kanji type of the current window. Each window can emulate a different type. The optional second parameter tells screen how to write the kanji codes to the connected terminal. The preferred -method of setting this is to use the \*QKJ\*U termcap entry. +method of setting the display type is to use the \*QKJ\*U termcap +entry. +See also \*Qdefkanji\*U, which changes the default setting of a new +window. .sp .ne 3 .B kill @@ -2137,14 +2165,25 @@ current window. .sp .ne 3 -.BR "zombie " [\fIkey\fP] +.BR "zombie " [\fIkeys\fP] +.br +.BR "defzombie " [\fIkeys\fP] .PP Per default .I screen windows are removed from the window list as soon as -the window's process (e.g. shell) exits. When a key is specified to the -zombie command a `dead' windows will remain in the list until it is selected -and this key is pressed or the \*Qkill\*U command is issued. +the windows process (e.g. shell) exits. When a string of two keys is +specified to the zombie command, `dead' windows will remain in the list. +The \fBkill\fP kommand may be used to remove such a window. Pressing the +first key in the dead window has the same effect. When pressing the second +key, screen will attempt to resurrect the window. The process that was +initially running in the window will be launched again. Calling \fBzombie\fP +without parameters will clear the zombie setting, thus making windows disappear +when their process exits. + +As the zombie-setting is manipulated globally for all windows, this command +should only be called \fBdefzombie\fP. Until we need this as a per window +setting, the commands \fBzombie\fP and \fBdefzombie\fP are synonymous. .SH "THE MESSAGE LINE" .I Screen @@ -2734,6 +2773,9 @@ .TP 27 .B "ESC [ c" Send VT100 Identification String +.TP 27 +.B "ESC [ > c" +Send VT220 Secondary Device Attributes String .TP 27 .B "ESC [ 6 n" Send Cursor Position Report diff -Nur ../screen-3.6.1/doc/screen.texinfo ./doc/screen.texinfo --- ../screen-3.6.1/doc/screen.texinfo Wed Dec 14 01:36:33 1994 +++ ./doc/screen.texinfo Tue Apr 4 00:14:12 1995 @@ -710,7 +710,7 @@ @item bufferfile @var{[exchange-file]} Select a file for screen-exchange. @xref{Screen-Exchange}. @item c1 @var{[state]} -Change c1 code processing. @xref{Character Processing} +Change c1 code processing. @xref{Character Processing}. @item chdir @var{[directory]} Change the current directory for future windows. @xref{Chdir}. @item clear @@ -731,10 +731,16 @@ Suppress/allow debugging output. @xref{Debug}. @item defautonuke @var{state} Select default autonuke behavior. @xref{Autonuke}. +@item defc1 @var{state} +Select default c1 processing behavior. @xref{Character Processing}. @item defescape @var{xy} Set the default command and @code{meta} characters. @xref{Command Character}. @item defflow @var{fstate} Select default flow control behavior. @xref{Flow}. +@item defgr @var{state} +Select default GR processing behavior. @xref{Character Processing}. +@item defkanji @var{wtype} +Select default GR processing behavior. @xref{Character Processing}. @item deflogin @var{state} Select default utmp logging behavior. @xref{Login}. @item defmode @var{mode} @@ -749,6 +755,8 @@ Set default line-wrapping behavior. @xref{Wrap}. @item defwritelock @var{on|off|auto} Set default writelock behavior. @xref{Multiuser}. +@item defzombie @var{[keys]} +Keep dead windows. @xref{Zombie}. @item detach Disconnect @code{screen} from the terminal. @xref{Detach}. @item dumptermcap @@ -923,7 +931,7 @@ Send an XOFF character. @xref{XON/XOFF}. @item xon Send an XON character. @xref{XON/XOFF}. -@item zombie @var{[key]} +@item zombie @var{[keys]} Keep dead windows. @xref{Zombie}. @end table @@ -1785,7 +1793,9 @@ ESC [ 8 ; Ph ; Pw t Resize the window to @samp{Ph} lines and @samp{Pw} columns (SunView special) ESC [ c Send VT100 Identification String +ESC [ > c Send Secondary Device Attributes String ESC [ 6 n Send Cursor Position Report + @end example @@ -2046,7 +2056,8 @@ the input characters between 128 and 159 as control functions. Such an 8-bit code is normally the same as ESC followed by the corresponding 7-bit code. The default setting is to process c1 -codes. Users with fonts that have usable characters in the +codes and can be changed with the @samp{defc1} command. +Users with fonts that have usable characters in the c1 positions may want to turn this off. @end deffn @@ -2055,8 +2066,8 @@ Turn GR charset switching on/off. Whenever screens sees an input char with an 8th bit set, it will use the charset stored in the GR slot and print the character with the 8th bit stripped. The -default is not to process GR switching because otherwise the -ISO88591 charset would not work. +default (see also @samp{defgr}) is not to process GR switching because +otherwise the ISO88591 charset would not work. @end deffn @deffn Command kanji wtype [dtype] @@ -2066,8 +2077,28 @@ @samp{sjis}. The first argument sets the kanji type of the current window. Each window can emulate a different type. The optional second parameter tells screen how to write the kanji codes to the -connected terminal. The preferred method of setting this is to -use the @samp{KJ} termcap entry. @xref{Special Capabilities} +connected terminal. The preferred method of setting the display type +is to use the @samp{KJ} termcap entry. @xref{Special Capabilities}. +See also @samp{defkanji}, which changes the default setting of a new +window. +@end deffn + +@deffn Command defc1 state +(none)@* +Same as the @samp{c1} command except that the default setting for +new windows is changed. Initial setting is @samp{on}. +@end deffn + +@deffn Command defgr state +(none)@* +Same as the @samp{gr} command except that the default setting for +new windows is changed. Initial setting is @samp{off}. +@end deffn + +@deffn Command defkanji wtype +(none)@* +Same as the @samp{kanji} command except that the default setting for +new windows is changed. Initial setting is @samp{off}, i.e. @samp{jis}. @end deffn @node Copy and Paste, Subprocess Execution, Virtual Terminal, Top @@ -3435,12 +3466,22 @@ @node Zombie, Printcmd, Version, Miscellaneous @section Zombie -@deffn Command zombie @var{[key]} +@deffn Command zombie @var{[keyx]} +@deffnx Command defzombie @var{[keyx]} (none)@* Per default windows are removed from the window list as soon as the -window's process (e.g. shell) exits. When a key is specified to the -zombie command a `dead' windows will remain in the list until it is selected -and this key is pressed or the @code{kill} command is issued. +windows process (e.g. shell) exits. When a string of two keys is +specified to the zombie command, `dead' windows will remain in the list. +The @code{kill} kommand may be used to remove the window. Pressing the first key +in the dead window has the same effect. Pressing the second key, however, +screen will attempt to resurrect the window. The process that was initially +running in the window will be launched again. Calling @code{zombie} without +parameters will clear the zombie setting, thus making windows disappear when +the process terminates. + +As the zombie setting is affected globally for all windows, this command +should only be called @code{defzombie}. Until we need this as a per window +setting, the commands @code{zombie} and @code{defzombie} are synonymous. @end deffn @node Printcmd, , Zombie, Miscellaneous @@ -3791,7 +3832,7 @@ This is a list of the default key bindings. -The leading escape character (@xref{Command Character}) has been omitted +The leading escape character (@pxref{Command Character}) has been omitted from the key sequences, since it is the same for all bindings. @printindex ky diff -Nur ../screen-3.6.1/etc/etcscreenrc ./etc/etcscreenrc --- ../screen-3.6.1/etc/etcscreenrc Mon Jan 16 15:59:25 1995 +++ ./etc/etcscreenrc Tue Apr 4 01:20:23 1995 @@ -59,15 +59,22 @@ #xterm understands both im/ic and doesn't have a status line. #Note: Do not specify im and ic in the real termcap/info file as -#some programs (e.g. vi) will not work anymore. +#some programs (e.g. vi) will (no,no, may (jw)) not work anymore. termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l +# Long time I had this in my private screenrc file. But many people +# seem to want it (jw): +# we do not want the width to change to 80 characters on startup: +# on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l: +termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' +terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + # # Do not use xterms alternate window buffer. # This one would not add lines to the scrollback buffer. -#termcap xterm|xterms|xs ti=\E7\E[?47l -#terminfo xterm|xterms|xs ti=\E7\E[?47l +termcap xterm|xterms|xs ti=\E7\E[?47l +terminfo xterm|xterms|xs ti=\E7\E[?47l # xs is xterm's two letter name. # story ... in earlier versions I used xterms here ... buggy sequent termcap diff -Nur ../screen-3.6.1/etc/screenrc ./etc/screenrc --- ../screen-3.6.1/etc/screenrc Mon Jan 16 15:59:26 1995 +++ ./etc/screenrc Tue Apr 4 01:20:23 1995 @@ -75,3 +75,5 @@ termcap * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' terminfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' +# make the shell in every window a login shell +#shell -$SHELL diff -Nur ../screen-3.6.1/extern.h ./extern.h --- ../screen-3.6.1/extern.h Fri Nov 25 00:07:30 1994 +++ ./extern.h Sun Apr 2 23:03:55 1995 @@ -50,6 +50,7 @@ /* ansi.c */ extern void Activate __P((int)); extern void ResetWindow __P((struct win *)); +extern void ResetCharsets __P((struct win *)); extern void WriteString __P((struct win *, char *, int)); extern void NewAutoFlow __P((struct win *, int)); extern void Redisplay __P((int)); @@ -109,6 +110,7 @@ /* window.c */ extern int MakeWindow __P((struct NewWindow *)); +extern int RemakeWindow __P((struct win *)); extern void FreeWindow __P((struct win *)); #ifdef PSEUDOS extern int winexec __P((char **)); diff -Nur ../screen-3.6.1/fileio.c ./fileio.c --- ../screen-3.6.1/fileio.c Mon Jan 16 00:40:21 1995 +++ ./fileio.c Sun Apr 2 22:41:13 1995 @@ -705,7 +705,7 @@ errno = EACCES; UserReturn(errno); } - if (q = UserStatus()) + if ((q = UserStatus())) { if (q > 0) errno = q; diff -Nur ../screen-3.6.1/help.c ./help.c --- ../screen-3.6.1/help.c Fri Nov 25 00:07:44 1994 +++ ./help.c Wed Mar 15 01:25:11 1995 @@ -53,7 +53,7 @@ printf("-f Flow control on, -fn = off, -fa = auto.\n"); printf("-h lines Set the size of the scrollback history buffer.\n"); printf("-i Interrupt output sooner when flow control is on.\n"); -#ifdef LOGOUTOK +#if defined(LOGOUTOK) && defined(UTMPOK) printf("-l Login mode on (update %s), -ln = off.\n", UTMPFILE); #endif printf("-list or -ls. Do nothing, just list our SockDir.\n"); diff -Nur ../screen-3.6.1/input.c ./input.c --- ../screen-3.6.1/input.c Tue May 31 14:32:08 1994 +++ ./input.c Thu Mar 30 22:53:24 1995 @@ -102,6 +102,11 @@ int maxlen; struct inpdata *inpdata; + if (!display) + { + Msg(0, "Input: cannot interact with user w/o display. Try other form of command\n"); + return; + } if (len > 100) len = 100; if (!(mode & INP_NOECHO)) diff -Nur ../screen-3.6.1/install.sh ./install.sh --- ../screen-3.6.1/install.sh Fri May 6 12:18:38 1994 +++ ./install.sh Sun Mar 19 16:02:43 1995 @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # # install - install a program, script, or datafile diff -Nur ../screen-3.6.1/kmapdef.c.dist ./kmapdef.c.dist --- ../screen-3.6.1/kmapdef.c.dist Mon Jan 16 00:13:57 1995 +++ ./kmapdef.c.dist Sat Apr 1 23:35:17 1995 @@ -18,8 +18,8 @@ "\033[19~", "\033[20~", "\033[21~", -"\033[22~", "\033[23~", +"\033[24~", "\010", "\033[1~", 0, diff -Nur ../screen-3.6.1/loadav.c ./loadav.c --- ../screen-3.6.1/loadav.c Mon Dec 5 23:09:02 1994 +++ ./loadav.c Mon Jan 30 20:21:05 1995 @@ -178,7 +178,7 @@ debug("Init Kmem...\n"); if ((kmemf = open("/dev/kmem", O_RDONLY)) == -1) return; -# ifndef _AUX_SOURCE +# if !defined(_AUX_SOURCE) && !defined(AUX) # ifdef NLIST_NAME_UNION nl[0].n_un.n_name = LOADAV_AVENRUN; # else diff -Nur ../screen-3.6.1/mark.c ./mark.c --- ../screen-3.6.1/mark.c Thu Jan 5 21:51:56 1995 +++ ./mark.c Wed Jan 25 17:52:50 1995 @@ -245,8 +245,8 @@ #ifdef KANJI if (badkanji(fWIN(i), j)) j--; - font = ASCII; #endif + font = ASCII; for (im = iWIN(i)+j, fo = fWIN(i)+j; j <= to; j++) { cf = *fo++; diff -Nur ../screen-3.6.1/os.h ./os.h --- ../screen-3.6.1/os.h Sun Dec 4 00:37:06 1994 +++ ./os.h Tue Feb 14 16:07:43 1995 @@ -114,11 +114,11 @@ #endif #ifndef USEBCOPY -# ifdef USEMEMCPY -# define bcopy(s,d,len) memcpy(d,s,len) +# ifdef USEMEMMOVE +# define bcopy(s,d,len) memmove(d,s,len) # else -# ifdef USEMEMMOVE -# define bcopy(s,d,len) memmove(d,s,len) +# ifdef USEMEMCPY +# define bcopy(s,d,len) memcpy(d,s,len) # else # define NEED_OWN_BCOPY # define bcopy xbcopy @@ -295,16 +295,16 @@ #endif #if defined(S_IFIFO) && defined(S_IFMT) && !defined(S_ISFIFO) -#define S_ISFIFO(mode) ((mode & S_IFMT) == S_IFIFO) +#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) #endif #if defined(S_IFSOCK) && defined(S_IFMT) && !defined(S_ISSOCK) -#define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) +#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) #endif #if defined(S_IFCHR) && defined(S_IFMT) && !defined(S_ISCHR) -#define S_ISCHR(mode) ((mode & S_IFMT) == S_IFCHR) +#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) #endif #if defined(S_IFDIR) && defined(S_IFMT) && !defined(S_ISDIR) -#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #endif #if !defined(O_NONBLOCK) && defined(O_NDELAY) diff -Nur ../screen-3.6.1/osdef.sh ./osdef.sh --- ../screen-3.6.1/osdef.sh Wed Jun 29 20:31:19 1994 +++ ./osdef.sh Sun Mar 19 16:02:46 1995 @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh if test -z "$CC"; then CC=cc diff -Nur ../screen-3.6.1/patchlevel.h ./patchlevel.h --- ../screen-3.6.1/patchlevel.h Mon Jan 16 01:04:13 1995 +++ ./patchlevel.h Tue Apr 4 00:00:11 1995 @@ -177,12 +177,22 @@ * Use \r (not \n) to join lines in pastebuf. * bindkey can now remove sequences. * InitTTY fixed for PLAIN. -- DISTRIBUTED - * + * 04.04.95 -- 3.06.02 Simple ESC-CR fix in the vt100 state machine. + * Now compiles again with all extras disabled. + * Zombie resurrect added. defc1, defgr, defkanji + * added. Screen now replies to a secondary DA + * query. Some missing NEED_XXX added in comm.c. + * Better default tty permissions/group test. + * More AUX support, now compiles with POSIX. + * Function keycodes xtermified (F11, F12). + * Paste bug fixed (only worked with KANJI). + * Check bcopy before memcpy/memmove. + * FindSocket code much fixed & improved. */ #define ORIGIN "FAU" #define REV 3 #define VERS 6 -#define PATCHLEVEL 1 -#define DATE "16-Jan-95" +#define PATCHLEVEL 2 +#define DATE "4-Apr-95" #define STATE "" diff -Nur ../screen-3.6.1/process.c ./process.c --- ../screen-3.6.1/process.c Mon Jan 16 00:10:39 1995 +++ ./process.c Mon Apr 3 23:34:20 1995 @@ -59,7 +59,8 @@ extern char *printcmd; extern int default_startup; extern int slowpaste, defobuflimit; -extern int ZombieKey; +extern int ZombieKey_destroy; +extern int ZombieKey_resurrect; #ifdef AUTO_NUKE extern int defautonuke; #endif @@ -142,9 +143,7 @@ #endif -struct win *wtab[MAXWIN]; /* window table */ -struct action ktab[256]; /* command key translation table */ - +struct win *wtab[MAXWIN]; /* window table, should be dynamic */ #ifdef MULTIUSER extern char *multi; @@ -156,14 +155,16 @@ struct plop plop_tab[MAX_PLOP_DEFS]; -#ifdef PTYMODE -int TtyMode = PTYMODE; -#else -int TtyMode = 0622; +#ifndef PTYMODE +# define PTYMODE 0622 #endif + +int TtyMode = PTYMODE; int hardcopy_append = 0; int all_norefresh = 0; +struct action ktab[256]; /* command key translation table */ + #ifdef MAPKEYS struct action umtab[KMAP_KEYS+KMAP_AKEYS+KMAP_EXT]; struct action dmtab[KMAP_KEYS+KMAP_AKEYS+KMAP_EXT]; @@ -365,6 +366,7 @@ } #endif + void ProcessInput(ibuf, ilen) char *ibuf; @@ -444,8 +446,10 @@ debug1(" - action %d\n", i); fore = D_fore; act = 0; +#ifdef COPY_PASTE if (InMark()) act = &mmtab[i]; +#endif if ((!act || act->nr == RC_ILLEGAL) && !D_mapdefault) act = &umtab[i]; D_mapdefault = 0; @@ -749,18 +753,26 @@ #endif break; case RC_ZOMBIE: - if (!(s = *args)) - { - ZombieKey = 0; - break; - } - if (!(s = ParseChar(s, &ch)) || *s) - { - Msg(0, "%s:zombie: one character expected.", rc_name); - break; - } - ZombieKey = ch; - break; + { + char ch2 = 0; + + if (!(s = *args)) + { + ZombieKey_destroy = 0; + break; + } + if (!(s = ParseChar(s, &ch)) || *s) + { + if (!s || !(s = ParseChar(s, &ch2)) || *s) + { + Msg(0, "%s:zombie: one or two characters expected.", rc_name); + break; + } + } + ZombieKey_destroy = ch; + ZombieKey_resurrect = ch2; + break; + } case RC_WALL: for (n = 0, s = *args; args[n]; n++) { @@ -799,8 +811,7 @@ struct display *nd; struct user *u; - args[0][n] = '\0'; - if (!*args[0]) + if (!n) u = D_user; else for (u = users; u; u = u->u_next) @@ -831,7 +842,6 @@ { struct display *nd; - args[0][n] = '\0'; debug1("at display matching '%s'\n", args[0]); for (display = displays; display; display = nd) { @@ -855,15 +865,19 @@ return; } case '#': - args[0][n--] = '\0'; + n--; /* FALLTHROUGH */ default: { struct win *nw; + int ch; n++; + ch = args[0][n]; + args[0][n] = '\0'; if (!*args[0] || (i = WindowByNumber(args[0])) < 0) { + args[0][n] = ch; /* must restore string in case of bind */ /* try looping over titles */ for (fore = windows; fore; fore = nw) { @@ -895,6 +909,7 @@ } else if (i < MAXWIN && (fore = wtab[i])) { + args[0][n] = ch; /* must restore string in case of bind */ debug2("AT window %d (%s)\n", fore->w_number, fore->w_title); if (fore->w_display) display = fore->w_display; @@ -1572,6 +1587,12 @@ case RC_DEFWRAP: (void)ParseOnOff(act, &nwin_default.wrap); break; + case RC_DEFC1: + (void)ParseOnOff(act, &nwin_default.c1); + break; + case RC_DEFGR: + (void)ParseOnOff(act, &nwin_default.gr); + break; case RC_DEFMONITOR: if (ParseOnOff(act, &n) == 0) nwin_default.monitor = (n == 0) ? MON_OFF : MON_ON; @@ -2138,7 +2159,7 @@ { if (args[i] == 0) break; - if (strcmp(args[i], "jis") == 0) + if (strcmp(args[i], "jis") == 0 || strcmp(args[i], "off") == 0) n = 0; else if (strcmp(args[i], "euc") == 0) n = EUC; @@ -2155,35 +2176,21 @@ D_kanji = n; } if (fore) + ResetCharsets(fore); + break; + case RC_DEFKANJI: + if (strcmp(*args, "jis") == 0 || strcmp(*args, "off") == 0) + n = 0; + else if (strcmp(*args, "euc") == 0) + n = EUC; + else if (strcmp(*args, "sjis") == 0) + n = SJIS; + else { - switch(fore->w_kanji) - { - case 0: - case SJIS: - fore->w_charsets[0] = ASCII; - fore->w_charsets[1] = KANA; - fore->w_charsets[2] = ASCII; - fore->w_Charset = 0; - fore->w_CharsetR = 1; - fore->w_gr = 1; - fore->w_c1 = 0; - break; - case EUC: - fore->w_charsets[0] = ASCII; - fore->w_charsets[1] = KANJI; - fore->w_charsets[2] = KANA; - fore->w_Charset = 0; - fore->w_CharsetR = 1; - fore->w_gr = 1; - fore->w_c1 = 1; - break; - default: - break; - } - fore->w_ss = 0; - fore->w_Font = fore->w_charsets[fore->w_Charset]; - fore->w_FontR = fore->w_charsets[fore->w_CharsetR]; + Msg(0, "defkanji: illegal argument (%s)", *args); + break; } + nwin_default.kanji = n; break; #endif case RC_PRINTCMD: diff -Nur ../screen-3.6.1/screen.c ./screen.c --- ../screen-3.6.1/screen.c Tue Dec 20 22:23:20 1994 +++ ./screen.c Sun Apr 2 22:41:10 1995 @@ -62,6 +62,10 @@ # include #endif /* ISC */ +#if (defined(AUX) || defined(_AUX_SOURCE)) && defined(POSIX) +# include +#endif + #include "screen.h" #include "patchlevel.h" @@ -117,6 +121,7 @@ extern char Password[]; #endif +int nversion; /* numerical version, used for secondary DA */ /* the attacher */ struct passwd *ppp; @@ -167,7 +172,7 @@ int real_uid, real_gid, eff_uid, eff_gid; int default_startup; int slowpaste; -int ZombieKey; +int ZombieKey_destroy, ZombieKey_resurrect; #ifdef NETHACK int nethackflag = 0; @@ -336,6 +341,10 @@ char *sockp; #endif +#if (defined(AUX) || defined(_AUX_SOURCE)) && defined(POSIX) + setcompat(COMPAT_POSIX|COMPAT_BSDPROT); /* turn on seteuid support */ +#endif + /* * First, close all unused descriptors * (otherwise, we might have problems with the select() call) @@ -355,6 +364,7 @@ #endif sprintf(version, "%d.%.2d.%.2d%s (%s) %s", REV, VERS, PATCHLEVEL, STATE, ORIGIN, DATE); + nversion = REV * 10000 + VERS * 100 + PATCHLEVEL; debug2("-- screen debug started %s (%s)\n", *av, version); #ifdef POSIX debug("POSIX\n"); @@ -1755,7 +1765,7 @@ WindowDied(p) struct win *p; { - if (ZombieKey) + if (ZombieKey_destroy) { char buf[100], *s; time_t now; @@ -1955,7 +1965,7 @@ } #endif /* Try to restart process */ -# ifdef NETHACK +# ifdef NETHACK if (nethackflag) Msg(0, "You regain consciousness."); else diff -Nur ../screen-3.6.1/socket.c ./socket.c --- ../screen-3.6.1/socket.c Tue May 31 14:33:00 1994 +++ ./socket.c Thu Jan 26 22:34:09 1995 @@ -210,12 +210,18 @@ *slisttail = sent; slisttail = &sent->next; nfound++; - if ((s = MakeClientSocket(0)) == -1) + s = MakeClientSocket(0); +#ifdef USE_SETEUID + /* MakeClientSocket sets ids back to eff */ + xseteuid(real_uid); + xsetegid(real_gid); +#endif + if (s == -1) { sent->mode = -3; /* Unreachable - it is dead if we detect that it's local * or we specified a match - */ + */ n = name + strlen(name) - 1; while (n != name && *n != '.') n--; @@ -237,10 +243,20 @@ /* Shall we connect ? */ mode &= 0776; - if ((dflag && mode != 0700) || - (!dflag && ((rflag && mode != 0600) || - (xflag && mode != 0600 && mode != 0700) || - (!rflag && !xflag)))) + /* + * mode 600: socket is detached. + * mode 700: socket is attached. + * xflag implies rflag here. + * + * fail, when socket mode mode is not 600 or 700 + * fail, when we want to detach, but it already is. + * fail, when we only want to attach, but mode 700 and not xflag. + * fail, if none of dflag, rflag, xflag is set. + */ + if ((mode != 0700 && mode != 0600) || + (dflag && mode == 0600) || + (!dflag && rflag && mode == 0700 && !xflag) || + (!dflag && !rflag && !xflag)) { close(s); continue; @@ -254,6 +270,7 @@ else close(s); } + (void)closedir(dirp); if (nfound && (lsflag || ngood != 1) && !quietflag) { switch(ngood) diff -Nur ../screen-3.6.1/term.c ./term.c --- ../screen-3.6.1/term.c Fri Nov 25 00:45:45 1994 +++ ./term.c Mon Feb 13 18:18:02 1995 @@ -171,8 +171,8 @@ { "k8", T_STR }, KMAPDEF("\033[19~") { "k9", T_STR }, KMAPDEF("\033[20~") { "k;", T_STR }, KMAPDEF("\033[21~") - { "F1", T_STR }, KMAPDEF("\033[22~") - { "F2", T_STR }, KMAPDEF("\033[23~") + { "F1", T_STR }, KMAPDEF("\033[23~") + { "F2", T_STR }, KMAPDEF("\033[24~") { "kb", T_STR }, KMAPDEF("\010") { "kh", T_STR }, KMAPDEF("\033[1~") KMAPMDEF("g") { "K1", T_STR }, diff -Nur ../screen-3.6.1/term.sh ./term.sh --- ../screen-3.6.1/term.sh Thu Jun 9 21:28:44 1994 +++ ./term.sh Sun Mar 19 16:02:49 1995 @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh if test -z "$AWK"; then AWK=awk diff -Nur ../screen-3.6.1/terminfo/screencap ./terminfo/screencap --- ../screen-3.6.1/terminfo/screencap Fri Nov 25 01:29:38 1994 +++ ./terminfo/screencap Mon Feb 13 18:17:15 1995 @@ -11,7 +11,7 @@ :ks=\E[?1h\E=:ke=\E[?1l\E>:\ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ - :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[22~:F2=\E[23~:\ + :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\ :kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[5~:kN=\E[6~:\ :as=^N:ae=^O:\ :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00: diff -Nur ../screen-3.6.1/terminfo/screeninfo.src ./terminfo/screeninfo.src --- ../screen-3.6.1/terminfo/screeninfo.src Fri Nov 25 01:33:56 1994 +++ ./terminfo/screeninfo.src Mon Feb 13 18:17:45 1995 @@ -10,7 +10,7 @@ ht=\t, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0, kbs=\b, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP, - kf10=\E[21~, kf11=\E[22~, kf12=\E[23~, kf2=\EOQ, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kll=\E[4~, knp=\E[6~, kpp=\E[5~, nel=\EE, @@ -31,7 +31,7 @@ ht=\t, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0, kbs=\b, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP, - kf10=\E[21~, kf11=\E[22~, kf12=\E[23~, kf2=\EOQ, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kll=\E[4~, knp=\E[6~, kpp=\E[5~, nel=\EE, diff -Nur ../screen-3.6.1/tty.sh ./tty.sh --- ../screen-3.6.1/tty.sh Thu Jan 5 16:42:03 1995 +++ ./tty.sh Sun Mar 19 16:02:53 1995 @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # sh tty.sh tty.c # This inserts all the needed #ifdefs for IF{} statements # and generates tty.c diff -Nur ../screen-3.6.1/utmp.c ./utmp.c --- ../screen-3.6.1/utmp.c Tue May 31 14:33:21 1994 +++ ./utmp.c Thu Jan 19 19:48:23 1995 @@ -155,7 +155,11 @@ } } #else /* !UTMPOK */ - Msg(0, "Unable to modify %s.\n", UtmpName); +# ifdef UTMPFILE + Msg(0, "Unable to modify %s.\n", UTMPFILE); +# else + Msg(0, "Unable to modify utmp-database.\n"); +# endif #endif } diff -Nur ../screen-3.6.1/window.c ./window.c --- ../screen-3.6.1/window.c Sun Jan 15 23:39:59 1995 +++ ./window.c Sun Apr 2 23:05:15 1995 @@ -73,13 +73,13 @@ struct NewWindow nwin_undef = { -1, (char *)0, (char **)0, (char *)0, (char *)0, -1, -1, - -1, -1, -1, -1, -1 + -1, -1, -1, -1, -1, -1, -1, -1 }; struct NewWindow nwin_default = { 0, 0, ShellArgs, 0, screenterm, 0, 1*FLOW_NOW, - LOGINDEFAULT, DEFAULTHISTHEIGHT, MON_OFF, WLOCK_AUTO, 1 + LOGINDEFAULT, DEFAULTHISTHEIGHT, MON_OFF, WLOCK_AUTO, 1, 1, 0, 0 }; struct NewWindow nwin_options; @@ -99,7 +99,12 @@ res->histheight = new->histheight != nwin_undef.histheight ? new->histheight : def->histheight; res->monitor = new->monitor != nwin_undef.monitor ? new->monitor : def->monitor; res->wlock = new->wlock != nwin_undef.wlock ? new->wlock : def->wlock; - res->wrap = new->wrap != nwin_undef.wrap ? new->wlock : def->wrap; + res->wrap = new->wrap != nwin_undef.wrap ? new->wrap : def->wrap; + res->c1 = new->c1 != nwin_undef.c1 ? new->c1 : def->c1; + res->gr = new->gr != nwin_undef.gr ? new->gr : def->gr; +#ifdef KANJI + res->kanji = new->kanji != nwin_undef.kanji ? new->kanji : def->kanji; +#endif } int @@ -107,7 +112,7 @@ struct NewWindow *newwin; { register struct win **pp, *p; - register int n; + register int n, i; int f = -1; struct NewWindow nwin; int ttyflag; @@ -159,6 +164,12 @@ return -1; } bzero((char *) p, (int) sizeof(struct win)); /* looks like a calloc above */ + + /* save the command line so that zombies can be resurrected */ + for (i = 0; nwin.args[i] && i < MAXARGS - 1; i++) + p->w_cmdargs[i] = SaveStr(nwin.args[i]); + p->w_cmdargs[i] = 0; + if (!(p->w_dlist = (struct displaylist *)malloc(sizeof(struct displaylist)))) { free((char *)p); @@ -177,7 +188,6 @@ return -1; } #endif - p->w_dupto = -1; p->w_winlay.l_next = 0; p->w_winlay.l_layfn = &WinLf; p->w_winlay.l_data = (char *)p; @@ -218,7 +228,10 @@ #ifdef COPY_PASTE ChangeScrollback(p, nwin.histheight, p->w_width); #endif - ResetWindow(p); /* sets p->w_wrap */ +#ifdef KANJI + p->w_kanji = nwin.kanji; +#endif + ResetWindow(p); /* sets w_wrap, w_c1, w_gr */ if (ttyflag == TTY_FLAG_PLAIN) { @@ -247,25 +260,83 @@ p->w_next = windows; windows = p; #ifdef UTMPOK + p->w_slot = (slot_t) -1; # ifdef LOGOUTOK debug1("MakeWindow will %slog in.\n", nwin.lflag?"":"not "); - if (!nwin.lflag) - p->w_slot = (slot_t) -1; - else + if (nwin.lflag) # else /* LOGOUTOK */ debug1("MakeWindow will log in, LOGOUTOK undefined in config.h%s.\n", nwin.lflag?"":" (although lflag=0)"); # endif /* LOGOUTOK */ { + p->w_slot = (slot_t) 0; if (display) SetUtmp(p); - else - p->w_slot = (slot_t) 0; } #endif SetForeWindow(p); Activate(p->w_norefresh); return n; +} + +/* + * Resurrect a window from Zombie state. + * The command vector is therefore stored in the window structure. + * Note: The terminaltype defaults to screenterm again, the current + * working directory is lost. + */ +int +RemakeWindow(p) +struct win *p; +{ + int ttyflag; + char *TtyName; + int lflag, f; + + lflag = nwin_default.lflag; + if ((f = OpenDevice(p->w_cmdargs[0], lflag, &ttyflag, &TtyName)) < 0) + return -1; + + strncpy(p->w_tty, *TtyName ? TtyName : p->w_title, MAXSTR - 1); + p->w_ptyfd = f; + + p->w_t.flags &= ~TTY_FLAG_PLAIN; + if (ttyflag == TTY_FLAG_PLAIN) + { + p->w_t.flags |= TTY_FLAG_PLAIN; /* Just in case... */ + WriteString(p, p->w_cmdargs[0], strlen(p->w_cmdargs[0])); + WriteString(p, ": ", 2); + WriteString(p, p->w_title, strlen(p->w_title)); + WriteString(p, "\r\n", 2); + p->w_pid = 0; + } + else + { + for (f = 0; p->w_cmdargs[f]; f++) + { + if (f) + WriteString(p, " ", 1); + WriteString(p, p->w_cmdargs[f], strlen(p->w_cmdargs[f])); + } + WriteString(p, "\r\n", 2); + p->w_pid = ForkWindow(p->w_cmdargs, (char *)0, nwin_default.term, TtyName, p); + if (p->w_pid < 0) + return -1; + } + +#ifdef UTMPOK + p->w_slot = (slot_t) -1; + debug1("RemakeWindow will %slog in.\n", lflag ? "" : "not "); +# ifdef LOGOUTOK + if (lflag) +# endif + { + p->w_slot = (slot_t) 0; + if (display) + SetUtmp(p); + } +#endif + return p->w_number; } void diff -Nur ../screen-3.6.1/window.h ./window.h --- ../screen-3.6.1/window.h Wed Dec 14 00:51:25 1994 +++ ./window.h Sun Apr 2 22:41:12 1995 @@ -40,6 +40,9 @@ int monitor; int wlock; /* default writelock setting */ int wrap; + int c1; + int gr; + int kanji; }; @@ -119,6 +122,7 @@ struct layer *w_lay; /* the layer of the window */ struct layer w_winlay; /* the layer of the window */ int w_pid; /* process at the other end of ptyfd */ + char *w_cmdargs[MAXARGS]; /* command line argument vector */ int w_ptyfd; /* fd of the master pty */ int w_aflag; /* (used for DUMP_TERMCAP) */ char w_inbuf[IOSIZE]; @@ -196,7 +200,6 @@ time_t lastio; /* timestamp of last filedescriptor activity */ int seconds; /* tell us when lastio + seconds < time() */ } w_tstamp; - int w_dupto; /* duplicate the output to this window */ char w_norefresh; /* dont redisplay when switching to that win */ char w_wlock; /* WLOCK_AUTO, WLOCK_OFF, WLOCK_ON */ struct user *w_wlockuser; /* NULL when unlocked or user who writes */