summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2011-09-03 14:05:24 +0200
committerAxel Beckert <abe@deuxchevaux.org>2011-09-03 14:05:24 +0200
commit0e9a09d7718f02726b12924f7ddb05a992202aa3 (patch)
tree7b78a28379fdbe3a9dba37cd99c780c5d42c1e6c
parentbdf45bc45637eefdbdee913465729f9d31d6c255 (diff)
downloadscreen-0e9a09d7718f02726b12924f7ddb05a992202aa3.tar.gz
Imported Upstream version 3.9.11upstream/3.9.11
-rw-r--r--Makefile.in57
-rw-r--r--NEWS80
-rw-r--r--TODO5
-rw-r--r--acls.c111
-rw-r--r--acls.h29
-rw-r--r--ansi.c878
-rw-r--r--ansi.h62
-rw-r--r--attacher.c199
-rw-r--r--braille.c12
-rw-r--r--braille.h3
-rw-r--r--comm.c91
-rw-r--r--comm.h.dist306
-rw-r--r--comm.sh3
-rw-r--r--config.h.in68
-rwxr-xr-xconfigure6450
-rw-r--r--configure.in208
-rw-r--r--display.c1232
-rw-r--r--display.h42
-rw-r--r--doc/Makefile.in19
-rw-r--r--doc/screen.1574
-rw-r--r--doc/screen.info325
-rw-r--r--doc/screen.info-1323
-rw-r--r--doc/screen.info-2446
-rw-r--r--doc/screen.info-3622
-rw-r--r--doc/screen.info-4914
-rw-r--r--doc/screen.info-5769
-rw-r--r--doc/screen.texinfo785
-rw-r--r--encoding.c1502
-rwxr-xr-xetc/ccdefs3
-rw-r--r--etc/completer.zsh53
-rw-r--r--etc/etcscreenrc13
-rw-r--r--etc/screenrc23
-rwxr-xr-xetc/toolcheck16
-rw-r--r--extern.h158
-rw-r--r--fileio.c176
-rw-r--r--help.c540
-rw-r--r--image.h138
-rw-r--r--input.c14
-rw-r--r--layer.c227
-rw-r--r--layer.h35
-rw-r--r--loadav.c41
-rw-r--r--logfile.c25
-rw-r--r--logfile.h2
-rw-r--r--mark.c252
-rw-r--r--mark.h4
-rw-r--r--misc.c9
-rw-r--r--nethack.c4
-rw-r--r--os.h18
-rw-r--r--osdef.h.in6
-rw-r--r--osdef.sh8
-rw-r--r--patchlevel.h66
-rw-r--r--process.c1834
-rw-r--r--pty.c18
-rw-r--r--putenv.c14
-rw-r--r--rcs.h2
-rw-r--r--resize.c180
-rw-r--r--sched.c30
-rw-r--r--sched.h23
-rw-r--r--screen.c657
-rw-r--r--screen.h24
-rw-r--r--search.c41
-rw-r--r--socket.c152
-rw-r--r--teln.c15
-rw-r--r--term.c6
-rw-r--r--term.h.dist179
-rw-r--r--termcap.c90
-rw-r--r--terminfo/screeninfo.src4
-rw-r--r--tty.c.dist140
-rw-r--r--tty.sh128
-rw-r--r--utf8encodings/01bin0 -> 29808 bytes
-rw-r--r--utf8encodings/02bin0 -> 27550 bytes
-rw-r--r--utf8encodings/03bin0 -> 32926 bytes
-rw-r--r--utf8encodings/04bin0 -> 24302 bytes
-rw-r--r--utf8encodings/18bin0 -> 54862 bytes
-rw-r--r--utf8encodings/a1bin0 -> 536 bytes
-rw-r--r--utf8encodings/bfbin0 -> 232 bytes
-rw-r--r--utf8encodings/c2bin0 -> 256 bytes
-rw-r--r--utf8encodings/c3bin0 -> 140 bytes
-rw-r--r--utf8encodings/c4bin0 -> 228 bytes
-rw-r--r--utf8encodings/c6bin0 -> 68 bytes
-rw-r--r--utf8encodings/c7bin0 -> 52 bytes
-rw-r--r--utf8encodings/c8bin0 -> 40 bytes
-rw-r--r--utf8encodings/ccbin0 -> 68 bytes
-rw-r--r--utf8encodings/cdbin0 -> 52 bytes
-rw-r--r--utf8encodings/d6bin0 -> 212 bytes
-rw-r--r--utmp.c12
-rw-r--r--window.c190
-rw-r--r--window.h23
88 files changed, 15563 insertions, 6145 deletions
diff --git a/Makefile.in b/Makefile.in
index add343d..652b75e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7,6 +7,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
+DESTDIR =
+
# Where to install screen.
prefix = @prefix@
@@ -19,12 +21,15 @@ VERSION = @VERSION@
SCREEN = screen-$(VERSION)
ETCSCREENRC = `sed < config.h -n -e '/define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'`
+SCREENENCODINGS = `sed < config.h -n -e '/define SCREENENCODINGS/s/^.*"\([^"]*\)"/\1/p'`
CC = @CC@
-CFLAGS = -O
-LDFLAGS =
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+CPP=@CPP@
CPP_DEPEND=$(CC) -MM
INSTALL = @INSTALL@
@@ -41,11 +46,6 @@ AWK = @AWK@
# -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.
-# Note: "detach" will be less powerfull, but "pow_detach" may be
-# more forcefull than usual.
-# Useful only for debugging.
OPTIONS=
#OPTIONS= -DDEBUG
@@ -55,12 +55,12 @@ 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 \
kmapdef.c acls.c braille.c braille_tsi.c logfile.c layer.c \
- sched.c teln.c nethack.c
+ sched.c teln.c nethack.c encoding.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 \
kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o \
- sched.o teln.o nethack.o
+ sched.o teln.o nethack.o encoding.o
all: screen
@@ -71,20 +71,21 @@ screen: $(OFILES)
$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
install_bin: .version screen
- -if [ -f $(bindir)/$(SCREEN) ] && [ ! -f $(bindir)/$(SCREEN).old ]; \
- then mv $(bindir)/$(SCREEN) $(bindir)/$(SCREEN).old; fi
- $(INSTALL_PROGRAM) screen $(bindir)/$(SCREEN)
- -chown root $(bindir)/$(SCREEN) && chmod 4755 $(bindir)/$(SCREEN)
+ -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
+ then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
+ $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
+ -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
# 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 $(SCREEN) $(bindir)/screen
+ -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
+ rm -f $(DESTDIR)$(bindir)/screen
+ (cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen)
+ cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
###############################################################################
install: installdirs install_bin
cd doc ; $(MAKE) install
-if [ -d /usr/lib/terminfo ]; then \
- PATH="$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \
+ PATH="$$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \
chmod 644 /usr/lib/terminfo/s/screen*; \
fi
# Better do this by hand. E.g. under RCS...
@@ -94,14 +95,14 @@ install: installdirs install_bin
installdirs:
# Path leading to ETCSCREENRC and Socketdirectory not checked.
- $(srcdir)/etc/mkinstalldirs $(bindir)
+ $(srcdir)/etc/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(SCREENENCODINGS)
cd doc ; $(MAKE) installdirs
uninstall: .version
- rm -f $(bindir)/$(SCREEN)
- rm -f $(bindir)/screen
- -mv $(bindir)/screen.old $(bindir)/screen
- rm -f $(ETCSCREENRC)
+ rm -f $(DESTDIR)$(bindir)/$(SCREEN)
+ rm -f $(DESTDIR)$(bindir)/screen
+ -mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen
+ rm -f $(DESTDIR)$(ETCSCREENRC)
cd doc; $(MAKE) uninstall
shadow:
@@ -124,7 +125,7 @@ comm.h: comm.c comm.sh config.h
AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
osdef.h: osdef.sh config.h osdef.h.in
- CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh
+ CPP="$(CPP) $(CPPFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh
docs:
cd doc; $(MAKE) dvi screen.info
@@ -136,7 +137,7 @@ mostlyclean:
rm -f $(OFILES) screen config.cache osdef0.c osdef1.sed osdef2.sed
clean celan: mostlyclean
- rm -f tty.c term.h comm.h osdef.h core
+ rm -f tty.c term.h comm.h osdef.h kmapdef.c core
# Delete all files from the current directory that are created by
# configuring or building the program.
@@ -157,7 +158,7 @@ maintainer-clean:
realclean: .version mostlyclean
rm -f $(SCREEN).tar $(SCREEN).tar.gz
rm -f config.status Makefile doc/Makefile
- rm -f tty.c term.h comm.h osdef.h
+ rm -f tty.c term.h comm.h osdef.h kmapdef.c
rm -f config.h
echo "install all Makefiles and config:" > Makefile
echo " sh ./configure" >> Makefile
@@ -193,7 +194,9 @@ $(SCREEN).tar: .version term.h comm.h tty.c kmapdef.c
../dist/$(SCREEN)/terminfo
mkdir dist/$(SCREEN)/etc
cd etc; ln * ../dist/$(SCREEN)/etc
- sed -e 's/^startup/#startup/' -e 's/^autodetach/#autodetach/' < $(ETCSCREENRC) > dist/$(SCREEN)/etc/etcscreenrc
+ mkdir dist/$(SCREEN)/utf8encodings
+ cd utf8encodings; ln * ../dist/$(SCREEN)/utf8encodings
+ # sed -e 's/^startup/#startup/' -e 's/^autodetach/#autodetach/' < $(ETCSCREENRC) > dist/$(SCREEN)/etc/etcscreenrc
cp $(HOME)/.screenrc dist/$(SCREEN)/etc/screenrc
mkdir dist/$(SCREEN)/doc
sed -e 's@/local/emacs@/usr/local@g' < doc/Makefile.in > dist/$(SCREEN)/doc/Makefile.in
@@ -324,3 +327,5 @@ teln.o: teln.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h extern.h
nethack.o: nethack.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h extern.h
+encoding.o: encoding.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+ comm.h layer.h term.h image.h display.h window.h extern.h
diff --git a/NEWS b/NEWS
index b0ecf3b..ad4b9e2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,83 @@
+ -------------------------------
+ What's new in screen-3.9.11 ?
+ -------------------------------
+
+* windowlist, bound to ^A"
+
+* support for other encodings, e.g. big5, koi8r, cp1251
+ new commands 'encoding', 'defencoding'
+ 'register', 'readreg', 'readbuf', 'writebuf' now understand
+ an extra encoding parameter
+
+* support for double utf-8 characters
+
+* lots of new string escapes and extensions to existsing ones:
+ %LD, %LM, %Lw, %W, %-w, %+w, %H, %f, %F, %l, %=, %<, %>
+
+* new commands: 'source', 'eval', 'deflog', 'ignorecase', 'setsid'
+
+* command key classes: 'bind', 'command' and 'help' understand
+ a '-c <class>' parameter. See the man page for examples
+
+* new login state: always - don't remove slot even if screen gets
+ detached
+
+* 256 color support (experimental)
+
+* configurable time format string (for ^At)
+
+* config option to use localized month/week names
+
+* new option '-h' for hardcopy: also dump the scrollback buffer
+
+
+ ------------------------------
+ What's new in screen-3.9.9 ?
+ ------------------------------
+
+* new '-X' option to send commands to screen sessions.
+
+ screen -X echo Hi...
+
+* added a possibility to change the attributes/color in caption or
+ hardstatus strings:
+
+ caption always "%3n %{r}%t%{-}%? @%u%?%? %{g}[%h]%{-}%?"
+
+* new 'dinfo' command to show what screen thinks about your terminal.
+
+* new 'attrcolor' command to map attributes to color codes:
+ attrcolor u "-u b"
+ attrcolor b "r"
+
+* support for UTF-8: new commands 'utf8', 'defutf8' to change the
+ encoding of a window, plus a '-U' option to tell screen that
+ your terminal sends/receives UTF-8 codes.
+
+* support for 16 colors.
+
+
+ ------------------------------
+ What's new in screen-3.9.8 ?
+ ------------------------------
+
+* new command 'resize' to resize regions (aka split windows), try:
+ bind = resize =
+ bind + resize +1
+ bind - resize -1
+ bind _ resize max
+
+* new argument for 'focus': up, down, top, bottom
+
+* X11 mouse tracking support
+
+* Support for the "new color model", aka "background color erase":
+ the bce/defbce commands change the color model of the current
+ window/new windows.
+
+* experimental rxvt OSC sequence support (used to set a background
+ picture or to change the default colors), disabled by default.
+
----------------------------
What's new in screen-3.9 ?
diff --git a/TODO b/TODO
index 2493216..01912af 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,7 @@
- display size adaption (Activate)
-- better kanji
-- message protocol (send screen command)
-- esc-sequence for screen commands
- process.c cleanup via comm splitting
- writelocks?
- partial?
- nonblock?
+- type into several windows at once (for cluster admins)
+- configurable digraph table
diff --git a/acls.c b/acls.c
index 74378d1..93b951a 100644
--- a/acls.c
+++ b/acls.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -57,7 +57,7 @@ extern struct win *windows, *wtab[];
extern char NullStr[];
extern char SockPath[];
extern struct display *display, *displays;
-struct user *users;
+struct acluser *users;
#ifdef MULTIUSER
int maxusercount = 0; /* used in process.c: RC_MONITOR, RC_SILENCE */
@@ -89,11 +89,11 @@ static char default_c_bit[ACL_BITS_PER_CMD] =
*/
static int GrowBitfield __P((AclBits *, int, int, int));
-static struct usergroup **FindGroupPtr __P((struct usergroup **, struct user *, int));
-static int AclSetPermCmd __P((struct user *, char *, struct comm *));
-static int AclSetPermWin __P((struct user *, struct user *, char *, struct win *));
-static int UserAcl __P((struct user *, struct user **, int, char **));
-static int UserAclCopy __P((struct user **, struct user **));
+static struct aclusergroup **FindGroupPtr __P((struct aclusergroup **, struct acluser *, int));
+static int AclSetPermCmd __P((struct acluser *, char *, struct comm *));
+static int AclSetPermWin __P((struct acluser *, struct acluser *, char *, struct win *));
+static int UserAcl __P((struct acluser *, struct acluser **, int, char **));
+static int UserAclCopy __P((struct acluser **, struct acluser **));
static int
@@ -124,11 +124,11 @@ int len, delta, defaultbit;
* Returns an nonzero Address. Its contents is either a User-ptr,
* or NULL which may be replaced by a User-ptr to create the entry.
*/
-struct user **
+struct acluser **
FindUserPtr(name)
char *name;
{
- struct user **u;
+ struct acluser **u;
for (u = &users; *u; u = &(*u)->u_next)
if (!strcmp((*u)->u_name, name))
@@ -153,7 +153,7 @@ int DefaultMetaEsc = -1;
int
UserAdd(name, pass, up)
char *name, *pass;
-struct user **up;
+struct acluser **up;
{
#ifdef MULTIUSER
int j;
@@ -168,12 +168,15 @@ struct user **up;
return 1; /* he is already there */
}
if (strcmp("none", name)) /* "none" is a reserved word */
- *up = (struct user *)calloc(1, sizeof(struct user));
+ *up = (struct acluser *)calloc(1, sizeof(struct acluser));
if (!*up)
return -1; /* he still does not exist */
#ifdef COPY_PASTE
- (*up)->u_copybuffer = NULL;
- (*up)->u_copylen = 0;
+ (*up)->u_plop.buf = NULL;
+ (*up)->u_plop.len = 0;
+# ifdef ENCODINGS
+ (*up)->u_plop.enc = 0;
+# endif
#endif
(*up)->u_Esc = DefaultEsc;
(*up)->u_MetaEsc = DefaultMetaEsc;
@@ -197,7 +200,7 @@ struct user **up;
{
int j;
struct win *w;
- struct user *u;
+ struct acluser *u;
debug2("growing all bitfields %d += %d\n", maxusercount, USER_CHUNK);
/* the bitfields are full, grow a chunk */
@@ -305,7 +308,7 @@ struct user **up;
int
UserSetPass(name, pass, up)
char *name, *pass;
-struct user **up;
+struct acluser **up;
{
if (!up)
up = FindUserPtr(name);
@@ -326,9 +329,9 @@ struct user **up;
int
UserDel(name, up)
char *name;
-struct user **up;
+struct acluser **up;
{
- struct user *u;
+ struct acluser *u;
#ifdef MULTIUSER
int i;
#endif
@@ -355,13 +358,13 @@ struct user **up;
for (up = &users; *up; up = &(*up)->u_next)
{
/* unlink all group references to this user */
- struct usergroup **g = &(*up)->u_group;
+ struct aclusergroup **g = &(*up)->u_group;
while (*g)
{
if ((*g)->u == u)
{
- struct usergroup *next = (*g)->next;
+ struct aclusergroup *next = (*g)->next;
free((char *)(*g));
*g = next;
@@ -401,23 +404,23 @@ struct user **up;
*/
int
UserFreeCopyBuffer(u)
-struct user *u;
+struct acluser *u;
{
struct win *w;
struct paster *pa;
- if (!u->u_copybuffer)
+ if (!u->u_plop.buf)
return 1;
for (w = windows; w; w = w->w_next)
{
pa = &w->w_paster;
- if (pa->pa_pasteptr >= u->u_copybuffer &&
- pa->pa_pasteptr - u->u_copybuffer < u->u_copylen)
+ if (pa->pa_pasteptr >= u->u_plop.buf &&
+ pa->pa_pasteptr - u->u_plop.buf < u->u_plop.len)
FreePaster(pa);
}
- free((char *)u->u_copybuffer);
- u->u_copylen = 0;
- u->u_copybuffer = NULL;
+ free((char *)u->u_plop.buf);
+ u->u_plop.len = 0;
+ u->u_plop.buf = 0;
return 0;
}
#endif /* COPY_PASTE */
@@ -429,13 +432,13 @@ struct user *u;
* depth first method. If none of the nodes references u, the address of
* the last next pointer is returned. This address will contain NULL.
*/
-static struct usergroup **
+static struct aclusergroup **
FindGroupPtr(gp, u, recursive)
-struct usergroup **gp;
-struct user *u;
+struct aclusergroup **gp;
+struct acluser *u;
int recursive;
{
- struct usergroup **g;
+ struct aclusergroup **g;
ASSERT(recursive < 1000); /* Ouch, cycle detection failed */
while (*gp)
@@ -459,8 +462,8 @@ int
AclLinkUser(from, to)
char *from, *to;
{
- struct user **u1, **u2;
- struct usergroup **g;
+ struct acluser **u1, **u2;
+ struct aclusergroup **g;
if (!*(u1 = FindUserPtr(from)) && UserAdd(from, NULL, u1))
return -1;
@@ -472,7 +475,7 @@ char *from, *to;
if (*(g = FindGroupPtr(&(*u1)->u_group, *u2, 0)))
return 2; /* aha, we are already linked! */
- if (!(*g = (struct usergroup *)malloc(sizeof(struct usergroup))))
+ if (!(*g = (struct aclusergroup *)malloc(sizeof(struct aclusergroup))))
return -1; /* Could not alloc link. Poor screen */
(*g)->u = (*u2);
(*g)->next = NULL;
@@ -486,10 +489,10 @@ char *from, *to;
*/
char *
DoSu(up, name, pw1, pw2)
-struct user **up;
+struct acluser **up;
char *name, *pw1, *pw2;
{
- struct user *u;
+ struct acluser *u;
int sorry = 0;
if (!(u = *FindUserPtr(name)))
@@ -598,7 +601,7 @@ char *name, *pw1, *pw2;
int
NewWindowAcl(w, u)
struct win *w;
-struct user *u;
+struct acluser *u;
{
int i, j;
@@ -648,7 +651,7 @@ struct win *w;
*/
static int
AclSetPermCmd(u, mode, cmd)
-struct user *u;
+struct acluser *u;
char *mode;
struct comm *cmd;
{
@@ -693,7 +696,7 @@ struct comm *cmd;
*/
static int
AclSetPermWin(uu, u, mode, win)
-struct user *u, *uu;
+struct acluser *u, *uu;
char *mode;
struct win *win;
{
@@ -793,7 +796,7 @@ struct win *win;
*/
int
AclSetPerm(uu, u, mode, s)
-struct user *uu, *u;
+struct acluser *uu, *u;
char *mode, *s;
{
struct win *w;
@@ -813,7 +816,7 @@ char *mode, *s;
AclSetPermWin(uu, u, mode, (struct win *)1);
else /* .. or all windows */
for (w = windows; w; w = w->w_next)
- AclSetPermWin((struct user *)0, u, mode, w);
+ AclSetPermWin((struct acluser *)0, u, mode, w);
s++;
break;
case '?':
@@ -832,7 +835,7 @@ char *mode, *s;
if ((i = FindCommnr(s)) != RC_ILLEGAL)
AclSetPermCmd(u, mode, &comms[i]);
else if (((i = WindowByNoN(s)) >= 0) && wtab[i])
- AclSetPermWin((struct user *)0, u, mode, wtab[i]);
+ AclSetPermWin((struct acluser *)0, u, mode, wtab[i]);
else
/* checking group name */
return -1;
@@ -857,7 +860,7 @@ char *mode, *s;
*/
static int
UserAcl(uu, u, argc, argv)
-struct user *uu, **u;
+struct acluser *uu, **u;
int argc;
char **argv;
{
@@ -889,7 +892,7 @@ char **argv;
static int
UserAclCopy(to_up, from_up)
-struct user **to_up, **from_up;
+struct acluser **to_up, **from_up;
{
struct win *w;
int i, j, to_id, from_id;
@@ -944,13 +947,13 @@ struct user **to_up, **from_up;
*/
int
UsersAcl(uu, argc, argv)
-struct user *uu;
+struct acluser *uu;
int argc;
char **argv;
{
char *s;
int r;
- struct user **cf_u = NULL;
+ struct acluser **cf_u = NULL;
if (argc == 1)
{
@@ -968,7 +971,7 @@ char **argv;
if (argv[0][0] == '*' && argv[0][1] == '\0')
{
- struct user **u;
+ struct acluser **u;
debug("all users acls.\n");
for (u = &users; *u; u = &(*u)->u_next)
@@ -1005,7 +1008,7 @@ char **argv;
*/
int
AclUmask(u, str, errp)
-struct user *u;
+struct acluser *u;
char *str;
char **errp;
{
@@ -1054,11 +1057,11 @@ int a, b;
debug2("AclWinSwap(%d, %d) NOP.\n", a, b);
}
-struct user *EffectiveAclUser = NULL; /* hook for AT command permission */
+struct acluser *EffectiveAclUser = NULL; /* hook for AT command permission */
int
AclCheckPermWin(u, mode, w)
-struct user *u;
+struct acluser *u;
int mode;
struct win *w;
{
@@ -1076,8 +1079,8 @@ struct win *w;
if (!ok)
{
- struct usergroup **g = &u->u_group;
- struct user *saved_eff = EffectiveAclUser;
+ struct aclusergroup **g = &u->u_group;
+ struct acluser *saved_eff = EffectiveAclUser;
EffectiveAclUser = NULL;
while (*g)
@@ -1096,7 +1099,7 @@ struct win *w;
int
AclCheckPermCmd(u, mode, c)
-struct user *u;
+struct acluser *u;
int mode;
struct comm *c;
{
@@ -1113,8 +1116,8 @@ struct comm *c;
debug3("AclCheckPermCmd(%s %d %s) = ", u->u_name, mode, c->name);
if (!ok)
{
- struct usergroup **g = &u->u_group;
- struct user *saved_eff = EffectiveAclUser;
+ struct aclusergroup **g = &u->u_group;
+ struct acluser *saved_eff = EffectiveAclUser;
EffectiveAclUser = NULL;
while (*g)
diff --git a/acls.h b/acls.h
index 1438113..b71b573 100644
--- a/acls.h
+++ b/acls.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -43,10 +43,10 @@ typedef unsigned char * AclBits;
* How a user joins a group.
* Here is the node to construct one list per user.
*/
-struct usergroup
+struct aclusergroup
{
- struct user *u; /* the user who borrows us his rights */
- struct usergroup *next;
+ struct acluser *u; /* the user who borrows us his rights */
+ struct aclusergroup *next;
};
#endif /* MULTIUSER */
@@ -55,13 +55,25 @@ struct usergroup
*/
/*
+ * a copy buffer
+ */
+struct plop
+{
+ char *buf;
+ int len;
+#ifdef ENCODINGS
+ int enc;
+#endif
+};
+
+/*
* A User has a list of groups, and points to other users.
* users is the User entry of the session owner (creator)
* and anchors all other users. Add/Delete users there.
*/
-typedef struct user
+typedef struct acluser
{
- struct user *u_next; /* continue the main user list */
+ struct acluser *u_next; /* continue the main user list */
char u_name[20+1]; /* login name how he showed up */
char *u_password; /* his password (may be NullStr). */
int u_checkpassword; /* nonzero if this u_password is valid */
@@ -69,13 +81,12 @@ typedef struct user
int u_detachotherwin; /* window that was "other" when he detached */
int u_Esc, u_MetaEsc; /* the users screen escape character */
#ifdef COPY_PASTE
- char *u_copybuffer;
- int u_copylen;
+ struct plop u_plop;
#endif
#ifdef MULTIUSER
int u_id; /* a uniq index in the bitfields. */
AclBits u_umask_w_bits[ACL_BITS_PER_WIN]; /* his window create umask */
- struct usergroup *u_group; /* linked list of pointers to other users */
+ struct aclusergroup *u_group; /* linked list of pointers to other users */
#endif
} User;
diff --git a/ansi.c b/ansi.c
index d2a4244..925735d 100644
--- a/ansi.c
+++ b/ansi.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -44,9 +44,13 @@ extern int log_flush, logtstamp_on, logtstamp_after;
extern char *logtstamp_string;
extern char *captionstring;
extern char *hstatusstring;
+extern char *wliststr;
#ifdef COPY_PASTE
extern int compacthist;
#endif
+#ifdef MULTIUSER
+extern struct acluser *EffectiveAclUser;
+#endif
int Z0width, Z1width; /* widths for Z0/Z1 switching */
@@ -58,8 +62,8 @@ int visual_bell = 0;
int use_hardstatus = 1; /* display status line in hs */
char *printcmd = 0;
-char *blank; /* line filled with spaces */
-char *null; /* line filled with '\0' */
+unsigned char *blank; /* line filled with spaces */
+unsigned char *null; /* line filled with '\0' */
struct mline mline_old;
struct mline mline_blank;
@@ -117,7 +121,6 @@ static void BackSpace __P((void));
static void Return __P((void));
static void LineFeed __P((int));
static void ReverseLineFeed __P((void));
-static void InsertAChar __P((int));
static void InsertChar __P((int));
static void DeleteChar __P((int));
static void DeleteLine __P((int));
@@ -140,18 +143,29 @@ static void FillWithEs __P((void));
static void FindAKA __P((void));
static void Report __P((char *, int, int));
static void ScrollRegion __P((int));
-static void AddLineToHist __P((struct win *, struct mline *));
-static void LogString __P((struct win *, char *, int));
+#ifdef COPY_PASTE
+static void WAddLineToHist __P((struct win *, struct mline *));
+#endif
+static void WLogString __P((struct win *, char *, int));
static void WReverseVideo __P((struct win *, int));
+static int WindowChangedCheck __P((char *, int, int *));
static void MFixLine __P((struct win *, int, struct mchar *));
-static void MScrollH __P((struct win *, int, int, int, int));
-static void MScrollV __P((struct win *, int, int, int));
-static void MClear __P((struct win *, int, int, int, int));
+static void MScrollH __P((struct win *, int, int, int, int, int));
+static void MScrollV __P((struct win *, int, int, int, int));
+static void MClearArea __P((struct win *, int, int, int, int, int));
static void MInsChar __P((struct win *, struct mchar *, int, int));
static void MPutChar __P((struct win *, struct mchar *, int, int));
+static void MPutStr __P((struct win *, char *, int, struct mchar *, int, int));
static void MWrapChar __P((struct win *, struct mchar *, int, int, int, int));
-static int WindowChangedCheck __P((char *, int, int *));
+#ifdef COLOR
+static void MBceLine __P((struct win *, int, int, int, int));
+#endif
+#ifdef COLOR
+# define CURR_BCE (curr->w_bce ? rend_getbg(&curr->w_rend) : 0)
+#else
+# define CURR_BCE 0
+#endif
void
ResetAnsiState(p)
@@ -171,6 +185,7 @@ register struct win *p;
p->w_origin = 0;
p->w_insert = 0;
p->w_revvid = 0;
+ p->w_mouse = 0;
p->w_curinv = 0;
p->w_curvvis = 0;
p->w_autolf = 0;
@@ -189,6 +204,9 @@ register struct win *p;
#ifdef FONT
ResetCharsets(p);
#endif
+#ifdef COLOR
+ p->w_bce = nwin_default.bce;
+#endif
}
/* adds max 22 bytes */
@@ -210,6 +228,7 @@ char *buf;
if (w->w_intermediate > 0xff)
p += AddXChar(p, w->w_intermediate >> 8);
p += AddXChar(p, w->w_intermediate & 0xff);
+ *p = 0;
}
if (w->w_state == ASTR || w->w_state == STRESC)
sprintf(p, "-%s", string_t_string[w->w_StringType]);
@@ -220,31 +239,17 @@ char *buf;
#ifdef FONT
-# ifdef KANJI
-static char *kanjicharsets[3] = {
- "BBBB02", /* jis */
- "B\002IB01", /* euc */
- "BIBB01" /* sjis */
-};
-# endif
-
void
ResetCharsets(p)
-register struct win *p;
+struct win *p;
{
p->w_gr = nwin_default.gr;
p->w_c1 = nwin_default.c1;
SetCharsets(p, "BBBB02");
if (nwin_default.charset)
SetCharsets(p, nwin_default.charset);
-#ifdef KANJI
- if (p->w_kanji)
- {
- p->w_gr = 1;
- if (p->w_kanji == SJIS)
- p->w_c1 = 0;
- SetCharsets(p, kanjicharsets[p->w_kanji]);
- }
+#ifdef ENCODINGS
+ ResetEncoding(p);
#endif
}
@@ -266,7 +271,7 @@ char *s;
p->w_FontL = p->w_charsets[p->w_Charset];
p->w_FontR = p->w_charsets[p->w_CharsetR];
}
-#endif
+#endif /* FONT */
/*****************************************************************/
@@ -298,7 +303,7 @@ register int len;
if (!len)
return;
if (wp->w_log)
- LogString(wp, buf, len);
+ WLogString(wp, buf, len);
/* set global variables (yuck!) */
curr = wp;
@@ -309,8 +314,10 @@ register int len;
for (cv = wp->w_layer.l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+#if 0 /* done by new status code */
if (D_status == STATUS_ON_WIN)
RemoveStatus();
+#endif
if (D_nonblock == 1 && (D_obufp - D_obuf > D_obufmax))
{
/* one last surprising '~' means: lost data */
@@ -333,66 +340,47 @@ register int len;
{
c = (unsigned char)*buf++;
#ifdef FONT
- curr->w_rend.font = curr->w_FontL; /* Default: GL */
+# ifdef DW_CHARS
+ if (!curr->w_mbcs)
+# endif
+ curr->w_rend.font = curr->w_FontL; /* Default: GL */
#endif
- /* The next part is only for speedup
- * (therefore no mchars are used) */
+ /* The next part is only for speedup */
if (curr->w_state == LIT &&
-#ifdef KANJI
- curr->w_FontL != KANJI && curr->w_FontL != KANA && !curr->w_mbcs &&
+#ifdef UTF8
+ curr->w_encoding != UTF8 &&
+#endif
+#ifdef DW_CHARS
+ !is_dw_font(curr->w_rend.font) &&
+# ifdef ENCODINGS
+ curr->w_rend.font != KANA && !curr->w_mbcs &&
+# endif
#endif
- c >= ' ' &&
+#ifdef FONT
+ curr->w_rend.font != '<' &&
+#endif
+ c >= ' ' && c != 0x7f &&
((c & 0x80) == 0 || ((c >= 0xa0 || !curr->w_c1) && !curr->w_gr)) && !curr->w_ss &&
!curr->w_insert && curr->w_x < cols - 1)
{
- register int currx;
- register char *imp, *atp, at;
-#ifdef FONT
- register char *fop, fo;
-#endif
-#ifdef COLOR
- register char *cop, co;
-#endif
+ register int currx = curr->w_x;
+ char *imp = buf - 1;
- if (c == '\177')
- continue;
- MFixLine(curr, curr->w_y, &curr->w_rend);
- currx = curr->w_x;
- imp = curr->w_mlines[curr->w_y].image + currx;
- atp = curr->w_mlines[curr->w_y].attr + currx;
- at = curr->w_rend.attr;
-#ifdef FONT
- fop = curr->w_mlines[curr->w_y].font + currx;
- fo = curr->w_rend.font;
-#endif
-#ifdef COLOR
- cop = curr->w_mlines[curr->w_y].color + currx;
- co = curr->w_rend.color;
-#endif
while (currx < cols - 1)
{
- *imp++ = c;
- *atp++ = at;
-#ifdef FONT
- *fop++ = fo;
-#endif
-#ifdef COLOR
- *cop++ = co;
-#endif
currx++;
-skip: if (--len == 0)
+ if (--len == 0)
break;
c = (unsigned char)*buf++;
- if (c == '\177')
- goto skip;
- if (c < ' ' || ((c & 0x80) && ((c < 0xa0 && curr->w_c1) || curr->w_gr)))
+ if (c < ' ' || c == 0x7f || ((c & 0x80) && ((c < 0xa0 && curr->w_c1) || curr->w_gr)))
break;
}
currx -= curr->w_x;
if (currx > 0)
{
- LPutStr(&curr->w_layer, imp - currx, currx, &curr->w_rend, curr->w_x, curr->w_y);
+ MPutStr(curr, imp, currx, &curr->w_rend, curr->w_x, curr->w_y);
+ LPutStr(&curr->w_layer, imp, currx, &curr->w_rend, curr->w_x, curr->w_y);
curr->w_x += currx;
}
if (len == 0)
@@ -400,6 +388,24 @@ skip: if (--len == 0)
}
/* end of speedup code */
+#ifdef UTF8
+ if (curr->w_encoding == UTF8)
+ {
+ c = FromUtf8(c, &curr->w_decodestate);
+ if (c == -1)
+ continue;
+ if (c == -2)
+ {
+ c = UCS_REPL;
+ /* try char again */
+ buf--;
+ len++;
+ }
+ if (c > 0xff)
+ debug1("read UNICODE %04x\n", c);
+ }
+#endif
+
tryagain:
switch (curr->w_state)
{
@@ -548,7 +554,7 @@ skip: if (--len == 0)
{
if (curr->w_intermediate)
{
-#ifdef KANJI
+#ifdef DW_CHARS
if (curr->w_intermediate == '$')
c |= '$' << 8;
else
@@ -576,8 +582,9 @@ skip: if (--len == 0)
case '5': case '6': case '7': case '8': case '9':
if (curr->w_NumArgs < MAXARGS)
{
- curr->w_args[curr->w_NumArgs] =
- 10 * curr->w_args[curr->w_NumArgs] + (c - '0');
+ if (curr->w_args[curr->w_NumArgs] < 100000000)
+ curr->w_args[curr->w_NumArgs] =
+ 10 * curr->w_args[curr->w_NumArgs] + (c - '0');
}
break;
case ';':
@@ -605,9 +612,10 @@ skip: if (--len == 0)
break;
case LIT:
default:
-#ifdef KANJI
- if (c <= ' ' || c == 0x7f || (c >= 0x80 && c < 0xa0 && curr->w_c1))
- curr->w_mbcs = 0;
+#ifdef DW_CHARS
+ if (curr->w_mbcs)
+ if (c <= ' ' || c == 0x7f || (c >= 0x80 && c < 0xa0 && curr->w_c1))
+ curr->w_mbcs = 0;
#endif
if (c < ' ')
{
@@ -623,6 +631,13 @@ skip: if (--len == 0)
break;
}
if (c >= 0x80 && c < 0xa0 && curr->w_c1)
+#ifdef FONT
+ if ((curr->w_FontR & 0xf0) != 0x20
+# ifdef UTF8
+ || curr->w_encoding == UTF8
+# endif
+ )
+#endif
{
switch (c)
{
@@ -652,9 +667,22 @@ skip: if (--len == 0)
}
#ifdef FONT
- font = curr->w_rend.font = (c >= 0x80 ? curr->w_FontR : curr->w_FontL);
-# ifdef KANJI
- if (font == KANA && curr->w_kanji == SJIS && curr->w_mbcs == 0)
+# ifdef DW_CHARS
+ if (!curr->w_mbcs)
+# endif
+ curr->w_rend.font = (c >= 0x80 ? curr->w_FontR : curr->w_FontL);
+# ifdef UTF8
+ if (curr->w_encoding == UTF8)
+ curr->w_rend.font = 0;
+# ifdef DW_CHARS
+ if (curr->w_encoding == UTF8 && utf8_isdouble(c))
+ curr->w_mbcs = 0xff;
+# endif
+ font = curr->w_rend.font;
+# endif
+# ifdef DW_CHARS
+# ifdef ENCODINGS
+ if (font == KANA && curr->w_encoding == SJIS && curr->w_mbcs == 0)
{
/* Lets see if it is the first byte of a kanji */
debug1("%x may be first of SJIS\n", c);
@@ -665,9 +693,10 @@ skip: if (--len == 0)
break;
}
}
- if (font == KANJI && c == ' ')
+# endif
+ if (is_dw_font(font) && c == ' ')
font = curr->w_rend.font = 0;
- if (font == KANJI || curr->w_mbcs)
+ if (is_dw_font(font) || curr->w_mbcs)
{
int t = c;
if (curr->w_mbcs == 0)
@@ -680,42 +709,65 @@ skip: if (--len == 0)
curr->w_x += curr->w_wrap ? 1 : -1;
debug1("Patched w_x to %d\n", curr->w_x);
}
- c = curr->w_mbcs;
- if (font != KANJI)
+# ifdef UTF8
+ if (curr->w_encoding != UTF8)
+# endif
{
- debug2("SJIS !! %x %x\n", c, t);
- /*
- * SJIS -> EUC mapping:
- * First byte:
- * 81,82...9f -> 21,23...5d
- * e0,e1...ef -> 5f,61...7d
- * Second byte:
- * 40-7e -> 21-5f
- * 80-9e -> 60-7e
- * 9f-fc -> 21-7e (increment first byte!)
- */
- if (0x40 <= t && t <= 0xfc && t != 0x7f)
+ c = curr->w_mbcs;
+# ifdef ENCODINGS
+ if (font == KANA && curr->w_encoding == SJIS)
{
- if (c <= 0x9f) c = (c - 0x81) * 2 + 0x21;
- else c = (c - 0xc1) * 2 + 0x21;
- if (t <= 0x7e) t -= 0x1f;
- else if (t <= 0x9e) t -= 0x20;
- else t -= 0x7e, c++;
- curr->w_rend.font = KANJI;
+ debug2("SJIS !! %x %x\n", c, t);
+ /*
+ * SJIS -> EUC mapping:
+ * First byte:
+ * 81,82...9f -> 21,23...5d
+ * e0,e1...ef -> 5f,61...7d
+ * Second byte:
+ * 40-7e -> 21-5f
+ * 80-9e -> 60-7e
+ * 9f-fc -> 21-7e (increment first byte!)
+ */
+ if (0x40 <= t && t <= 0xfc && t != 0x7f)
+ {
+ if (c <= 0x9f) c = (c - 0x81) * 2 + 0x21;
+ else c = (c - 0xc1) * 2 + 0x21;
+ if (t <= 0x7e) t -= 0x1f;
+ else if (t <= 0x9e) t -= 0x20;
+ else t -= 0x7e, c++;
+ curr->w_rend.font = KANJI;
+ }
+ else
+ {
+ /* Incomplete shift-jis - skip first byte */
+ c = t;
+ t = 0;
+ }
+ debug2("SJIS after %x %x\n", c, t);
}
- else
+# endif
+ if (t && curr->w_gr && font != 030)
{
- /* Incomplete shift-jis - skip first byte */
- c = t;
- t = 0;
+ t &= 0x7f;
+ if (t < ' ')
+ goto tryagain;
}
- debug2("SJIS after %x %x\n", c, t);
+ if (t == '\177')
+ break;
+ curr->w_mbcs = t;
}
- curr->w_mbcs = t;
}
- kanjiloop:
+# endif /* DW_CHARS */
+ if (font == '<' && c >= ' ')
+ {
+ font = curr->w_rend.font = 0;
+ c |= 0x80;
+ }
+# ifdef UTF8
+ else if (curr->w_gr && curr->w_encoding != UTF8)
+# else
+ else if (curr->w_gr)
# endif
- if (curr->w_gr)
{
c &= 0x7f;
if (c < ' ') /* this is ugly but kanji support */
@@ -725,10 +777,22 @@ skip: if (--len == 0)
if (c == '\177')
break;
curr->w_rend.image = c;
+#ifdef UTF8
+ if (curr->w_encoding == UTF8)
+ curr->w_rend.font = c >> 8;
+#endif
+#ifdef DW_CHARS
+ curr->w_rend.mbcs = curr->w_mbcs;
+#endif
if (curr->w_x < cols - 1)
{
if (curr->w_insert)
- InsertAChar(c);
+ {
+ save_mline(&curr->w_mlines[curr->w_y], cols);
+ MInsChar(curr, &curr->w_rend, curr->w_x, curr->w_y);
+ LInsChar(&curr->w_layer, &curr->w_rend, curr->w_x, curr->w_y, &mline_old);
+ curr->w_x++;
+ }
else
{
MPutChar(curr, &curr->w_rend, curr->w_x, curr->w_y);
@@ -752,12 +816,11 @@ skip: if (--len == 0)
curr->w_x = 1;
}
#ifdef FONT
-# ifdef KANJI
+# ifdef DW_CHARS
if (curr->w_mbcs)
{
- c = curr->w_mbcs;
- curr->w_mbcs = 0;
- goto kanjiloop; /* what a hack! */
+ curr->w_rend.mbcs = curr->w_mbcs = 0;
+ curr->w_x++;
}
# endif
if (curr->w_ss)
@@ -778,7 +841,7 @@ skip: if (--len == 0)
}
static void
-LogString(p, buf, len)
+WLogString(p, buf, len)
struct win *p;
char *buf;
int len;
@@ -816,7 +879,7 @@ register int c;
case '\n':
if (curr->w_autoaka)
FindAKA();
- LineFeed(1);
+ LineFeed(0);
return 1;
case '\007':
WBell(curr, visual_bell);
@@ -847,10 +910,10 @@ int c, intermediate;
switch (c)
{
case 'E':
- LineFeed(2);
+ LineFeed(1);
break;
case 'D':
- LineFeed(1);
+ LineFeed(0);
break;
case 'M':
ReverseLineFeed();
@@ -873,24 +936,25 @@ int c, intermediate;
LKeypadMode(&curr->w_layer, 0);
LCursorkeysMode(&curr->w_layer, 0);
#ifndef TIOCPKT
- NewAutoFlow(curr, 1);
+ WNewAutoFlow(curr, 1);
#endif
/* XXX
SetRendition(&mchar_null);
InsertMode(0);
ChangeScrollRegion(0, rows - 1);
*/
+ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
break;
case '=':
LKeypadMode(&curr->w_layer, curr->w_keypad = 1);
#ifndef TIOCPKT
- NewAutoFlow(curr, 0);
+ WNewAutoFlow(curr, 0);
#endif /* !TIOCPKT */
break;
case '>':
LKeypadMode(&curr->w_layer, curr->w_keypad = 0);
#ifndef TIOCPKT
- NewAutoFlow(curr, 1);
+ WNewAutoFlow(curr, 1);
#endif /* !TIOCPKT */
break;
#ifdef FONT
@@ -951,7 +1015,7 @@ int c, intermediate;
case '+':
DesignateCharset(c, G3);
break;
-# ifdef KANJI
+# ifdef DW_CHARS
/*
* ESC $ ( Fn: invoke multi-byte charset, Fn, to G0
* ESC $ Fn: same as above. (old sequence)
@@ -1201,15 +1265,15 @@ int c, intermediate;
case 1: /* CKM: cursor key mode */
LCursorkeysMode(&curr->w_layer, curr->w_cursorkeys = i);
#ifndef TIOCPKT
- NewAutoFlow(curr, !i);
+ WNewAutoFlow(curr, !i);
#endif /* !TIOCPKT */
break;
case 2: /* ANM: ansi/vt52 mode */
if (i)
{
#ifdef FONT
-# ifdef KANJI
- if (curr->w_kanji)
+# ifdef ENCODINGS
+ if (curr->w_encoding)
break;
# endif
curr->w_charsets[0] = curr->w_charsets[1] =
@@ -1248,6 +1312,10 @@ int c, intermediate;
break;
/* case 8: ARM: auto repeat mode */
/* case 9: INLM: interlace mode */
+ case 9: /* X10 mouse tracking */
+ curr->w_mouse = i ? 9 : 0;
+ LMouseMode(&curr->w_layer, curr->w_mouse);
+ break;
/* case 10: EDM: edit mode */
/* case 11: LTM: line transmit mode */
/* case 13: SCFDM: space compression / field delimiting */
@@ -1268,6 +1336,10 @@ int c, intermediate;
/* case 44: margin bell enable */
/* case 66: NKM: Numeric keypad appl mode */
/* case 68: KBUM: Keyboard usage mode (data process) */
+ case 1000: /* VT200 mouse tracking */
+ curr->w_mouse = i ? 1000 : 0;
+ LMouseMode(&curr->w_layer, curr->w_mouse);
+ break;
}
}
break;
@@ -1311,20 +1383,73 @@ static int
StringEnd()
{
struct canvas *cv;
+ char *p;
+ int typ;
curr->w_state = LIT;
*curr->w_stringp = '\0';
switch (curr->w_StringType)
{
case OSC: /* special xterm compatibility hack */
- if (curr->w_stringp - curr->w_string < 2 ||
- curr->w_string[0] < '0' ||
- curr->w_string[0] > '2' ||
- curr->w_string[1] != ';')
+ if (curr->w_string[0] == ';' || (p = index(curr->w_string, ';')) == 0)
+ break;
+ typ = atoi(curr->w_string);
+ p++;
+#ifdef MULTIUSER
+ if (typ == 83) /* 83 = 'S' */
+ {
+ /* special execute commands sequence */
+ char *args[MAXARGS];
+ struct acluser *windowuser;
+
+ windowuser = *FindUserPtr(":window:");
+ if (windowuser && Parse(p, args))
+ {
+ for (display = displays; display; display = display->d_next)
+ if (D_forecv->c_layer->l_bottom == &curr->w_layer)
+ break; /* found it */
+ if (display == 0 && curr->w_layer.l_cvlist)
+ display = curr->w_layer.l_cvlist->c_display;
+ EffectiveAclUser = windowuser;
+ DoCommand(args);
+ EffectiveAclUser = 0;
+ }
+ break;
+ }
+#endif
+#ifdef RXVT_OSC
+ if (typ == 0 || typ == 1 || typ == 20 || typ == 39 || typ == 49)
+ {
+ int typ2;
+ typ2 = typ / 10;
+ if (--typ2 < 0)
+ typ2 = 0;
+ if (strcmp(curr->w_xtermosc[typ2], p))
+ {
+ strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1);
+ curr->w_xtermosc[typ2][sizeof(curr->w_xtermosc[typ2]) - 1] = 0;
+
+ for (display = displays; display; display = display->d_next)
+ {
+ if (!D_CXT)
+ continue;
+ if (D_forecv->c_layer->l_bottom == &curr->w_layer)
+ SetXtermOSC(typ2, curr->w_xtermosc[typ2]);
+ if ((typ2 == 2 || typ2 == 3) && D_xtermosc[typ2])
+ Redisplay(0);
+ }
+ }
+ }
+ if (typ != 0 && typ != 2)
break;
- curr->w_stringp -= 2;
+#else
+ if (typ < 0 || typ > 2)
+ break;
+#endif
+
+ curr->w_stringp -= p - curr->w_string;
if (curr->w_stringp > curr->w_string)
- bcopy(curr->w_string + 2, curr->w_string, curr->w_stringp - curr->w_string);
+ bcopy(p, curr->w_string, curr->w_stringp - curr->w_string);
*curr->w_stringp = '\0';
/* FALLTHROUGH */
case APC:
@@ -1432,9 +1557,9 @@ PrintFlush()
}
else if (display && curr->w_stringp > curr->w_string)
{
- PutStr(D_PO);
+ AddCStr(D_PO);
AddStrn(curr->w_string, curr->w_stringp - curr->w_string);
- PutStr(D_PF);
+ AddCStr(D_PF);
Flush();
}
curr->w_stringp = curr->w_string;
@@ -1442,11 +1567,11 @@ PrintFlush()
void
-NewAutoFlow(win, on)
+WNewAutoFlow(win, on)
struct win *win;
int on;
{
- debug1("NewAutoFlow: %d\n", on);
+ debug1("WNewAutoFlow: %d\n", on);
if (win->w_flow & FLOW_AUTOFLAG)
win->w_flow = FLOW_AUTOFLAG | (FLOW_AUTO|FLOW_NOW) * on;
else
@@ -1462,11 +1587,11 @@ DesignateCharset(c, n)
int c, n;
{
curr->w_ss = 0;
-# ifdef KANJI
- if (c == ('@' & 037))
+# ifdef ENCODINGS
+ if (c == ('@' & 037)) /* map JIS 6226 to 0208 */
c = KANJI;
# endif
- if (c == 'B' || c == 'J')
+ if (c == 'B')
c = ASCII;
if (curr->w_charsets[n] != c)
{
@@ -1517,7 +1642,7 @@ SaveCursor()
curr->w_saved = 1;
curr->w_Saved_x = curr->w_x;
curr->w_Saved_y = curr->w_y;
- curr->w_SavedRend= curr->w_rend;
+ curr->w_SavedRend = curr->w_rend;
#ifdef FONT
curr->w_SavedCharset = curr->w_Charset;
curr->w_SavedCharsetR = curr->w_CharsetR;
@@ -1575,25 +1700,21 @@ static void
LineFeed(out_mode)
int out_mode;
{
- /* out_mode: 0=cr+lf no-output, 1=lf, 2=cr+lf */
- if (out_mode != 1)
+ /* out_mode: 0=lf, 1=cr+lf */
+ if (out_mode)
curr->w_x = 0;
if (curr->w_y != curr->w_bot) /* Don't scroll */
{
if (curr->w_y < rows-1)
curr->w_y++;
- if (out_mode)
- LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
+ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
return;
}
- MScrollV(curr, 1, curr->w_top, curr->w_bot);
if (curr->w_autoaka > 1)
curr->w_autoaka--;
- if (out_mode)
- {
- LScrollV(&curr->w_layer, 1, curr->w_top, curr->w_bot);
- LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
- }
+ MScrollV(curr, 1, curr->w_top, curr->w_bot, CURR_BCE);
+ LScrollV(&curr->w_layer, 1, curr->w_top, curr->w_bot, CURR_BCE);
+ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
}
static void
@@ -1601,8 +1722,8 @@ ReverseLineFeed()
{
if (curr->w_y == curr->w_top)
{
- MScrollV(curr, -1, curr->w_top, curr->w_bot);
- LScrollV(&curr->w_layer, -1, curr->w_top, curr->w_bot);
+ MScrollV(curr, -1, curr->w_top, curr->w_bot, CURR_BCE);
+ LScrollV(&curr->w_layer, -1, curr->w_top, curr->w_bot, CURR_BCE);
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
}
else if (curr->w_y > 0)
@@ -1610,19 +1731,6 @@ ReverseLineFeed()
}
static void
-InsertAChar(c)
-int c;
-{
- register int y = curr->w_y, x = curr->w_x;
-
- save_mline(&curr->w_mlines[y], cols);
- curr->w_rend.image = c;
- MInsChar(curr, &curr->w_rend, x, y);
- curr->w_x = x + 1;
- LInsChar(&curr->w_layer, &curr->w_rend, x, y, &mline_old);
-}
-
-static void
InsertChar(n)
int n;
{
@@ -1633,8 +1741,8 @@ int n;
if (x == cols)
x--;
save_mline(&curr->w_mlines[y], cols);
- MScrollH(curr, -n, y, x, curr->w_width - 1);
- LScrollH(&curr->w_layer, -n, y, x, curr->w_width - 1, &mline_old);
+ MScrollH(curr, -n, y, x, curr->w_width - 1, CURR_BCE);
+ LScrollH(&curr->w_layer, -n, y, x, curr->w_width - 1, CURR_BCE, &mline_old);
LGotoPos(&curr->w_layer, x, y);
}
@@ -1647,8 +1755,8 @@ int n;
if (x == cols)
x--;
save_mline(&curr->w_mlines[y], cols);
- MScrollH(curr, n, y, x, curr->w_width - 1);
- LScrollH(&curr->w_layer, n, y, x, curr->w_width - 1, &mline_old);
+ MScrollH(curr, n, y, x, curr->w_width - 1, CURR_BCE);
+ LScrollH(&curr->w_layer, n, y, x, curr->w_width - 1, CURR_BCE, &mline_old);
LGotoPos(&curr->w_layer, x, y);
}
@@ -1660,8 +1768,8 @@ int n;
return;
if (n > curr->w_bot - curr->w_y + 1)
n = curr->w_bot - curr->w_y + 1;
- MScrollV(curr, n, curr->w_y, curr->w_bot);
- LScrollV(&curr->w_layer, n, curr->w_y, curr->w_bot);
+ MScrollV(curr, n, curr->w_y, curr->w_bot, CURR_BCE);
+ LScrollV(&curr->w_layer, n, curr->w_y, curr->w_bot, CURR_BCE);
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
}
@@ -1673,8 +1781,8 @@ int n;
return;
if (n > curr->w_bot - curr->w_y + 1)
n = curr->w_bot - curr->w_y + 1;
- MScrollV(curr, -n, curr->w_y, curr->w_bot);
- LScrollV(&curr->w_layer, -n, curr->w_y, curr->w_bot);
+ MScrollV(curr, -n, curr->w_y, curr->w_bot, CURR_BCE);
+ LScrollV(&curr->w_layer, -n, curr->w_y, curr->w_bot, CURR_BCE);
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
}
@@ -1682,8 +1790,8 @@ static void
ScrollRegion(n)
int n;
{
- MScrollV(curr, n, curr->w_top, curr->w_bot);
- LScrollV(&curr->w_layer, n, curr->w_top, curr->w_bot);
+ MScrollV(curr, n, curr->w_top, curr->w_bot, CURR_BCE);
+ LScrollV(&curr->w_layer, n, curr->w_top, curr->w_bot, CURR_BCE);
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
}
@@ -1695,7 +1803,7 @@ ForwardTab()
if (x == cols)
{
- LineFeed(2);
+ LineFeed(1);
x = 0;
}
if (curr->w_tabs[x] && x < cols - 1)
@@ -1722,11 +1830,11 @@ BackwardTab()
static void
ClearScreen()
{
- LClear(&curr->w_layer, 0, 0, curr->w_width - 1, curr->w_height - 1, 1);
+ LClearArea(&curr->w_layer, 0, 0, curr->w_width - 1, curr->w_height - 1, CURR_BCE, 1);
#ifdef COPY_PASTE
- MScrollV(curr, curr->w_height, 0, curr->w_height - 1);
+ MScrollV(curr, curr->w_height, 0, curr->w_height - 1, CURR_BCE);
#else
- MClear(curr, 0, 0, curr->w_width - 1, curr->w_height - 1);
+ MClearArea(curr, 0, 0, curr->w_width - 1, curr->w_height - 1, CURR_BCE);
#endif
}
@@ -1735,8 +1843,8 @@ ClearFromBOS()
{
register int y = curr->w_y, x = curr->w_x;
- LClear(&curr->w_layer, 0, 0, x, y, 1);
- MClear(curr, 0, 0, x, y);
+ LClearArea(&curr->w_layer, 0, 0, x, y, CURR_BCE, 1);
+ MClearArea(curr, 0, 0, x, y, CURR_BCE);
RestorePosRendition();
}
@@ -1748,10 +1856,11 @@ ClearToEOS()
if (x == 0 && y == 0)
{
ClearScreen();
+ RestorePosRendition();
return;
}
- LClear(&curr->w_layer, x, y, cols - 1, rows - 1, 1);
- MClear(curr, x, y, cols - 1, rows - 1);
+ LClearArea(&curr->w_layer, x, y, cols - 1, rows - 1, CURR_BCE, 1);
+ MClearArea(curr, x, y, cols - 1, rows - 1, CURR_BCE);
RestorePosRendition();
}
@@ -1760,8 +1869,8 @@ ClearLineRegion(from, to)
int from, to;
{
register int y = curr->w_y;
- LClear(&curr->w_layer, from, y, to, y, 1);
- MClear(curr, from, y, to, y);
+ LClearArea(&curr->w_layer, from, y, to, y, CURR_BCE, 1);
+ MClearArea(curr, from, y, to, y, CURR_BCE);
RestorePosRendition();
}
@@ -1773,7 +1882,7 @@ register int n;
if (x == cols)
{
- LineFeed(2);
+ LineFeed(1);
x = 0;
}
if ((curr->w_x += n) >= cols)
@@ -1851,7 +1960,7 @@ int on;
static char rendlist[] =
{
- (1 << NATTR), A_BD, A_DI, A_SO, A_US, A_BL, 0, A_RV, 0, 0,
+ ~((1 << NATTR) - 1), A_BD, A_DI, A_SO, A_US, A_BL, 0, A_RV, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, ~(A_BD|A_SO|A_DI), ~A_SO, ~A_US, ~A_BL, 0, ~A_RV
};
@@ -1859,21 +1968,83 @@ static char rendlist[] =
static void
SelectRendition()
{
- register int j, i = 0, a = curr->w_rend.attr;
#ifdef COLOR
- register int c = curr->w_rend.color;
+ register int j, i = 0, a = curr->w_rend.attr, c = curr->w_rend.color;
+# ifdef COLORS256
+ int cx = curr->w_rend.colorx;
+# endif
+#else
+ register int j, i = 0, a = curr->w_rend.attr;
#endif
do
{
j = curr->w_args[i];
#ifdef COLOR
- if (j >= 30 && j <= 39)
- c = (c & 0xf0) | (39 - j);
- else if (j >= 40 && j <= 49)
- c = (c & 0x0f) | ((49 - j) << 4);
+ if ((j == 38 || j == 48) && i + 2 < curr->w_NumArgs && curr->w_args[i + 1] == 5)
+ {
+ int jj;
+
+ i += 2;
+ jj = curr->w_args[i];
+ if (jj < 0 || jj > 255)
+ continue;
+# ifdef COLORS256
+ if (j == 38)
+ {
+ c = (c & 0xf0) | ((jj & 0x0f) ^ 9);
+ a |= A_BFG;
+ if (jj >= 8 && jj < 16)
+ c |= 0x08;
+ else
+ a ^= A_BFG;
+ a = (a & 0xbf) | (jj & 8 ? 0x40 : 0);
+ cx = (cx & 0xf0) | (jj >> 4 & 0x0f);
+ }
+ else
+ {
+ c = (c & 0x0f) | ((jj & 0x0f) ^ 9) << 4;
+ a |= A_BBG;
+ if (jj >= 8 && jj < 16)
+ c |= 0x80;
+ else
+ a ^= A_BBG;
+ cx = (cx & 0x0f) | (jj & 0xf0);
+ }
+ continue;
+# else
+ jj = color256to16(jj) + 30;
+ if (jj >= 38)
+ jj += 60 - 8;
+ j = j == 38 ? jj : jj + 10;
+# endif
+ }
+# ifdef COLORS16
+ if (j == 0 || (j >= 30 && j <= 39 && j != 38))
+ a &= 0xbf;
+ if (j == 0 || (j >= 40 && j <= 49 && j != 48))
+ a &= 0x7f;
+ if (j >= 90 && j <= 97)
+ a |= 0x40;
+ if (j >= 100 && j <= 107)
+ a |= 0x80;
+# endif
+ if (j >= 90 && j <= 97)
+ j -= 60;
+ if (j >= 100 && j <= 107)
+ j -= 60;
+ if (j >= 30 && j <= 39 && j != 38)
+ c = (c & 0xf0) | ((j - 30) ^ 9);
+ else if (j >= 40 && j <= 49 && j != 48)
+ c = (c & 0x0f) | (((j - 40) ^ 9) << 4);
if (j == 0)
c = 0;
+# ifdef COLORS256
+ if (j == 0 || (j >= 30 && j <= 39 && j != 38))
+ cx &= 0xf0;
+ if (j == 0 || (j >= 40 && j <= 49 && j != 48))
+ cx &= 0x0f;
+# endif
#endif
if (j < 0 || j >= (sizeof(rendlist)/sizeof(*rendlist)))
continue;
@@ -1887,6 +2058,9 @@ SelectRendition()
curr->w_rend.attr = a;
#ifdef COLOR
curr->w_rend.color = c;
+# ifdef COLORS256
+ curr->w_rend.colorx = cx;
+# endif
#endif
LSetRendition(&curr->w_layer, &curr->w_rend);
}
@@ -1895,9 +2069,9 @@ static void
FillWithEs()
{
register int i;
- register char *p, *ep;
+ register unsigned char *p, *ep;
- ClearLayer(&curr->w_layer, 1);
+ LClearAll(&curr->w_layer, 1);
curr->w_y = curr->w_x = 0;
for (i = 0; i < rows; ++i)
{
@@ -1907,7 +2081,7 @@ FillWithEs()
while (p < ep)
*p++ = 'E';
}
- RedisplayLayer(&curr->w_layer, 1);
+ LRefreshAll(&curr->w_layer, 1);
}
@@ -1939,7 +2113,7 @@ int l;
static void
FindAKA()
{
- register char *cp, *line;
+ register unsigned char *cp, *line;
register struct win *wp = curr;
register int len = strlen(wp->w_akabuf);
int y;
@@ -1958,7 +2132,7 @@ FindAKA()
goto try_line;
return;
}
- if (strncmp(cp, wp->w_akabuf, len) == 0)
+ if (strncmp((char *)cp, wp->w_akabuf, len) == 0)
break;
cp++;
}
@@ -1979,7 +2153,7 @@ FindAKA()
line = cp;
len--;
}
- ChangeAKA(wp, line, cp - line);
+ ChangeAKA(wp, (char *)line, cp - line);
}
else
wp->w_autoaka = 0;
@@ -2033,18 +2207,18 @@ struct mchar *mc;
struct mline *ml = &p->w_mlines[y];
if (mc->attr && ml->attr == null)
{
- if ((ml->attr = (char *)malloc(p->w_width + 1)) == 0)
+ if ((ml->attr = (unsigned char *)malloc(p->w_width + 1)) == 0)
{
ml->attr = null;
mc->attr = p->w_rend.attr = 0;
WMsg(p, 0, "Warning: no space for attr - turned off");
}
- bzero(ml->attr, p->w_width + 1);
+ bzero((char *)ml->attr, p->w_width + 1);
}
#ifdef FONT
if (mc->font && ml->font == null)
{
- if ((ml->font = (char *)malloc(p->w_width + 1)) == 0)
+ if ((ml->font = (unsigned char *)malloc(p->w_width + 1)) == 0)
{
ml->font = null;
p->w_FontL = p->w_charsets[p->w_ss ? p->w_ss : p->w_Charset] = 0;
@@ -2052,62 +2226,109 @@ struct mchar *mc;
mc->font = p->w_rend.font = 0;
WMsg(p, 0, "Warning: no space for font - turned off");
}
- bzero(ml->font, p->w_width + 1);
+ bzero((char *)ml->font, p->w_width + 1);
}
#endif
#ifdef COLOR
if (mc->color && ml->color == null)
{
- if ((ml->color = (char *)malloc(p->w_width + 1)) == 0)
+ if ((ml->color = (unsigned char *)malloc(p->w_width + 1)) == 0)
{
ml->color = null;
mc->color = p->w_rend.color = 0;
WMsg(p, 0, "Warning: no space for color - turned off");
}
- bzero(ml->color, p->w_width + 1);
+ bzero((char *)ml->color, p->w_width + 1);
}
+# ifdef COLORS256
+ if (mc->colorx && ml->colorx == null)
+ {
+ if ((ml->colorx = (unsigned char *)malloc(p->w_width + 1)) == 0)
+ {
+ ml->colorx = null;
+ mc->colorx = p->w_rend.colorx = 0;
+ WMsg(p, 0, "Warning: no space for extended colors - turned off");
+ }
+ bzero((char *)ml->colorx, p->w_width + 1);
+ }
+# endif
#endif
}
/*****************************************************************/
+#ifdef DW_CHARS
+# define MKillDwRight(p, ml, x) \
+ if (dw_right(ml, x, p->w_encoding)) \
+ { \
+ if (x > 0) \
+ copy_mchar2mline(&mchar_blank, ml, x - 1); \
+ copy_mchar2mline(&mchar_blank, ml, x); \
+ }
+
+# define MKillDwLeft(p, ml, x) \
+ if (dw_left(ml, x, p->w_encoding)) \
+ { \
+ copy_mchar2mline(&mchar_blank, ml, x); \
+ copy_mchar2mline(&mchar_blank, ml, x + 1); \
+ }
+#else
+# define MKillDwRight(p, ml, x) ;
+# define MKillDwLeft(p, ml, x) ;
+#endif
+
static void
-MScrollH(p, n, y, xs, xe)
+MScrollH(p, n, y, xs, xe, bce)
struct win *p;
-int n, y, xs, xe;
+int n, y, xs, xe, bce;
{
struct mline *ml;
if (n == 0)
return;
ml = &p->w_mlines[y];
+ MKillDwRight(p, ml, xs);
+ MKillDwLeft(p, ml, xe);
if (n > 0)
{
if (xe - xs + 1 > n)
- bcopy_mline(ml, xs + n, xs, xe + 1 - xs - n);
+ {
+ MKillDwRight(p, ml, xs + n);
+ bcopy_mline(ml, xs + n, xs, xe + 1 - xs - n);
+ }
else
n = xe - xs + 1;
clear_mline(ml, xe + 1 - n, n);
+#ifdef COLOR
+ if (bce)
+ MBceLine(p, y, xe + 1 - n, n, bce);
+#endif
}
else
{
n = -n;
if (xe - xs + 1 > n)
- bcopy_mline(ml, xs, xs + n, xe + 1 - xs - n);
+ {
+ MKillDwLeft(p, ml, xe - n);
+ bcopy_mline(ml, xs, xs + n, xe + 1 - xs - n);
+ }
else
n = xe - xs + 1;
clear_mline(ml, xs, n);
+#ifdef COLOR
+ if (bce)
+ MBceLine(p, y, xs, n, bce);
+#endif
}
}
static void
-MScrollV(p, n, ys, ye)
+MScrollV(p, n, ys, ye, bce)
struct win *p;
-int n;
-int ys, ye;
+int n, ys, ye, bce;
{
int i, cnt1, cnt2;
- struct mline *tmp[256];
+ struct mline tmp[256];
struct mline *ml;
if (n == 0)
@@ -2116,7 +2337,7 @@ int ys, ye;
{
if (n > 256)
{
- MScrollV(p, n - 256, ys, ye);
+ MScrollV(p, n - 256, ys, ye, bce);
n = 256;
}
if (ye - ys + 1 < n)
@@ -2137,7 +2358,7 @@ int ys, ye;
{
#ifdef COPY_PASTE
if (ys == p->w_top)
- AddLineToHist(p, ml);
+ WAddLineToHist(p, ml);
#endif
if (ml->attr != null)
free(ml->attr);
@@ -2151,8 +2372,17 @@ int ys, ye;
if (ml->color != null)
free(ml->color);
ml->color = null;
+# ifdef COLORS256
+ if (ml->colorx != null)
+ free(ml->colorx);
+ ml->colorx = null;
+# endif
+#endif
+ bclear((char *)ml->image, p->w_width + 1);
+#ifdef COLOR
+ if (bce)
+ MBceLine(p, i, 0, p->w_width, bce);
#endif
- bclear(ml->image, p->w_width + 1);
}
/* switch 'em over */
cnt1 = n * sizeof(struct mline);
@@ -2164,7 +2394,7 @@ int ys, ye;
{
if (n < -256)
{
- MScrollV(p, n + 256, ys, ye);
+ MScrollV(p, n + 256, ys, ye, bce);
n = -256;
}
n = -n;
@@ -2187,8 +2417,17 @@ int ys, ye;
if (ml->color != null)
free(ml->color);
ml->color = null;
+# ifdef COLORS256
+ if (ml->colorx != null)
+ free(ml->colorx);
+ ml->colorx = null;
+# endif
+#endif
+ bclear((char *)ml->image, p->w_width + 1);
+#ifdef COLOR
+ if (bce)
+ MBceLine(p, i, 0, p->w_width, bce);
#endif
- bclear(ml->image, p->w_width + 1);
}
cnt1 = n * sizeof(struct mline);
cnt2 = (ye - ys + 1 - n) * sizeof(struct mline);
@@ -2219,9 +2458,9 @@ int cnt1, cnt2;
}
static void
-MClear(p, xs, ys, xe, ye)
+MClearArea(p, xs, ys, xe, ye, bce)
struct win *p;
-int xs, ys, xe, ye;
+int xs, ys, xe, ye, bce;
{
int n, y;
int xxe;
@@ -2233,6 +2472,9 @@ int xs, ys, xe, ye;
if (xe >= p->w_width)
xe = p->w_width - 1;
+ MKillDwRight(p, p->w_mlines + ys, xs);
+ MKillDwLeft(p, p->w_mlines + ye, xe);
+
ml = p->w_mlines + ys;
for (y = ys; y <= ye; y++, ml++)
{
@@ -2240,6 +2482,10 @@ int xs, ys, xe, ye;
n = xxe - xs + 1;
if (n > 0)
clear_mline(ml, xs, n);
+#ifdef COLOR
+ if (n > 0 && bce)
+ MBceLine(p, y, xs, xs + n - 1, bce);
+#endif
xs = 0;
}
}
@@ -2257,9 +2503,33 @@ int x, y;
MFixLine(p, y, c);
ml = p->w_mlines + y;
n = p->w_width - x - 1;
+ MKillDwRight(p, ml, x);
if (n > 0)
- bcopy_mline(ml, x, x + 1, n);
+ {
+ MKillDwRight(p, ml, p->w_width - 1);
+ bcopy_mline(ml, x, x + 1, n);
+ }
copy_mchar2mline(c, ml, x);
+#ifdef DW_CHARS
+ if (c->mbcs)
+ {
+ if (--n > 0)
+ {
+ MKillDwRight(p, ml, p->w_width - 1);
+ bcopy_mline(ml, x + 1, x + 2, n);
+ }
+ copy_mchar2mline(c, ml, x + 1);
+ ml->image[x + 1] = c->mbcs;
+# ifdef UTF8
+ if (p->w_encoding != UTF8)
+ ml->font[x + 1] |= 0x80;
+ else if (p->w_encoding == UTF8 && c->mbcs)
+ ml->font[x + 1] = c->mbcs;
+# else
+ ml->font[x + 1] |= 0x80;
+# endif
+ }
+#endif
}
static void
@@ -2272,7 +2542,24 @@ int x, y;
MFixLine(p, y, c);
ml = &p->w_mlines[y];
+ MKillDwRight(p, ml, x);
copy_mchar2mline(c, ml, x);
+#ifdef DW_CHARS
+ if (c->mbcs)
+ {
+ MKillDwLeft(p, ml, x + 1);
+ copy_mchar2mline(c, ml, x + 1);
+ ml->image[x + 1] = c->mbcs;
+# ifdef UTF8
+ if (p->w_encoding != UTF8)
+ ml->font[x + 1] |= 0x80;
+ else if (p->w_encoding == UTF8 && c->mbcs)
+ ml->font[x + 1] = c->mbcs;
+# else
+ ml->font[x + 1] |= 0x80;
+# endif
+ }
+#endif
}
@@ -2284,28 +2571,103 @@ int y, top, bot;
int ins;
{
struct mline *ml;
+ int bce;
+#ifdef COLOR
+ bce = rend_getbg(c);
+#else
+ bce = 0;
+#endif
MFixLine(p, y, c);
ml = &p->w_mlines[y];
copy_mchar2mline(&mchar_null, ml, p->w_width);
if (y == bot)
- MScrollV(p, 1, top, bot);
+ MScrollV(p, 1, top, bot, bce);
else if (y < p->w_height - 1)
y++;
- MFixLine(p, y, c);
+ if (ins)
+ MInsChar(p, c, 0, y);
+ else
+ MPutChar(p, c, 0, y);
+}
+
+static void
+MPutStr(p, s, n, r, x, y)
+struct win *p;
+char *s;
+int n;
+struct mchar *r;
+int x, y;
+{
+ struct mline *ml;
+ int i;
+ unsigned char *b;
+
+ if (n <= 0)
+ return;
+ MFixLine(p, y, r);
ml = &p->w_mlines[y];
- if (ins && p->w_width > 1)
- bcopy_mline(ml, 0, 1, p->w_width - 1);
- copy_mchar2mline(c, ml, 0);
+ MKillDwRight(p, ml, x);
+ MKillDwLeft(p, ml, x + n - 1);
+ bcopy(s, (char *)ml->image + x, n);
+ b = ml->attr + x;
+ for (i = n; i-- > 0;)
+ *b++ = r->attr;
+#ifdef FONT
+ b = ml->font + x;
+ for (i = n; i-- > 0;)
+ *b++ = r->font;
+#endif
+#ifdef COLOR
+ b = ml->color + x;
+ for (i = n; i-- > 0;)
+ *b++ = r->color;
+# ifdef COLORS256
+ b = ml->colorx + x;
+ for (i = n; i-- > 0;)
+ *b++ = r->colorx;
+# endif
+#endif
+}
+
+#ifdef COLOR
+static void
+MBceLine(p, y, xs, xe, bce)
+struct win *p;
+int y, xs, xe, bce;
+{
+ struct mchar mc;
+ struct mline *ml;
+ int x;
+
+ mc = mchar_null;
+ rend_setbg(&mc, bce);
+ MFixLine(p, y, &mc);
+ ml = p->w_mlines + y;
+# ifdef COLORS16
+ if (mc.attr)
+ for (x = xs; x <= xe; x++)
+ ml->attr[x] = mc.attr;
+# endif
+ if (mc.color)
+ for (x = xs; x <= xe; x++)
+ ml->color[x] = mc.color;
+# ifdef COLORS256
+ if (mc.colorx)
+ for (x = xs; x <= xe; x++)
+ ml->colorx[x] = mc.colorx;
+# endif
}
+#endif
+
#ifdef COPY_PASTE
static void
-AddLineToHist(wp, ml)
+WAddLineToHist(wp, ml)
struct win *wp;
struct mline *ml;
{
- register char *q, *o;
+ register unsigned char *q, *o;
struct mline *hml;
if (wp->w_histheight == 0)
@@ -2327,6 +2689,11 @@ struct mline *ml;
q = ml->color; o = hml->color; hml->color = q; ml->color = null;
if (o != null)
free(o);
+# ifdef COLORS256
+ q = ml->colorx; o = hml->colorx; hml->colorx = q; ml->colorx = null;
+ if (o != null)
+ free(o);
+# endif
#endif
if (++wp->w_histidx >= wp->w_histheight)
@@ -2352,6 +2719,10 @@ int ys, ye;
#ifdef COLOR
if (ml->color != null && bcmp((char*)ml->color, null, p->w_width))
break;
+# ifdef COLORS256
+ if (ml->colorx != null && bcmp((char*)ml->colorx, null, p->w_width))
+ break;
+# endif
#endif
}
debug1("MFindUsedLine returning %d\n", y);
@@ -2366,7 +2737,7 @@ int ys, ye;
/*
* Tricky: send only one bell even if the window is displayed
- * more than one times.
+ * more than once.
*/
void
WBell(p, visual)
@@ -2380,9 +2751,9 @@ int visual;
if (cv->c_layer->l_bottom == &p->w_layer)
break;
if (cv && !visual)
- PutStr(D_BL);
+ AddCStr(D_BL);
else if (cv && D_VB)
- PutStr(D_VB);
+ AddCStr(D_VB);
else
p->w_bell = visual ? BELL_VISUAL : BELL_FOUND;
}
@@ -2410,7 +2781,7 @@ int on;
if (!on && p->w_revvid && !D_CVR)
{
if (D_VB)
- PutStr(D_VB);
+ AddCStr(D_VB);
else
p->w_bell = BELL_VISUAL;
}
@@ -2485,15 +2856,22 @@ int what;
int *hp;
{
int h = 0;
+ int l;
while(*s)
{
- if (*s++ != '%')
+ if (*s++ != (hp ? '%' : '\005'))
continue;
+ l = 0;
while (*s >= '0' && *s <= '9')
s++;
+ if (*s == 'L')
+ {
+ s++;
+ l = 0x100;
+ }
if (*s == 'h')
h = 1;
- if (*s == what || what == 'd')
+ if (*s == what || ((*s | l) == what) || what == 'd')
break;
if (*s)
s++;
@@ -2508,16 +2886,31 @@ WindowChanged(p, what)
struct win *p;
int what;
{
- int inwstr, inhstr;
- int inwstrh, inhstrh;
+ int inwstr, inhstr, inlstr;
+ int inwstrh = 0, inhstrh = 0, inlstrh = 0;
int got, ox, oy;
struct display *olddisplay = display;
struct canvas *cv;
inwstr = inhstr = 0;
- inwstr = WindowChangedCheck(captionstring, what, &inwstrh);
- inhstr = WindowChangedCheck(hstatusstring, what, &inhstrh);
+ if (what == 'f')
+ {
+ WindowChanged((struct win *)0, 'w'|0x100);
+ WindowChanged((struct win *)0, 'W'|0x100);
+ }
+
+ if (what)
+ {
+ inwstr = WindowChangedCheck(captionstring, what, &inwstrh);
+ inhstr = WindowChangedCheck(hstatusstring, what, &inhstrh);
+ inlstr = WindowChangedCheck(wliststr, what, &inlstrh);
+ }
+ else
+ {
+ inwstr = inhstr = 0;
+ inlstr = 1;
+ }
if (p == 0)
{
@@ -2527,6 +2920,8 @@ int what;
oy = D_y;
for (cv = D_cvlist; cv; cv = cv->c_next)
{
+ if (inlstr || (inlstrh && p && p->w_hstatus && *p->w_hstatus && WindowChangedCheck(p->w_hstatus, what, (int *)0)))
+ WListUpdatecv(cv, (struct win *)0);
p = Layer2Window(cv->c_layer);
if (inwstr || (inwstrh && p && p->w_hstatus && *p->w_hstatus && WindowChangedCheck(p->w_hstatus, what, (int *)0)))
if (cv->c_ye + 1 < D_height)
@@ -2542,12 +2937,13 @@ int what;
return;
}
- if (p->w_hstatus && *p->w_hstatus && (inwstrh || inhstrh) && WindowChangedCheck(p->w_hstatus, what, (int *)0))
+ if (p->w_hstatus && *p->w_hstatus && (inwstrh || inhstrh || inlstrh) && WindowChangedCheck(p->w_hstatus, what, (int *)0))
{
inwstr |= inwstrh;
inhstr |= inhstrh;
+ inlstr |= inlstrh;
}
- if (!inwstr && !inhstr)
+ if (!inwstr && !inhstr && !inlstr)
return;
for (display = displays; display; display = display->d_next)
{
@@ -2556,6 +2952,8 @@ int what;
oy = D_y;
for (cv = D_cvlist; cv; cv = cv->c_next)
{
+ if (inlstr)
+ WListUpdatecv(cv, p);
if (Layer2Window(cv->c_layer) != p)
continue;
got = 1;
diff --git a/ansi.h b/ansi.h
index b34d7bd..1ac661b 100644
--- a/ansi.h
+++ b/ansi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -43,6 +43,14 @@
#define ATYP_S (1<<1)
#define ATYP_U (1<<2)
+#ifdef COLORS16
+/* pseudo attributes */
+# define ATTR_BFG 6 /* bright foreground */
+# define ATTR_BBG 7 /* bright background */
+# define A_BFG (1<<ATTR_BFG)
+# define A_BBG (1<<ATTR_BBG)
+#endif
+
/*
* Parser state
*/
@@ -106,13 +114,57 @@ enum move_t {
#define STATLINE (D_height-1)
#endif
-#ifdef KANJI
+#ifdef ENCODINGS
-#undef KANJI
-#define KANJI ('B' & 037)
+#define KANJI ('B' & 037)
+#define KANJI0212 ('D' & 037)
#define KANA 'I'
-#define EUC 1
+#define EUC_JP 1
#define SJIS 2
+#define EUC_KR 3
+#define EUC_CN 4
+#define BIG5 5
+#define KOI8R 6
+#define CP1251 7
+
+#define EUC EUC_JP
+
+#endif
+
+#ifdef UTF8
+#undef UTF8
+#define UTF8 8
+#endif
+
+#ifdef UTF8
+# define UCS_REPL 0xfffd /* character for illegal codes */
+# define UCS_REPL_DW 0xff1f /* character for illegal codes */
+# define UCS_HIDDEN 0xffff
+#endif
+#ifdef DW_CHARS
+# define is_dw_font(f) ((f) && ((f) & 0x60) == 0)
+
+# ifdef UTF8
+# define dw_left(ml, x, enc) ((enc == UTF8) ? \
+ (unsigned char)(ml)->font[(x) + 1] == 0xff && (unsigned char)(ml)->image[(x) + 1] == 0xff : \
+ ((unsigned char)(ml)->font[x] & 0x1f) != 0 && ((unsigned char)(ml)->font[x] & 0xe0) == 0 \
+ )
+# define dw_right(ml, x, enc) ((enc == UTF8) ? \
+ (unsigned char)(ml)->font[x] == 0xff && (unsigned char)(ml)->image[x] == 0xff : \
+ ((unsigned char)(ml)->font[x] & 0xe0) == 0x80 \
+ )
+# else
+# define dw_left(ml, x, enc) ( \
+ ((unsigned char)(ml)->font[x] & 0x1f) != 0 && ((unsigned char)(ml)->font[x] & 0xe0) == 0 \
+ )
+# define dw_right(ml, x, enc) ( \
+ ((unsigned char)(ml)->font[x] & 0xe0) == 0x80 \
+ )
+# endif /* UTF8 */
+#else
+# define dw_left(ml, x, enc) 0
+# define dw_right(ml, x, enc) 0
#endif
+
diff --git a/attacher.c b/attacher.c
index db953ad..92de3ce 100644
--- a/attacher.c
+++ b/attacher.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -35,6 +35,7 @@ RCS_ID("$Id: attacher.c,v 1.8 1994/05/31 12:31:32 mlschroe Exp $ FAU")
#include <pwd.h>
+static int WriteMessage __P((int, struct msg *));
static sigret_t AttacherSigInt __P(SIGPROTOARG);
#if defined(SIGWINCH) && defined(TIOCGWINSZ)
static sigret_t AttacherWinch __P(SIGPROTOARG);
@@ -58,6 +59,7 @@ extern struct passwd *ppp;
extern char *attach_tty, *attach_term, *LoginName, *preselect;
extern int xflag, dflag, rflag, quietflag, adaptflag;
extern struct mode attach_Mode;
+extern struct NewWindow nwin_options;
extern int MasterPid;
#ifdef MULTIUSER
@@ -90,6 +92,26 @@ AttachSigCont SIGDEFARG
* MSG_CONT, MSG_WINCH and nothing else!
*/
+static int
+WriteMessage(s, m)
+int s;
+struct msg *m;
+{
+ int r, l = sizeof(*m);
+
+ while(l > 0)
+ {
+ r = write(s, (char *)m + (sizeof(*m) - l), l);
+ if (r == -1 && errno == EINTR)
+ continue;
+ if (r == -1 || r == 0)
+ return -1;
+ l -= r;
+ }
+ return 0;
+}
+
+
int
Attach(how)
int how;
@@ -141,8 +163,8 @@ int how;
if (ret == SIG_POWER_BYE)
{
int ppid;
- setuid(real_uid);
setgid(real_gid);
+ setuid(real_uid);
if ((ppid = getppid()) > 1)
Kill(ppid, SIGHUP);
exit(0);
@@ -184,7 +206,7 @@ int how;
{
if ((lasts = MakeClientSocket(0)) >= 0)
{
- write(lasts, (char *)&m, sizeof(m));
+ WriteMessage(lasts, &m);
close(lasts);
}
return 0;
@@ -285,8 +307,8 @@ int how;
else
# endif
m.type = MSG_DETACH;
- if (write(lasts, (char *) &m, sizeof(m)) != sizeof(m))
- Panic(errno, "write");
+ if (WriteMessage(lasts, &m))
+ Panic(errno, "WriteMessage");
close(lasts);
if (how != MSG_ATTACH)
return 0; /* we detached it. jw. */
@@ -314,6 +336,7 @@ int how;
m.m.attach.lines = atoi(s);
if ((s = getenv("COLUMNS")))
m.m.attach.columns = atoi(s);
+ m.m.attach.encoding = nwin_options.encoding > 0 ? nwin_options.encoding + 1 : 0;
#ifdef MULTIUSER
/* setup CONT signal handler to repair the terminal mode */
@@ -321,8 +344,8 @@ int how;
signal(SIGCONT, AttachSigCont);
#endif
- if (write(lasts, (char *) &m, sizeof(m)) != sizeof(m))
- Panic(errno, "write");
+ if (WriteMessage(lasts, &m))
+ Panic(errno, "WriteMessage");
close(lasts);
debug1("Attach(%d): sent\n", m.type);
#ifdef MULTIUSER
@@ -350,14 +373,14 @@ int how;
#if defined(DEBUG) || !defined(DO_NOT_POLL_MASTER)
-static int AttacherPanic;
+static int AttacherPanic = 0;
#endif
#ifdef DEBUG
static sigret_t
AttacherChld SIGDEFARG
{
- AttacherPanic=1;
+ AttacherPanic = 1;
SIGRETURN;
}
#endif
@@ -387,7 +410,7 @@ AttacherSigInt SIGDEFARG
/*
* Unfortunatelly this is also the SIGHUP handler, so we have to
- * check, if the backend is already detached.
+ * check if the backend is already detached.
*/
sigret_t
@@ -412,7 +435,7 @@ AttacherFinit SIGDEFARG
m.protocol_revision = MSG_REVISION;
if ((s = MakeClientSocket(0)) >= 0)
{
- write(s, (char *)&m, sizeof(m));
+ WriteMessage(s, &m);
close(s);
}
}
@@ -437,12 +460,12 @@ AttacherFinitBye SIGDEFARG
if (multiattach)
exit(SIG_POWER_BYE);
#endif
+ setgid(real_gid);
#ifdef MULTIUSER
setuid(own_uid);
#else
setuid(real_uid);
#endif
- setgid(real_gid);
/* we don't want to disturb init (even if we were root), eh? jw */
if ((ppid = getppid()) > 1)
Kill(ppid, SIGHUP); /* carefully say good bye. jw. */
@@ -557,14 +580,10 @@ Attacher()
#if defined(DEBUG) || !defined(DO_NOT_POLL_MASTER)
if (AttacherPanic)
{
-# ifdef FORKDEBUG
- exit(0);
-# else
fcntl(0, F_SETFL, 0);
SetTTY(0, &attach_Mode);
printf("\nSuddenly the Dungeon collapses!! - You die...\n");
eexit(1);
-# endif
}
#endif
#ifdef BSDJOBS
@@ -622,12 +641,12 @@ static sigret_t
LockHup SIGDEFARG
{
int ppid = getppid();
+ setgid(real_gid);
#ifdef MULTIUSER
setuid(own_uid);
#else
setuid(real_uid);
#endif
- setgid(real_gid);
if (ppid > 1)
Kill(ppid, SIGHUP);
exit(0);
@@ -653,12 +672,12 @@ LockTerminal()
if ((pid = fork()) == 0)
{
/* Child */
+ setgid(real_gid);
#ifdef MULTIUSER
setuid(own_uid);
#else
setuid(real_uid); /* this should be done already */
#endif
- setgid(real_gid);
closeallfiles(0); /* important: /etc/shadow may be open */
execl(prg, "SCREEN-LOCK", NULL);
exit(errno);
@@ -722,13 +741,79 @@ LockTerminal()
}
} /* LockTerminal */
+#ifdef USE_PAM
+
+/*
+ * PAM support by Pablo Averbuj <pablo@averbuj.com>
+ */
+
+#include <security/pam_appl.h>
+
+static int PAM_conv __P((int, const struct pam_message **, struct pam_response **, void *));
+
+static int
+PAM_conv(num_msg, msg, resp, appdata_ptr)
+int num_msg;
+const struct pam_message **msg;
+struct pam_response **resp;
+void *appdata_ptr;
+{
+ int replies = 0;
+ struct pam_response *reply = NULL;
+
+ reply = malloc(sizeof(struct pam_response)*num_msg);
+ if (!reply)
+ return PAM_CONV_ERR;
+ #define COPY_STRING(s) (s) ? strdup(s) : NULL
+
+ for (replies = 0; replies < num_msg; replies++)
+ {
+ switch (msg[replies]->msg_style)
+ {
+ case PAM_PROMPT_ECHO_OFF:
+ /* wants password */
+ reply[replies].resp_retcode = PAM_SUCCESS;
+ reply[replies].resp = appdata_ptr ? strdup((char *)appdata_ptr) : 0;
+ break;
+ case PAM_TEXT_INFO:
+ /* ignore the informational mesage */
+ /* but first clear out any drek left by malloc */
+ reply[replies].resp = NULL;
+ break;
+ case PAM_PROMPT_ECHO_ON:
+ /* user name given to PAM already */
+ /* fall through */
+ default:
+ /* unknown or PAM_ERROR_MSG */
+ free(reply);
+ return PAM_CONV_ERR;
+ }
+ }
+ *resp = reply;
+ return PAM_SUCCESS;
+}
+
+static struct pam_conv PAM_conversation = {
+ &PAM_conv,
+ NULL
+};
+
+
+#endif
+
/* -- original copyright by Luigi Cannelloni 1985 (luigi@faui70.UUCP) -- */
static void
screen_builtin_lck()
{
char fullname[100], *cp1, message[100 + 100];
+#ifdef USE_PAM
+ pam_handle_t *pamh = 0;
+ int pam_error;
+#else
char *pass, mypass[9];
+#endif
+#ifndef USE_PAM
pass = ppp->pw_passwd;
if (pass == 0 || *pass == 0)
{
@@ -756,6 +841,7 @@ screen_builtin_lck()
}
pass = 0;
}
+#endif
debug("screen_builtin_lck looking in gcos field\n");
strncpy(fullname, ppp->pw_gecos, sizeof(fullname) - 9);
@@ -784,6 +870,17 @@ screen_builtin_lck()
AttacherFinit(SIGARG);
/* NOTREACHED */
}
+#ifdef USE_PAM
+ PAM_conversation.appdata_ptr = cp1;
+ pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh);
+ if (pam_error != PAM_SUCCESS)
+ AttacherFinit(SIGARG); /* goodbye */
+ pam_error = pam_authenticate(pamh, 0);
+ pam_end(pamh, pam_error);
+ PAM_conversation.appdata_ptr = 0;
+ if (pam_error == PAM_SUCCESS)
+ break;
+#else
if (pass)
{
if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
@@ -794,9 +891,75 @@ screen_builtin_lck()
if (!strcmp(cp1, mypass))
break;
}
+#endif
debug("screen_builtin_lck: NO!!!!!\n");
+ bzero(cp1, strlen(cp1));
}
+ bzero(cp1, strlen(cp1));
debug("password ok.\n");
}
#endif /* LOCK */
+
+
+void
+SendCmdMessage(sty, match, av)
+char *sty;
+char *match;
+char **av;
+{
+ int i, s;
+ struct msg m;
+ char *p;
+ int len, n;
+
+ if (sty == 0)
+ {
+ i = FindSocket(&s, (int *)0, (int *)0, match);
+ if (i == 0)
+ Panic(0, "No screen session found.");
+ if (i != 1)
+ Panic(0, "Use -S to specify a session.");
+ }
+ else
+ {
+#ifdef NAME_MAX
+ if (strlen(sty) > NAME_MAX)
+ sty[NAME_MAX] = 0;
+#endif
+ if (strlen(sty) > 2 * MAXSTR - 1)
+ sty[2 * MAXSTR - 1] = 0;
+ sprintf(SockPath + strlen(SockPath), "/%s", sty);
+ if ((s = MakeClientSocket(1)) == -1)
+ exit(1);
+ }
+ bzero((char *)&m, sizeof(m));
+ m.type = MSG_COMMAND;
+ if (attach_tty)
+ {
+ strncpy(m.m_tty, attach_tty, sizeof(m.m_tty) - 1);
+ m.m_tty[sizeof(m.m_tty) - 1] = 0;
+ }
+ p = m.m.command.cmd;
+ n = 0;
+ for (; *av && n < MAXARGS - 1; ++av, ++n)
+ {
+ len = strlen(*av) + 1;
+ if (p + len >= m.m.command.cmd + sizeof(m.m.command.cmd) - 1)
+ break;
+ strcpy(p, *av);
+ p += len;
+ }
+ *p = 0;
+ m.m.command.nargs = n;
+ strncpy(m.m.attach.auser, LoginName, sizeof(m.m.attach.auser) - 1);
+ m.m.command.auser[sizeof(m.m.command.auser) - 1] = 0;
+ m.protocol_revision = MSG_REVISION;
+ strncpy(m.m.command.preselect, preselect ? preselect : "", sizeof(m.m.command.preselect) - 1);
+ m.m.command.preselect[sizeof(m.m.command.preselect) - 1] = 0;
+ m.m.command.apid = getpid();
+ debug1("SendCommandMsg writing '%s'\n", m.m.command.cmd);
+ if (WriteMessage(s, &m))
+ Msg(errno, "write");
+ close(s);
+}
diff --git a/braille.c b/braille.c
index 8a05599..a0c1bc6 100644
--- a/braille.c
+++ b/braille.c
@@ -341,8 +341,8 @@ RefreshBraille()
}
else if (xs <= xe)
{
- RedisplayLine(-1, xs, xe, 1);
- RedisplayLine(y, xs, xe, 1);
+ LayRedisplayLine(-1, xs, xe, 1);
+ LayRedisplayLine(y, xs, xe, 1);
}
debug1("Braille: got >%s<\n", bd.bd_line);
@@ -380,10 +380,10 @@ bd_signal()
return;
display = bd.bd_dpy;
if (D_obufp != D_obuf)
- PutStr(D_BL);
+ AddCStr(D_BL);
else
{
- PutStr(D_BL);
+ AddCStr(D_BL);
Flush();
}
}
@@ -411,8 +411,8 @@ int y, xs, xe;
bd.bd_refreshing = bd.bd_searching = 1;
bd.bd_searchstart = xs;
bd.bd_searchend = xe;
- RedisplayLine(-1, xs, xe, 1);
- RedisplayLine(y, xs, xe, 1);
+ LayRedisplayLine(-1, xs, xe, 1);
+ LayRedisplayLine(y, xs, xe, 1);
bd.bd_refreshing = bd.bd_searching = 0;
BD_FORE->w_bd_y = oy;
}
diff --git a/braille.h b/braille.h
index 4d751b8..c0157de 100644
--- a/braille.h
+++ b/braille.h
@@ -25,6 +25,8 @@
* $Id: braille.h,v 1.1 1995/09/06 15:51:18 jnweiger Exp jnweiger $ FAU
*/
+#ifdef HAVE_BRAILLE
+
extern void StartBraille __P((void));
struct braille_display
@@ -78,3 +80,4 @@ extern struct braille_display bd;
#define BD_FORE bd.bd_dpy->d_fore
+#endif
diff --git a/comm.c b/comm.c
index ab468e6..e053ec7 100644
--- a/comm.c
+++ b/comm.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -56,10 +56,16 @@ struct comm comms[RC_LAST + 1] =
#endif
{ "allpartial", NEED_DISPLAY|ARGS_1 },
{ "at", NEED_DISPLAY|ARGS_2|ARGS_ORMORE },
+#ifdef COLOR
+ { "attrcolor", ARGS_12 },
+#endif
{ "autodetach", ARGS_1 },
#ifdef AUTO_NUKE
{ "autonuke", NEED_DISPLAY|ARGS_1 },
#endif
+#ifdef COLOR
+ { "bce", NEED_FORE|ARGS_01 },
+#endif
#ifdef HAVE_BRAILLE
/* keywords for braille display (bd) */
@@ -104,8 +110,8 @@ struct comm comms[RC_LAST + 1] =
{ "charset", NEED_FORE|ARGS_1 },
{ "chdir", ARGS_01 },
{ "clear", NEED_FORE|ARGS_0 },
- { "colon", NEED_DISPLAY|ARGS_01 },
- { "command", NEED_DISPLAY|ARGS_0 },
+ { "colon", NEED_LAYER|ARGS_01 },
+ { "command", NEED_DISPLAY|ARGS_02 },
#ifdef COPY_PASTE
{ "compacthist", ARGS_01 },
#endif
@@ -118,16 +124,23 @@ struct comm comms[RC_LAST + 1] =
#ifdef AUTO_NUKE
{ "defautonuke", ARGS_1 },
#endif
+#ifdef COLOR
+ { "defbce", ARGS_1 },
+#endif
{ "defbreaktype", ARGS_01 },
{ "defc1", ARGS_1 },
{ "defcharset", ARGS_01 },
+#ifdef ENCODINGS
+ { "defencoding", ARGS_1 },
+#endif
{ "defescape", ARGS_1 },
{ "defflow", ARGS_12 },
{ "defgr", ARGS_1 },
{ "defhstatus", ARGS_01 },
-#ifdef KANJI
+#ifdef ENCODINGS
{ "defkanji", ARGS_1 },
#endif
+ { "deflog", ARGS_1 },
#if defined(UTMPOK) && defined(LOGOUTOK)
{ "deflogin", ARGS_1 },
#endif
@@ -140,40 +153,49 @@ struct comm comms[RC_LAST + 1] =
{ "defshell", ARGS_1 },
{ "defsilence", ARGS_1 },
{ "defslowpaste", ARGS_1 },
+#ifdef UTF8
+ { "defutf8", ARGS_1 },
+#endif
{ "defwrap", ARGS_1 },
{ "defwritelock", ARGS_1 },
#ifdef DETACH
- { "detach", NEED_DISPLAY|ARGS_0 },
+ { "detach", NEED_DISPLAY|ARGS_01 },
#endif
- { "digraph", NEED_DISPLAY|ARGS_01 },
- { "displays", NEED_DISPLAY|ARGS_0 },
+ { "digraph", NEED_LAYER|ARGS_01 },
+ { "dinfo", NEED_DISPLAY|ARGS_0 },
+ { "displays", NEED_LAYER|ARGS_0 },
{ "dumptermcap", NEED_FORE|ARGS_0 },
{ "echo", ARGS_12 },
- { "escape", NEED_DISPLAY|ARGS_1 },
+#ifdef ENCODINGS
+ { "encoding", ARGS_12 },
+#endif
+ { "escape", ARGS_1 },
+ { "eval", ARGS_1|ARGS_ORMORE },
#ifdef PSEUDOS
{ "exec", NEED_FORE|ARGS_0|ARGS_ORMORE },
#endif
{ "fit", NEED_DISPLAY|ARGS_0 },
{ "flow", NEED_FORE|ARGS_01 },
- { "focus", NEED_DISPLAY|ARGS_0 },
+ { "focus", NEED_DISPLAY|ARGS_01 },
{ "gr", NEED_FORE|ARGS_01 },
- { "hardcopy", NEED_FORE|ARGS_0 },
+ { "hardcopy", ARGS_012 },
{ "hardcopy_append", ARGS_1 },
- { "hardcopydir", ARGS_1 },
+ { "hardcopydir", ARGS_01 },
{ "hardstatus", ARGS_012 },
- { "height", NEED_DISPLAY|ARGS_01 },
- { "help", NEED_DISPLAY|ARGS_0 },
+ { "height", ARGS_0123 },
+ { "help", NEED_LAYER|ARGS_02 },
#ifdef COPY_PASTE
- { "history", NEED_FORE|ARGS_0 },
+ { "history", NEED_DISPLAY|NEED_FORE|ARGS_0 },
#endif
{ "hstatus", NEED_FORE|ARGS_1 },
- { "info", NEED_DISPLAY|ARGS_0 },
-#ifdef KANJI
+ { "ignorecase", ARGS_01 },
+ { "info", NEED_LAYER|ARGS_0 },
+#ifdef ENCODINGS
{ "kanji", NEED_FORE|ARGS_12 },
#endif
{ "kill", NEED_FORE|ARGS_0 },
{ "lastmsg", NEED_DISPLAY|ARGS_0 },
- { "license", NEED_DISPLAY|ARGS_0 },
+ { "license", NEED_LAYER|ARGS_0 },
#ifdef LOCK
{ "lockscreen", NEED_DISPLAY|ARGS_0 },
#endif
@@ -191,7 +213,7 @@ struct comm comms[RC_LAST + 1] =
#ifdef COPY_PASTE
{ "markkeys", ARGS_1 },
#endif
- { "meta", NEED_DISPLAY|ARGS_0 },
+ { "meta", NEED_LAYER|ARGS_0 },
{ "monitor", NEED_FORE|ARGS_01 },
{ "msgminwait", ARGS_1 },
{ "msgwait", ARGS_1 },
@@ -201,20 +223,20 @@ struct comm comms[RC_LAST + 1] =
#ifdef NETHACK
{ "nethack", ARGS_1 },
#endif
- { "next", NEED_DISPLAY|ARGS_0 },
+ { "next", ARGS_0 },
#ifdef MULTI
{ "nonblock", NEED_DISPLAY|ARGS_01 },
#endif
{ "number", NEED_FORE|ARGS_01 },
{ "obuflimit", NEED_DISPLAY|ARGS_01 },
{ "only", NEED_DISPLAY|ARGS_0 },
- { "other", NEED_DISPLAY|ARGS_0 },
+ { "other", ARGS_0 },
{ "partial", NEED_FORE|ARGS_01 },
#ifdef PASSWORD
{ "password", ARGS_01 },
#endif
#ifdef COPY_PASTE
- { "paste", NEED_DISPLAY|ARGS_012 },
+ { "paste", NEED_LAYER|ARGS_012 },
{ "pastefont", ARGS_01 },
#endif
{ "pow_break", NEED_FORE|ARGS_01 },
@@ -222,21 +244,22 @@ struct comm comms[RC_LAST + 1] =
{ "pow_detach", NEED_DISPLAY|ARGS_0 },
{ "pow_detach_msg", ARGS_01 },
#endif
- { "prev", NEED_DISPLAY|ARGS_0 },
+ { "prev", ARGS_0 },
{ "printcmd", ARGS_01 },
{ "process", NEED_DISPLAY|ARGS_01 },
{ "quit", ARGS_0 },
#ifdef COPY_PASTE
- { "readbuf", NEED_DISPLAY|ARGS_0 },
+ { "readbuf", ARGS_0123 },
#endif
- { "readreg", ARGS_012 },
+ { "readreg", ARGS_0|ARGS_ORMORE },
{ "redisplay", NEED_DISPLAY|ARGS_0 },
- { "register", ARGS_2 },
+ { "register", ARGS_24 },
{ "remove", NEED_DISPLAY|ARGS_0 },
#ifdef COPY_PASTE
{ "removebuf", ARGS_0 },
#endif
{ "reset", NEED_FORE|ARGS_0 },
+ { "resize", NEED_DISPLAY|ARGS_01 },
{ "screen", ARGS_0|ARGS_ORMORE },
#ifdef COPY_PASTE
{ "scrollback", NEED_FORE|ARGS_1 },
@@ -244,6 +267,7 @@ struct comm comms[RC_LAST + 1] =
{ "select", ARGS_01 },
{ "sessionname", ARGS_01 },
{ "setenv", ARGS_012 },
+ { "setsid", ARGS_1 },
{ "shell", ARGS_1 },
{ "shelltitle", ARGS_1 },
{ "silence", NEED_FORE|ARGS_01 },
@@ -251,9 +275,10 @@ struct comm comms[RC_LAST + 1] =
{ "sleep", ARGS_1 },
{ "slowpaste", NEED_FORE|ARGS_01 },
{ "sorendition", ARGS_012 },
+ { "source", ARGS_1 },
{ "split", NEED_DISPLAY|ARGS_0 },
{ "startup_message", ARGS_1 },
- { "stuff", NEED_DISPLAY|ARGS_12 },
+ { "stuff", NEED_LAYER|ARGS_12 },
#ifdef MULTIUSER
{ "su", NEED_DISPLAY|ARGS_012 },
#endif
@@ -264,24 +289,28 @@ struct comm comms[RC_LAST + 1] =
{ "termcap", ARGS_23 },
{ "termcapinfo", ARGS_23 },
{ "terminfo", ARGS_23 },
- { "time", ARGS_0 },
+ { "time", ARGS_01 },
{ "title", NEED_FORE|ARGS_01 },
{ "umask", ARGS_1|ARGS_ORMORE },
{ "unsetenv", ARGS_1 },
+#ifdef UTF8
+ { "utf8", NEED_FORE|ARGS_012 },
+#endif
{ "vbell", ARGS_01 },
{ "vbell_msg", ARGS_01 },
{ "vbellwait", ARGS_1 },
{ "verbose", ARGS_01 },
{ "version", ARGS_0 },
{ "wall", NEED_DISPLAY|ARGS_1},
- { "width", ARGS_01 },
+ { "width", ARGS_0123 },
+ { "windowlist", NEED_DISPLAY|ARGS_012 },
{ "windows", NEED_DISPLAY|ARGS_0 },
{ "wrap", NEED_FORE|ARGS_01 },
#ifdef COPY_PASTE
- { "writebuf", NEED_DISPLAY|ARGS_0 },
+ { "writebuf", ARGS_0123 },
#endif
{ "writelock", NEED_FORE|ARGS_01 },
- { "xoff", NEED_DISPLAY|ARGS_0 },
- { "xon", NEED_DISPLAY|ARGS_0 },
+ { "xoff", NEED_LAYER|ARGS_0 },
+ { "xon", NEED_LAYER|ARGS_0 },
{ "zombie", ARGS_01 }
};
diff --git a/comm.h.dist b/comm.h.dist
index d004f71..3ddd8e4 100644
--- a/comm.h.dist
+++ b/comm.h.dist
@@ -25,13 +25,16 @@ struct comm
#define NEED_FORE (1<<6) /* this command needs a fore window */
#define NEED_DISPLAY (1<<7) /* this command needs a display */
+#define NEED_LAYER (1<<8) /* this command needs a layer */
#define ARGS_01 (ARGS_0 | ARGS_PLUS1)
#define ARGS_02 (ARGS_0 | ARGS_PLUS2)
#define ARGS_12 (ARGS_1 | ARGS_PLUS1)
#define ARGS_23 (ARGS_2 | ARGS_PLUS1)
+#define ARGS_24 (ARGS_2 | ARGS_PLUS2)
#define ARGS_34 (ARGS_3 | ARGS_PLUS1)
#define ARGS_012 (ARGS_0 | ARGS_PLUS1 | ARGS_PLUS2)
+#define ARGS_0123 (ARGS_0 | ARGS_PLUS1 | ARGS_PLUS2 | ARGS_PLUS3)
#define ARGS_123 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS2)
#define ARGS_124 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS3)
#define ARGS_1234 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS2 | ARGS_PLUS3)
@@ -53,148 +56,163 @@ struct action
#define RC_ADDACL 6
#define RC_ALLPARTIAL 7
#define RC_AT 8
-#define RC_AUTODETACH 9
-#define RC_AUTONUKE 10
-#define RC_BELL 11
-#define RC_BELL_MSG 12
-#define RC_BIND 13
-#define RC_BINDKEY 14
-#define RC_BREAK 15
-#define RC_BREAKTYPE 16
-#define RC_BUFFERFILE 17
-#define RC_C1 18
-#define RC_CAPTION 19
-#define RC_CHACL 20
-#define RC_CHARSET 21
-#define RC_CHDIR 22
-#define RC_CLEAR 23
-#define RC_COLON 24
-#define RC_COMMAND 25
-#define RC_COMPACTHIST 26
-#define RC_CONSOLE 27
-#define RC_COPY 28
-#define RC_CRLF 29
-#define RC_DEBUG 30
-#define RC_DEFAUTONUKE 31
-#define RC_DEFBREAKTYPE 32
-#define RC_DEFC1 33
-#define RC_DEFCHARSET 34
-#define RC_DEFESCAPE 35
-#define RC_DEFFLOW 36
-#define RC_DEFGR 37
-#define RC_DEFHSTATUS 38
-#define RC_DEFKANJI 39
-#define RC_DEFLOGIN 40
-#define RC_DEFMODE 41
-#define RC_DEFMONITOR 42
-#define RC_DEFOBUFLIMIT 43
-#define RC_DEFSCROLLBACK 44
-#define RC_DEFSHELL 45
-#define RC_DEFSILENCE 46
-#define RC_DEFSLOWPASTE 47
-#define RC_DEFWRAP 48
-#define RC_DEFWRITELOCK 49
-#define RC_DETACH 50
-#define RC_DIGRAPH 51
-#define RC_DISPLAYS 52
-#define RC_DUMPTERMCAP 53
-#define RC_ECHO 54
-#define RC_ESCAPE 55
-#define RC_EXEC 56
-#define RC_FIT 57
-#define RC_FLOW 58
-#define RC_FOCUS 59
-#define RC_GR 60
-#define RC_HARDCOPY 61
-#define RC_HARDCOPY_APPEND 62
-#define RC_HARDCOPYDIR 63
-#define RC_HARDSTATUS 64
-#define RC_HEIGHT 65
-#define RC_HELP 66
-#define RC_HISTORY 67
-#define RC_HSTATUS 68
-#define RC_INFO 69
-#define RC_KANJI 70
-#define RC_KILL 71
-#define RC_LASTMSG 72
-#define RC_LICENSE 73
-#define RC_LOCKSCREEN 74
-#define RC_LOG 75
-#define RC_LOGFILE 76
-#define RC_LOGIN 77
-#define RC_LOGTSTAMP 78
-#define RC_MAPDEFAULT 79
-#define RC_MAPNOTNEXT 80
-#define RC_MAPTIMEOUT 81
-#define RC_MARKKEYS 82
-#define RC_META 83
-#define RC_MONITOR 84
-#define RC_MSGMINWAIT 85
-#define RC_MSGWAIT 86
-#define RC_MULTIUSER 87
-#define RC_NETHACK 88
-#define RC_NEXT 89
-#define RC_NONBLOCK 90
-#define RC_NUMBER 91
-#define RC_OBUFLIMIT 92
-#define RC_ONLY 93
-#define RC_OTHER 94
-#define RC_PARTIAL 95
-#define RC_PASSWORD 96
-#define RC_PASTE 97
-#define RC_PASTEFONT 98
-#define RC_POW_BREAK 99
-#define RC_POW_DETACH 100
-#define RC_POW_DETACH_MSG 101
-#define RC_PREV 102
-#define RC_PRINTCMD 103
-#define RC_PROCESS 104
-#define RC_QUIT 105
-#define RC_READBUF 106
-#define RC_READREG 107
-#define RC_REDISPLAY 108
-#define RC_REGISTER 109
-#define RC_REMOVE 110
-#define RC_REMOVEBUF 111
-#define RC_RESET 112
-#define RC_SCREEN 113
-#define RC_SCROLLBACK 114
-#define RC_SELECT 115
-#define RC_SESSIONNAME 116
-#define RC_SETENV 117
-#define RC_SHELL 118
-#define RC_SHELLTITLE 119
-#define RC_SILENCE 120
-#define RC_SILENCEWAIT 121
-#define RC_SLEEP 122
-#define RC_SLOWPASTE 123
-#define RC_SORENDITION 124
-#define RC_SPLIT 125
-#define RC_STARTUP_MESSAGE 126
-#define RC_STUFF 127
-#define RC_SU 128
-#define RC_SUSPEND 129
-#define RC_TERM 130
-#define RC_TERMCAP 131
-#define RC_TERMCAPINFO 132
-#define RC_TERMINFO 133
-#define RC_TIME 134
-#define RC_TITLE 135
-#define RC_UMASK 136
-#define RC_UNSETENV 137
-#define RC_VBELL 138
-#define RC_VBELL_MSG 139
-#define RC_VBELLWAIT 140
-#define RC_VERBOSE 141
-#define RC_VERSION 142
-#define RC_WALL 143
-#define RC_WIDTH 144
-#define RC_WINDOWS 145
-#define RC_WRAP 146
-#define RC_WRITEBUF 147
-#define RC_WRITELOCK 148
-#define RC_XOFF 149
-#define RC_XON 150
-#define RC_ZOMBIE 151
+#define RC_ATTRCOLOR 9
+#define RC_AUTODETACH 10
+#define RC_AUTONUKE 11
+#define RC_BCE 12
+#define RC_BELL 13
+#define RC_BELL_MSG 14
+#define RC_BIND 15
+#define RC_BINDKEY 16
+#define RC_BREAK 17
+#define RC_BREAKTYPE 18
+#define RC_BUFFERFILE 19
+#define RC_C1 20
+#define RC_CAPTION 21
+#define RC_CHACL 22
+#define RC_CHARSET 23
+#define RC_CHDIR 24
+#define RC_CLEAR 25
+#define RC_COLON 26
+#define RC_COMMAND 27
+#define RC_COMPACTHIST 28
+#define RC_CONSOLE 29
+#define RC_COPY 30
+#define RC_CRLF 31
+#define RC_DEBUG 32
+#define RC_DEFAUTONUKE 33
+#define RC_DEFBCE 34
+#define RC_DEFBREAKTYPE 35
+#define RC_DEFC1 36
+#define RC_DEFCHARSET 37
+#define RC_DEFENCODING 38
+#define RC_DEFESCAPE 39
+#define RC_DEFFLOW 40
+#define RC_DEFGR 41
+#define RC_DEFHSTATUS 42
+#define RC_DEFKANJI 43
+#define RC_DEFLOG 44
+#define RC_DEFLOGIN 45
+#define RC_DEFMODE 46
+#define RC_DEFMONITOR 47
+#define RC_DEFOBUFLIMIT 48
+#define RC_DEFSCROLLBACK 49
+#define RC_DEFSHELL 50
+#define RC_DEFSILENCE 51
+#define RC_DEFSLOWPASTE 52
+#define RC_DEFUTF8 53
+#define RC_DEFWRAP 54
+#define RC_DEFWRITELOCK 55
+#define RC_DETACH 56
+#define RC_DIGRAPH 57
+#define RC_DINFO 58
+#define RC_DISPLAYS 59
+#define RC_DUMPTERMCAP 60
+#define RC_ECHO 61
+#define RC_ENCODING 62
+#define RC_ESCAPE 63
+#define RC_EVAL 64
+#define RC_EXEC 65
+#define RC_FIT 66
+#define RC_FLOW 67
+#define RC_FOCUS 68
+#define RC_GR 69
+#define RC_HARDCOPY 70
+#define RC_HARDCOPY_APPEND 71
+#define RC_HARDCOPYDIR 72
+#define RC_HARDSTATUS 73
+#define RC_HEIGHT 74
+#define RC_HELP 75
+#define RC_HISTORY 76
+#define RC_HSTATUS 77
+#define RC_IGNORECASE 78
+#define RC_INFO 79
+#define RC_KANJI 80
+#define RC_KILL 81
+#define RC_LASTMSG 82
+#define RC_LICENSE 83
+#define RC_LOCKSCREEN 84
+#define RC_LOG 85
+#define RC_LOGFILE 86
+#define RC_LOGIN 87
+#define RC_LOGTSTAMP 88
+#define RC_MAPDEFAULT 89
+#define RC_MAPNOTNEXT 90
+#define RC_MAPTIMEOUT 91
+#define RC_MARKKEYS 92
+#define RC_META 93
+#define RC_MONITOR 94
+#define RC_MSGMINWAIT 95
+#define RC_MSGWAIT 96
+#define RC_MULTIUSER 97
+#define RC_NETHACK 98
+#define RC_NEXT 99
+#define RC_NONBLOCK 100
+#define RC_NUMBER 101
+#define RC_OBUFLIMIT 102
+#define RC_ONLY 103
+#define RC_OTHER 104
+#define RC_PARTIAL 105
+#define RC_PASSWORD 106
+#define RC_PASTE 107
+#define RC_PASTEFONT 108
+#define RC_POW_BREAK 109
+#define RC_POW_DETACH 110
+#define RC_POW_DETACH_MSG 111
+#define RC_PREV 112
+#define RC_PRINTCMD 113
+#define RC_PROCESS 114
+#define RC_QUIT 115
+#define RC_READBUF 116
+#define RC_READREG 117
+#define RC_REDISPLAY 118
+#define RC_REGISTER 119
+#define RC_REMOVE 120
+#define RC_REMOVEBUF 121
+#define RC_RESET 122
+#define RC_RESIZE 123
+#define RC_SCREEN 124
+#define RC_SCROLLBACK 125
+#define RC_SELECT 126
+#define RC_SESSIONNAME 127
+#define RC_SETENV 128
+#define RC_SETSID 129
+#define RC_SHELL 130
+#define RC_SHELLTITLE 131
+#define RC_SILENCE 132
+#define RC_SILENCEWAIT 133
+#define RC_SLEEP 134
+#define RC_SLOWPASTE 135
+#define RC_SORENDITION 136
+#define RC_SOURCE 137
+#define RC_SPLIT 138
+#define RC_STARTUP_MESSAGE 139
+#define RC_STUFF 140
+#define RC_SU 141
+#define RC_SUSPEND 142
+#define RC_TERM 143
+#define RC_TERMCAP 144
+#define RC_TERMCAPINFO 145
+#define RC_TERMINFO 146
+#define RC_TIME 147
+#define RC_TITLE 148
+#define RC_UMASK 149
+#define RC_UNSETENV 150
+#define RC_UTF8 151
+#define RC_VBELL 152
+#define RC_VBELL_MSG 153
+#define RC_VBELLWAIT 154
+#define RC_VERBOSE 155
+#define RC_VERSION 156
+#define RC_WALL 157
+#define RC_WIDTH 158
+#define RC_WINDOWLIST 159
+#define RC_WINDOWS 160
+#define RC_WRAP 161
+#define RC_WRITEBUF 162
+#define RC_WRITELOCK 163
+#define RC_XOFF 164
+#define RC_XON 165
+#define RC_ZOMBIE 166
-#define RC_LAST 151
+#define RC_LAST 166
diff --git a/comm.sh b/comm.sh
index d5fd8b0..3d09f81 100644
--- a/comm.sh
+++ b/comm.sh
@@ -39,13 +39,16 @@ struct comm
#define NEED_FORE (1<<6) /* this command needs a fore window */
#define NEED_DISPLAY (1<<7) /* this command needs a display */
+#define NEED_LAYER (1<<8) /* this command needs a layer */
#define ARGS_01 (ARGS_0 | ARGS_PLUS1)
#define ARGS_02 (ARGS_0 | ARGS_PLUS2)
#define ARGS_12 (ARGS_1 | ARGS_PLUS1)
#define ARGS_23 (ARGS_2 | ARGS_PLUS1)
+#define ARGS_24 (ARGS_2 | ARGS_PLUS2)
#define ARGS_34 (ARGS_3 | ARGS_PLUS1)
#define ARGS_012 (ARGS_0 | ARGS_PLUS1 | ARGS_PLUS2)
+#define ARGS_0123 (ARGS_0 | ARGS_PLUS1 | ARGS_PLUS2 | ARGS_PLUS3)
#define ARGS_123 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS2)
#define ARGS_124 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS3)
#define ARGS_1234 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS2 | ARGS_PLUS3)
diff --git a/config.h.in b/config.h.in
index 34af7e2..e96e9fb 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2000
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -49,8 +49,12 @@
*
* Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison).
*/
+#undef SOCKDIR
-#define SOCKDIR (eff_uid ? "/tmp/uscreens" : "/tmp/screens")
+/*
+ * Define this if the SOCKDIR is not shared between hosts.
+ */
+#define SOCKDIR_IS_LOCAL_TO_HOST
/*
* Screen sources two startup files. First a global file with a path
@@ -70,6 +74,14 @@
#define ALLOW_SYSSCREENRC 1
/*
+ * Screen needs encoding files for the translation of utf8
+ * into some encodings, e.g. JIS, BIG5.
+ * Only needed if FONT, ENCODINGS and UTF8 are defined.
+ */
+#ifndef SCREENENCODINGS
+# define SCREENENCODINGS "/usr/local/lib/screen/encodings"
+#endif
+/*
* Define CHECKLOGIN to force Screen users to enter their Unix password
* in addition to the screen password.
*
@@ -127,10 +139,18 @@
* define FONT to support ISO2022/alternet charset support
* define COLOR to include ansi color support. This may expose
* a bug in x11r6-color-xterm.
- * define KANJI to include support for japanese character sets.
+ * define DW_CHARS to include support for double-width character
+ * sets.
+ * define ENCODINGS to include support for encodings like euc or big5.
* Needs FONT to work.
+ * define UTF8 if you want support for UTF-8 encoding.
+ * Needs FONT and ENCODINGS to work.
+ * define COLORS16 if you want 16 colors.
+ * Needs COLOR to work.
* define BUILTIN_TELNET to add telnet support to screen.
* Syntax: screen //telnet host [port]
+ * define RXVT_OSC if you want support for rxvts special
+ * change fgcolor/bgcolor/bgpicture sequences
*/
#undef SIMPLESCREEN
#ifndef SIMPLESCREEN
@@ -146,10 +166,15 @@
# define MAPKEYS
# define COLOR
# define FONT
-# define KANJI
+# define DW_CHARS
+# define ENCODINGS
+# define UTF8
+# define COLORS16
#endif /* SIMPLESCREEN */
#undef BUILTIN_TELNET
+#undef RXVT_OSC
+#undef COLORS256
/*
@@ -252,6 +277,19 @@
#undef USE_SGR
+/*
+ * Define USE_LOCALE if you want screen to use the locale names
+ * for the name of the month and day of the week.
+ */
+#define USE_LOCALE
+
+/*
+ * Define USE_PAM if your system supports PAM (Pluggable Authentication
+ * Modules) and you want screen to use it instead of calling crypt().
+ * (You may also need to add -lpam to LIBS in the Makefile.)
+ */
+#undef USE_PAM
+
/**********************************************************************
*
* End of User Configuration Section
@@ -425,6 +463,7 @@
#undef LOADAV_GETLOADAVG
#undef LOADAV_UNIX
#undef LOADAV_AVENRUN
+#undef LOADAV_USE_NLIST64
#undef NLIST_DECLARED
#undef NLIST_STRUCT
@@ -551,6 +590,22 @@
#undef HAVE_GETCWD
/*
+ * define HAVE_SETLOCALE if your system has the setlocale() call.
+ */
+#undef HAVE_SETLOCALE
+
+/*
+ * define HAVE_STRFTIME if your system has the strftime() call.
+ */
+#undef HAVE_STRFTIME
+
+/*
+ * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call
+ * and <langinfo.h> defines CODESET.
+ */
+#undef HAVE_NL_LANGINFO
+
+/*
* define HAVE_DEV_PTC if you have a /dev/ptc character special
* device.
*/
@@ -562,6 +617,11 @@
*/
#undef HAVE_SVR4_PTYS
+/*
+ * define HAVE_GETPT if you have the getpt() function.
+ */
+#undef HAVE_GETPT
+
/*
* define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen
* to unusual environments. E.g. For SunOs the defaults are "qpr" and
diff --git a/configure b/configure
index be6c524..7426457 100755
--- a/configure
+++ b/configure
@@ -1,26 +1,120 @@
#! /bin/sh
-
-# From configure.in Revision: 1.18 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# From configure.in Revision: 1.18 .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by Autoconf 2.52.
#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-# Defaults:
-ac_help=
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
+cross_compiling=no
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+ac_unique_file="screen.c"
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -29,10 +123,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -46,16 +145,16 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -63,59 +162,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -124,95 +223,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -221,12 +272,12 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
@@ -247,26 +298,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -283,7 +334,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -293,7 +344,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -304,58 +355,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -366,98 +416,98 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-exec 5>./config.log
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: should be removed in autoconf 3.0.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=screen.c
+test "$silent" = yes && exec 6>/dev/null
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
@@ -468,13 +518,311 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<EOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+EOF
+
+ cat <<EOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+EOF
+
+ cat <<\EOF
+EOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\EOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-socket-dir disable system wide socket-dir and use ~/.screen instead
+ --enable-pam enable PAM support
+ --enable-locale use localized month/day names
+ --enable-telnet enable builtin telnet
+ --enable-colors256 enable support for 256 colors
+ --enable-rxvt_osc enable support for rxvt OSC codes
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-socket-dir=path where to put the per-user sockets
+ --with-sys-screenrc=path where to put the global screenrc file
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+EOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+ cd $ac_subdir
+ # A "../" for each directory in /$ac_subdir.
+ ac_dots=`echo $ac_subdir |
+ sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+ case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_subdir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_sub_srcdir/configure; then
+ echo
+ $SHELL $ac_sub_srcdir/configure --help=recursive
+ elif test -f $ac_sub_srcdir/configure.ac ||
+ test -f $ac_sub_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\EOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+EOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.52. Invocation command line was
+ $ $0 $@
+
+EOF
+{
+cat <<_ASUNAME
+## ---------- ##
+## Platform. ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+} >&5
+
+cat >&5 <<EOF
+## ------------ ##
+## Core tests. ##
+## ------------ ##
+
+EOF
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ echo >&5
+ echo "## ----------------- ##" >&5
+ echo "## Cache variables. ##" >&5
+ echo "## ----------------- ##" >&5
+ echo >&5
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} >&5
+ sed "/^$/d" confdefs.h >conftest.log
+ if test -s conftest.log; then
+ echo >&5
+ echo "## ------------ ##" >&5
+ echo "## confdefs.h. ##" >&5
+ echo "## ------------ ##" >&5
+ echo >&5
+ cat conftest.log >&5
+ fi
+ (echo; echo) >&5
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal" >&5
+ echo "$as_me: exit $exit_status" >&5
+ rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -485,41 +833,109 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:836: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ cat "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:847: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:855: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:871: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:875: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:881: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:883: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:885: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status. It doesn't matter if
+ # we pass some twice (in addition to the command line arguments).
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+ ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:904: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:906: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+echo "#! $SHELL" >conftest.sh
+echo "exit 0" >>conftest.sh
+chmod +x conftest.sh
+if { (echo "$as_me:926: PATH=\".;.\"; conftest.sh") >&5
+ (PATH=".;."; conftest.sh) 2>&5
+ ac_status=$?
+ echo "$as_me:929: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ ac_path_separator=';'
else
- ac_n= ac_c='\c' ac_t=
+ ac_path_separator=:
fi
+PATH_SEPARATOR="$ac_path_separator"
+rm -f conftest.sh
-
-
-
+ac_config_headers="$ac_config_headers config.h"
rev=`sed < ${srcdir}/patchlevel.h -n -e '/#define REV/s/#define REV *//p'`
vers=`sed < ${srcdir}/patchlevel.h -n -e '/#define VERS/s/#define VERS *//p'`
@@ -527,370 +943,1086 @@ pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVE
VERSION="$rev.$vers.$pat"
echo "this is screen version $VERSION" 1>&6
-
if test "x$prefix" = xNONE; then
-echo $ac_n "checking for prefix by $ac_c" 1>&6
-# Extract the first word of "screen", so it can be a program name with args.
+ echo $ECHO_N "checking for prefix by $ECHO_C" >&6
+ # Extract the first word of "screen", so it can be a program name with args.
set dummy screen; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:537: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SCREEN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:950: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_SCREEN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$SCREEN" in
- /*)
+ case $SCREEN in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_SCREEN="$SCREEN" # Let the user override the test with a path.
;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_SCREEN="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_SCREEN="$ac_dir/$ac_word"
+ echo "$as_me:967: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
;;
esac
fi
-SCREEN="$ac_cv_path_SCREEN"
+SCREEN=$ac_cv_path_SCREEN
+
if test -n "$SCREEN"; then
- echo "$ac_t""$SCREEN" 1>&6
+ echo "$as_me:978: result: $SCREEN" >&5
+echo "${ECHO_T}$SCREEN" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:981: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test -n "$ac_cv_path_SCREEN"; then
- prefix=`echo $ac_cv_path_SCREEN|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
+ prefix=`$as_expr X"$ac_cv_path_SCREEN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_cv_path_SCREEN" : 'X\(//\)[^/]' \| \
+ X"$ac_cv_path_SCREEN" : 'X\(//\)$' \| \
+ X"$ac_cv_path_SCREEN" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_cv_path_SCREEN" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ prefix=`$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$prefix" : 'X\(//\)[^/]' \| \
+ X"$prefix" : 'X\(//\)$' \| \
+ X"$prefix" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$prefix" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
fi
fi
if test "x$prefix" = xNONE; then
-echo $ac_n "checking for prefix by $ac_c" 1>&6
-# Extract the first word of "gzip", so it can be a program name with args.
+ echo $ECHO_N "checking for prefix by $ECHO_C" >&6
+ # Extract the first word of "gzip", so it can be a program name with args.
set dummy gzip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:575: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:1015: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GZIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$GZIP" in
- /*)
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_GZIP="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_GZIP="$ac_dir/$ac_word"
+ echo "$as_me:1032: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
;;
esac
fi
-GZIP="$ac_cv_path_GZIP"
+GZIP=$ac_cv_path_GZIP
+
if test -n "$GZIP"; then
- echo "$ac_t""$GZIP" 1>&6
+ echo "$as_me:1043: result: $GZIP" >&5
+echo "${ECHO_T}$GZIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:1046: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test -n "$ac_cv_path_GZIP"; then
- prefix=`echo $ac_cv_path_GZIP|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
+ prefix=`$as_expr X"$ac_cv_path_GZIP" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_cv_path_GZIP" : 'X\(//\)[^/]' \| \
+ X"$ac_cv_path_GZIP" : 'X\(//\)$' \| \
+ X"$ac_cv_path_GZIP" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_cv_path_GZIP" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ prefix=`$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$prefix" : 'X\(//\)[^/]' \| \
+ X"$prefix" : 'X\(//\)$' \| \
+ X"$prefix" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$prefix" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
fi
fi
+old_CFLAGS="$CFLAGS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:1085: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}gcc"
+echo "$as_me:1100: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1108: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1111: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-# Extract the first word of "gcc", so it can be a program name with args.
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:612: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:1120: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="gcc"
+echo "$as_me:1135: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1143: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1146: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:1159: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}cc"
+echo "$as_me:1174: found $ac_dir/$ac_word" >&5
+break
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:1182: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:1185: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:1194: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="cc"
+echo "$as_me:1209: found $ac_dir/$ac_word" >&5
+break
+done
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1217: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1220: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:641: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:1233: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+fi
+ac_cv_prog_CC="cc"
+echo "$as_me:1253: found $ac_dir/$ac_word" >&5
+break
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
+ set dummy "$ac_dir/$ac_word" ${1+"$@"}
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1275: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1278: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:1289: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+echo "$as_me:1304: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:1312: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:1315: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+ test -n "$CC" && break
+ done
fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:1328: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="$ac_prog"
+echo "$as_me:1343: found $ac_dir/$ac_word" >&5
+break
+done
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:689: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1351: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1354: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+ test -n "$ac_ct_CC" && break
+done
-cat > conftest.$ac_ext <<EOF
-#line 699 "configure"
+ CC=$ac_ct_CC
+fi
+
+fi
+
+test -z "$CC" && { { echo "$as_me:1366: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:1371:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:1374: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1377: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1379: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1382: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1384: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1387: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 1391 "configure"
#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:1407: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:1410: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:1413: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ a.out ) # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1436: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:1442: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1447: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:1453: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1456: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:1463: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
+fi
+echo "$as_me:1471: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1478: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:1480: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:1483: checking for executable suffix" >&5
+echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+if { (eval echo "$as_me:1485: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:1488: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ { { echo "$as_me:1504: error: cannot compute EXEEXT: cannot compile and link" >&5
+echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -fr conftest*
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:723: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
+rm -f conftest$ac_cv_exeext
+echo "$as_me:1510: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:728: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:1516: checking for object suffix" >&5
+echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1522 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:1534: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1537: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
else
- ac_cv_prog_gcc=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1549: error: cannot compute OBJEXT: cannot compile" >&5
+echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
+echo "$as_me:1556: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:1560: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1566 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1584: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1587: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1590: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:1602: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:1608: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1614 "configure"
+#include "confdefs.h"
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:752: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1626: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1629: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1632: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1635: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
- ac_cv_prog_cc_g=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
+echo "$as_me:1645: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
CFLAGS="-O2"
+ else
+ CFLAGS=
fi
+fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1675: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1678: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1681: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1693 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1706: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1709: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1712: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1715: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1725 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1737: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1740: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1743: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1746: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
fi
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:780: checking how to run the C preprocessor" >&5
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:1778: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 795 "configure"
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1799 "configure"
#include "confdefs.h"
#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:1804: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:1810: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1833 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:1837: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:1843: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 812 "configure"
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:1880: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1890 "configure"
#include "confdefs.h"
#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:1895: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:1901: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ # Broken: fails on valid input.
+continue
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1924 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:1928: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:1934: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
- CPP="$ac_cv_prog_CPP"
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- ac_cv_prog_CPP="$CPP"
+ { { echo "$as_me:1962: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$CPP" 1>&6
-if test $ac_cv_prog_gcc = yes; then
- echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:842: checking whether ${CC-cc} needs -traditional" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ echo "$as_me:1974: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_pattern="Autoconf.*'x'"
- cat > conftest.$ac_ext <<EOF
-#line 848 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1981 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
ac_cv_prog_gcc_traditional=yes
else
- rm -rf conftest*
ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*
-
if test $ac_cv_prog_gcc_traditional = no; then
- cat > conftest.$ac_ext <<EOF
-#line 866 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1996 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
fi
fi
-
-echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
+echo "$as_me:2009: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
fi
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:888: checking for POSIXized ISC" >&5
+echo "$as_me:2016: checking for POSIXized ISC" >&5
+echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:2021: result: yes" >&5
+echo "${ECHO_T}yes" >&6
ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF
@@ -900,27 +2032,38 @@ EOF
CC="$CC -Xp"
fi
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:2035: result: no" >&5
+echo "${ECHO_T}no" >&6
ISC=
fi
-
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:2041: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 913 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2046 "configure"
#include "confdefs.h"
main(){exit(0);}
-EOF
-if { (eval echo configure:917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:2051: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2054: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:2056: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2059: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
-
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
if test $CC != cc ; then
echo "Your $CC failed - restarting with CC=cc" 1>&6
@@ -932,42 +2075,55 @@ exec $0 $configure_args
fi
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:2082: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 944 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2087 "configure"
#include "confdefs.h"
main(){exit(0);}
-EOF
-if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:2092: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2095: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:2097: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2100: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- exec 5>&2
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+exec 5>&2
eval $ac_link
echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6
echo "$ac_compile" 1>&6
-{ echo "configure: error: Can't run the compiler - sorry" 1>&2; exit 1; }
+{ { echo "$as_me:2113: error: Can't run the compiler - sorry" >&5
+echo "$as_me: error: Can't run the compiler - sorry" >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:2121: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 971 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2126 "configure"
#include "confdefs.h"
main()
@@ -976,52 +2132,66 @@ main()
__something_strange_(0);
}
-EOF
-if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- { echo "configure: error: Your compiler does not set the exit status - sorry" 1>&2; exit 1; }
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:2137: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2140: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:2142: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2145: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { { echo "$as_me:2147: error: Your compiler does not set the exit status - sorry" >&5
+echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -fr conftest*
-fi
-
for ac_prog in mawk gawk nawk awk
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:997: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:2162: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:2177: found $ac_dir/$ac_word" >&5
+break
+done
+
fi
fi
-AWK="$ac_cv_prog_AWK"
+AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
+ echo "$as_me:2185: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:2188: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$AWK" && break
+ test -n "$AWK" && break
done
-
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -1032,14 +2202,20 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { { echo "$as_me:2212: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -1048,28 +2224,38 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1056: checking for a BSD compatible install" >&5
+echo "$as_me:2232: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
for ac_dir in $PATH; do
+ IFS=$ac_save_IFS
# Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ case $ac_dir/ in
+ / | ./ | .// | /cC/* \
+ | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
+ | /usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
- for ac_prog in ginstall installbsd scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if $as_executable_p "$ac_dir/$ac_prog"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
- # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
@@ -1080,194 +2266,274 @@ else
;;
esac
done
- IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:2281: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
if test -f etc/toolcheck; then
-echo "checking for buggy tools" 1>&6
-echo "configure:1108: checking for buggy tools" >&5
+{ echo "$as_me:2293: checking for buggy tools..." >&5
+echo "$as_me: checking for buggy tools..." >&6;}
sh etc/toolcheck 1>&6
fi
+echo "$as_me:2298: checking if a system-wide socket dir should be used" >&5
+echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6
+# Check whether --enable-socket-dir or --disable-socket-dir was given.
+if test "${enable_socket_dir+set}" = set; then
+ enableval="$enable_socket_dir"
+
+ echo "$as_me:2304: result: no. ~/.screen will be used instead." >&5
+echo "${ECHO_T}no. ~/.screen will be used instead." >&6
+
+else
+
+ echo "$as_me:2309: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ echo "$as_me:2311: checking for the socket dir" >&5
+echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6
+ SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")"
+
+# Check whether --with-socket-dir or --without-socket-dir was given.
+if test "${with_socket_dir+set}" = set; then
+ withval="$with_socket_dir"
+ SOCKDIR="\"${withval}\""
+fi;
+ echo "$as_me:2320: result: ${SOCKDIR}" >&5
+echo "${ECHO_T}${SOCKDIR}" >&6
+ cat >>confdefs.h <<EOF
+#define SOCKDIR $SOCKDIR
+EOF
+
+fi;
+
if test -n "$ISC"; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define ISC 1
EOF
LIBS="$LIBS -linet"
fi
-
if test -f /sysV68 ; then
-cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define sysV68 1
EOF
fi
-echo "checking for MIPS" 1>&6
-echo "configure:1128: checking for MIPS" >&5
+{ echo "$as_me:2342: checking for MIPS..." >&5
+echo "$as_me: checking for MIPS..." >&6;}
if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
oldlibs="$LIBS"
test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha.
-echo "checking mld library" 1>&6
-echo "configure:1133: checking mld library" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1135 "configure"
+{ echo "$as_me:2347: checking mld library..." >&5
+echo "$as_me: checking mld library..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2350 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2362: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2365: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2368: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2371: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$oldlibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$oldlibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test -r /dev/ptc; then
-cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define MIPS 1
EOF
-echo "checking wait3" 1>&6
-echo "configure:1157: checking wait3" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1159 "configure"
+{ echo "$as_me:2385: checking wait3..." >&5
+echo "$as_me: checking wait3..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2388 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
wait3();
-; return 0; }
-EOF
-if { (eval echo configure:1166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2400: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2403: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2406: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2409: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "checking wait2" 1>&6
-echo "configure:1173: checking wait2" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1175 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ echo "$as_me:2415: checking wait2..." >&5
+echo "$as_me: checking wait2..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2418 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
wait2();
-; return 0; }
-EOF
-if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2430: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2433: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2436: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2439: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define USE_WAIT2 1
EOF
LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-
-echo "checking for Ultrix" 1>&6
-echo "configure:1201: checking for Ultrix" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1203 "configure"
+{ echo "$as_me:2456: checking for Ultrix..." >&5
+echo "$as_me: checking for Ultrix..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2459 "configure"
#include "confdefs.h"
#if defined(ultrix) || defined(__ultrix)
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
ULTRIX=1
fi
rm -f conftest*
-
if test -f /usr/lib/libpyr.a ; then
oldlibs="$LIBS"
LIBS="$LIBS -lpyr"
-echo "checking Pyramid OSX" 1>&6
-echo "configure:1222: checking Pyramid OSX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1224 "configure"
+{ echo "$as_me:2475: checking Pyramid OSX..." >&5
+echo "$as_me: checking Pyramid OSX..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2478 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
open_controlling_pty("")
-; return 0; }
-EOF
-if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2490: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2493: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2496: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2499: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define OSX 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$oldlibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$oldlibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "checking for butterfly" 1>&6
-echo "configure:1247: checking for butterfly" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1249 "configure"
+{ echo "$as_me:2513: checking for butterfly..." >&5
+echo "$as_me: checking for butterfly..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2516 "configure"
#include "confdefs.h"
#if defined(butterfly)
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
butterfly=1
fi
rm -f conftest*
-
if test -z "$butterfly"; then
if test -n "$ULTRIX"; then
test -z "$GCC" && CC="$CC -YBSD"
fi
-echo "checking for POSIX.1" 1>&6
-echo "configure:1269: checking for POSIX.1" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1271 "configure"
+{ echo "$as_me:2533: checking for POSIX.1..." >&5
+echo "$as_me: checking for POSIX.1..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2536 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
@@ -1276,12 +2542,11 @@ main () {
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
echo "- you have a POSIX system" 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define POSIX 1
EOF
posix=1
@@ -1290,180 +2555,219 @@ rm -f conftest*
fi
-echo "checking for System V" 1>&6
-echo "configure:1295: checking for System V" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1297 "configure"
+{ echo "$as_me:2558: checking for System V..." >&5
+echo "$as_me: checking for System V..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2561 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
-int main() {
+int
+main ()
+{
int x = SIGCHLD | FNDELAY;
-; return 0; }
-EOF
-if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2575: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2578: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:2581: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2584: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >>confdefs.h <<\EOF
#define SYSV 1
EOF
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
-echo "checking for sequent/ptx" 1>&6
-echo "configure:1320: checking for sequent/ptx" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1322 "configure"
+{ echo "$as_me:2597: checking for sequent/ptx..." >&5
+echo "$as_me: checking for sequent/ptx..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2600 "configure"
#include "confdefs.h"
#ifdef _SEQUENT_
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
LIBS="$LIBS -lsocket -linet";seqptx=1
fi
rm -f conftest*
-
oldlibs="$LIBS"
LIBS="$LIBS -lelf"
-echo "checking SVR4" 1>&6
-echo "configure:1340: checking SVR4" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1342 "configure"
+{ echo "$as_me:2615: checking SVR4..." >&5
+echo "$as_me: checking SVR4..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2618 "configure"
#include "confdefs.h"
#include <utmpx.h>
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:1350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- ac_safe=`echo "dwarf.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dwarf.h""... $ac_c" 1>&6
-echo "configure:1354: checking for dwarf.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1359 "configure"
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2631: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2634: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2637: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2640: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:2642: checking for dwarf.h" >&5
+echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6
+if test "${ac_cv_header_dwarf_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2648 "configure"
#include "confdefs.h"
#include <dwarf.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+if { (eval echo "$as_me:2652: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2658: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_dwarf_h=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cv_header_dwarf_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+echo "$as_me:2677: result: $ac_cv_header_dwarf_h" >&5
+echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6
+if test $ac_cv_header_dwarf_h = yes; then
+ cat >>confdefs.h <<\EOF
#define SVR4 1
EOF
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define BUGGYGETLOGIN 1
EOF
else
- echo "$ac_t""no" 1>&6
-ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for elf.h""... $ac_c" 1>&6
-echo "configure:1391: checking for elf.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:2688: checking for elf.h" >&5
+echo $ECHO_N "checking for elf.h... $ECHO_C" >&6
+if test "${ac_cv_header_elf_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1396 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2694 "configure"
#include "confdefs.h"
#include <elf.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2704: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_elf_h=yes
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cv_header_elf_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+echo "$as_me:2723: result: $ac_cv_header_elf_h" >&5
+echo "${ECHO_T}$ac_cv_header_elf_h" >&6
+if test $ac_cv_header_elf_h = yes; then
+ cat >>confdefs.h <<\EOF
#define SVR4 1
EOF
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define BUGGYGETLOGIN 1
EOF
-else
- echo "$ac_t""no" 1>&6
fi
fi
-
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$oldlibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$oldlibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking for Solaris 2.x" 1>&6
-echo "configure:1440: checking for Solaris 2.x" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1442 "configure"
+{ echo "$as_me:2744: checking for Solaris 2.x..." >&5
+echo "$as_me: checking for Solaris 2.x..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2747 "configure"
#include "confdefs.h"
#if defined(SVR4) && defined(sun)
yes
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
LIBS="$LIBS -lsocket -lnsl -lkstat"
fi
rm -f conftest*
-
-
-
-echo "checking BSD job jontrol" 1>&6
-echo "configure:1460: checking BSD job jontrol" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1462 "configure"
+{ echo "$as_me:2760: checking BSD job jontrol..." >&5
+echo "$as_me: checking BSD job jontrol..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2763 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ioctl.h>
-int main() {
+int
+main ()
+{
#ifdef POSIX
tcsetpgrp(0, 0);
@@ -1476,31 +2780,44 @@ int y = TIOCNOTTY;
#endif
#endif
-; return 0; }
-EOF
-if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2788: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2791: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2794: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2797: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- you have jobcontrol" 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define BSDJOBS 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "- you don't have jobcontrol" 1>&6
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- you don't have jobcontrol" 1>&6
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking setreuid" 1>&6
-echo "configure:1499: checking setreuid" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1501 "configure"
+{ echo "$as_me:2812: checking setreuid..." >&5
+echo "$as_me: checking setreuid..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2815 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
#ifdef __hpux
setresuid(0, 0, 0);
@@ -1508,26 +2825,40 @@ setresuid(0, 0, 0);
setreuid(0, 0);
#endif
-; return 0; }
-EOF
-if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2833: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2836: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2839: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2842: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define HAVE_SETREUID 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-echo "checking seteuid" 1>&6
-echo "configure:1526: checking seteuid" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1528 "configure"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+{ echo "$as_me:2853: checking seteuid..." >&5
+echo "$as_me: checking seteuid..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2856 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
seteuid_is_broken(0);
@@ -1535,68 +2866,111 @@ seteuid_is_broken(0);
seteuid(0);
#endif
-; return 0; }
-EOF
-if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2874: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2877: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2880: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2883: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define HAVE_SETEUID 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking select" 1>&6
-echo "configure:1555: checking select" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1557 "configure"
+{ echo "$as_me:2895: checking select..." >&5
+echo "$as_me: checking select..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2898 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
select(0, 0, 0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2910: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2913: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2916: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2919: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$LIBS -lnet -lnsl"
-echo "checking select with $LIBS" 1>&6
-echo "configure:1572: checking select with $LIBS" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1574 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$LIBS -lnet -lnsl"
+{ echo "$as_me:2926: checking select with $LIBS..." >&5
+echo "$as_me: checking select with $LIBS..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 2929 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
select(0, 0, 0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:2941: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:2944: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:2947: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2950: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- { echo "configure: error: !!! no select - no screen" 1>&2; exit 1; }
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:2956: error: !!! no select - no screen" >&5
+echo "$as_me: error: !!! no select - no screen" >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking fifos" 1>&6
-echo "configure:1595: checking fifos" >&5
+{ echo "$as_me:2965: checking fifos..." >&5
+echo "$as_me: checking fifos..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:2968: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 1600 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2973 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -1615,7 +2989,11 @@ char *fin = "/tmp/conftest$$";
main()
{
struct stat stb;
+#ifdef FD_SET
+ fd_set f;
+#else
int f;
+#endif
(void)alarm(5);
#ifdef POSIX
@@ -1649,37 +3027,51 @@ main()
exit(1);
exit(0);
}
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
f = 1;
+#endif
if (select(1, &f, 0, 0, 0) == -1)
exit(1);
exit(0);
}
-EOF
-if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3042: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3045: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3047: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3050: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- your fifos are usable" 1>&6
fifo=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- your fifos are not usable" 1>&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- your fifos are not usable" 1>&6
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f /tmp/conftest*
if test -n "$fifo"; then
-echo "checking for broken fifo implementation" 1>&6
-echo "configure:1678: checking for broken fifo implementation" >&5
+{ echo "$as_me:3066: checking for broken fifo implementation..." >&5
+echo "$as_me: checking for broken fifo implementation..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:3069: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 1683 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3074 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -1699,7 +3091,11 @@ char *fin = "/tmp/conftest$$";
main()
{
struct timeval tv;
- int r, x;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
#ifdef POSIX
if (mkfifo(fin, 0600))
@@ -1710,43 +3106,56 @@ main()
close(0);
if (open(fin, O_RDONLY|O_NONBLOCK))
exit(1);
- r = 1;
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
tv.tv_sec = 1;
tv.tv_usec = 0;
- if (select(1, &r, 0, 0, &tv))
+ if (select(1, &f, 0, 0, &tv))
exit(1);
exit(0);
}
-EOF
-if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3123: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3126: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3128: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3131: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- your implementation is ok" 1>&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- you have a broken implementation" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- you have a broken implementation" 1>&6
+ cat >>confdefs.h <<\EOF
#define BROKEN_PIPE 1
EOF
fifobr=1
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f /tmp/conftest*
fi
-
-echo "checking sockets" 1>&6
-echo "configure:1745: checking sockets" >&5
+{ echo "$as_me:3150: checking sockets..." >&5
+echo "$as_me: checking sockets..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:3153: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 1750 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3158 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -1758,8 +3167,13 @@ char *son = "/tmp/conftest$$";
main()
{
- int s1, s2, s3, l;
+ int s1, s2, l;
struct sockaddr_un a;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
(void)alarm(5);
if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
@@ -1784,37 +3198,51 @@ main()
close(0);
if (accept(s1, &a, &l))
exit(1);
- l = 1;
- if (select(1, &l, 0, 0, 0) == -1)
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
+ if (select(1, &f, 0, 0, 0) == -1)
exit(1);
exit(0);
}
-EOF
-if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3213: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3216: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3218: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3221: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- your sockets are usable" 1>&6
sock=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- your sockets are not usable" 1>&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- your sockets are not usable" 1>&6
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f /tmp/conftest*
if test -n "$sock"; then
-echo "checking socket implementation" 1>&6
-echo "configure:1813: checking socket implementation" >&5
+{ echo "$as_me:3237: checking socket implementation..." >&5
+echo "$as_me: checking socket implementation..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:3240: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 1818 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3245 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -1842,35 +3270,42 @@ main()
exit(0);
}
-EOF
-if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3275: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3278: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3280: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3283: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- you are normal" 1>&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- unix domain sockets are not kept in the filesystem" 1>&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- unix domain sockets are not kept in the filesystem" 1>&6
-cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define SOCK_NOT_IN_FS 1
EOF
socknofs=1
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f /tmp/conftest*
fi
-
if test -n "$fifo"; then
if test -n "$sock"; then
if test -n "$nore"; then
echo "- hmmm... better take the fifos" 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define NAMEDPIPE 1
EOF
@@ -1880,7 +3315,7 @@ EOF
else
echo "- both sockets and fifos usable. let's take fifos." 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define NAMEDPIPE 1
EOF
@@ -1888,7 +3323,7 @@ EOF
else
echo "- using named pipes" 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define NAMEDPIPE 1
EOF
@@ -1897,17 +3332,20 @@ elif test -n "$sock"; then
echo "- using unix-domain sockets" 1>&6
else
- { echo "configure: error: you have neither usable sockets nor usable pipes -> no screen" 1>&2; exit 1; }
+ { { echo "$as_me:3335: error: you have neither usable sockets nor usable pipes -> no screen" >&5
+echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;}
+ { (exit 1); exit 1; }; }
fi
-
-echo "checking select return value" 1>&6
-echo "configure:1906: checking select return value" >&5
+{ echo "$as_me:3340: checking select return value..." >&5
+echo "$as_me: checking select return value..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:3343: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 1911 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3348 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -1925,10 +3363,13 @@ char *nam = "/tmp/conftest$$";
#define S_IFIFO 0010000
#endif
-
main()
{
- int l;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
#ifdef __FreeBSD__
/* From Andrew A. Chernov (ache@astral.msk.su):
@@ -1958,8 +3399,13 @@ main()
main()
{
- int s1, s2, s3, l;
+ int s1, s2, l;
struct sockaddr_un a;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
(void)alarm(5);
if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
@@ -1986,45 +3432,86 @@ main()
exit(1);
#endif
-
- l = 1;
- if (select(1, &l, 0, 0, 0) == -1)
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
+ if (select(1, &f, 0, 0, 0) == -1)
exit(1);
- if (select(1, &l, &l, 0, 0) != 2)
+ if (select(1, &f, &f, 0, 0) != 2)
exit(1);
exit(0);
}
-EOF
-if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3449: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3452: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3454: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3457: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- select is ok" 1>&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- it is not usable" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- select can't count" 1>&6
+ cat >>confdefs.h <<\EOF
#define SELECT_BROKEN 1
EOF
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+{ echo "$as_me:3474: checking for tgetent..." >&5
+echo "$as_me: checking for tgetent..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 3477 "configure"
+#include "confdefs.h"
-echo "checking for tgetent" 1>&6
-echo "configure:2019: checking for tgetent" >&5
+int
+main ()
+{
+tgetent((char *)0, (char *)0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3489: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3492: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3495: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3498: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
olibs="$LIBS"
LIBS="-lcurses $olibs"
-echo "checking libcurses" 1>&6
-echo "configure:2023: checking libcurses" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2025 "configure"
+{ echo "$as_me:3506: checking libcurses..." >&5
+echo "$as_me: checking libcurses..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 3509 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
#ifdef __hpux
__sorry_hpux_libcurses_is_totally_broken_in_10_10();
@@ -2032,181 +3519,344 @@ __sorry_hpux_libcurses_is_totally_broken_in_10_10();
tgetent((char *)0, (char *)0);
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3527: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3530: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3533: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3536: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="-ltermcap $olibs"
-echo "checking libtermcap" 1>&6
-echo "configure:2046: checking libtermcap" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2048 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="-ltermcap $olibs"
+{ echo "$as_me:3543: checking libtermcap..." >&5
+echo "$as_me: checking libtermcap..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 3546 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
tgetent((char *)0, (char *)0);
-; return 0; }
-EOF
-if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3558: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3561: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3564: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3567: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="-ltermlib $olibs"
-echo "checking libtermlib" 1>&6
-echo "configure:2063: checking libtermlib" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="-ltermlib $olibs"
+{ echo "$as_me:3574: checking libtermlib..." >&5
+echo "$as_me: checking libtermlib..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 3577 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
tgetent((char *)0, (char *)0);
-; return 0; }
-EOF
-if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3589: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3592: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3595: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3598: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="-lncurses $olibs"
-echo "checking libncurses" 1>&6
-echo "configure:2080: checking libncurses" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2082 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="-lncurses $olibs"
+{ echo "$as_me:3605: checking libncurses..." >&5
+echo "$as_me: checking libncurses..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 3608 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
tgetent((char *)0, (char *)0);
-; return 0; }
-EOF
-if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3620: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3623: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3626: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3629: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- { echo "configure: error: !!! no tgetent - no screen" 1>&2; exit 1; }
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:3635: error: !!! no tgetent - no screen" >&5
+echo "$as_me: error: !!! no tgetent - no screen" >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:3650: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 2109 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3655 "configure"
#include "confdefs.h"
main()
{
exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
}
-EOF
-if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3664: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3667: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3669: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3672: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- you use the termcap database" 1>&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- you use the terminfo database" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "- you use the terminfo database" 1>&6
+ cat >>confdefs.h <<\EOF
#define TERMINFO 1
EOF
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "checking ospeed" 1>&6
-echo "configure:2135: checking ospeed" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2137 "configure"
+{ echo "$as_me:3688: checking ospeed..." >&5
+echo "$as_me: checking ospeed..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 3691 "configure"
#include "confdefs.h"
extern short ospeed;
-int main() {
+int
+main ()
+{
ospeed=5;
-; return 0; }
-EOF
-if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3703: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3706: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3709: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3712: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >>confdefs.h <<\EOF
#define NEED_OSPEED 1
EOF
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking for /dev/ptc" 1>&6
-echo "configure:2158: checking for /dev/ptc" >&5
+{ echo "$as_me:3725: checking for /dev/ptc..." >&5
+echo "$as_me: checking for /dev/ptc..." >&6;}
if test -r /dev/ptc; then
-cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define HAVE_DEV_PTC 1
EOF
fi
-echo "checking for SVR4 ptys" 1>&6
-echo "configure:2167: checking for SVR4 ptys" >&5
+{ echo "$as_me:3734: checking for SVR4 ptys..." >&5
+echo "$as_me: checking for SVR4 ptys..." >&6;}
if test -c /dev/ptmx ; then
-cat > conftest.$ac_ext <<EOF
-#line 2170 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3738 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
ptsname(0);grantpt(0);unlockpt(0);
-; return 0; }
-EOF
-if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3750: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3753: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3756: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3759: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define HAVE_SVR4_PTYS 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+for ac_func in getpt
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:3775: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3781 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3812: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3815: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3818: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3821: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:3831: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
fi
+done
-echo "checking for ptyranges" 1>&6
-echo "configure:2191: checking for ptyranges" >&5
+{ echo "$as_me:3841: checking for ptyranges..." >&5
+echo "$as_me: checking for ptyranges..." >&6;}
if test -d /dev/ptym ; then
pdir='/dev/ptym'
else
pdir='/dev'
fi
-cat > conftest.$ac_ext <<EOF
-#line 2198 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3849 "configure"
#include "confdefs.h"
#ifdef M_UNIX
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
ptys=`echo /dev/ptyp??`
else
- rm -rf conftest*
ptys=`echo $pdir/pty??`
fi
rm -f conftest*
@@ -2214,24 +3864,26 @@ rm -f conftest*
if test "$ptys" != "$pdir/pty??" ; then
p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define PTYRANGE0 "$p0"
EOF
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define PTYRANGE1 "$p1"
EOF
fi
-echo "checking default tty permissions/group" 1>&6
-echo "configure:2229: checking default tty permissions/group" >&5
+{ echo "$as_me:3877: checking default tty permissions/group..." >&5
+echo "$as_me: checking default tty permissions/group..." >&6;}
rm -f conftest_grp
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:3881: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 2235 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3886 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2262,19 +3914,28 @@ main()
exit(0);
}
-EOF
-if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3919: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3922: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3924: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3927: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
if test -f conftest_grp; then
ptygrp=`cat conftest_grp`
- echo "- pty mode: 0620" 1>&6
+ echo "- pty mode: 0620, group: $ptygrp" 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define PTYMODE 0620
EOF
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<EOF
#define PTYGROUP $ptygrp
EOF
@@ -2284,22 +3945,134 @@ EOF
fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "- can't determine - assume ptys are world accessable" 1>&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ WRITEPATH=''
+ XTERMPATH=''
+ # Extract the first word of "write", so it can be a program name with args.
+set dummy write; ac_word=$2
+echo "$as_me:3956: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_WRITEPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $WRITEPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WRITEPATH="$WRITEPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_WRITEPATH="$ac_dir/$ac_word"
+ echo "$as_me:3973: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ ;;
+esac
+fi
+WRITEPATH=$ac_cv_path_WRITEPATH
+
+if test -n "$WRITEPATH"; then
+ echo "$as_me:3984: result: $WRITEPATH" >&5
+echo "${ECHO_T}$WRITEPATH" >&6
+else
+ echo "$as_me:3987: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "xterm", so it can be a program name with args.
+set dummy xterm; ac_word=$2
+echo "$as_me:3993: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XTERMPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $XTERMPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XTERMPATH="$XTERMPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_XTERMPATH="$ac_dir/$ac_word"
+ echo "$as_me:4010: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+ ;;
+esac
fi
-rm -fr conftest*
+XTERMPATH=$ac_cv_path_XTERMPATH
+
+if test -n "$XTERMPATH"; then
+ echo "$as_me:4021: result: $XTERMPATH" >&5
+echo "${ECHO_T}$XTERMPATH" >&6
+else
+ echo "$as_me:4024: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ found=
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ findfollow=
+ lsfollow=
+ found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null`
+ if test -n "$found"; then
+ findfollow=-follow
+ lsfollow=L
+ fi
+ if test -n "$XTERMPATH"; then
+ ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'`
+ if test tty != "$ptygrpn"; then
+ XTERMPATH=
+ fi
+ fi
+ fi
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print`
+ if test -n "$found"; then
+ ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'`
+ echo "- pty mode: 0620, group: $ptygrp" 1>&6
+
+ cat >>confdefs.h <<\EOF
+#define PTYMODE 0620
+EOF
+
+ cat >>confdefs.h <<EOF
+#define PTYGROUP $ptygrp
+EOF
+
+ else
+ echo "- ptys are world accessable" 1>&6
+
+ fi
+ else
+ echo "- can't determine - assume ptys are world accessable" 1>&6
+
+ fi
+
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
rm -f conftest_grp
-echo "checking getutent" 1>&6
-echo "configure:2301: checking getutent" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2303 "configure"
+{ echo "$as_me:4072: checking getutent..." >&5
+echo "$as_me: checking getutent..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4075 "configure"
#include "confdefs.h"
#include <time.h> /* to get time_t on SCO */
@@ -2314,26 +4087,39 @@ cat > conftest.$ac_ext <<EOF
#define pututline _pututline
#endif
-int main() {
+int
+main ()
+{
int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();
-; return 0; }
-EOF
-if { (eval echo configure:2322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4099: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4102: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4105: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4108: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define GETUTENT 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- olibs="$LIBS"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+olibs="$LIBS"
LIBS="$LIBS -lgen"
-echo "checking getutent with -lgen" 1>&6
-echo "configure:2335: checking getutent with -lgen" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2337 "configure"
+{ echo "$as_me:4119: checking getutent with -lgen..." >&5
+echo "$as_me: checking getutent with -lgen..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4122 "configure"
#include "confdefs.h"
#include <time.h>
@@ -2348,30 +4134,43 @@ cat > conftest.$ac_ext <<EOF
#define pututline _pututline
#endif
-int main() {
+int
+main ()
+{
int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();
-; return 0; }
-EOF
-if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4146: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4149: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4152: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4155: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define GETUTENT 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$olibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$olibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
-echo "checking ut_host" 1>&6
-echo "configure:2373: checking ut_host" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2375 "configure"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+{ echo "$as_me:4170: checking ut_host..." >&5
+echo "$as_me: checking ut_host..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4173 "configure"
#include "confdefs.h"
#include <time.h>
@@ -2383,139 +4182,187 @@ cat > conftest.$ac_ext <<EOF
#include <utmp.h>
#endif
-int main() {
+int
+main ()
+{
struct utmp u; u.ut_host[0] = 0;
-; return 0; }
-EOF
-if { (eval echo configure:2391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4194: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4197: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4200: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4203: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define UTHOST 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-ac_safe=`echo "utempter.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for utempter.h""... $ac_c" 1>&6
-echo "configure:2404: checking for utempter.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:4214: checking for utempter.h" >&5
+echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6
+if test "${ac_cv_header_utempter_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2409 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4220 "configure"
#include "confdefs.h"
#include <utempter.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+if { (eval echo "$as_me:4224: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:4230: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_utempter_h=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cv_header_utempter_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+echo "$as_me:4249: result: $ac_cv_header_utempter_h" >&5
+echo "${ECHO_T}$ac_cv_header_utempter_h" >&6
+if test $ac_cv_header_utempter_h = yes; then
have_utempter=yes
else
- echo "$ac_t""no" 1>&6
-have_utempter=no
+ have_utempter=no
fi
if test "$have_utempter" = yes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define HAVE_UTEMPTER 1
EOF
LIBS="$LIBS -lutempter"
fi
-echo "checking for libutil(s)" 1>&6
-echo "configure:2445: checking for libutil(s)" >&5
+{ echo "$as_me:4265: checking for libutil(s)..." >&5
+echo "$as_me: checking for libutil(s)..." >&6;}
test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
-echo "checking getloadavg" 1>&6
-echo "configure:2450: checking getloadavg" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2452 "configure"
+{ echo "$as_me:4270: checking getloadavg..." >&5
+echo "$as_me: checking getloadavg..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4273 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
getloadavg((double *)0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4285: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4288: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4291: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4294: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define LOADAV_GETLOADAVG 1
EOF
load=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- if test -f /usr/lib/libkvm.a ; then
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+if test -f /usr/lib/libkvm.a ; then
olibs="$LIBS"
LIBS="$LIBS -lkvm"
-echo "checking getloadavg with -lkvm" 1>&6
-echo "configure:2473: checking getloadavg with -lkvm" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2475 "configure"
+{ echo "$as_me:4306: checking getloadavg with -lkvm..." >&5
+echo "$as_me: checking getloadavg with -lkvm..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4309 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
getloadavg((double *)0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4321: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4324: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4327: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4330: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define LOADAV_GETLOADAVG 1
EOF
load=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$olibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$olibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test -z "$load" ; then
-cat > conftest.$ac_ext <<EOF
-#line 2502 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4349 "configure"
#include "confdefs.h"
#if defined(NeXT) || defined(apollo) || defined(linux)
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
load=1
fi
rm -f conftest*
fi
if test -z "$load" ; then
-echo "checking for kernelfile" 1>&6
-echo "configure:2519: checking for kernelfile" >&5
+{ echo "$as_me:4364: checking for kernelfile..." >&5
+echo "$as_me: checking for kernelfile..." >&6;}
for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
if test -f $core || test -c $core; then
break
@@ -2528,72 +4375,93 @@ else
echo "- using kernelfile '$core'" 1>&6
if test -r $core ; then
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<EOF
#define LOADAV_UNIX "$core"
EOF
- ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:2538: checking for nlist.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:4382: checking for nlist.h" >&5
+echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6
+if test "${ac_cv_header_nlist_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2543 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4388 "configure"
#include "confdefs.h"
#include <nlist.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+_ACEOF
+if { (eval echo "$as_me:4392: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:4398: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_nlist_h=yes
+else
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cv_header_nlist_h=no
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+echo "$as_me:4417: result: $ac_cv_header_nlist_h" >&5
+echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
+if test $ac_cv_header_nlist_h = yes; then
+ cat >>confdefs.h <<\EOF
#define NLIST_STRUCT 1
EOF
- echo "checking n_un in struct nlist" 1>&6
-echo "configure:2569: checking n_un in struct nlist" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2571 "configure"
+ { echo "$as_me:4424: checking n_un in struct nlist..." >&5
+echo "$as_me: checking n_un in struct nlist..." >&6;}
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4427 "configure"
#include "confdefs.h"
#include <nlist.h>
-int main() {
+int
+main ()
+{
struct nlist n; n.n_un.n_name = 0;
-; return 0; }
-EOF
-if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4439: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4442: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4445: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4448: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define NLIST_NAME_UNION 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-else
- echo "$ac_t""no" 1>&6
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
- echo "checking for nlist declaration" 1>&6
-echo "configure:2595: checking for nlist declaration" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2597 "configure"
+ { echo "$as_me:4461: checking for nlist declaration..." >&5
+echo "$as_me: checking for nlist declaration..." >&6;}
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4464 "configure"
#include "confdefs.h"
#ifdef NLIST_STRUCT
@@ -2602,26 +4470,27 @@ echo "configure:2595: checking for nlist declaration" >&5
# include <a.out.h>
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "nlist(( | )( | )*.*\(|\()" >/dev/null 2>&1; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define NLIST_DECLARED 1
EOF
fi
rm -f conftest*
-
- echo "checking for avenrun symbol" 1>&6
-echo "configure:2619: checking for avenrun symbol" >&5
- for av in avenrun _avenrun _Loadavg ; do
+ { echo "$as_me:4483: checking for avenrun symbol..." >&5
+echo "$as_me: checking for avenrun symbol..." >&6;}
+ nlist64=
+ for av in avenrun _avenrun _Loadavg avenrun _avenrun _Loadavg; do
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:4488: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 2625 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4493 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2631,11 +4500,7 @@ else
#include <a.out.h>
#endif
-#ifdef __sgi
-# if _MIPS_SZLONG == 64 || (defined(_MIPS_ISA) && _MIPS_ISA > 2)
-# define nlist nlist64
-# endif
-#endif
+$nlist64
struct nlist nl[2];
@@ -2655,18 +4520,30 @@ main()
exit(1);
exit(0);
}
-
-EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4526: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4529: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4531: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4534: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
avensym=$av;break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
+ if test "$av" = _Loadavg; then
+ nlist64='#define nlist nlist64'
+ fi
done
if test -z "$avensym" ; then
echo "- no avenrun symbol found" 1>&6
@@ -2674,10 +4551,18 @@ fi
else
echo "- using avenrun symbol '$avensym'" 1>&6
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<EOF
#define LOADAV_AVENRUN "$avensym"
EOF
+ if test -n "$nlist64"; then
+ echo "- used nlist64 to find it" 1>&6
+
+ cat >>confdefs.h <<\EOF
+#define LOADAV_USE_NLIST64 1
+EOF
+
+ fi
load=1
fi
else
@@ -2700,13 +4585,14 @@ fi
fi
cat > conftest.c <<EOF
+#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
_CUT_HERE_
-#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || !(defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
+#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
loadtype=long
# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX)
loadscale=65536
@@ -2738,24 +4624,23 @@ loadnum=3
#endif
EOF
-eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' > conftest.out"
+eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.out"
. ./conftest.out
rm -f conftest*
-
-if test -n "$load" ; then cat >> confdefs.h <<\EOF
+if test -n "$load" ; then cat >>confdefs.h <<\EOF
#define LOADAV 1
EOF
fi
-if test -n "$loadtype" ; then cat >> confdefs.h <<EOF
+if test -n "$loadtype" ; then cat >>confdefs.h <<EOF
#define LOADAV_TYPE $loadtype
EOF
fi
-if test -n "$loadnum" ; then cat >> confdefs.h <<EOF
+if test -n "$loadnum" ; then cat >>confdefs.h <<EOF
#define LOADAV_NUM $loadnum
EOF
fi
-if test -n "$loadscale" ; then cat >> confdefs.h <<EOF
+if test -n "$loadscale" ; then cat >>confdefs.h <<EOF
#define LOADAV_SCALE $loadscale
EOF
fi
@@ -2764,17 +4649,16 @@ if test -n "$posix" ; then
echo "assuming posix signal definition" 1>&6
-cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define SIGVOID 1
EOF
-
else
-echo "checking return type of signal handlers" 1>&6
-echo "configure:2776: checking return type of signal handlers" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2778 "configure"
+{ echo "$as_me:4658: checking return type of signal handlers..." >&5
+echo "$as_me: checking return type of signal handlers..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4661 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2782,31 +4666,47 @@ cat > conftest.$ac_ext <<EOF
#undef signal
#endif
extern void (*signal ()) ();
-int main() {
+int
+main ()
+{
int i;
-; return 0; }
-EOF
-if { (eval echo configure:2790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4678: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4681: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4684: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4687: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define SIGVOID 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-echo "checking sigset" 1>&6
-echo "configure:2802: checking sigset" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2804 "configure"
+rm -f conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:4698: checking sigset..." >&5
+echo "$as_me: checking sigset..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4701 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
-int main() {
+int
+main ()
+{
#ifdef SIGVOID
sigset(0, (void (*)())0);
@@ -2814,26 +4714,40 @@ sigset(0, (void (*)())0);
sigset(0, (int (*)())0);
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4722: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4725: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4728: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4731: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define USESIGSET 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-echo "checking signal implementation" 1>&6
-echo "configure:2832: checking signal implementation" >&5
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+{ echo "$as_me:4742: checking signal implementation..." >&5
+echo "$as_me: checking signal implementation..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:4745: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 2837 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4750 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2869,146 +4783,208 @@ main()
exit(0);
}
-EOF
-if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4788: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4791: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4793: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4796: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- cat >> confdefs.h <<\EOF
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >>confdefs.h <<\EOF
#define SYSVSIGS 1
EOF
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "checking for crypt and sec libraries" 1>&6
-echo "configure:2894: checking for crypt and sec libraries" >&5
+{ echo "$as_me:4813: checking for crypt and sec libraries..." >&5
+echo "$as_me: checking for crypt and sec libraries..." >&6;}
test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
oldlibs="$LIBS"
LIBS="$LIBS -lcrypt"
-echo "checking crypt" 1>&6
-echo "configure:2899: checking crypt" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2901 "configure"
+{ echo "$as_me:4818: checking crypt..." >&5
+echo "$as_me: checking crypt..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4821 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4833: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4836: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4839: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4842: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$oldlibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$oldlibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
oldlibs="$LIBS"
LIBS="$LIBS -lsun"
-echo "checking IRIX sun library" 1>&6
-echo "configure:2922: checking IRIX sun library" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2924 "configure"
+{ echo "$as_me:4855: checking IRIX sun library..." >&5
+echo "$as_me: checking IRIX sun library..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4858 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
-; return 0; }
-EOF
-if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4870: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4873: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4876: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4879: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$oldlibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$oldlibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking syslog" 1>&6
-echo "configure:2942: checking syslog" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2944 "configure"
+{ echo "$as_me:4889: checking syslog..." >&5
+echo "$as_me: checking syslog..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4892 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
closelog();
-; return 0; }
-EOF
-if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4904: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4907: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4910: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4913: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- oldlibs="$LIBS"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+oldlibs="$LIBS"
LIBS="$LIBS -lbsd"
-echo "checking syslog in libbsd.a" 1>&6
-echo "configure:2960: checking syslog in libbsd.a" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2962 "configure"
+{ echo "$as_me:4921: checking syslog in libbsd.a..." >&5
+echo "$as_me: checking syslog in libbsd.a..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4924 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
closelog();
-; return 0; }
-EOF
-if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4936: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4939: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4942: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4945: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
echo "- found." 1>&6
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="oldlibs"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$oldlibs"
echo "- bad news: syslog missing." 1>&6
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#define NOSYSLOG 1
EOF
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-cat > conftest.$ac_ext <<EOF
-#line 2989 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4964 "configure"
#include "confdefs.h"
#ifdef M_UNIX
yes;
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
LIBS="$LIBS -lsocket -lcrypt_i"
fi
rm -f conftest*
-
-echo "checking wait union" 1>&6
-echo "configure:3005: checking wait union" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3007 "configure"
+{ echo "$as_me:4977: checking wait union..." >&5
+echo "$as_me: checking wait union..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 4980 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
-int main() {
+int
+main ()
+{
union wait x;
int y;
@@ -3016,120 +4992,184 @@ int main() {
y = WEXITSTATUS(x);
#endif
-; return 0; }
-EOF
-if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5000: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5003: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5006: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5009: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define BSDWAIT 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test -z "$butterfly"; then
-echo "checking for termio or termios" 1>&6
-echo "configure:3036: checking for termio or termios" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3038 "configure"
+{ echo "$as_me:5022: checking for termio or termios..." >&5
+echo "$as_me: checking for termio or termios..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 5025 "configure"
#include "confdefs.h"
#include <termio.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+_ACEOF
+if { (eval echo "$as_me:5029: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:5035: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cat >>confdefs.h <<\EOF
#define TERMIO 1
EOF
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
if test -n "$posix"; then
-cat > conftest.$ac_ext <<EOF
-#line 3058 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 5055 "configure"
#include "confdefs.h"
#include <termios.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+_ACEOF
+if { (eval echo "$as_me:5059: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:5065: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ cat >>confdefs.h <<\EOF
#define TERMIO 1
EOF
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
fi
-rm -f conftest*
+rm -f conftest.err conftest.$ac_ext
fi
-echo "checking getspnam" 1>&6
-echo "configure:3084: checking getspnam" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3086 "configure"
+{ echo "$as_me:5092: checking getspnam..." >&5
+echo "$as_me: checking getspnam..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 5095 "configure"
#include "confdefs.h"
#include <shadow.h>
-int main() {
+int
+main ()
+{
getspnam("x");
-; return 0; }
-EOF
-if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5110: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5113: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5116: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define SHADOWPW 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking getttyent" 1>&6
-echo "configure:3106: checking getttyent" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3108 "configure"
+{ echo "$as_me:5128: checking getttyent..." >&5
+echo "$as_me: checking getttyent..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line 5131 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
getttyent();
-; return 0; }
-EOF
-if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5143: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5146: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5149: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5152: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define GETTTYENT 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "checking whether memcpy/memmove/bcopy handles overlapping arguments" 1>&6
-echo "configure:3128: checking whether memcpy/memmove/bcopy handles overlapping arguments" >&5
+{ echo "$as_me:5164: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5
+echo "$as_me: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&6;}
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:5167: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 3133 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5172 "configure"
#include "confdefs.h"
main() {
@@ -3144,26 +5184,37 @@ main() {
exit(1);
exit(0); /* libc version works properly. */
}
-EOF
-if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- cat >> confdefs.h <<\EOF
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5189: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5192: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5194: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5197: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define USEBCOPY 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:5212: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 3167 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5217 "configure"
#include "confdefs.h"
#define bcopy(s,d,l) memmove(d,s,l)
@@ -3179,27 +5230,37 @@ main() {
exit(1);
exit(0); /* libc version works properly. */
}
-EOF
-if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- cat >> confdefs.h <<\EOF
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5235: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5238: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5240: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5243: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define USEMEMMOVE 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
-
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:5258: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 3203 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5263 "configure"
#include "confdefs.h"
#define bcopy(s,d,l) memcpy(d,s,l)
@@ -3215,683 +5276,1454 @@ main() {
exit(1);
exit(0); /* libc version works properly. */
}
-EOF
-if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- cat >> confdefs.h <<\EOF
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5284: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5286: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5289: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\EOF
#define USEMEMCPY 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
-echo $ac_n "checking long file names""... $ac_c" 1>&6
-echo "configure:3235: checking long file names" >&5
+echo "$as_me:5303: checking long file names" >&5
+echo $ECHO_N "checking long file names... $ECHO_C" >&6
(echo 1 > /tmp/conftest9012345) 2>/dev/null
(echo 2 > /tmp/conftest9012346) 2>/dev/null
val=`cat /tmp/conftest9012345 2>/dev/null`
if test -f /tmp/conftest9012345 && test "$val" = 1; then
-echo "$ac_t""yes" 1>&6
+echo "$as_me:5309: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
-echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
+echo "$as_me:5312: result: no" >&5
+echo "${ECHO_T}no" >&6
+cat >>confdefs.h <<\EOF
#define NAME_MAX 14
EOF
fi
rm -f /tmp/conftest*
-echo $ac_n "checking for vsprintf""... $ac_c" 1>&6
-echo "configure:3251: checking for vsprintf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3253 "configure"
+echo "$as_me:5321: checking for vsprintf" >&5
+echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 5324 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
vsprintf(0,0,0);
-; return 0; }
-EOF
-if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5339: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5342: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5345: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5347: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
#define USEVARARGS 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5355: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:3279: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3284 "configure"
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:5363: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5369 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:3292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=yes"
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5387: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5390: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5393: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_dirent_$ac_safe=no"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+echo "$as_me:5403: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
EOF
- ac_header_dirent=$ac_hdr; break
-else
- echo "$ac_t""no" 1>&6
+
+ac_header_dirent=$ac_hdr; break
fi
+
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:3317: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:5416: checking for opendir in -ldir" >&5
+echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
+if test "${ac_cv_lib_dir_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3325 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 5424 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5443: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5446: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5449: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5452: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dir_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dir_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:5463: result: $ac_cv_lib_dir_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
+if test $ac_cv_lib_dir_opendir = yes; then
LIBS="$LIBS -ldir"
-else
- echo "$ac_t""no" 1>&6
fi
else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:3358: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:5470: checking for opendir in -lx" >&5
+echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
+if test "${ac_cv_lib_x_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lx $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3366 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line 5478 "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5497: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5500: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5503: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5506: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_x_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_x_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:5517: result: $ac_cv_lib_x_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
+if test $ac_cv_lib_x_opendir = yes; then
LIBS="$LIBS -lx"
-else
- echo "$ac_t""no" 1>&6
fi
fi
-
-echo $ac_n "checking for setenv""... $ac_c" 1>&6
-echo "configure:3401: checking for setenv" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3403 "configure"
+echo "$as_me:5525: checking for setenv" >&5
+echo $ECHO_N "checking for setenv... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 5528 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
setenv((char *)0,(char *)0);unsetenv((char *)0);
-; return 0; }
-EOF
-if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6;cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5540: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5543: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5546: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5549: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5551: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
#define USESETENV 1
EOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for putenv""... $ac_c" 1>&6
-echo "configure:3422: checking for putenv" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3424 "configure"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5559: result: no" >&5
+echo "${ECHO_T}no" >&6
+echo "$as_me:5561: checking for putenv" >&5
+echo $ECHO_N "checking for putenv... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 5564 "configure"
#include "confdefs.h"
-int main() {
+int
+main ()
+{
putenv((char *)0);unsetenv((char *)0);
-; return 0; }
-EOF
-if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6;cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5579: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5582: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5585: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5587: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5592: result: no" >&5
+echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\EOF
#define NEEDPUTENV 1
EOF
-
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+echo "$as_me:5601: checking for nl_langinfo(CODESET)" >&5
+echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 5604 "configure"
+#include "confdefs.h"
+
+#include <langinfo.h>
-for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd
+int
+main ()
+{
+nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5618: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5621: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5624: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5627: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5629: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
+#define HAVE_NL_LANGINFO 1
+EOF
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5637: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3451: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3456 "configure"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:5645: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5651 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
+ which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+int
+main ()
+{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+f = $ac_func;
#endif
-; return 0; }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5682: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5685: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5688: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5691: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:5701: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF
-if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
+
+fi
+done
+
+# Check whether --enable-pam or --disable-pam was given.
+if test "${enable_pam+set}" = set; then
+ enableval="$enable_pam"
+
+fi;
+if test "$enable_pam" = "yes"; then
+ echo "$as_me:5717: checking for PAM support" >&5
+echo $ECHO_N "checking for PAM support... $ECHO_C" >&6
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpam"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5722 "configure"
+#include "confdefs.h"
+#include <security/pam_appl.h>
+int
+main ()
+{
+
+ pam_start(0, 0, 0, 0);
+ pam_authenticate(0, 0);
+ pam_end(0,0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5738: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5741: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5744: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5747: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5749: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
+#define USE_PAM 1
+EOF
+
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5757: result: no" >&5
+echo "${ECHO_T}no" >&6;LIBS="$oldlibs"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+# Check whether --enable-use_locale or --disable-use_locale was given.
+if test "${enable_use_locale+set}" = set; then
+ enableval="$enable_use_locale"
+
+fi;
+if test "$enable_use_locale" = "yes"; then
+ cat >>confdefs.h <<\EOF
+#define USE_LOCALE 1
EOF
-
-else
- echo "$ac_t""no" 1>&6
+
fi
-done
+# Check whether --enable-telnet or --disable-telnet was given.
+if test "${enable_telnet+set}" = set; then
+ enableval="$enable_telnet"
+
+fi;
+if test "$enable_telnet" = "yes"; then
+ cat >>confdefs.h <<\EOF
+#define BUILTIN_TELNET 1
+EOF
+
+fi
+# Check whether --enable-colors256 or --disable-colors256 was given.
+if test "${enable_colors256+set}" = set; then
+ enableval="$enable_colors256"
+
+fi;
+if test "$enable_colors256" = "yes"; then
+ cat >>confdefs.h <<\EOF
+#define COLORS256 1
+EOF
+
+fi
+# Check whether --enable-rxvt_osc or --disable-rxvt_osc was given.
+if test "${enable_rxvt_osc+set}" = set; then
+ enableval="$enable_rxvt_osc"
+
+fi;
+if test "$enable_rxvt_osc" = "yes"; then
+ cat >>confdefs.h <<\EOF
+#define RXVT_OSC 1
+EOF
+fi
+if test -z "$old_CFLAGS"; then
+ if test "x$CFLAGS" = "x-g"; then
+ CFLAGS="-O"
+ fi
+fi
test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ { { echo "$as_me:5816: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
else
- cat > conftest.$ac_ext <<EOF
-#line 3510 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5821 "configure"
#include "confdefs.h"
main(){exit(0);}
-EOF
-if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5826: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5829: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5831: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5834: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- { echo "configure: error: Can't run the compiler - internal error. Sorry." 1>&2; exit 1; }
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:5841: error: Can't run the compiler - internal error. Sorry." >&5
+echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -fr conftest*
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ETCSCREENRC="\"/usr/local/etc/screenrc\""
if test -n "$prefix"; then
-cat >> confdefs.h <<EOF
-#define ETCSCREENRC "$prefix/etc/screenrc"
+ETCSCREENRC="\"$prefix/etc/screenrc\""
+fi
+echo "$as_me:5852: checking for the global screenrc file" >&5
+echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6
+
+# Check whether --with-sys-screenrc or --without-sys-screenrc was given.
+if test "${with_sys_screenrc+set}" = set; then
+ withval="$with_sys_screenrc"
+ ETCSCREENRC="\"${withval}\""
+fi;
+cat >>confdefs.h <<EOF
+#define ETCSCREENRC $ETCSCREENRC
EOF
+echo "$as_me:5864: result: $ETCSCREENRC" >&5
+echo "${ECHO_T}$ETCSCREENRC" >&6
+
+SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
+if test -n "$datadir"; then
+eval SCREENENCODINGS="$datadir/screen/utf8encodings"
+SCREENENCODINGS="\"$SCREENENCODINGS\""
fi
+echo "$as_me:5872: checking for the utf8-encodings location" >&5
+echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6
+cat >>confdefs.h <<EOF
+#define SCREENENCODINGS $SCREENENCODINGS
+EOF
-trap '' 1 2 15
-cat > confcache <<\EOF
+echo "$as_me:5878: result: $SCREENENCODINGS" >&5
+echo "${ECHO_T}$SCREENENCODINGS" >&6
+
+ac_config_files="$ac_config_files Makefile doc/Makefile"
+ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:5962: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\EOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.52,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
do
- case "\$ac_option" in
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=false;;
+ esac
+
+ case $1 in
+ # Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:6138: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES="$CONFIG_FILES $1"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ ac_need_defaults=false;;
+
+ # This is an error.
+ -*) { { echo "$as_me:6157: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
esac
+ shift
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status. ##
+## ----------------------- ##
-trap 'rm -fr `echo "Makefile doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+This file was extended by $as_me 2.52, executed with
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_ACEOF
EOF
-cat >> $CONFIG_STATUS <<EOF
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@VERSION@%$VERSION%g
-s%@SCREEN@%$SCREEN%g
-s%@GZIP@%$GZIP%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@AWK@%$AWK%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
+cat >>$CONFIG_STATUS <<\EOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:6196: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
-CEOF
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<EOF
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@DEFS@,$DEFS,;t t
+s,@LIBS@,$LIBS,;t t
+s,@VERSION@,$VERSION,;t t
+s,@SCREEN@,$SCREEN,;t t
+s,@GZIP@,$GZIP,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@AWK@,$AWK,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@WRITEPATH@,$WRITEPATH,;t t
+s,@XTERMPATH@,$XTERMPATH,;t t
+CEOF
+
+EOF
+
+ cat >>$CONFIG_STATUS <<\EOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
+fi # test -n "$CONFIG_FILES"
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+cat >>$CONFIG_STATUS <<\EOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
# A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
else
ac_dir_suffix= ac_dots=
fi
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ case $srcdir in
+ .) ac_srcdir=.
+ if test -z "$ac_dots"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* )
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
*) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_dots$srcdir ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_dots$INSTALL ;;
esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:6409: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ configure_input="Generated automatically from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:6427: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:6440: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+EOF
+cat >>$CONFIG_STATUS <<EOF
+ sed "$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
+ac_uD=',;t'
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:6501: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:6512: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:6525: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+EOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\EOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+EOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+cat >>conftest.undefs <<\EOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
EOF
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\EOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated automatically by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ { echo "$as_me:6642: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ fi
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
fi
-fi; done
-
+done
EOF
-cat >> $CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<\EOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ case $ac_dest in
+ default )
# a hook for preserving undef directive in config.h
mv config.h conftest
sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2 /\*\3@' < conftest > config.h
rm -f conftest
+ ;;
+ esac
+done
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
-exit 0
+{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
+ac_clean_files=$ac_clean_files_save
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
echo ""
if test -z "$AWK"; then
diff --git a/configure.in b/configure.in
index f10734d..98dd2cf 100644
--- a/configure.in
+++ b/configure.in
@@ -14,11 +14,12 @@ dnl Define some useful macros
dnl
AC_DEFUN(AC_PROGRAM_SOURCE,
[AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c <<EOF
+#include "confdefs.h"
[$1]
_CUT_HERE_
[$2]
EOF
-eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' > conftest.out"
+eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.out"
. ./conftest.out
rm -f conftest*
])dnl
@@ -39,6 +40,7 @@ AC_SUBST(VERSION)
AC_PREFIX_PROGRAM(screen)
AC_PREFIX_PROGRAM(gzip)
+old_CFLAGS="$CFLAGS"
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
@@ -78,6 +80,26 @@ AC_CHECKING(for buggy tools)
sh etc/toolcheck 1>&AC_FD_MSG
fi
+
+
+dnl SOCKDIR
+AC_MSG_CHECKING(if a system-wide socket dir should be used)
+AC_ARG_ENABLE(socket-dir,
+ [ --disable-socket-dir disable system wide socket-dir and use ~/.screen instead],
+ [
+ AC_MSG_RESULT(no. ~/.screen will be used instead.)
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING(for the socket dir)
+ SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")"
+ AC_ARG_WITH(socket-dir, [ --with-socket-dir=path where to put the per-user sockets], [ SOCKDIR="\"${withval}\"" ])
+ AC_MSG_RESULT(${SOCKDIR})
+ AC_DEFINE_UNQUOTED(SOCKDIR, $SOCKDIR)
+ ]
+)
+
+
dnl
dnl **** special unix variants ****
dnl
@@ -288,7 +310,11 @@ char *fin = "/tmp/conftest$$";
main()
{
struct stat stb;
+#ifdef FD_SET
+ fd_set f;
+#else
int f;
+#endif
(void)alarm(5);
#ifdef POSIX
@@ -322,7 +348,11 @@ main()
exit(1);
exit(0);
}
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
f = 1;
+#endif
if (select(1, &f, 0, 0, 0) == -1)
exit(1);
exit(0);
@@ -351,7 +381,11 @@ char *fin = "/tmp/conftest$$";
main()
{
struct timeval tv;
- int r, x;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
#ifdef POSIX
if (mkfifo(fin, 0600))
@@ -362,10 +396,14 @@ main()
close(0);
if (open(fin, O_RDONLY|O_NONBLOCK))
exit(1);
- r = 1;
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
tv.tv_sec = 1;
tv.tv_usec = 0;
- if (select(1, &r, 0, 0, &tv))
+ if (select(1, &f, 0, 0, &tv))
exit(1);
exit(0);
}
@@ -391,8 +429,13 @@ char *son = "/tmp/conftest$$";
main()
{
- int s1, s2, s3, l;
+ int s1, s2, l;
struct sockaddr_un a;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
(void)alarm(5);
if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
@@ -417,8 +460,12 @@ main()
close(0);
if (accept(s1, &a, &l))
exit(1);
- l = 1;
- if (select(1, &l, 0, 0, 0) == -1)
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
+ if (select(1, &f, 0, 0, 0) == -1)
exit(1);
exit(0);
}
@@ -508,7 +555,11 @@ char *nam = "/tmp/conftest$$";
main()
{
- int l;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
#ifdef __FreeBSD__
/* From Andrew A. Chernov (ache@astral.msk.su):
@@ -538,8 +589,13 @@ main()
main()
{
- int s1, s2, s3, l;
+ int s1, s2, l;
struct sockaddr_un a;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
(void)alarm(5);
if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
@@ -567,20 +623,25 @@ main()
#endif
- l = 1;
- if (select(1, &l, 0, 0, 0) == -1)
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
+ if (select(1, &f, 0, 0, 0) == -1)
exit(1);
- if (select(1, &l, &l, 0, 0) != 2)
+ if (select(1, &f, &f, 0, 0) != 2)
exit(1);
exit(0);
}
],AC_NOTE(- select is ok),
-AC_NOTE(- it is not usable) AC_DEFINE(SELECT_BROKEN))
+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
dnl
dnl **** termcap or terminfo ****
dnl
AC_CHECKING(for tgetent)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
olibs="$LIBS"
LIBS="-lcurses $olibs"
AC_CHECKING(libcurses)
@@ -600,7 +661,7 @@ AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
LIBS="-lncurses $olibs"
AC_CHECKING(libncurses)
AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
-AC_MSG_ERROR(!!! no tgetent - no screen)))))
+AC_MSG_ERROR(!!! no tgetent - no screen))))))
AC_TRY_RUN([
main()
@@ -624,6 +685,8 @@ if test -c /dev/ptmx ; then
AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],AC_DEFINE(HAVE_SVR4_PTYS))
fi
+AC_CHECK_FUNCS(getpt)
+
AC_CHECKING(for ptyranges)
if test -d /dev/ptym ; then
pdir='/dev/ptym'
@@ -684,14 +747,47 @@ main()
],[
if test -f conftest_grp; then
ptygrp=`cat conftest_grp`
- AC_NOTE(- pty mode: 0620, group: $ptygrp)
+ AC_NOTE([- pty mode: 0620, group: $ptygrp])
AC_DEFINE(PTYMODE, 0620)
AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
else
AC_NOTE(- ptys are world accessable)
fi
-],
- AC_NOTE(- can't determine - assume ptys are world accessable)
+],[
+ WRITEPATH=''
+ XTERMPATH=''
+ AC_PATH_PROG(WRITEPATH, write)
+ AC_PATH_PROG(XTERMPATH, xterm)
+ found=
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ findfollow=
+ lsfollow=
+ found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null`
+ if test -n "$found"; then
+ findfollow=-follow
+ lsfollow=L
+ fi
+ if test -n "$XTERMPATH"; then
+ ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'`
+ if test tty != "$ptygrpn"; then
+ XTERMPATH=
+ fi
+ fi
+ fi
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print`
+ if test -n "$found"; then
+ ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'`
+ AC_NOTE([- pty mode: 0620, group: $ptygrp])
+ AC_DEFINE(PTYMODE, 0620)
+ AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
+ else
+ AC_NOTE(- ptys are world accessable)
+ fi
+ else
+ AC_NOTE(- can't determine - assume ptys are world accessable)
+ fi
+ ]
)
rm -f conftest_grp
@@ -804,7 +900,8 @@ else
],AC_DEFINE(NLIST_DECLARED))
AC_CHECKING(for avenrun symbol)
- for av in avenrun _avenrun _Loadavg ; do
+ nlist64=
+ for av in avenrun _avenrun _Loadavg avenrun _avenrun _Loadavg; do
AC_TRY_RUN([
#include <sys/types.h>
#ifdef NLIST_STRUCT
@@ -813,11 +910,7 @@ else
#include <a.out.h>
#endif
-#ifdef __sgi
-# if _MIPS_SZLONG == 64 || (defined(_MIPS_ISA) && _MIPS_ISA > 2)
-# define nlist nlist64
-# endif
-#endif
+$nlist64
struct nlist nl[2];
@@ -838,12 +931,19 @@ main()
exit(0);
}
],avensym=$av;break)
+ if test "$av" = _Loadavg; then
+ nlist64='#define nlist nlist64'
+ fi
done
if test -z "$avensym" ; then
AC_NOTE(- no avenrun symbol found)
else
AC_NOTE(- using avenrun symbol '$avensym')
AC_DEFINE_UNQUOTED(LOADAV_AVENRUN,"$avensym")
+ if test -n "$nlist64"; then
+ AC_NOTE(- used nlist64 to find it)
+ AC_DEFINE(LOADAV_USE_NLIST64)
+ fi
load=1
fi
else
@@ -862,7 +962,7 @@ AC_PROGRAM_SOURCE([
#include <sys/types.h>
#include <sys/param.h>
],[
-#if ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || !(defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
+#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
loadtype=long
# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX)
loadscale=65536
@@ -988,7 +1088,7 @@ AC_CHECKING(syslog)
AC_TRY_LINK(,[closelog();], , [oldlibs="$LIBS"
LIBS="$LIBS -lbsd"
AC_CHECKING(syslog in libbsd.a)
-AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="oldlibs"
+AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
AC_EGREP_CPP(yes,
@@ -1096,19 +1196,73 @@ AC_MSG_RESULT(no)
AC_MSG_CHECKING(for putenv)
AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)
))
+AC_MSG_CHECKING([for nl_langinfo(CODESET)])
+AC_TRY_LINK([
+#include <langinfo.h>
+],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no))
+
+AC_CHECK_FUNCS(rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime)
+
+AC_ARG_ENABLE(pam, [ --enable-pam enable PAM support])
+if test "$enable_pam" = "yes"; then
+ AC_MSG_CHECKING(for PAM support)
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpam"
+ AC_TRY_LINK([#include <security/pam_appl.h>], [
+ pam_start(0, 0, 0, 0);
+ pam_authenticate(0, 0);
+ pam_end(0,0);
+ ], AC_MSG_RESULT(yes);AC_DEFINE(USE_PAM),
+ AC_MSG_RESULT(no);LIBS="$oldlibs")
+fi
-AC_CHECK_FUNCS(rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd)
+AC_ARG_ENABLE(use_locale, [ --enable-locale use localized month/day names])
+if test "$enable_use_locale" = "yes"; then
+ AC_DEFINE(USE_LOCALE)
+fi
+AC_ARG_ENABLE(telnet, [ --enable-telnet enable builtin telnet])
+if test "$enable_telnet" = "yes"; then
+ AC_DEFINE(BUILTIN_TELNET)
+fi
+AC_ARG_ENABLE(colors256, [ --enable-colors256 enable support for 256 colors])
+if test "$enable_colors256" = "yes"; then
+ AC_DEFINE(COLORS256)
+fi
+AC_ARG_ENABLE(rxvt_osc, [ --enable-rxvt_osc enable support for rxvt OSC codes])
+if test "$enable_rxvt_osc" = "yes"; then
+ AC_DEFINE(RXVT_OSC)
+fi
dnl
dnl **** the end ****
dnl
+if test -z "$old_CFLAGS"; then
+ if test "x$CFLAGS" = "x-g"; then
+ CFLAGS="-O"
+ fi
+fi
dnl Ptx bug workaround -- insert -lc after -ltermcap
test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
+
+ETCSCREENRC="\"/usr/local/etc/screenrc\""
if test -n "$prefix"; then
-AC_DEFINE_UNQUOTED(ETCSCREENRC,"$prefix/etc/screenrc")
+ETCSCREENRC="\"$prefix/etc/screenrc\""
+fi
+AC_MSG_CHECKING(for the global screenrc file)
+AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path where to put the global screenrc file], [ ETCSCREENRC="\"${withval}\"" ])
+AC_DEFINE_UNQUOTED(ETCSCREENRC,$ETCSCREENRC)
+AC_MSG_RESULT($ETCSCREENRC)
+
+SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
+if test -n "$datadir"; then
+eval SCREENENCODINGS="$datadir/screen/utf8encodings"
+SCREENENCODINGS="\"$SCREENENCODINGS\""
fi
+AC_MSG_CHECKING(for the utf8-encodings location)
+AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS)
+AC_MSG_RESULT($SCREENENCODINGS)
AC_OUTPUT(Makefile doc/Makefile, [[
# a hook for preserving undef directive in config.h
diff --git a/display.c b/display.c
index 68133f0..00b2a22 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -34,7 +34,7 @@ RCS_ID("$Id: display.c,v 1.16 1994/05/31 12:31:50 mlschroe Exp $ FAU")
#include "braille.h"
static int CountChars __P((int));
-static int PutChar __P((int));
+static int DoAddChar __P((int));
static int BlankResize __P((int, int));
static int CallRewrite __P((int, int, int, int));
static void FreeCanvas __P((struct canvas *));
@@ -47,8 +47,11 @@ static void cv_winid_fn __P((struct event *, char *));
static void disp_map_fn __P((struct event *, char *));
#endif
static void WriteLP __P((int, int));
-static void INSERTCHAR __P((int));
-static void RAW_PUTCHAR __P((int));
+static void INSERTCHAR __P((int));
+static void RAW_PUTCHAR __P((int));
+#ifdef COLOR
+static void SetBackColor __P((int));
+#endif
extern struct layer *flayer;
@@ -58,14 +61,17 @@ extern struct LayFuncs WinLf;
extern int use_hardstatus;
extern int MsgWait, MsgMinWait;
extern int Z0width, Z1width;
-extern char *blank, *null;
-extern struct mline mline_blank, mline_null;
+extern unsigned char *blank, *null;
+extern struct mline mline_blank, mline_null, mline_old;
extern struct mchar mchar_null, mchar_blank, mchar_so;
+extern struct NewWindow nwin_default;
/* XXX shouldn't be here */
extern char *hstatusstring;
extern char *captionstring;
+extern int pastefont;
+
/*
* tputs needs this to calculate the padding
*/
@@ -76,6 +82,10 @@ short ospeed;
struct display *display, *displays;
+#ifdef COLOR
+int attr2color[8];
+int nattr2color;
+#endif
#ifndef MULTI
struct display TheDisplay;
@@ -109,14 +119,14 @@ DefRedisplayLine(y, xs, xe, isblank)
int y, xs, xe, isblank;
{
if (isblank == 0 && y >= 0)
- DefClearLine(y, xs, xe);
+ DefClearLine(y, xs, xe, 0);
}
void
-DefClearLine(y, xs, xe)
-int y, xs, xe;
+DefClearLine(y, xs, xe, bce)
+int y, xs, xe, bce;
{
- LClearLine(flayer, y, xs, xe, (struct mline *)0);
+ LClearLine(flayer, y, xs, xe, bce, (struct mline *)0);
}
/*ARGSUSED*/
@@ -144,8 +154,9 @@ DefRestore()
LKeypadMode(flayer, 0);
LCursorkeysMode(flayer, 0);
LCursorVisibility(flayer, 0);
+ LMouseMode(flayer, 0);
LSetRendition(flayer, &mchar_null);
- LSetFlow(flayer, FLOW_NOW);
+ LSetFlow(flayer, nwin_default.flowflag & FLOW_NOW);
}
/*
@@ -186,7 +197,7 @@ char *uname, *utty, *term;
int fd, pid;
struct mode *Mode;
{
- struct user **u;
+ struct acluser **u;
struct baud_values *b;
if (!*(u = FindUserPtr(uname)) && UserAdd(uname, (char *)0, u))
@@ -198,6 +209,7 @@ struct mode *Mode;
#else
if (displays)
return 0;
+ bzero((char *)&TheDisplay, sizeof(TheDisplay));
display = &TheDisplay;
#endif
display->d_next = displays;
@@ -227,6 +239,7 @@ struct mode *Mode;
D_mapev.handler = disp_map_fn;
#endif
D_OldMode = *Mode;
+ D_status_obuffree = -1;
Resize_obuf(); /* Allocate memory for buffer */
D_obufmax = defobuflimit;
D_obuflenmax = D_obuflen - D_obufmax;
@@ -248,8 +261,8 @@ struct mode *Mode;
D_dospeed = (short)D_OldMode.m_ttyb.sg_ospeed;
# endif
#endif
-
debug1("New displays ospeed = %d\n", D_dospeed);
+
strncpy(D_usertty, utty, sizeof(D_usertty) - 1);
D_usertty[sizeof(D_usertty) - 1] = 0;
strncpy(D_termname, term, sizeof(D_termname) - 1);
@@ -275,6 +288,8 @@ FreeDisplay()
if (D_userfd >= 0)
{
Flush();
+ if (!display)
+ return;
SetTTY(D_userfd, &D_OldMode);
fcntl(D_userfd, F_SETFL, 0);
}
@@ -324,6 +339,8 @@ FreeDisplay()
{
if (p->w_pdisplay == display)
p->w_pdisplay = 0;
+ if (p->w_readev.condneg == &D_status || p->w_readev.condneg == &D_obuflenmax)
+ p->w_readev.condpos = p->w_readev.condneg = 0;
}
for (; cv; cv = cvp)
{
@@ -375,7 +392,7 @@ MakeDefaultCanvas()
return 0;
}
-void
+static void
FreeCanvas(cv)
struct canvas *cv;
{
@@ -645,27 +662,27 @@ int adapt;
ASSERT(display);
ASSERT(D_tcinited);
D_top = D_bot = -1;
- PutStr(D_TI);
- PutStr(D_IS);
+ AddCStr(D_TI);
+ AddCStr(D_IS);
/* Check for toggle */
if (D_IM && strcmp(D_IM, D_EI))
- PutStr(D_EI);
+ AddCStr(D_EI);
D_insert = 0;
#ifdef MAPKEYS
- PutStr(D_KS);
- PutStr(D_CCS);
+ AddCStr(D_KS);
+ AddCStr(D_CCS);
#else
/* Check for toggle */
if (D_KS && strcmp(D_KS, D_KE))
- PutStr(D_KE);
+ AddCStr(D_KE);
if (D_CCS && strcmp(D_CCS, D_CCE))
- PutStr(D_CCE);
+ AddCStr(D_CCE);
#endif
D_keypad = 0;
D_cursorkeys = 0;
- PutStr(D_ME);
- PutStr(D_EA);
- PutStr(D_CE0);
+ AddCStr(D_ME);
+ AddCStr(D_EA);
+ AddCStr(D_CE0);
D_rend = mchar_null;
D_atyp = 0;
if (adapt == 0)
@@ -673,7 +690,7 @@ int adapt;
ChangeScrollRegion(0, D_height - 1);
D_x = D_y = 0;
Flush();
- ClearDisplay();
+ ClearAll();
debug1("we %swant to adapt all our windows to the display\n",
(adapt) ? "" : "don't ");
/* In case the size was changed by a init sequence */
@@ -692,19 +709,23 @@ FinitTerm()
KeypadMode(0);
CursorkeysMode(0);
CursorVisibility(0);
+ MouseMode(0);
SetRendition(&mchar_null);
SetFlow(FLOW_NOW);
#ifdef MAPKEYS
- PutStr(D_KE);
- PutStr(D_CCE);
+ AddCStr(D_KE);
+ AddCStr(D_CCE);
#endif
if (D_hstatus)
ShowHStatus((char *)0);
+#ifdef RXVT_OSC
+ ClearAllXtermOSC();
+#endif
D_x = D_y = -1;
GotoPos(0, D_height - 1);
AddChar('\r');
AddChar('\n');
- PutStr(D_TE);
+ AddCStr(D_TE);
}
Flush();
}
@@ -720,9 +741,9 @@ int c;
if (D_IC || D_CIC)
{
if (D_IC)
- PutStr(D_IC);
+ AddCStr(D_IC);
else
- CPutStr(D_CIC, 1);
+ AddCStr2(D_CIC, 1);
RAW_PUTCHAR(c);
return;
}
@@ -759,15 +780,25 @@ int c;
}
if (D_CLP || D_y != D_bot)
{
+ int y = D_y;
RAW_PUTCHAR(c);
+ if (D_AM && !D_CLP)
+ GotoPos(D_width - 1, y);
return;
}
+ debug("PUTCHARLP: lp_missing!\n");
D_lp_missing = 1;
D_rend.image = c;
D_lpchar = D_rend;
-#ifdef KANJI
- D_lp_mbcs = D_mbcs;
- D_mbcs = 0;
+#ifdef DW_CHARS
+ /* XXX -> PutChar ? */
+ if (D_mbcs)
+ {
+ D_lpchar.mbcs = c;
+ D_lpchar.image = D_mbcs;
+ D_mbcs = 0;
+ D_x--;
+ }
#endif
}
@@ -783,8 +814,31 @@ int c;
ASSERT(display);
#ifdef FONT
-# ifdef KANJI
- if (D_rend.font == KANJI)
+# ifdef UTF8
+ if (D_encoding == UTF8)
+ {
+ c = (c & 255) | (unsigned char)D_rend.font << 8;
+# ifdef DW_CHARS
+ if (D_mbcs)
+ {
+ c = D_mbcs;
+ if (D_x == D_width)
+ D_x += D_AM ? 1 : -1;
+ D_mbcs = 0;
+ }
+ else if (utf8_isdouble(c))
+ {
+ D_mbcs = c;
+ D_x++;
+ return;
+ }
+# endif
+ AddUtf8(c);
+ goto addedutf8;
+ }
+# endif
+# ifdef DW_CHARS
+ if (is_dw_font(D_rend.font))
{
int t = c;
if (D_mbcs == 0)
@@ -797,30 +851,14 @@ int c;
if (D_x == D_width - 1)
D_x += D_AM ? 1 : -1;
c = D_mbcs;
- c &= 0x7f;
- t &= 0x7f;
- if (D_kanji == EUC)
- {
- c |= 0x80;
- t |= 0x80;
- }
- else if (D_kanji == SJIS)
- {
- t += (c & 1) ? ((t <= 0x5f) ? 0x1f : 0x20) : 0x7e;
- c = (c - 0x21) / 2 + ((c < 0x5f) ? 0x81 : 0xc1);
- }
D_mbcs = t;
}
- else if (D_rend.font == KANA)
- {
- if (D_kanji == EUC)
- {
- AddChar(0x8e); /* SS2 */
- c |= 0x80;
- }
- else if (D_kanji == SJIS)
- c |= 0x80;
- }
+# endif
+# if defined(ENCODINGS) && defined(DW_CHARS)
+ if (D_encoding)
+ c = PrepareEncodedChar(c);
+# endif
+# ifdef DW_CHARS
kanjiloop:
# endif
if (D_xtable && D_xtable[(int)(unsigned char)D_rend.font] && D_xtable[(int)(unsigned char)D_rend.font][(int)(unsigned char)c])
@@ -831,6 +869,9 @@ int c;
AddChar(c);
#endif /* FONT */
+#ifdef UTF8
+addedutf8:
+#endif
if (++D_x >= D_width)
{
if (D_AM == 0)
@@ -842,7 +883,7 @@ int c;
D_y++;
}
}
-#ifdef KANJI
+#ifdef DW_CHARS
if (D_mbcs)
{
c = D_mbcs;
@@ -853,34 +894,34 @@ int c;
}
static int
-PutChar(c)
+DoAddChar(c)
int c;
{
- /* this PutChar for ESC-sequences only (AddChar is a macro) */
+ /* this is for ESC-sequences only (AddChar is a macro) */
AddChar(c);
return c;
}
void
-PutStr(s)
+AddCStr(s)
char *s;
{
- if (display && s)
+ if (display && s && *s)
{
ospeed = D_dospeed;
- tputs(s, 1, PutChar);
+ tputs(s, 1, DoAddChar);
}
}
void
-CPutStr(s, c)
+AddCStr2(s, c)
char *s;
int c;
{
- if (display && s)
+ if (display && s && *s)
{
ospeed = D_dospeed;
- tputs(tgoto(s, 0, c), 1, PutChar);
+ tputs(tgoto(s, 0, c), 1, DoAddChar);
}
}
@@ -895,9 +936,9 @@ int on;
{
D_insert = on;
if (on)
- PutStr(D_IM);
+ AddCStr(D_IM);
else
- PutStr(D_EI);
+ AddCStr(D_EI);
}
}
@@ -915,9 +956,9 @@ int on;
{
D_keypad = on;
if (on)
- PutStr(D_KS);
+ AddCStr(D_KS);
else
- PutStr(D_KE);
+ AddCStr(D_KE);
}
#endif
}
@@ -934,9 +975,9 @@ int on;
{
D_cursorkeys = on;
if (on)
- PutStr(D_CCS);
+ AddCStr(D_CCS);
else
- PutStr(D_CCE);
+ AddCStr(D_CCE);
}
#endif
}
@@ -949,9 +990,9 @@ int on;
{
D_revvid = on;
if (D_revvid)
- PutStr(D_CVR);
+ AddCStr(D_CVR);
else
- PutStr(D_CVN);
+ AddCStr(D_CVN);
}
}
@@ -962,18 +1003,34 @@ int v;
if (display && D_curvis != v)
{
if (D_curvis)
- PutStr(D_VE); /* do this always, just to be safe */
+ AddCStr(D_VE); /* do this always, just to be safe */
D_curvis = 0;
if (v == -1 && D_VI)
- PutStr(D_VI);
+ AddCStr(D_VI);
else if (v == 1 && D_VS)
- PutStr(D_VS);
+ AddCStr(D_VS);
else
return;
D_curvis = v;
}
}
+void
+MouseMode(mode)
+int mode;
+{
+ if (display && D_mouse != mode)
+ {
+ if (!D_CXT)
+ return;
+ if (D_mouse)
+ AddStr(D_mouse == 9 ? "\033[?9l" : "\033[?1000l");
+ if (mode)
+ AddStr(mode == 9 ? "\033[?9h" : "\033[?1000h");
+ D_mouse = mode;
+ }
+}
+
static int StrCost;
/* ARGSUSED */
@@ -1033,7 +1090,7 @@ int y, xs, xe, doit;
cvlnext = cv->c_lnext;
flayer->l_cvlist = cv;
cv->c_lnext = 0;
- Rewrite(y - vp->v_yoff, xs - vp->v_xoff, xe - vp->v_xoff, &D_rend, 1);
+ LayRewrite(y - vp->v_yoff, xs - vp->v_xoff, xe - vp->v_xoff, &D_rend, 1);
flayer->l_cvlist = cvlist;
cv->c_lnext = cvlnext;
flayer = oldflayer;
@@ -1047,10 +1104,14 @@ int y, xs, xe, doit;
return EXPENSIVE; /* line not on layer */
if (xs - vp->v_xoff < 0 || xe - vp->v_xoff >= cv->c_layer->l_width)
return EXPENSIVE; /* line not on layer */
+#ifdef UTF8
+ if (D_encoding == UTF8)
+ D_rend.font = 0;
+#endif
oldflayer = flayer;
flayer = cv->c_layer;
debug3("Calling Rewrite %d %d %d\n", y - vp->v_yoff, xs - vp->v_xoff, xe - vp->v_xoff);
- cost = Rewrite(y - vp->v_yoff, xs - vp->v_xoff, xe - vp->v_xoff, &D_rend, 0);
+ cost = LayRewrite(y - vp->v_yoff, xs - vp->v_xoff, xe - vp->v_xoff, &D_rend, 0);
flayer = oldflayer;
if (D_insert)
cost += D_EIcost + D_IMcost;
@@ -1098,13 +1159,20 @@ int x2, y2;
{
DoCM:
if (D_HO && !x2 && !y2)
- PutStr(D_HO);
+ AddCStr(D_HO);
else
- PutStr(tgoto(D_CM, x2, y2));
+ AddCStr(tgoto(D_CM, x2, y2));
D_x = x2;
D_y = y2;
return;
}
+
+ /* some scrollregion implementations don't allow movements
+ * away from the region. sigh.
+ */
+ if ((y1 > D_bot && y2 > y1) || (y1 < D_top && y2 < y1))
+ goto DoCM;
+
/* Calculate CMcost */
if (D_HO && !x2 && !y2)
s = D_HO;
@@ -1128,7 +1196,7 @@ int x2, y2;
costx = m;
xm = M_RI;
}
- /* Speedup: dx <= Rewrite() */
+ /* Speedup: dx <= LayRewrite() */
if (dx < costx && (m = CallRewrite(y1, x1, x2 - 1, 0)) < costx)
{
costx = m;
@@ -1151,7 +1219,7 @@ int x2, y2;
else
costx = 0;
}
- /* Speedup: Rewrite() >= x2 */
+ /* Speedup: LayRewrite() >= x2 */
if (x2 + D_CRcost < costx && (m = (x2 ? CallRewrite(y1, 0, x2 - 1, 0) : 0) + D_CRcost) < costx)
{
costx = m;
@@ -1201,20 +1269,20 @@ int x2, y2;
{
case M_LE:
while (dx++ < 0)
- PutStr(D_BC);
+ AddCStr(D_BC);
break;
case M_CLE:
- CPutStr(D_CLE, -dx);
+ AddCStr2(D_CLE, -dx);
break;
case M_RI:
while (dx-- > 0)
- PutStr(D_ND);
+ AddCStr(D_ND);
break;
case M_CRI:
- CPutStr(D_CRI, dx);
+ AddCStr2(D_CRI, dx);
break;
case M_CR:
- PutStr(D_CR);
+ AddCStr(D_CR);
D_x = 0;
x1 = 0;
/* FALLTHROUGH */
@@ -1230,18 +1298,18 @@ int x2, y2;
{
case M_UP:
while (dy++ < 0)
- PutStr(D_UP);
+ AddCStr(D_UP);
break;
case M_CUP:
- CPutStr(D_CUP, -dy);
+ AddCStr2(D_CUP, -dy);
break;
case M_DO:
s = (x2 == 0) ? D_NL : D_DO;
while (dy-- > 0)
- PutStr(s);
+ AddCStr(s);
break;
case M_CDO:
- CPutStr(D_CDO, dy);
+ AddCStr2(D_CDO, dy);
break;
default:
break;
@@ -1251,15 +1319,15 @@ int x2, y2;
}
void
-ClearDisplay()
+ClearAll()
{
ASSERT(display);
- Clear(0, 0, 0, D_width - 1, D_width - 1, D_height - 1, 0);
+ ClearArea(0, 0, 0, D_width - 1, D_width - 1, D_height - 1, 0, 0);
}
void
-Clear(x1, y1, xs, xe, x2, y2, uselayfn)
-int x1, y1, xs, xe, x2, y2, uselayfn;
+ClearArea(x1, y1, xs, xe, x2, y2, bce, uselayfn)
+int x1, y1, xs, xe, x2, y2, bce, uselayfn;
{
int y, xxe;
struct canvas *cv;
@@ -1267,20 +1335,29 @@ int x1, y1, xs, xe, x2, y2, uselayfn;
debug2("Clear %d,%d", x1, y1);
debug2(" %d-%d", xs, xe);
- debug3(" %d,%d uselayfn=%d\n", x2, y2, uselayfn);
+ debug2(" %d,%d", x2, y2);
+ debug2(" uselayfn=%d bce=%d\n", uselayfn, bce);
ASSERT(display);
if (x1 == D_width)
x1--;
if (x2 == D_width)
x2--;
+ if (xs == -1)
+ xs = x1;
+ if (xe == -1)
+ xe = x2;
if (D_UT) /* Safe to erase ? */
SetRendition(&mchar_null);
+#ifdef COLOR
+ if (D_BE)
+ SetBackColor(bce);
+#endif
if (D_lp_missing && y1 <= D_bot && xe >= D_width - 1)
{
if (y2 > D_bot || (y2 == D_bot && x2 >= D_width - 1))
D_lp_missing = 0;
}
- if (x2 == D_width - 1 && (xs == 0 || y1 == y2) && xe == D_width - 1 && y2 == D_height - 1)
+ if (x2 == D_width - 1 && (xs == 0 || y1 == y2) && xe == D_width - 1 && y2 == D_height - 1 && (!bce || D_BE))
{
#ifdef AUTO_NUKE
if (x1 == 0 && y1 == 0 && D_auto_nuke)
@@ -1288,7 +1365,7 @@ int x1, y1, xs, xe, x2, y2, uselayfn;
#endif
if (x1 == 0 && y1 == 0 && D_CL)
{
- PutStr(D_CL);
+ AddCStr(D_CL);
D_y = D_x = 0;
return;
}
@@ -1299,14 +1376,14 @@ int x1, y1, xs, xe, x2, y2, uselayfn;
if (D_CD && (y1 < y2 || !D_CE))
{
GotoPos(x1, y1);
- PutStr(D_CD);
+ AddCStr(D_CD);
return;
}
}
- if (x1 == 0 && xs == 0 && (xe == D_width - 1 || y1 == y2) && y1 == 0 && D_CCD)
+ if (x1 == 0 && xs == 0 && (xe == D_width - 1 || y1 == y2) && y1 == 0 && D_CCD && (!bce || D_BE))
{
GotoPos(x1, y1);
- PutStr(D_CCD);
+ AddCStr(D_CCD);
return;
}
xxe = xe;
@@ -1314,16 +1391,16 @@ int x1, y1, xs, xe, x2, y2, uselayfn;
{
if (y == y2)
xxe = x2;
- if (x1 == 0 && D_CB && (xxe != D_width - 1 || (D_x == xxe && D_y == y)))
+ if (x1 == 0 && D_CB && (xxe != D_width - 1 || (D_x == xxe && D_y == y)) && (!bce || D_BE))
{
GotoPos(xxe, y);
- PutStr(D_CB);
+ AddCStr(D_CB);
continue;
}
- if (xxe == D_width - 1 && D_CE)
+ if (xxe == D_width - 1 && D_CE && (!bce || D_BE))
{
GotoPos(x1, y);
- PutStr(D_CE);
+ AddCStr(D_CE);
continue;
}
if (uselayfn)
@@ -1350,14 +1427,14 @@ int x1, y1, xs, xe, x2, y2, uselayfn;
cvlnext = cv->c_lnext;
flayer->l_cvlist = cv;
cv->c_lnext = 0;
- ClearLine(y - vp->v_yoff, x1 - vp->v_xoff, xxe - vp->v_xoff);
+ LayClearLine(y - vp->v_yoff, x1 - vp->v_xoff, xxe - vp->v_xoff, bce);
flayer->l_cvlist = cvlist;
cv->c_lnext = cvlnext;
flayer = oldflayer;
continue;
}
}
- DisplayLine(&mline_null, &mline_blank, y, x1, xxe);
+ ClearLine((struct mline *)0, y, x1, xxe, bce);
}
}
@@ -1370,9 +1447,6 @@ void
Redisplay(cur_only)
int cur_only;
{
- register int i, stop;
- struct canvas *cv;
-
ASSERT(display);
/* XXX do em all? */
@@ -1381,30 +1455,20 @@ int cur_only;
KeypadMode(0);
CursorkeysMode(0);
CursorVisibility(0);
+ MouseMode(0);
SetRendition(&mchar_null);
SetFlow(FLOW_NOW);
- ClearDisplay();
- stop = D_height;
- i = 0;
+ ClearAll();
+#ifdef RXVT_OSC
+ RefreshXtermOSC();
+#endif
if (cur_only > 0 && D_fore)
- {
- i = stop = D_fore->w_y;
- stop++;
- }
+ RefreshArea(0, D_fore->w_y, D_width - 1, D_fore->w_y, 1);
else
- {
- debug("Signalling full refresh!\n");
- for (cv = D_cvlist; cv; cv = cv->c_next)
- {
- CV_CALL(cv, RedisplayLine(-1, -1, -1, 1));
- display = cv->c_display; /* just in case! */
- }
- }
- RefreshArea(0, i, D_width - 1, stop - 1, 1);
+ RefreshAll(1);
RefreshHStatus();
-
- CV_CALL(D_forecv, Restore();SetCursor());
+ CV_CALL(D_forecv, LayRestore();LaySetCursor());
}
void
@@ -1420,8 +1484,8 @@ int cur_only;
/* XXX: use oml! */
void
-ScrollH(y, xs, xe, n, oml)
-int y, xs, xe, n;
+ScrollH(y, xs, xe, n, bce, oml)
+int y, xs, xe, n, bce;
struct mline *oml;
{
int i;
@@ -1437,14 +1501,20 @@ struct mline *oml;
GotoPos(xs, y);
if (D_UT)
SetRendition(&mchar_null);
+#ifdef COLOR
+ if (D_BE)
+ SetBackColor(bce);
+#endif
if (n > 0)
{
+ if (n >= xe - xs + 1)
+ n = xe - xs + 1;
if (D_CDC && !(n == 1 && D_DC))
- CPutStr(D_CDC, n);
+ AddCStr2(D_CDC, n);
else if (D_DC)
{
for (i = n; i--; )
- PutStr(D_DC);
+ AddCStr(D_DC);
}
else
{
@@ -1455,20 +1525,27 @@ struct mline *oml;
}
else
{
+ if (-n >= xe - xs + 1)
+ n = -(xe - xs + 1);
if (!D_insert)
{
if (D_CIC && !(n == -1 && D_IC))
- CPutStr(D_CIC, -n);
+ AddCStr2(D_CIC, -n);
else if (D_IC)
{
for (i = -n; i--; )
- PutStr(D_IC);
+ AddCStr(D_IC);
}
else if (D_IM)
{
InsertMode(1);
+ SetRendition(&mchar_null);
+#ifdef COLOR
+ SetBackColor(bce);
+#endif
for (i = -n; i--; )
INSERTCHAR(' ');
+ bce = 0; /* all done */
}
else
{
@@ -1479,10 +1556,22 @@ struct mline *oml;
}
else
{
+ SetRendition(&mchar_null);
+#ifdef COLOR
+ SetBackColor(bce);
+#endif
for (i = -n; i--; )
INSERTCHAR(' ');
+ bce = 0; /* all done */
}
}
+ if (bce && !D_BE)
+ {
+ if (n > 0)
+ ClearLine((struct mline *)0, y, xe - n + 1, xe, bce);
+ else
+ ClearLine((struct mline *)0, y, xs, xs - n - 1, bce);
+ }
if (D_lp_missing && y == D_bot)
{
if (n > 0)
@@ -1492,8 +1581,8 @@ struct mline *oml;
}
void
-ScrollV(xs, ys, xe, ye, n)
-int xs, ys, xe, ye, n;
+ScrollV(xs, ys, xe, ye, n, bce)
+int xs, ys, xe, ye, n, bce;
{
int i;
int up;
@@ -1506,7 +1595,7 @@ int xs, ys, xe, ye, n;
return;
if (n >= ye - ys + 1 || -n >= ye - ys + 1)
{
- Clear(xs, ys, xs, xe, xe, ye, 0);
+ ClearArea(xs, ys, xs, xe, xe, ye, bce, 0);
return;
}
if (xs > D_vpxmin || xe < D_vpxmax)
@@ -1557,28 +1646,35 @@ int xs, ys, xe, ye, n;
/* XXX
ChangeScrollRegion(oldtop, oldbot);
*/
+ if (bce && !D_BE)
+ ClearLine((struct mline *)0, ye, xs, xe, bce);
return;
}
}
}
- aldlfaster = (n > 1 && ys >= D_top && ye == D_bot && ((up && D_CDL) || (!up && D_CAL)));
-
if (D_UT)
SetRendition(&mchar_null);
+#ifdef COLOR
+ if (D_BE)
+ SetBackColor(bce);
+#endif
+
+ aldlfaster = (n > 1 && ys >= D_top && ye == D_bot && ((up && D_CDL) || (!up && D_CAL)));
+
if ((up || D_SR) && D_top == ys && D_bot == ye && !aldlfaster)
{
if (up)
{
GotoPos(0, ye);
- while (n-- > 0)
- PutStr(D_NL); /* was SF, I think NL is faster */
+ for(i = n; i-- > 0; )
+ AddCStr(D_NL); /* was SF, I think NL is faster */
}
else
{
GotoPos(0, ys);
- while (n-- > 0)
- PutStr(D_SR);
+ for(i = n; i-- > 0; )
+ AddCStr(D_SR);
}
}
else if (alok && dlok)
@@ -1587,19 +1683,19 @@ int xs, ys, xe, ye, n;
{
GotoPos(0, up ? ys : ye+1-n);
if (D_CDL && !(n == 1 && D_DL))
- CPutStr(D_CDL, n);
+ AddCStr2(D_CDL, n);
else
for(i = n; i--; )
- PutStr(D_DL);
+ AddCStr(D_DL);
}
if (!up || ye != D_bot)
{
GotoPos(0, up ? ye+1-n : ys);
if (D_CAL && !(n == 1 && D_AL))
- CPutStr(D_CAL, n);
+ AddCStr2(D_CAL, n);
else
for(i = n; i--; )
- PutStr(D_AL);
+ AddCStr(D_AL);
}
}
else
@@ -1607,6 +1703,13 @@ int xs, ys, xe, ye, n;
RefreshArea(xs, ys, xe, ye, 0);
return;
}
+ if (bce && !D_BE)
+ {
+ if (up)
+ ClearArea(xs, ye - n + 1, xs, xe, xe, ye, bce, 0);
+ else
+ ClearArea(xs, ys, xs, xe, xe, ys + n - 1, bce, 0);
+ }
if (D_lp_missing && missy != D_bot)
WriteLP(D_width - 1, missy);
/* XXX
@@ -1624,6 +1727,12 @@ register int new;
if (!display || (old = D_rend.attr) == new)
return;
+#ifdef COLORS16
+ D_col16change = (old ^ new) & (A_BFG | A_BBG);
+ new ^= D_col16change;
+ if (old == new)
+ return;
+#endif
#if defined(TERMINFO) && defined(USE_SGR)
if (D_SA)
{
@@ -1632,12 +1741,12 @@ register int new;
ospeed = D_dospeed;
tputs(tparm(D_SA, new & A_SO, new & A_US, new & A_RV, new & A_BL,
new & A_DI, new & A_BD, 0 , 0 ,
- 0), 1, PutChar);
+ 0), 1, DoAddChar);
D_rend.attr = new;
D_atyp = 0;
# ifdef COLOR
- if (D_CAF || D_CAB)
- D_rend.color = 0;
+ if (D_hascolor)
+ rend_setdefault(&D_rend);
# endif
return;
}
@@ -1646,16 +1755,26 @@ register int new;
if ((new & old) != old)
{
if ((typ & ATYP_U))
- PutStr(D_UE);
+ AddCStr(D_UE);
if ((typ & ATYP_S))
- PutStr(D_SE);
+ AddCStr(D_SE);
if ((typ & ATYP_M))
{
- PutStr(D_ME);
+ AddCStr(D_ME);
#ifdef COLOR
/* ansi attrib handling: \E[m resets color, too */
- if (D_CAF || D_CAB)
- D_rend.color = 0;
+ if (D_hascolor)
+ rend_setdefault(&D_rend);
+#endif
+#ifdef FONT
+ if (!D_CG0)
+ {
+ /* D_ME may also reset the alternate charset */
+ D_rend.font = 0;
+# ifdef ENCODINGS
+ D_realfont = 0;
+# endif
+ }
#endif
}
old = 0;
@@ -1669,7 +1788,7 @@ register int new;
old ^= j;
if (D_attrtab[i])
{
- PutStr(D_attrtab[i]);
+ AddCStr(D_attrtab[i]);
typ |= D_attrtyp[i];
}
}
@@ -1685,14 +1804,17 @@ int new;
if (!display || D_rend.font == new)
return;
D_rend.font = new;
-#ifdef KANJI
- if ((new == KANJI || new == KANA) && D_kanji)
- return; /* all done in RAW_PUTCHAR */
+#ifdef ENCODINGS
+ if (D_encoding && CanEncodeFont(D_encoding, new))
+ return;
+ if (new == D_realfont)
+ return;
+ D_realfont = new;
#endif
if (D_xtable && D_xtable[(int)(unsigned char)new] &&
D_xtable[(int)(unsigned char)new][256])
{
- PutStr(D_xtable[(int)(unsigned char)new][256]);
+ AddCStr(D_xtable[(int)(unsigned char)new][256]);
return;
}
@@ -1700,54 +1822,188 @@ int new;
new = ASCII;
if (new == ASCII)
- PutStr(D_CE0);
-#ifdef KANJI
+ AddCStr(D_CE0);
+#ifdef DW_CHARS
else if (new < ' ')
{
AddStr("\033$");
+ if (new > 2)
+ AddChar('(');
AddChar(new + '@');
}
#endif
else
- CPutStr(D_CS0, new);
+ AddCStr2(D_CS0, new);
}
#endif
#ifdef COLOR
+
+int
+color256to16(jj)
+int jj;
+{
+ int min, max;
+ int r, g, b;
+
+ if (jj >= 232)
+ {
+ jj = (jj - 232) / 6;
+ jj = (jj & 1) << 3 | (jj & 2 ? 7 : 0);
+ }
+ else if (jj >= 16)
+ {
+ jj -= 16;
+ r = jj / 36;
+ g = (jj / 6) % 6;
+ b = jj % 6;
+ min = r < g ? (r < b ? r : b) : (g < b ? g : b);
+ max = r > g ? (r > b ? r : b) : (g > b ? g : b);
+ if (min == max)
+ jj = ((max + 1) & 2) << 2 | ((max + 1) & 4 ? 7 : 0);
+ else
+ jj = (b - min) / (max - min) << 2 | (g - min) / (max - min) << 1 | (r -
+min) / (max - min) | (max > 3 ? 8 : 0);
+ }
+ return jj;
+}
+
+#ifdef COLORS256
+int
+color256to88(jj)
+int jj;
+{
+ int r, g, b;
+
+ if (jj >= 232)
+ return (jj - 232) / 3 + 80;
+ if (jj >= 16)
+ {
+ jj -= 16;
+ r = jj / 36;
+ g = (jj / 6) % 6;
+ b = jj % 6;
+ return ((r + 1) / 2) * 16 + ((g + 1) / 2) * 4 + ((b + 1) / 2) + 16;
+ }
+ return jj;
+}
+#endif
+
void
-SetColor(new)
-int new;
+SetColor(f, b)
+int f, b;
{
- int of, ob, f, b;
+ int of, ob;
+ static unsigned char sftrans[8] = {0,4,2,6,1,5,3,7};
- if (!display || D_rend.color == new)
+ if (!display)
return;
- of = D_rend.color & 0xf;
- ob = (D_rend.color >> 4) & 0xf;
- f = new & 0xf;
- b = (new >> 4) & 0xf;
- if (!D_CAX && (D_CAF || D_CAB) && ((f == 0 && f != of) || (b == 0 && b != ob)))
- {
- int oattr;
+ of = rend_getfg(&D_rend);
+ ob = rend_getbg(&D_rend);
+
+ debug2("SetColor %d %d", coli2e(of), coli2e(ob));
+ debug2(" -> %d %d\n", coli2e(f), coli2e(b));
- oattr = D_rend.attr;
- AddStr("\033[m");
- D_rend.attr = 0;
- D_rend.color = 0;
+ if (!D_CAX && D_hascolor && ((f == 0 && f != of) || (b == 0 && b != ob)))
+ {
+ if (D_OP)
+ AddCStr(D_OP);
+ else
+ {
+ int oattr;
+ oattr = D_rend.attr;
+ AddCStr(D_ME ? D_ME : "\033[m");
+#ifdef FONT
+ if (D_ME && !D_CG0)
+ {
+ /* D_ME may also reset the alternate charset */
+ D_rend.font = 0;
+# ifdef ENCODINGS
+ D_realfont = 0;
+# endif
+ }
+#endif
+ D_atyp = 0;
+ D_rend.attr = 0;
+ SetAttr(oattr);
+ }
of = ob = 0;
- SetAttr(oattr);
}
- if (D_CAF || D_CAB)
+ rend_setfg(&D_rend, f);
+ rend_setbg(&D_rend, b);
+#ifdef COLORS16
+ D_col16change = 0;
+#endif
+ if (!D_hascolor)
+ return;
+ f = f ? coli2e(f) : -1;
+ b = b ? coli2e(b) : -1;
+ of = of ? coli2e(of) : -1;
+ ob = ob ? coli2e(ob) : -1;
+#ifdef COLORS256
+ if (f != of && f > 15 && D_CCO != 256)
+ f = D_CCO == 88 && D_CAF ? color256to88(f) : color256to16(f);
+ if (f != of && f > 15 && D_CAF)
{
- if (f != of)
- CPutStr(D_CAF, 9 - f);
- if (b != ob)
- CPutStr(D_CAB, 9 - b);
+ AddCStr2(D_CAF, f);
+ of = f;
+ }
+ if (b != ob && b > 15 && D_CCO != 256)
+ b = D_CCO == 88 && D_CAB ? color256to88(b) : color256to16(b);
+ if (b != ob && b > 15 && D_CAB)
+ {
+ AddCStr2(D_CAB, b);
+ ob = b;
}
- D_rend.color = new;
-}
#endif
+ if (f != of && f != (of | 8))
+ {
+ if (f == -1)
+ AddCStr("\033[39m"); /* works because AX is set */
+ else if (D_CAF)
+ AddCStr2(D_CAF, f & 7);
+ else if (D_CSF)
+ AddCStr2(D_CSF, sftrans[f & 7]);
+ }
+ if (b != ob && b != (ob | 8))
+ {
+ if (b == -1)
+ AddCStr("\033[49m"); /* works because AX is set */
+ else if (D_CAB)
+ AddCStr2(D_CAB, b & 7);
+ else if (D_CSB)
+ AddCStr2(D_CSB, sftrans[b & 7]);
+ }
+#ifdef COLORS16
+ if (f != of && D_CXT && (f & 8) != 0 && f != -1)
+ {
+# ifdef TERMINFO
+ AddCStr2("\033[9%p1%dm", f & 7);
+# else
+ AddCStr2("\033[9%dm", f & 7);
+# endif
+ }
+ if (b != ob && D_CXT && (b & 8) != 0 && b != -1)
+ {
+# ifdef TERMINFO
+ AddCStr2("\033[10%p1%dm", b & 7);
+# else
+ AddCStr2("\033[10%dm", b & 7);
+# endif
+ }
+#endif
+}
+
+static void
+SetBackColor(new)
+int new;
+{
+ if (!display)
+ return;
+ SetColor(rend_getfg(&D_rend), new);
+}
+#endif /* COLOR */
void
SetRendition(mc)
@@ -1755,11 +2011,39 @@ struct mchar *mc;
{
if (!display)
return;
- if (D_rend.attr != mc->attr)
+ if (nattr2color && D_hascolor && (mc->attr & nattr2color) != 0)
+ {
+ static struct mchar mmc;
+ int i;
+ mmc = *mc;
+ for (i = 0; i < 8; i++)
+ if (attr2color[i] && (mc->attr & (1 << i)) != 0)
+ ApplyAttrColor(attr2color[i], &mmc);
+ mc = &mmc;
+ debug2("SetRendition: mapped to %02x %02x\n", (unsigned char)mc->attr, 0x99 - (unsigned char)mc->color);
+ }
+ if (D_hascolor && D_CC8 && (mc->attr & (A_BFG|A_BBG)))
+ {
+ int a = mc->attr;
+ if ((mc->attr & A_BFG) && D_MD)
+ a |= A_BD;
+ if ((mc->attr & A_BBG) && D_MB)
+ a |= A_BL;
+ if (D_rend.attr != a)
+ SetAttr(a);
+ }
+ else if (D_rend.attr != mc->attr)
SetAttr(mc->attr);
#ifdef COLOR
- if (D_rend.color != mc->color)
- SetColor(mc->color);
+ if (D_rend.color != mc->color
+# ifdef COLORS256
+ || D_rend.colorx != mc->colorx
+# endif
+# ifdef COLORS16
+ || D_col16change
+# endif
+ )
+ SetColor(rend_getfg(mc), rend_getbg(mc));
#endif
#ifdef FONT
if (D_rend.font != mc->font)
@@ -1774,11 +2058,39 @@ int x;
{
if (!display)
return;
- if (D_rend.attr != ml->attr[x])
+ if (nattr2color && D_hascolor && (ml->attr[x] & nattr2color) != 0)
+ {
+ struct mchar mc;
+ copy_mline2mchar(&mc, ml, x);
+ SetRendition(&mc);
+ return;
+ }
+ if (D_hascolor && D_CC8 && (ml->attr[x] & (A_BFG|A_BBG)))
+ {
+ int a = ml->attr[x];
+ if ((ml->attr[x] & A_BFG) && D_MD)
+ a |= A_BD;
+ if ((ml->attr[x] & A_BBG) && D_MB)
+ a |= A_BL;
+ if (D_rend.attr != a)
+ SetAttr(a);
+ }
+ else if (D_rend.attr != ml->attr[x])
SetAttr(ml->attr[x]);
#ifdef COLOR
- if (D_rend.color != ml->color[x])
- SetColor(ml->color[x]);
+ if (D_rend.color != ml->color[x]
+# ifdef COLORS256
+ || D_rend.colorx != ml->colorx[x]
+# endif
+# ifdef COLORS16
+ || D_col16change
+# endif
+ )
+ {
+ struct mchar mc;
+ copy_mline2mchar(&mc, ml, x);
+ SetColor(rend_getfg(&mc), rend_getbg(&mc));
+ }
#endif
#ifdef FONT
if (D_rend.font != ml->font[x])
@@ -1813,7 +2125,7 @@ char *msg;
max--;
}
else
- max = D_WS;
+ max = D_WS > 0 ? D_WS : (D_width - !D_CLP);
if (D_status)
{
/* same message? */
@@ -1827,13 +2139,13 @@ char *msg;
{
ti = time((time_t *)0) - D_status_time;
if (ti < MsgMinWait)
- sleep(MsgMinWait - ti);
+ DisplaySleep(MsgMinWait - ti, 0);
}
RemoveStatus();
}
for (s = t = msg; *s && t - msg < max; ++s)
if (*s == BELL)
- PutStr(D_BL);
+ AddCStr(D_BL);
else if ((unsigned char)*s >= ' ' && *s != 0177)
*t++ = *s;
*t = '\0';
@@ -1859,12 +2171,6 @@ char *msg;
D_status_lasty = D_y;
if (!use_hardstatus || D_has_hstatus == HSTATUS_IGNORE || D_has_hstatus == HSTATUS_MESSAGE)
{
- if (D_status_delayed != -1 && t - msg < D_status_buflen)
- {
- D_status_delayed = 1; /* not yet... */
- D_status = 0;
- return;
- }
D_status = STATUS_ON_WIN;
debug1("using STATLINE %d\n", STATLINE);
GotoPos(0, STATLINE);
@@ -1892,8 +2198,30 @@ char *msg;
D_status = STATUS_ON_HS;
ShowHStatus(msg);
}
- D_status_delayed = 0;
Flush();
+ if (!display)
+ return;
+ if (D_status == STATUS_ON_WIN)
+ {
+ struct display *olddisplay = display;
+ struct layer *oldflayer = flayer;
+
+ ASSERT(D_obuffree == D_obuflen);
+ /* this is copied over from RemoveStatus() */
+ D_status = 0;
+ GotoPos(0, STATLINE);
+ RefreshLine(STATLINE, 0, D_status_len - 1, 0);
+ GotoPos(D_status_lastx, D_status_lasty);
+ flayer = D_forecv ? D_forecv->c_layer : 0;
+ if (flayer)
+ LaySetCursor();
+ display = olddisplay;
+ flayer = oldflayer;
+ D_status_obuflen = D_obuflen;
+ D_status_obuffree = D_obuffree;
+ D_obuffree = D_obuflen = 0;
+ D_status = STATUS_ON_WIN;
+ }
(void) time(&D_status_time);
SetTimeout(&D_statusev, MsgWait * 1000);
evenq(&D_statusev);
@@ -1914,6 +2242,17 @@ RemoveStatus()
if (!(where = D_status))
return;
+ debug("RemoveStatus\n");
+ if (D_status_obuffree >= 0)
+ {
+ D_obuflen = D_status_obuflen;
+ D_obuffree = D_status_obuffree;
+ D_status_obuffree = -1;
+ D_status = 0;
+ D_status_bell = 0;
+ evdeq(&D_statusev);
+ return;
+ }
D_status = 0;
D_status_bell = 0;
evdeq(&D_statusev);
@@ -1927,9 +2266,9 @@ RemoveStatus()
}
else
RefreshHStatus();
- flayer = D_forecv->c_layer;
+ flayer = D_forecv ? D_forecv->c_layer : 0;
if (flayer)
- SetCursor();
+ LaySetCursor();
display = olddisplay;
flayer = oldflayer;
}
@@ -1939,7 +2278,7 @@ void
ShowHStatus(str)
char *str;
{
- int l, i, ox, oy;
+ int l, i, ox, oy, max;
if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE == D_height-1)
return; /* sorry, in use */
@@ -1952,16 +2291,17 @@ char *str;
SetRendition(&mchar_null);
InsertMode(0);
if (D_hstatus)
- PutStr(D_DS);
+ AddCStr(D_DS);
D_hstatus = 0;
if (str == 0 || *str == 0)
return;
- CPutStr(D_TS, 0);
- if (strlen(str) > D_WS)
- AddStrn(str, D_WS);
+ AddCStr2(D_TS, 0);
+ max = D_WS > 0 ? D_WS : (D_width - !D_CLP);
+ if (strlen(str) > max)
+ AddStrn(str, max);
else
AddStr(str);
- PutStr(D_FS);
+ AddCStr(D_FS);
D_hstatus = 1;
}
else if (D_has_hstatus == HSTATUS_LASTLINE)
@@ -1975,13 +2315,14 @@ char *str;
l = D_width;
GotoPos(0, D_height - 1);
SetRendition(captionalways || D_cvlist == 0 || D_cvlist->c_next ? &mchar_null: &mchar_so);
- for (i = 0; i < l; i++)
- PUTCHARLP(str[i]);
+ if (!PutWinMsg(str, 0, l))
+ for (i = 0; i < l; i++)
+ PUTCHARLP(str[i]);
if (!captionalways && D_cvlist && !D_cvlist->c_next)
while (l++ < D_width)
PUTCHARLP(' ');
if (l < D_width)
- Clear(l, D_height - 1, l, D_width - 1, D_width - 1, D_height - 1, 0);
+ ClearArea(l, D_height - 1, l, D_width - 1, D_width - 1, D_height - 1, 0, 0);
if (ox != -1 && oy != -1)
GotoPos(ox, oy);
D_hstatus = *str ? 1 : 0;
@@ -2006,7 +2347,7 @@ RefreshHStatus()
evdeq(&D_hstatusev);
if (D_status == STATUS_ON_HS)
return;
- buf = MakeWinMsgEv(hstatusstring, D_fore, '%', &D_hstatusev);
+ buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS) ? D_WS : D_width - !D_CLP, &D_hstatusev);
if (buf && *buf)
{
ShowHStatus(buf);
@@ -2023,6 +2364,22 @@ RefreshHStatus()
*/
void
+RefreshAll(isblank)
+int isblank;
+{
+ struct canvas *cv;
+
+ ASSERT(display);
+ debug("Signalling full refresh!\n");
+ for (cv = D_cvlist; cv; cv = cv->c_next)
+ {
+ CV_CALL(cv, LayRedisplayLine(-1, -1, -1, isblank));
+ display = cv->c_display; /* just in case! */
+ }
+ RefreshArea(0, 0, D_width - 1, D_height - 1, isblank);
+}
+
+void
RefreshArea(xs, ys, xe, ye, isblank)
int xs, ys, xe, ye, isblank;
{
@@ -2032,7 +2389,7 @@ int xs, ys, xe, ye, isblank;
debug3(" - %d,%d (isblank=%d)\n", xe, ye, isblank);
if (!isblank && xs == 0 && xe == D_width - 1 && ye == D_height - 1 && (ys == 0 || D_CD))
{
- Clear(xs, ys, xs, xe, xe, ye, 0);
+ ClearArea(xs, ys, xs, xe, xe, ye, 0, 0);
isblank = 1;
}
for (y = ys; y <= ye; y++)
@@ -2061,9 +2418,9 @@ int y, from, to, isblank;
if (isblank == 0 && D_CE && to == D_width - 1 && from < to)
{
GotoPos(from, y);
- if (D_UT)
+ if (D_UT || D_BE)
SetRendition(&mchar_null);
- PutStr(D_CE);
+ AddCStr(D_CE);
isblank = 1;
}
while (from <= to)
@@ -2097,7 +2454,7 @@ int y, from, to, isblank;
from = lvp->v_xs;
}
- /* call RedisplayLine on canvas lcv viewport lvp */
+ /* call LayRedisplayLine on canvas lcv viewport lvp */
yy = y - lvp->v_yoff;
xx = to < lvp->v_xe ? to : lvp->v_xe;
@@ -2129,7 +2486,7 @@ int y, from, to, isblank;
cvlnext = lcv->c_lnext;
flayer->l_cvlist = lcv;
lcv->c_lnext = 0;
- RedisplayLine(yy, from - lvp->v_xoff, xx - lvp->v_xoff, isblank);
+ LayRedisplayLine(yy, from - lvp->v_xoff, xx - lvp->v_xoff, isblank);
flayer->l_cvlist = cvlist;
lcv->c_lnext = cvlnext;
flayer = oldflayer;
@@ -2156,16 +2513,21 @@ int y, from, to, isblank;
}
p = Layer2Window(cv->c_layer);
- buf = MakeWinMsgEv(captionstring, p, '%', &cv->c_captev);
+ buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev);
if (cv->c_captev.timeout.tv_sec)
evenq(&cv->c_captev);
xx = strlen(buf);
GotoPos(from, y);
SetRendition(&mchar_so);
- while (from <= to && from < xx)
+ if (PutWinMsg(buf, from, to + 1))
+ from = xx > to + 1 ? to + 1 : xx;
+ else
{
- PUTCHARLP(buf[from]);
- from++;
+ while (from <= to && from < xx)
+ {
+ PUTCHARLP(buf[from]);
+ from++;
+ }
}
while (from++ <= to)
PUTCHARLP(' ');
@@ -2185,18 +2547,76 @@ int x2, y2;
ASSERT(display);
ASSERT(D_lp_missing);
oldrend = D_rend;
-#ifdef KANJI
- if (D_lpchar.font == KANJI && (D_mbcs = D_lp_mbcs) != 0 && x2 > 0)
- x2--;
+ debug2("WriteLP(%d,%d)\n", x2, y2);
+#ifdef DW_CHARS
+ if (D_lpchar.mbcs)
+ {
+ if (x2 > 0)
+ x2--;
+ else
+ D_lpchar = mchar_blank;
+ }
#endif
+ /* Can't use PutChar */
GotoPos(x2, y2);
SetRendition(&D_lpchar);
PUTCHAR(D_lpchar.image);
+#ifdef DW_CHARS
+ if (D_lpchar.mbcs)
+ PUTCHAR(D_lpchar.mbcs);
+#endif
D_lp_missing = 0;
SetRendition(&oldrend);
}
void
+ClearLine(oml, y, from, to, bce)
+struct mline *oml;
+int from, to, y, bce;
+{
+ int x;
+#ifdef COLOR
+ struct mchar bcechar;
+#endif
+
+ debug3("ClearLine %d,%d-%d\n", y, from, to);
+ if (D_UT) /* Safe to erase ? */
+ SetRendition(&mchar_null);
+#ifdef COLOR
+ if (D_BE)
+ SetBackColor(bce);
+#endif
+ if (from == 0 && D_CB && (to != D_width - 1 || (D_x == to && D_y == y)) && (!bce || D_BE))
+ {
+ GotoPos(to, y);
+ AddCStr(D_CB);
+ return;
+ }
+ if (to == D_width - 1 && D_CE && (!bce || D_BE))
+ {
+ GotoPos(from, y);
+ AddCStr(D_CE);
+ return;
+ }
+ if (oml == 0)
+ oml = &mline_null;
+#ifdef COLOR
+ if (!bce)
+ {
+ DisplayLine(oml, &mline_blank, y, from, to);
+ return;
+ }
+ bcechar = mchar_blank;
+ rend_setbg(&bcechar, bce);
+ for (x = from; x <= to; x++)
+ copy_mchar2mline(&bcechar, &mline_old, x);
+ DisplayLine(oml, &mline_old, y, from, to);
+#else
+ DisplayLine(oml, &mline_blank, y, from, to);
+#endif
+}
+
+void
DisplayLine(oml, ml, y, from, to)
struct mline *oml, *ml;
int from, to, y;
@@ -2212,27 +2632,30 @@ int from, to, y;
{
if (D_lp_missing || !cmp_mline(oml, ml, to))
{
+#ifdef DW_CHARS
+ if ((D_IC || D_IM) && from < to && !dw_left(ml, to, D_encoding))
+#else
if ((D_IC || D_IM) && from < to)
+#endif
{
- to -= 2;
last2flag = 1;
D_lp_missing = 0;
+ to--;
}
else
{
- to--;
- delete_lp = (D_CE || D_DC || D_CDC);
+ delete_lp = !cmp_mchar_mline(&mchar_blank, oml, to) && (D_CE || D_DC || D_CDC);
D_lp_missing = !cmp_mchar_mline(&mchar_blank, ml, to);
copy_mline2mchar(&D_lpchar, ml, to);
}
}
- else
- to--;
+ to--;
}
-#ifdef KANJI
+#ifdef DW_CHARS
if (D_mbcs)
{
- /* finish kanji (can happen after a wrap) */
+ /* finish dw-char (can happen after a wrap) */
+ debug("DisplayLine finishing kanji\n");
SetRenditionMline(ml, from);
PUTCHAR(ml->image[from]);
from++;
@@ -2249,21 +2672,21 @@ int from, to, y;
continue;
GotoPos(x, y);
}
-#ifdef KANJI
- if (badkanji(ml->font, x))
+#ifdef DW_CHARS
+ if (dw_right(ml, x, D_encoding))
{
x--;
- debug1("DisplayLine badkanji - x now %d\n", x);
+ debug1("DisplayLine on right side of dw char- x now %d\n", x);
GotoPos(x, y);
}
- if (ml->font[x] == KANJI && x == to)
+ if (x == to && dw_left(ml, x, D_encoding))
break; /* don't start new kanji */
#endif
SetRenditionMline(ml, x);
PUTCHAR(ml->image[x]);
-#ifdef KANJI
- if (ml->font[x] == KANJI)
- PUTCHAR(ml->image[++x]);
+#ifdef DW_CHARS
+ if (dw_left(ml, x, D_encoding))
+ PUTCHAR(ml->image[++x]);
#endif
}
#if 0 /* not needed any longer */
@@ -2285,12 +2708,32 @@ int from, to, y;
if (D_UT)
SetRendition(&mchar_null);
if (D_DC)
- PutStr(D_DC);
+ AddCStr(D_DC);
else if (D_CDC)
- CPutStr(D_CDC, 1);
+ AddCStr2(D_CDC, 1);
else if (D_CE)
- PutStr(D_CE);
+ AddCStr(D_CE);
+ }
+}
+
+void
+PutChar(c, x, y)
+struct mchar *c;
+int x, y;
+{
+ GotoPos(x, y);
+ SetRendition(c);
+ PUTCHARLP(c->image);
+#ifdef DW_CHARS
+ if (c->mbcs)
+ {
+# ifdef UTF8
+ if (D_encoding == UTF8)
+ D_rend.font = 0;
+# endif
+ PUTCHARLP(c->mbcs);
}
+#endif
}
void
@@ -2304,6 +2747,7 @@ struct mline *oml;
{
if (x == D_width - 1)
{
+ D_lp_missing = 1;
D_lpchar = *c;
return;
}
@@ -2312,10 +2756,8 @@ struct mline *oml;
}
if (x == xe)
{
- if (xe != D_width - 1)
- InsertMode(0);
SetRendition(c);
- RAW_PUTCHAR(c->image);
+ PUTCHARLP(c->image);
return;
}
if (!(D_IC || D_CIC || D_IM) || xe != D_width - 1)
@@ -2328,13 +2770,35 @@ struct mline *oml;
InsertMode(1);
if (!D_insert)
{
+#ifdef DW_CHARS
+ if (c->mbcs && D_IC)
+ AddCStr(D_IC);
if (D_IC)
- PutStr(D_IC);
+ AddCStr(D_IC);
else
- CPutStr(D_CIC, 1);
+ AddCStr2(D_CIC, c->mbcs ? 2 : 1);
+#else
+ if (D_IC)
+ AddCStr(D_IC);
+ else
+ AddCStr2(D_CIC, 1);
+#endif
}
SetRendition(c);
RAW_PUTCHAR(c->image);
+#ifdef DW_CHARS
+ if (c->mbcs)
+ {
+# ifdef UTF8
+ if (D_encoding == UTF8)
+ D_rend.font = 0;
+# endif
+ if (D_x == D_width - 1)
+ PUTCHARLP(c->mbcs);
+ else
+ RAW_PUTCHAR(c->mbcs);
+ }
+#endif
}
void
@@ -2344,6 +2808,13 @@ int x, y;
int xs, ys, xe, ye;
int ins;
{
+ int bce;
+
+#ifdef COLOR
+ bce = rend_getbg(c);
+#else
+ bce = 0;
+#endif
debug("WrapChar:");
debug2(" x %d y %d", x, y);
debug2(" Dx %d Dy %d", D_x, D_y);
@@ -2352,27 +2823,23 @@ int ins;
if (xs != 0 || x != D_width || !D_AM)
{
if (y == ye)
- ScrollV(xs, ys, xe, ye, 1);
+ ScrollV(xs, ys, xe, ye, 1, bce);
else if (y < D_height - 1)
y++;
- GotoPos(xs, y);
if (ins)
- {
- InsChar(c, xs, xe, y, 0);
- return;
- }
- SetRendition(c);
- RAW_PUTCHAR(c->image);
+ InsChar(c, xs, xe, y, 0);
+ else
+ PutChar(c, xs, y);
return;
}
if (y == ye) /* we have to scroll */
{
debug("- scrolling\n");
ChangeScrollRegion(ys, ye);
- if (D_bot != y)
+ if (D_bot != y || D_x != D_width || (!bce && !D_BE))
{
debug("- have to call ScrollV\n");
- ScrollV(xs, ys, xe, ye, 1);
+ ScrollV(xs, ys, xe, ye, 1, bce);
y--;
}
}
@@ -2380,13 +2847,13 @@ int ins;
ChangeScrollRegion(ys, ye); /* remove unusable region */
if (D_x != D_width || D_y != y)
{
- if (D_CLP && y >= 0) /* don't even try if !LP */
+ if (D_CLP) /* don't even try if !LP */
RefreshLine(y, D_width - 1, D_width - 1, 0);
debug2("- refresh last char -> x,y now %d,%d\n", D_x, D_y);
if (D_x != D_width || D_y != y) /* sorry, no bonus */
{
if (y == ye)
- ScrollV(xs, ys, xe, ye, 1);
+ ScrollV(xs, ys, xe, ye, 1, bce);
GotoPos(xs, y == ye || y == D_height - 1 ? y : y + 1);
}
}
@@ -2401,10 +2868,20 @@ int ins;
debug2(" -> done with insert (%d,%d)\n", D_x, D_y);
return;
}
- SetRendition(c);
D_y = y;
D_x = 0;
+ SetRendition(c);
RAW_PUTCHAR(c->image);
+#ifdef DW_CHARS
+ if (c->mbcs)
+ {
+# ifdef UTF8
+ if (D_encoding == UTF8)
+ D_rend.font = 0;
+# endif
+ RAW_PUTCHAR(c->mbcs);
+ }
+#endif
debug2(" -> done (%d,%d)\n", D_x, D_y);
}
@@ -2422,14 +2899,14 @@ int wi, he;
if (D_width != wi && (D_height == he || !D_CWS) && D_CZ0 && (wi == Z0width || wi == Z1width))
{
debug("ResizeDisplay: using Z0/Z1\n");
- PutStr(wi == Z0width ? D_CZ0 : D_CZ1);
+ AddCStr(wi == Z0width ? D_CZ0 : D_CZ1);
ChangeScreenSize(wi, D_height, 0);
return (he == D_height) ? 0 : -1;
}
if (D_CWS)
{
debug("ResizeDisplay: using WS\n");
- PutStr(tgoto(D_CWS, wi, he));
+ AddCStr(tgoto(D_CWS, wi, he));
ChangeScreenSize(wi, he, 0);
return 0;
}
@@ -2455,12 +2932,50 @@ int newtop, newbot;
if (D_top == newtop && D_bot == newbot)
return;
debug2("ChangeScrollRegion: (%d - %d)\n", newtop, newbot);
- PutStr(tgoto(D_CS, newbot, newtop));
+ AddCStr(tgoto(D_CS, newbot, newtop));
D_top = newtop;
D_bot = newbot;
D_y = D_x = -1; /* Just in case... */
}
+#ifdef RXVT_OSC
+void
+SetXtermOSC(i, s)
+int i;
+char *s;
+{
+ static char oscs[] = "1;\000\00020;\00039;\00049;\000";
+
+ ASSERT(display);
+ if (!D_CXT)
+ return;
+ if (!s)
+ s = "";
+ if (!D_xtermosc[i] && !*s)
+ return;
+ if (i == 0 && !*s)
+ s = "screen"; /* always set icon name */
+ if (i == 1 && !*s)
+ s = ""; /* no background */
+ if (i == 2 && !*s)
+ s = "black"; /* black text */
+ if (i == 3 && !*s)
+ s = "white"; /* on white background */
+ D_xtermosc[i] = 1;
+ AddStr("\033]");
+ AddStr(oscs + i * 4);
+ AddStr(s);
+ AddChar(7);
+}
+
+void
+ClearAllXtermOSC()
+{
+ int i;
+ for (i = 3; i >= 0; i--)
+ SetXtermOSC(i, 0);
+}
+#endif
/*
* Output buffering routines
@@ -2474,6 +2989,14 @@ char *str;
ASSERT(display);
+#ifdef UTF8
+ if (D_encoding == UTF8)
+ {
+ while ((c = *str++))
+ AddUtf8((unsigned char)c);
+ return;
+ }
+#endif
while ((c = *str++))
AddChar(c);
}
@@ -2486,6 +3009,14 @@ int n;
register char c;
ASSERT(display);
+#ifdef UTF8
+ if (D_encoding == UTF8)
+ {
+ while ((c = *str++) && n-- > 0)
+ AddUtf8((unsigned char)c);
+ }
+ else
+#endif
while ((c = *str++) && n-- > 0)
AddChar(c);
while (n-- > 0)
@@ -2501,9 +3032,9 @@ Flush()
ASSERT(display);
l = D_obufp - D_obuf;
debug1("Flush(): %d\n", l);
- ASSERT(l + D_obuffree == D_obuflen);
if (l == 0)
return;
+ ASSERT(l + D_obuffree == D_obuflen);
if (D_userfd < 0)
{
D_obuffree += l;
@@ -2524,6 +3055,8 @@ Flush()
debug1("Writing to display: %d\n", errno);
wr = l;
}
+ if (!display)
+ return;
D_obuffree += wr;
p += wr;
l -= wr;
@@ -2563,6 +3096,19 @@ Resize_obuf()
register int ind;
ASSERT(display);
+ if (D_status_obuffree >= 0)
+ {
+ ASSERT(D_obuffree == -1);
+ if (!D_status_bell)
+ {
+ int ti = time((time_t *)0) - D_status_time;
+ if (ti < MsgMinWait)
+ DisplaySleep(MsgMinWait - ti, 0);
+ }
+ RemoveStatus();
+ if (--D_obuffree > 0) /* redo AddChar decrement */
+ return;
+ }
if (D_obuflen && D_obuf)
{
ind = D_obufp - D_obuf;
@@ -2593,6 +3139,7 @@ NukePending()
struct mchar oldrend;
int oldkeypad = D_keypad, oldcursorkeys = D_cursorkeys;
int oldcurvis = D_curvis;
+ int oldmouse = D_mouse;
oldrend = D_rend;
len = D_obufp - D_obuf;
@@ -2610,81 +3157,64 @@ NukePending()
D_obufp = D_obuf;
D_obuffree += len;
D_top = D_bot = -1;
- PutStr(D_TI);
- PutStr(D_IS);
+ AddCStr(D_TI);
+ AddCStr(D_IS);
/* Turn off all attributes. (Tim MacKenzie) */
if (D_ME)
- PutStr(D_ME);
+ AddCStr(D_ME);
else
{
#ifdef COLOR
- if (D_CAF)
+ if (D_hascolor)
AddStr("\033[m"); /* why is D_ME not set? */
#endif
- PutStr(D_SE);
- PutStr(D_UE);
+ AddCStr(D_SE);
+ AddCStr(D_UE);
}
/* Check for toggle */
if (D_IM && strcmp(D_IM, D_EI))
- PutStr(D_EI);
+ AddCStr(D_EI);
D_insert = 0;
/* Check for toggle */
#ifdef MAPKEYS
if (D_KS && strcmp(D_KS, D_KE))
- PutStr(D_KS);
+ AddCStr(D_KS);
if (D_CCS && strcmp(D_CCS, D_CCE))
- PutStr(D_CCS);
+ AddCStr(D_CCS);
#else
if (D_KS && strcmp(D_KS, D_KE))
- PutStr(D_KE);
+ AddCStr(D_KE);
D_keypad = 0;
if (D_CCS && strcmp(D_CCS, D_CCE))
- PutStr(D_CCE);
+ AddCStr(D_CCE);
D_cursorkeys = 0;
#endif
- PutStr(D_CE0);
+ AddCStr(D_CE0);
D_rend = mchar_null;
D_atyp = 0;
- PutStr(D_DS);
+ AddCStr(D_DS);
D_hstatus = 0;
- PutStr(D_VE);
+ AddCStr(D_VE);
D_curvis = 0;
ChangeScrollRegion(oldtop, oldbot);
SetRendition(&oldrend);
KeypadMode(oldkeypad);
CursorkeysMode(oldcursorkeys);
CursorVisibility(oldcurvis);
+ MouseMode(oldmouse);
if (D_CWS)
{
debug("ResizeDisplay: using WS\n");
- PutStr(tgoto(D_CWS, D_width, D_height));
+ AddCStr(tgoto(D_CWS, D_width, D_height));
}
else if (D_CZ0 && (D_width == Z0width || D_width == Z1width))
{
debug("ResizeDisplay: using Z0/Z1\n");
- PutStr(D_width == Z0width ? D_CZ0 : D_CZ1);
+ AddCStr(D_width == Z0width ? D_CZ0 : D_CZ1);
}
}
#endif /* AUTO_NUKE */
-#ifdef KANJI
-int
-badkanji(f, x)
-char *f;
-int x;
-{
- int i, j;
-
- f += x;
- if (*f-- != KANJI)
- return 0;
- for (j = 0, i = x - 1; i >= 0; i--, j ^= 1)
- if (*f-- != KANJI)
- break;
- return j;
-}
-#endif
-
static void
disp_writeev_fn(ev, data)
struct event *ev;
@@ -2714,8 +3244,8 @@ char *data;
}
else
{
- if (errno != EINTR)
-# ifdef EWOULDBLOCK
+ if (errno != EINTR && errno != EAGAIN)
+# if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
if (errno != EWOULDBLOCK)
# endif
Msg(errno, "Error writing output to display");
@@ -2763,20 +3293,95 @@ char *data;
size = read(D_userfd, buf, size);
if (size < 0)
{
- if (errno == EINTR)
+ if (errno == EINTR || errno == EAGAIN)
+ return;
+#if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
+ if (errno == EWOULDBLOCK)
return;
- debug1("Read error: %d - SigHup()ing!\n", errno);
- SigHup(SIGARG);
+#endif
+ debug1("Read error: %d - hangup!\n", errno);
+ Hangup();
sleep(1);
return;
}
else if (size == 0)
{
- debug("Found EOF - SigHup()ing!\n");
- SigHup(SIGARG);
+ debug("Found EOF - hangup!\n");
+ Hangup();
sleep(1);
return;
}
+ if (D_mouse && D_forecv)
+ {
+ unsigned char *bp = (unsigned char *)buf;
+ int x, y, i = size;
+
+ /* XXX this assumes that the string is read in as a whole... */
+ for (i = size; i > 0; i--, bp++)
+ {
+ if (i > 5 && bp[0] == 033 && bp[1] == '[' && bp[2] == 'M')
+ {
+ bp++;
+ i--;
+ }
+ else if (i < 5 || bp[0] != 0233 || bp[1] != 'M')
+ continue;
+ x = bp[3] - 33;
+ y = bp[4] - 33;
+ if (x >= D_forecv->c_xs && x <= D_forecv->c_xe && y >= D_forecv->c_ys && y <= D_forecv->c_ye)
+ {
+ x -= D_forecv->c_xoff;
+ y -= D_forecv->c_yoff;
+ if (x >= 0 && x < D_forecv->c_layer->l_width && y >= 0 && y < D_forecv->c_layer->l_height)
+ {
+ bp[3] = x + 33;
+ bp[4] = y + 33;
+ i -= 4;
+ bp += 4;
+ continue;
+ }
+ }
+ if (bp[0] == '[')
+ {
+ bcopy((char *)bp + 1, (char *)bp, i);
+ bp--;
+ size--;
+ }
+ if (i > 5)
+ bcopy((char *)bp + 5, (char *)bp, i - 5);
+ bp--;
+ i -= 4;
+ size -= 5;
+ }
+ }
+#ifdef ENCODINGS
+ if (D_encoding != (D_forecv ? D_forecv->c_layer->l_encoding : 0))
+ {
+ int i, j, c;
+ char buf2[IOSIZE * 2 + 10];
+ for (i = j = 0; i < size; i++)
+ {
+ c = ((unsigned char *)buf)[i];
+ c = DecodeChar(c, D_encoding, &D_decodestate);
+ if (c == -2)
+ i--; /* try char again */
+ if (c < 0)
+ continue;
+ if (pastefont)
+ {
+ int font = 0;
+ j += EncodeChar(buf2 + j, c, D_forecv->c_layer->l_encoding, &font);
+ j += EncodeChar(buf2 + j, 0, D_forecv->c_layer->l_encoding, &font);
+ }
+ else
+ j += EncodeChar(buf2 + j, c, D_forecv->c_layer->l_encoding, 0);
+ if (j > sizeof(buf2) - 10) /* just in case... */
+ break;
+ }
+ (*D_processinput)(buf2, j);
+ return;
+ }
+#endif
(*D_processinput)(buf, size);
}
@@ -2786,6 +3391,7 @@ struct event *ev;
char *data;
{
display = (struct display *)data;
+ debug1("disp_status_fn for display %x\n", (int)display);
if (D_status)
RemoveStatus();
}
@@ -2796,6 +3402,12 @@ struct event *ev;
char *data;
{
display = (struct display *)data;
+ if (D_status == STATUS_ON_HS)
+ {
+ SetTimeout(ev, 1);
+ evenq(ev);
+ return;
+ }
RefreshHStatus();
}
@@ -2808,6 +3420,12 @@ char *data;
struct canvas *cv = (struct canvas *)data;
display = cv->c_display;
+ if (D_status == STATUS_ON_WIN)
+ {
+ SetTimeout(ev, 1);
+ evenq(ev);
+ return;
+ }
ox = D_x;
oy = D_y;
if (cv->c_ye + 1 < D_height)
diff --git a/display.h b/display.h
index eef58b4..d1b7fb4 100644
--- a/display.h
+++ b/display.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993
+/* Copyright (c) 1993-2002
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -75,7 +75,7 @@ struct viewport
struct display
{
struct display *d_next; /* linked list */
- struct user *d_user; /* user who owns that display */
+ struct acluser *d_user; /* user who owns that display */
struct canvas *d_cvlist; /* the canvases of this display */
struct canvas *d_forecv; /* current input focus */
void (*d_processinput) __P((char *, int));
@@ -93,11 +93,15 @@ struct display
int d_top, d_bot; /* scrollregion start/end */
int d_x, d_y; /* cursor position */
struct mchar d_rend; /* current rendition */
+ int d_col16change; /* the 16col bits changed in attr */
char d_atyp; /* current attribute types */
-#ifdef KANJI
+#ifdef DW_CHARS
int d_mbcs; /* saved char for multibytes charset */
- int d_kanji; /* what kanji type the display is */
- int d_lp_mbcs; /* mbcs part of lp_missing */
+#endif
+#ifdef ENCODINGS
+ int d_encoding; /* what encoding type the display is */
+ int d_decodestate; /* state of our decoder */
+ int d_realfont; /* real font of terminal */
#endif
int d_insert; /* insert mode flag */
int d_keypad; /* application keypad flag */
@@ -107,6 +111,10 @@ struct display
int d_has_hstatus; /* display has hardstatus line */
int d_hstatus; /* hardstatus used */
int d_lp_missing; /* last character on bot line missing */
+ int d_mouse; /* mouse mode */
+#ifdef RXVT_OSC
+ int d_xtermosc[4]; /* osc used */
+#endif
struct mchar d_lpchar; /* missing char */
time_t d_status_time; /* time of status display */
int d_status; /* is status displayed? */
@@ -116,10 +124,12 @@ struct display
int d_status_buflen; /* last message buffer len */
int d_status_lastx; /* position of the cursor */
int d_status_lasty; /* before status was displayed */
- int d_status_delayed; /* status not displayed yet */
+ int d_status_obuflen; /* saved obuflen */
+ int d_status_obuffree; /* saved obuffree */
struct event d_statusev; /* timeout event */
struct event d_hstatusev; /* hstatus changed event */
- int d_ESCseen; /* Was the last char an ESC (^a) */
+ int d_kaablamm; /* display kaablamm msg */
+ struct action *d_ESCseen; /* Was the last char an ESC (^a) */
int d_userpid; /* pid of attacher */
char d_usertty[MAXPATHLEN]; /* tty we are attached to */
int d_userfd; /* fd of the tty */
@@ -128,6 +138,7 @@ struct display
struct mode d_OldMode; /* tty mode when screen was started */
struct mode d_NewMode; /* New tty mode */
int d_flow; /* tty's flow control on/off flag*/
+ int d_intrc; /* current intr when flow is on */
char *d_obuf; /* output buffer */
int d_obuflen; /* len of buffer */
int d_obufmax; /* len where we are blocking the pty */
@@ -149,6 +160,7 @@ struct display
union tcu d_tcs[T_N]; /* terminal capabilities */
char *d_attrtab[NATTR]; /* attrib emulation table */
char d_attrtyp[NATTR]; /* attrib group table */
+ int d_hascolor; /* do we support color */
short d_dospeed; /* baudrate of tty */
#ifdef FONT
char d_c0_tab[256]; /* conversion for C0 */
@@ -197,10 +209,12 @@ extern struct display TheDisplay;
#define D_x DISPLAY(d_x)
#define D_y DISPLAY(d_y)
#define D_rend DISPLAY(d_rend)
+#define D_col16change DISPLAY(d_col16change)
#define D_atyp DISPLAY(d_atyp)
#define D_mbcs DISPLAY(d_mbcs)
-#define D_kanji DISPLAY(d_kanji)
-#define D_lp_mbcs DISPLAY(d_lp_mbcs)
+#define D_encoding DISPLAY(d_encoding)
+#define D_decodestate DISPLAY(d_decodestate)
+#define D_realfont DISPLAY(d_realfont)
#define D_insert DISPLAY(d_insert)
#define D_keypad DISPLAY(d_keypad)
#define D_cursorkeys DISPLAY(d_cursorkeys)
@@ -209,6 +223,8 @@ extern struct display TheDisplay;
#define D_has_hstatus DISPLAY(d_has_hstatus)
#define D_hstatus DISPLAY(d_hstatus)
#define D_lp_missing DISPLAY(d_lp_missing)
+#define D_mouse DISPLAY(d_mouse)
+#define D_xtermosc DISPLAY(d_xtermosc)
#define D_lpchar DISPLAY(d_lpchar)
#define D_status DISPLAY(d_status)
#define D_status_time DISPLAY(d_status_time)
@@ -218,9 +234,11 @@ extern struct display TheDisplay;
#define D_status_buflen DISPLAY(d_status_buflen)
#define D_status_lastx DISPLAY(d_status_lastx)
#define D_status_lasty DISPLAY(d_status_lasty)
-#define D_status_delayed DISPLAY(d_status_delayed)
+#define D_status_obuflen DISPLAY(d_status_obuflen)
+#define D_status_obuffree DISPLAY(d_status_obuffree)
#define D_statusev DISPLAY(d_statusev)
#define D_hstatusev DISPLAY(d_hstatusev)
+#define D_kaablamm DISPLAY(d_kaablamm)
#define D_ESCseen DISPLAY(d_ESCseen)
#define D_userpid DISPLAY(d_userpid)
#define D_usertty DISPLAY(d_usertty)
@@ -228,6 +246,7 @@ extern struct display TheDisplay;
#define D_OldMode DISPLAY(d_OldMode)
#define D_NewMode DISPLAY(d_NewMode)
#define D_flow DISPLAY(d_flow)
+#define D_intr DISPLAY(d_intr)
#define D_obuf DISPLAY(d_obuf)
#define D_obuflen DISPLAY(d_obuflen)
#define D_obufmax DISPLAY(d_obufmax)
@@ -244,6 +263,7 @@ extern struct display TheDisplay;
#define D_tcs DISPLAY(d_tcs)
#define D_attrtab DISPLAY(d_attrtab)
#define D_attrtyp DISPLAY(d_attrtyp)
+#define D_hascolor DISPLAY(d_hascolor)
#define D_dospeed DISPLAY(d_dospeed)
#define D_c0_tab DISPLAY(d_c0_tab)
#define D_xtable DISPLAY(d_xtable)
@@ -273,7 +293,7 @@ extern struct display TheDisplay;
#define AddChar(c) \
do \
{ \
- if (--D_obuffree == 0) \
+ if (--D_obuffree <= 0) \
Resize_obuf(); \
*D_obufp++ = (c); \
} \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index f42a3ca..d3c42fe 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -3,6 +3,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
+DESTDIR =
+
prefix = @prefix@
mandir = @mandir@
infodir = @infodir@
@@ -11,6 +13,7 @@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
+TEXI2PDF = texi2pdf
SHELL = /bin/sh
@@ -19,26 +22,30 @@ all: screen.info
dvi screen.dvi: screen.texinfo mostlyclean
$(TEXI2DVI) $(srcdir)/screen.texinfo
+pdf screen.pdf: screen.texinfo mostlyclean
+ $(TEXI2PDF) $(srcdir)/screen.texinfo
+
info screen.info: screen.texinfo
+ @rm -f screen.info*
$(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info
install: installdirs
- $(INSTALL_DATA) $(srcdir)/screen.1 $(mandir)/man1/screen.1
+ $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1
-$(MAKE) screen.info
-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) $$f $(infodir);done; \
+ for f in $$d/screen.info*; do $(INSTALL_DATA) $$f $(DESTDIR)$(infodir);done; \
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- install-info --info-dir=$(infodir) $$d/screen.info; \
+ install-info --info-dir=$(DESTDIR)$(infodir) $$d/screen.info; \
else true; fi; \
fi
uninstall:
- rm -f $(mandir)/man1/screen.1
- rm -f $(infodir)/screen.info*
+ rm -f $(DESTDIR)$(mandir)/man1/screen.1
+ rm -f $(DESTDIR)$(infodir)/screen.info*
installdirs:
- $(srcdir)/../etc/mkinstalldirs $(mandir)/man1 $(infodir)
+ $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(infodir)
mostlyclean:
-rm -f *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.tp *.vr
diff --git a/doc/screen.1 b/doc/screen.1
index 74c35d4..aad6aef 100644
--- a/doc/screen.1
+++ b/doc/screen.1
@@ -1,5 +1,5 @@
.\" vi:set wm=5
-.TH SCREEN 1 "10 Jun 1999"
+.TH SCREEN 1 "Jan 2002"
.if n .ds Q \&"
.if n .ds U \&"
.if t .ds Q ``
@@ -34,7 +34,7 @@ multiplexes a physical terminal between several processes (typically
interactive shells).
Each virtual terminal provides the functions
of a DEC VT100 terminal and, in addition, several control functions
-from the ISO 6492 (ECMA 48, ANSI X3.64) and ISO 2022 standards
+from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards
(e.\|g. insert/delete line and support for multiple character sets).
There is a scrollback history buffer for each virtual terminal and a
copy-and-paste mechanism that allows moving text regions between
@@ -74,9 +74,7 @@ does not understand the prefix \*QC-\*U to mean control.
Please use the caret notation (\*Q^A\*U instead of \*QC-a\*U) as arguments
to e.g. the
.I escape
-command or the
-.I -e
-option.
+command or the \fI-e\fP option.
.I Screen
will also print out control characters in caret notation.
.PP
@@ -270,13 +268,13 @@ is called from within another
session or not. This flag has a special meaning in connection
with the `-d' option:
.TP 8
-.B \-m \-d
+.B \-d \-m
Start
.I screen
in \*Qdetached\*U mode. This creates a new session but doesn't
attach to it. This is useful for system startup scripts.
.TP 8
-.B \-m \-D
+.B \-D \-m
This also starts screen in \*Qdetached\*U mode, but doesn't fork
a new process. The command exits if the session terminates.
.TP 5
@@ -320,7 +318,7 @@ options, just as if
.B \-R
had not been specified. The option is set by default if
.I screen
-is run as a login-shell.
+is run as a login-shell (actually screen uses \*Q-xRR\*U in that case).
For combinations with the \fB\-d\fP/\fB\-D\fP option see there.
.TP 5
.B \-s
@@ -338,6 +336,11 @@ default [\fItty.host\fP] suffix.
sets the title (a.\|k.\|a.) for the default shell or specified program.
See also the \*Qshelltitle\*U .screenrc command.
.TP 5
+.B \-U
+Run screen in UTF-8 mode. This option tells screen that your terminal
+sends and understands UTF-8 encoded characters. It also sets the default
+encoding for new windows to `utf8'.
+.TP 5
.B \-v
Print version number.
.TP 5
@@ -352,6 +355,12 @@ See the \fB-r\fP flag for a description how to construct matches.
Attach to a not detached
.I screen
session. (Multi display mode).
+.TP 5
+.B \-X
+Send the specified command to a running screen session. You can use
+the \fB-d\fP or \fB-r\fP option to tell screen to look only for
+attached or detached screen sessions. Note that this command doesn't
+work if the session is password protected.
.SH "DEFAULT KEY BINDINGS"
@@ -368,11 +377,10 @@ of the command.
.PP
.TP 26n
The following table shows the default key bindings:
-.IP "\fBC-a '\fP"
-.PD 0
-.IP "\fBC-a ""\fP (select)"
-.PD
+.IP "\fBC-a '\fP (select)"
Prompt for a window name or number to switch to.
+.IP "\fBC-a ""\fP (windowlist -b)"
+Present a list of all windows for selection.
.IP "\fBC-a 0\fP (select 0)"
.PD 0
.IP "\fB ... \fP ..."
@@ -689,6 +697,7 @@ If the second parameter is omitted all groups the user is in are listed.
.B aclumask
.RI [[ users ] +bits
.RI |[ users ] -bits " .... ]"
+.br
.B umask
.RI [[ users ] +bits
.RI |[ users ] -bits " .... ]"
@@ -773,6 +782,38 @@ a display is associated with the target windows. These commands may not work
correctly under \*Qat\*U looping over windows.
.sp
.ne 3
+.BI "attrcolor " attrib
+.RI [ "attribute/color-modifier" ]
+.PP
+This command can be used to highlight attributes by changing the color of
+the text. If the attribute
+.I attrib
+is in use, the specified attribute/color modifier is also applied. If no
+modifier is given, the current one is deleted. See the \*QSTRING ESCAPES\*U
+chapter for the syntax of the modifier. Screen understands two
+pseudo-attributes, \*Qi\*U stands for high-intensity foreground
+color and \*QI\*U for high-intensity background color.
+.sp
+Examples:
+.IP
+attrcolor b "R"
+.PP
+Change the color to bright red if bold text is to be printed.
+.IP
+attrcolor u "-u b"
+.PP
+Use blue text instead of underline.
+.IP
+attrcolor b "I"
+.PP
+Use bright colors for bold text. Most terminal emulators do this
+already.
+.IP
+attrcolor i "+b"
+.PP
+Make bright colored text also bold.
+.sp
+.ne 3
.BR "autodetach on" | off
.PP
Sets whether
@@ -786,14 +827,6 @@ When turned off, a hangup signal will terminate
and all the processes it contains. Autodetach is on by default.
.sp
.ne 3
-.BR "autofixterm on" | off
-.PP
-Sets whether
-.I screen
-will add missing capabilities to the termcap/info entry. It is on
-by default.
-.sp
-.ne 3
.BR "autonuke on" | off
.PP
Sets whether a clear screen sequence should nuke all the output
@@ -801,6 +834,14 @@ that has not been written to the terminal. See also
\*Qobuflimit\*U.
.sp
.ne 3
+.BR "bce " [ on | off ]
+.PP
+Change background-color-erase setting. If \*Qbce\*U is set to on, all
+characters cleared by an erase/insert/scroll/clear operation
+will be displayed in the current background color. Otherwise
+the default background color is used.
+.sp
+.ne 3
.B bell_msg
.RI [ message ]
.PP
@@ -821,7 +862,10 @@ output of a message line (bell_msg "").
Without parameter, the current message is shown.
.sp
.ne 3
-.BI "bind " key
+.BI "bind "
+.RB [ -c
+.IR class ]
+.I key
.RI [ command " [" args ]]
.PP
Bind a command to a key.
@@ -840,6 +884,11 @@ The argument can also be quoted, if you like.
If no further argument is given, any previously established binding
for this key is removed.
The \fIcommand\fP argument can be any command listed in this section.
+
+If a command class is specified via the \*Q-c\*U option, the key
+is bound for the specified class. Use the \*Qcommand\*U command
+to activate a class. Command classes can be used to create multiple
+command keys or multi-character bindings.
.PP
Some examples:
.PP
@@ -861,6 +910,24 @@ binds \*QC-f\*U to the command \*Qcreate a window with a TELNET
connection to foobar\*U, and bind \*Qescape\*U to the command
that creates an non-login window with a.\|k.\|a. \*Qroot\*U in slot #9, with
a superuser shell and a scrollback buffer of 1000 lines.
+.PP
+.nf
+ bind -c demo1 0 select 10
+ bind -c demo1 1 select 11
+ bind -c demo1 2 select 12
+ bindkey "^B" command -c demo1
+.fi
+.PP
+makes \*QC-b 0\*U select window 10, \*QC-b 1\*U window 11, etc.
+.PP
+.nf
+ bind -c demo2 0 select 10
+ bind -c demo2 1 select 11
+ bind -c demo2 2 select 12
+ bind - command -c demo2
+.fi
+.PP
+makes \*QC-a - 0\*U select window 10, \*QC-a - 1\*U window 11, etc.
.sp
.ne 3
.B bindkey
@@ -1029,7 +1096,7 @@ mapping. On every position a '.' may be used to indicate that
the corresponding charset/mapping should not be changed
(\fIset\fP is padded to six characters internally by appending '.'
chars). New windows have "BBBB02" as default charset, unless a
-\*Qkanji\*U command is active.
+\*Qencoding\*U command is active.
.br
The current setting can be viewed with the \*Qinfo\*U command.
.sp
@@ -1076,10 +1143,13 @@ you may regard \*QC-a esc\*U (copy mode) as its `Vi command mode'.
.sp
.ne 3
.B command
+.RB [ -c
+.IR class ]
.PP
This command has the same effect as typing the screen escape
character (^A). It is probably only useful for key bindings.
-See also \*Qbindkey\*U.
+If the \*Q-c\*U option is given, select the specified command
+class. See also \*Qbind\*U and \*Qbindkey\*U.
.sp
.ne 3
.BR "compacthist " [ on | off ]
@@ -1296,6 +1366,12 @@ Note that you can use the special `AN' terminal capability if you
want to have a dependency on the terminal type.
.sp
.ne 3
+.BR "defbce on" | off
+.PP
+Same as the \fBbce\fP command except that the default setting for new
+windows is changed. Initial setting is `off'.
+.sp
+.ne 3
.B defbreaktype
.RI [ tcsendbreak | TIOCSBRK
.RI | TCSBRK ]
@@ -1366,10 +1442,17 @@ is omitted, the current default string is displayed.
Per default the hardstatus line of new windows is empty.
.sp
.ne 3
-.BR "defkanji jis" | sjis | euc
+.BI "defencoding " enc
.PP
-Same as the \fBkanji\fP command except that the default setting for new
-windows is changed. Initial setting is `off', i.e. `jis'.
+Same as the \fBencoding\fP command except that the default setting for new
+windows is changed. Initial setting is the encoding taken from the
+terminal.
+.sp
+.ne 3
+.BR "deflog on" | off
+.PP
+Same as the \fBlog\fP command except that the default setting for new windows
+is changed. Initial setting is `off'.
.sp
.ne 3
.BR "deflogin on" | off
@@ -1421,6 +1504,13 @@ Same as the \fBslowpaste\fP command except that the default setting for new
windows is changed. Initial setting is 0 milliseconds, meaning `off'.
.sp
.ne 3
+.BR "defutf8 on" | off
+.PP
+Same as the \fButf8\fP command except that the default setting for new
+windows is changed. Initial setting is `on' if screen was started with
+\*Q-U\*U, otherwise `off'.
+.sp
+.ne 3
.BR "defwrap on" | off
.PP
Same as the \fBwrap\fP command except that the default setting for new
@@ -1441,6 +1531,7 @@ See there.
.sp
.ne 3
.B detach
+.RB [ -h ]
.PP
Detach the
.I screen
@@ -1453,7 +1544,16 @@ can be resumed by invoking
.I screen
with the
.B \-r
-option. (See also section \*QCOMMAND-LINE OPTIONS\*U.)
+option (see also section \*QCOMMAND-LINE OPTIONS\*U). The
+.B \-h
+option tells screen to immediately close the connection to the
+terminal (\*Qhangup\*U).
+.sp
+.ne 3
+.B dinfo
+.PP
+Show what screen thinks about your terminal. Useful if you want to know
+why features like color or the alternate charset don't work.
.sp
.ne 3
.B displays
@@ -1519,6 +1619,14 @@ by a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
The default is \*Q^Aa\*U.
.sp
.ne 3
+.B eval
+.I command1
+.RI [ command2
+.IR ... ]
+.PP
+Parses and executes each argument as seperate command.
+.sp
+.ne 3
.B exec
.RI [[ fdpat ]
.IR "newcommand " [ "args ..." ]]
@@ -1627,10 +1735,19 @@ details and note, that this is subject to change in future releases.
Default is set by `defflow'.
.sp
.ne 3
-.B focus
+.BR "focus " [ up | down | top | bottom ]
.PP
Move the input focus to the next region. This is done in a cyclic
-way so that the top region is selected after the bottom one.
+way so that the top region is selected after the bottom one. If
+no subcommand is given it defaults to `down'. `up' cycles in the
+opposite order, `top' and `bottom' go to the top and bottom
+region respectively. Useful bindings are (j and k as in vi)
+.nf
+ bind j focus down
+ bind k focus up
+ bind t focus top
+ bind b focus bottom
+.fi
.sp
.ne 3
.BR "gr " [ on | off ]
@@ -1643,11 +1760,15 @@ otherwise the ISO88591 charset would not work.
.sp
.ne 3
.B hardcopy
+.RB [ -h ]
+.RI [ file ]
.PP
-Writes out the currently displayed image to a file \fIhardcopy.n\fP
-in the window's default directory, where \fIn\fP is the number
-of the current window.
+Writes out the currently displayed image to the file \fIfile\fP,
+or, if no filename is specified, to \fIhardcopy.n\fP in the
+default directory, where \fIn\fP is the number of the current window.
This either appends or overwrites the file if it exists. See below.
+If the option \fB-h\fP is specified, dump also the contents of the
+scrollback buffer.
.sp
.ne 3
.BR "hardcopy_append on" | off
@@ -1703,12 +1824,12 @@ If you prepend the word \*Qalways\*U to the type,
.I screen
will use the type even if the terminal supports a hardstatus.
.P
-The third form specifies the contents of the hardstatus line.
-'%h' is used as default string, i.e. the stored hardstatus of the
-current window (settable via \\E]0;^G or \\E_\\\\) is displayed.
-You can customize this to any string you like including
-the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave
-out the argument
+The third form specifies the contents of the hardstatus line. '%h' is
+used as default string, i.e. the stored hardstatus of the current
+window (settable via \*QESC]0;<string>^G\*U or \*QESC_<string>ESC\e\*U)
+is displayed. You can customize this to any string you like including
+the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave out
+the argument
.IR string ,
the current string is displayed.
.P
@@ -1716,13 +1837,24 @@ You can mix the second and third form by providing the string as
additional argument.
.sp
.ne 3
-.BR "height " [ \fIlines\fP ]
+.B height
+.RB [ -w | -d ]
+.RI [ lines " [" cols ]]
.PP
Set the display height to a specified number of lines. When no argument
-is given it toggles between 24 and 42 lines display.
+is given it toggles between 24 and 42 lines display. You can also
+specify a width if you want to change both values.
+The
+.B -w
+option tells screen to leave the display size unchanged and just set
+the window size,
+.B -d
+vice versa.
.sp
.ne 3
.B help
+.RB [ -c
+.IR class ]
.PP
Not really a online help, but
displays a help
@@ -1732,7 +1864,8 @@ The first pages list all the internal commands followed by their current
bindings.
Subsequent pages will display the custom commands, one command per key.
Press space when you're done reading each page, or return to exit early.
-All other characters are ignored.
+All other characters are ignored. If the \*Q-c\*U option is given,
+display all bound commands for the specified command class.
See also \*QDEFAULT KEY BINDINGS\*U section.
.sp
.ne 3
@@ -1756,6 +1889,12 @@ scrollback buffer).
Change the window's hardstatus line to the string \fIstatus\fP.
.sp
.ne 3
+.BR "ignorecase " [ on | off ]
+.PP
+Tell screen to ignore the case of caracters in searches. Default is
+`off'.
+.sp
+.ne 3
.B info
.PP
Uses the message line to display some information about the current window:
@@ -1782,7 +1921,8 @@ activity monitoring or partial redraw enabled.
The currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP,
or \fIG3\fP) and in square brackets the terminal character sets that are
-currently designated as \fIG0\fP through \fIG3\fP is shown.
+currently designated as \fIG0\fP through \fIG3\fP is shown. If the window
+is in UTF-8 mode, the string \*QUTF-8\*U is shown instead.
Additional modes depending on the type of the window are displayed at the end of the status line (See also chapter \*QWINDOW TYPES\*U).
.br
@@ -1797,20 +1937,24 @@ For system information use the \*Qtime\*U command.
No longer exists, use \*Qpaste\*U instead.
.sp
.ne 3
-.B kanji
-.BR jis | euc | sjis
-.RB [ jis | euc | sjis\fR]
+.BI "encoding " enc
+.RI [ enc ]
.PP
Tell
.I screen
-how to process kanji input/output. The first argument
-sets the kanji type of the current window. Each window can emulate
-a different type. The optional second parameter tells
-.I screen
-how to write the kanji codes to the connected terminal. The preferred
-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
+how to interpret the input/output. The first argument
+sets the encoding of the current window. Each window can emulate
+a different encoding. The optional second parameter overwrites
+the encoding of the connected terminal. It should never be
+needed as screen uses the locale setting to detect the encoding.
+There is also a way to select a terminal encoding depending on
+the terminal type by using the \*QKJ\*U termcap entry.
+
+Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, KOI8-R,
+CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6,
+ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis.
+
+See also \*Qdefencoding\*U, which changes the default setting of a new
window.
.sp
.ne 3
@@ -2208,12 +2352,19 @@ Use the empty bind command (as in \*Qbind '^\e'\*U) to remove a key binding.
.sp
.ne 3
.B readbuf
+.RB [ -e
+.IR encoding ]
+.RI [ filename ]
.PP
-Reads the contents of the current screen-exchange file into the paste buffer.
+Reads the contents of the specified file into the paste buffer.
+You can tell screen the encoding of the file via the \fB-e\fP option.
+If no file is specified, the screen-exchange filename is used.
See also \*Qbufferfile\*U command.
.sp
.ne 3
.B readreg
+.RB [ -e
+.IR encoding ]
.RI [ register " [" filename ]]
.PP
Does one of two things, dependent on number of arguments: with zero or one
@@ -2221,6 +2372,7 @@ arguments it it duplicates the paste buffer contents into the register specified
or entered at the prompt. With two arguments it reads the contents of the named
file into the register, just as \fIreadbuf\fP reads the screen-exchange file
into the paste buffer.
+You can tell screen the encoding of the file via the \fB-e\fP option.
The following example will paste the system's password file into
the
.I screen
@@ -2238,10 +2390,14 @@ Redisplay the current window. Needed to get a full redisplay when in
partial redraw mode.
.sp
.ne 3
-.BI "register " "key string"
+.B register
+.RB [ -e
+.IR encoding ]
+.I "key string"
.PP
-Save the specified \fIstring\fP to the register \fIkey\fP. See also the
-\*Qpaste\*U command.
+Save the specified \fIstring\fP to the register \fIkey\fP.
+The encoding of the string can be specified via the \fB-e\fP option.
+See also the \*Qpaste\*U command.
.sp
.ne 3
.B "remove"
@@ -2262,6 +2418,25 @@ settings (like scroll regions or graphics character set) are left over from
an application.
.sp
.ne 3
+.B "resize"
+.PP
+Resize the current region. The space will be removed from or added to
+the region below or if there's not enough space from the region above.
+.IP
+resize +N increase current region height by N
+.IP
+resize -N decrease current region height by N
+.IP
+resize N set current region height to N
+.IP
+resize = make all windows equally high
+.IP
+resize max maximize current region height
+.IP
+resize min minimize current region height
+.PP
+.sp
+.ne 3
.B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]]"
.PP
Establish a new window.
@@ -2341,6 +2516,16 @@ If no parameters are specified, the user will be prompted for both variable
and value. The environment is inherited by all subsequently forked shells.
.sp
.ne 3
+.BR "setsid " [ on | off ]
+.PP
+Normally screen uses different sessions and process groups for
+the windows. If setsid is turned \fIoff\fP, this is not done
+anymore and all windows will be in the same process group as the
+screen backend process. This also breaks job-control, so be careful.
+The default is \fIon\fP, of course. This command is probably useful
+only in rare circumstances.
+.sp
+.ne 3
.B "shell \fIcommand\fP"
.PP
Set the command to be used to create a new shell.
@@ -2394,23 +2579,27 @@ underlying system exposes flow control problems while pasting large amounts of
text.
.sp
.ne 3
+.BI "source " file
+.PP
+Read and execute commands from file \fIfile\fP. Source commands may
+be nested to a maximum recursion level of ten. If file is not an
+absolute path and screen already processes a source command, the
+parent directory of the running source command file is used to search
+for the new command file before screen's current directory.
+
+Note that termcap/terminfo/termcapinfo commands only work at
+startup and reattach time, so they must be reached via the
+default screenrc files to have an effect.
+.sp
+.ne 3
.B sorendition
.RB [ "\fIattr\fR " [ \fIcolor ]]
.PP
Change the way
.I screen
does highlighting for text marking and printing messages.
-.I Attr
-is a hexadecimal number and describes the attributes (inverse,
-underline, ...) the text will get.
-.I Color
-is a 2 digit number and changes the
-foreground/background of the highlighted text.
-Some knowledge of
-.IR screen 's
-internal character representation is
-needed to make the characters appear in the desired way. The default
-is currently 10 99 (standout, default colors).
+See the \*QSTRING ESCAPES\*U chapter for the syntax of the modifiers.
+The default is currently \*Q=s dd\*U (standout, default colors).
.sp
.ne 3
.B split
@@ -2583,10 +2772,15 @@ man page for more information on termcap definitions.
.sp
.ne 3
.B time
+.RI [ string ]
.PP
Uses the message line to display the time of day, the host name, and the load
averages over 1, 5, and 15 minutes (if this is available on your system).
For window specific information use \*Qinfo\*U.
+
+If a string is specified, it changes the format of the time report like it is
+described in the \*QSTRING ESCAPES\*U chapter. Screen uses a default of
+"%c:%s %M %d %H%? %l%?".
.sp
.ne 3
.BR "title " [ \fIwindowalias ]
@@ -2603,6 +2797,19 @@ releases.
Unset an environment variable.
.sp
.ne 3
+.B utf8
+.RB [ on | off
+.RB [ on | off ]]
+.PP
+Change the encoding used in the current window. If utf8 is enabled, the
+strings sent to the window will be UTF-8 encoded and vice versa. Omitting the
+parameter toggles the setting. If a second parameter is given, the display's
+encoding is also changed (this should rather be done with screen's \*Q-U\*U
+option).
+See also \*Qdefutf8\*U, which changes the default setting of a new
+window.
+.sp
+.ne 3
.B vbell
.RB [ on | off ]
.PP
@@ -2653,12 +2860,45 @@ Write a message to all displays. The message will appear in the terminal's
status line.
.sp
.ne 3
-.BR "width " [ \fInum ]
+.B width
+.RB [ -w | -d ]
+.RI [ cols " [" lines ]]
.PP
-Toggle the window width between 80 and 132 columns or set it to \fInum\fP
+Toggle the window width between 80 and 132 columns or set it to \fIcols\fP
columns if an argument is specified.
This requires a capable terminal and the termcap entries \*QZ0\*U and \*QZ1\*U.
-See the \*Qtermcap\*U command for more information.
+See the \*Qtermcap\*U command for more information. You can also specify
+a new height if you want to change both values.
+The
+.B -w
+option tells screen to leave the display size unchanged and just set
+the window size,
+.B -d
+vice versa.
+.sp
+.ne 3
+.B windowlist
+.RB [ -b "] |"
+.B string
+.RI [ string "] |"
+.B title
+.RI [ title ]
+.PP
+Display all windows in a table for visual window selection. The
+desired window can be selected via the standard movement keys (see
+the \*Qcopy\*U command) and activated via the return key.
+If the
+.B -b
+option is given, screen will switch to the blank window before
+presenting the list, so that the current window is also selectable.
+
+The table format can be changed with the \fBstring\fP and
+\fBtitle\fP option, the title is displayed as table heading, while
+the lines are made by using the string setting. The default
+setting is \*QNum Name%=Flags\*U for the title and \*Q%3n %t%=%f\*U
+for the lines.
+See the \*QSTRING ESCAPES\*U chapter for more codes (e.g. color
+settings).
.sp
.ne 3
.B windows
@@ -2690,11 +2930,16 @@ Default is `on'.
.sp
.ne 3
.B writebuf
+.RB [ -e
+.IR encoding ]
+.RI [ filename ]
.PP
-Writes the contents of the paste buffer to a public accessible screen-exchange
-file. This is thought of as a primitive means of communication between
+Writes the contents of the paste buffer to the specified file, or the public accessible screen-exchange
+file if no filename is given. This is thought of as a primitive means of communication between
.I screen
-users on the same host. The filename can be set with the \fIbufferfile\fP
+users on the same host. If an encoding is specified the paste buffer
+is recoded on the fly to match the encoding.
+The filename can be set with the \fIbufferfile\fP
command and defaults to \*Q/tmp/screen-exchange\*U.
.sp
.ne 3
@@ -2897,8 +3142,14 @@ current time HH:MM in 12h format
day number
.IP D
weekday name
+.IP f
+flags of the window
+.IP F
+sets %? to true if the window has the focus
.IP h
hardstatus of the window
+.IP H
+hostname of the system
.IP l
current load of the system
.IP m
@@ -2914,7 +3165,9 @@ window title
.IP u
all other users on this window
.IP w
-all window numbers and names
+all window numbers and names. With '-' quailifier: up to the current
+window; with '+' qualifier: starting with the window after the current
+one.
.IP W
all window numbers and names except the current one
.IP y
@@ -2926,12 +3179,122 @@ the part to the next '%?' is displayed only if an escape expands to an
nonempty string
.IP :
else part of '%?'
+.IP =
+pad the string to the display's width (like TeX's hfill). If a
+number is specified, pad to the percentage of the window's width.
+A '0' qualifier tells screen to treat the number as absolute position.
+You can specify to pad relative to the last absolute pad position
+by adding a '+' qualifier or to pad relative to the right margin
+by using '-'. The padding truncates the string if the specified
+position lies before the current position. Add the 'L' qualifier
+to change this.
+.IP <
+same as '%=' but just do truncation, do not fill with spaces
+.IP >
+mark the current text position for the next truncation. When
+screen needs to do truncation, it tries to do it in a way that
+the marked position gets moved to the specified percentage of
+the output area. (The area starts from the last absolute pad
+position and ends with the position specified by the truncation
+operator.) The 'L' qualifier tells screen to mark the truncated
+parts with '...'.
+.IP {
+attribute/color modifier string terminated by the next \*Q}\*U
.P
The 'c' and 'C' escape may be qualified with a '0' to make
.I screen
-use zero instead of space as fill character. The 'n' escape understands
-a length qualifier (e.g. '%3n').
-
+use zero instead of space as fill character. The '0' qualifier
+also makes the '=' escape use absolute positions. The 'n' and '='
+escapes understand
+a length qualifier (e.g. '%3n'), 'D' and 'M' can be prefixed with 'L'
+to generate long names, 'w' and 'W' also show the window flags
+if 'L' is given.
+.PP
+An attribute/color modifier is is used to change the attributes or the
+color settings. Its format
+is \*Q[attribute modifier] [color description]\*U. The attribute modifier
+must be prefixed by a change type indicator if it can be confused with
+a color desciption. The following change types are known:
+.IP +
+add the specified set to the current attributes
+.IP -
+remove the set from the current attributes
+.IP !
+invert the set in the current attributes
+.IP =
+change the current attributes to the specified set
+.PP
+The attribute set can either be specified as a hexadecimal number or
+a combination of the following letters:
+.IP u
+underline
+.PD 0
+.IP b
+bold
+.IP r
+reverse
+.IP s
+standout
+.IP B
+blinking
+.PD
+.PP
+Colors are coded either as a hexadecimal number or two letters specifying
+the desired background and foreground color (in that order). The following
+colors are known:
+.IP k
+black
+.PD 0
+.IP r
+red
+.IP g
+green
+.IP y
+yellow
+.IP b
+blue
+.IP m
+magenta
+.IP c
+cyan
+.IP w
+white
+.IP d
+default color
+.IP .
+leave color unchanged
+.PD
+.PP
+The capitalized versions of the letter specify bright colors. You can also
+use the pseudo-color 'i' to set just the brightness and leave the color
+unchanged.
+.br
+A one digit/letter color description is treated as foreground or
+background color dependant on the current attributes: if reverse mode is
+set, the background color is changed instead of the foreground color.
+If you don't like this, prefix the color with a \*Q.\*U. If you want
+the same behaviour for two-letter color descriptions, also prefix them
+with a \*Q.\*U.
+.br
+As a special case, \*Q%{-}\*U restores the attributes and colors that
+were set before the last change was made (i.e. pops one level of the
+color-change stack).
+.PP
+Examples:
+.IP "\*QG\*U"
+set color to bright green
+.IP "\*Q+b r\*U"
+use bold red
+.IP "\*Q= yd\*U"
+clear all attributes, write in default color on yellow background.
+.IP "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
+The available windows centered at the current window and truncated to
+the available width. The current window is displayed white on blue.
+This can be used with \*Qhardstatus alwayslastline\*U.
+.IP "%?%F%{.R.}%?%3n %t%? [%h]%?"
+The window number and title and the window's hardstatus, if one is set.
+Also use a red background if this is the active focus. Useful for
+\*Qcaption string\*U.
.SH "FLOW-CONTROL"
Each window has a flow-control setting that determines how
.I screen
@@ -2958,8 +3321,8 @@ Each window has an initial flow-control value set with either the
.B \-f
option or the \*Qdefflow\*U .screenrc command. Per default the windows
are set to automatic flow-switching.
-It can then be toggled between the three states 'fixed on', 'fixed off' and
-'automatic' interactively with the \*Qflow\*U command bound to "C-a f".
+It can then be toggled between the three states 'fixed on', 'fixed off'
+and 'automatic' interactively with the \*Qflow\*U command bound to "C-a f".
.PP
The automatic flow-switching mode deals with
flow control using the TIOCPKT mode (like \*Qrlogin\*U does). If
@@ -3347,9 +3710,15 @@ terminal without interpretation.
.BR "ESC _" " (A)"
Application Program Command (Hardstatus)
.TP 27
-.BR "ESC ]" " (A)"
+.BR "ESC ] 0 ; string ^G" " (A)"
Operating System Command (Hardstatus, xterm title hack)
.TP 27
+.BR "ESC ] 83 ; cmd ^G" " (A)"
+Execute screen command. This only works if multi-user support is
+compiled into screen. The pseudo-user \*Q:window:\*U is used to
+check the access control list. Use \*Qaddacl :window: -rwx #?\*U to
+create a user with no rights and allow only the needed commands.
+.TP 27
.BR "Control-N" " (A)"
Lock Shift G1 (SO)
.TP 27
@@ -3410,6 +3779,9 @@ From Beginning of Line to Cursor
\h'\w'ESC [ Pn = 'u'\fB2\fP
Entire Line
.TP 27
+.B "ESC [ \fPPn\fB X"
+Erase character
+.TP 27
.B "ESC [ \fPPn\fB A"
Cursor Up
.TP 27
@@ -3581,9 +3953,15 @@ Reverse Video
\h'\w'ESC [ Ps = 'u'\fB?7\fP (V)
\fIWrap\fP Mode
.TP 27
+\h'\w'ESC [ Ps = 'u'\fB?9\fP
+X10 mouse tracking
+.TP 27
\h'\w'ESC [ Ps = 'u'\fB?25\fP (V)
Visible Cursor
.TP 27
+\h'\w'ESC [ Ps = 'u'\fB?1000\fP (V)
+VT200 mouse tracking
+.TP 27
.BR "ESC [ 5 i" " (A)"
Start relay to printer (ANSI Media Copy)
.TP 27
@@ -3652,9 +4030,8 @@ Function key 7 k7 stuff \e033[18~
Function key 8 k8 stuff \e033[19~
Function key 9 k9 stuff \e033[20~
Function key 10 k; stuff \e033[21~
-Function key 11 F1 stuff \e033[22~
-Function key 12 F2 stuff \e033[23~
-Backspace kb stuff \e010
+Function key 11 F1 stuff \e033[23~
+Function key 12 F2 stuff \e033[24~
Home kh stuff \e033[1~
End kH stuff \e033[4~
Insert kI stuff \e033[2~
@@ -3761,8 +4138,8 @@ Turn on autonuke. See the 'autonuke' command for more details.
Set the output buffer limit. See the 'obuflimit' command for more details.
.TP 13
.BI KJ " (str)"
-Set the kanji type of the terminal. Valid strings are \*Qjis\*U,
-\*Qeuc\*U and \*Qsjis\*U.
+Set the encoding of the terminal. See the 'encoding' command for
+valid encodings.
.TP 13
.BI AF " (str)"
Change character foreground color in an ANSI conform way. This
@@ -3779,6 +4156,12 @@ Does understand ANSI set default fg/bg color (\eE[39m / \eE[49m).
Describe a translation of characters to strings depending on the
current font. More details follow in the next section.
.TP 13
+.BI XT " (bool)"
+Terminal understands special xterm sequences (OSC, mouse tracking).
+.TP 13
+.BI C8 " (bool)"
+Terminal needs bold to display high-intensity colors (e.g. Eterm).
+.TP 13
.BI TF " (bool)"
Add missing capabilities to the termcap/info entry. (Set by default).
@@ -3817,8 +4200,8 @@ Here is an example:
termcap hp700 'XC=B\eE(K%\eE(B,\e304[,\e326\e\e\e\e,\e334]'
-This tells .I
-screen
+This tells
+.I screen
how to translate ISOlatin1 (charset 'B')
upper case umlaut characters on a hp700 terminal that has a
german charset. '\e304' gets translated to '\eE(K[\eE(B' and so on.
@@ -3877,7 +4260,8 @@ Alternate system screenrc file.
Terminal name.
.IP TERMCAP
Terminal description.
-
+.IP WINDOW
+Window number of a window (at creation time).
.SH FILES
.PD 0
@@ -3929,7 +4313,7 @@ produced by Wayne Davison, Juergen Weigert and Michael Schroeder.
.SH COPYLEFT
.nf
-Copyright (C) 1999
+Copyright (C) 1993-2002
Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
Copyright (C) 1987 Oliver Laumann
@@ -3976,12 +4360,14 @@ E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
Matthew Green (mrg@mame.mu.oz.au),
Christopher Williams (cgw@unt.edu),
Matt Mosley (mattm@access.digex.net),
-Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU).
+Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
+Johannes Zellner (johannes@zellner.org),
+Pablo Averbuj (pablo@averbuj.com).
.fi
.SH VERSION
-This is version 3.9 Its roots are a merge of a custom version
+This is version 3.9.9. Its roots are a merge of a custom version
2.3PR7 by Wayne Davison
and several enhancements to Oliver Laumann's version 2.0. Note that all versions
numbered 2.x are copyright by Oliver Laumann.
@@ -3989,11 +4375,11 @@ numbered 2.x are copyright by Oliver Laumann.
.SH AVAILABILITY
The latest official release of
.I screen
-available via anonymous ftp from prep.ai.mit.edu, nic.funet.fi or any other
+available via anonymous ftp from gnudist.gnu.org, nic.funet.fi or any other
.I GNU
distribution site. The home site of
.I screen
-is ftp.uni-erlangen.de (131.188.3.71), in the directory
+is ftp.uni-erlangen.de, in the directory
pub/utilities/screen. The subdirectory `private' contains the latest beta
testing release. If you want to help, send a note to
screen@uni-erlangen.de.
diff --git a/doc/screen.info b/doc/screen.info
index 11447c5..25800d8 100644
--- a/doc/screen.info
+++ b/doc/screen.info
@@ -1,9 +1,14 @@
-This is Info file screen.info, produced by Makeinfo-1.55 from the input
-file ./screen.texinfo.
+This is screen.info, produced by makeinfo version 4.0 from
+./screen.texinfo.
+
+INFO-DIR-SECTION General Commands
+START-INFO-DIR-ENTRY
+* Screen: (screen). Full-screen window manager.
+END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-1995 Free Software Foundation, Inc.
+ Copyright (c) 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -21,161 +26,169 @@ translation approved by the Foundation.

Indirect:
-screen.info-1: 878
-screen.info-2: 50660
-screen.info-3: 100483
-screen.info-4: 150213
+screen.info-1: 995
+screen.info-2: 50933
+screen.info-3: 100453
+screen.info-4: 149266
+screen.info-5: 195279

Tag Table:
(Indirect)
-Node: Top878
-Node: Overview2886
-Node: Getting Started6518
-Node: Invoking Screen8276
-Node: Customization16304
-Node: Startup Files16791
-Node: Colon18437
-Node: Commands19059
-Node: Default Key Bindings20017
-Node: Command Summary25596
-Node: New Window37785
-Node: Chdir38617
-Node: Screen Command39588
-Node: Setenv41289
-Node: Shell41809
-Node: Term42575
-Node: Window Types43356
-Node: Selecting47674
-Node: Next and Previous48228
-Node: Other Window48754
-Node: Select49163
-Node: Session Management49831
-Node: Detach50660
-Node: Power Detach51945
-Node: Lock52584
-Node: Multiuser Session53470
-Node: Multiuser54432
-Node: Acladd54819
-Node: Aclchg55384
-Node: Acldel56790
-Node: Aclgrp57125
-Node: Displays57776
-Node: Umask58070
-Node: Wall59051
-Node: Writelock59288
-Node: Su60184
-Node: Session Name60984
-Node: Suspend61531
-Node: Quit61863
-Node: Regions62288
-Node: Split62773
-Node: Focus63063
-Node: Only63325
-Node: Remove63489
-Node: Caption63698
-Node: Window Settings64443
-Node: Naming Windows65178
-Node: Title Command66678
-Node: Dynamic Titles66952
-Node: Title Prompts68486
-Node: Title Screenrc69567
-Node: Console71206
-Node: Kill71649
-Node: Login72541
-Node: Mode73360
-Node: Monitor73759
-Node: Windows75172
-Node: Hardstatus76234
-Node: Virtual Terminal77427
-Node: Control Sequences78485
-Node: Input Translation85315
-Node: Digraph89831
-Node: Bell90623
-Node: Clear92502
-Node: Info92705
-Node: Redisplay94567
-Node: Wrap95698
-Node: Reset96449
-Node: Window Size96767
-Node: Character Processing97612
-Node: Copy and Paste100483
-Node: Copy101088
-Node: Line Termination101933
-Node: Scrollback102342
-Node: Copy Mode Keys103079
-Node: Movement103894
-Node: Marking105048
-Node: Repeat count105423
-Node: Searching105737
-Node: Specials105999
-Node: Paste107953
-Node: Registers110625
-Node: Screen-Exchange111631
-Node: History112714
-Node: Subprocess Execution113454
-Node: Exec113818
-Node: Using Exec115564
-Node: Key Binding117403
-Node: Bind118046
-Node: Bind Examples119033
-Node: Command Character119713
-Node: Help121254
-Node: Bindkey121767
-Node: Bindkey Examples123313
-Node: Bindkey Control124202
-Node: Flow Control124799
-Node: Flow Control Summary125375
-Node: Flow128309
-Node: XON/XOFF129083
-Node: Termcap129456
-Node: Window Termcap130313
-Node: Dump Termcap135556
-Node: Termcap Syntax136271
-Node: Termcap Examples138438
-Node: Special Capabilities140479
-Node: Autonuke143042
-Node: Obuflimit143692
-Node: Character Translation144521
-Node: Message Line147134
-Node: Privacy Message148045
-Node: Hardware Status Line148542
-Node: Last Message150213
-Node: Message Wait150640
-Node: Logging151066
-Node: Hardcopy151390
-Node: Log152186
-Node: Startup153802
-Node: echo154209
-Node: sleep154617
-Node: Startup Message154958
-Node: Miscellaneous155231
-Node: At156339
-Node: Break158333
-Node: Debug159980
-Node: License160457
-Node: Nethack160722
-Node: Nonblock161400
-Node: Number161854
-Node: Silence162224
-Node: Time163160
-Node: Verbose163534
-Node: Version163868
-Node: Zombie164077
-Node: Printcmd165131
-Node: Sorendition165837
-Node: String Escapes166489
-Node: Environment167814
-Node: Files168849
-Node: Credits169936
-Node: Bugs171849
-Node: Known Bugs172319
-Node: Reporting Bugs174413
-Node: Availability175179
-Node: Installation175723
-Node: Socket Directory176113
-Node: Compiling Screen176643
-Node: Concept Index178035
-Node: Command Index180092
-Node: Keystroke Index188392
+Node: Top995
+Node: Overview3004
+Node: Getting Started6634
+Node: Invoking Screen8389
+Node: Customization16916
+Node: Startup Files17462
+Node: Source19108
+Node: Colon19785
+Node: Commands20399
+Node: Default Key Bindings21356
+Node: Command Summary27035
+Node: New Window40444
+Node: Chdir41245
+Node: Screen Command42216
+Node: Setenv43917
+Node: Shell44437
+Node: Term45203
+Node: Window Types45984
+Node: Selecting50303
+Node: Next and Previous50933
+Node: Other Window51463
+Node: Select51871
+Node: Windowlist52549
+Node: Session Management53445
+Node: Detach54274
+Node: Power Detach55661
+Node: Lock56300
+Node: Multiuser Session57186
+Node: Multiuser58148
+Node: Acladd58535
+Node: Aclchg59100
+Node: Acldel60506
+Node: Aclgrp60841
+Node: Displays61492
+Node: Umask61786
+Node: Wall62735
+Node: Writelock62972
+Node: Su63868
+Node: Session Name64668
+Node: Suspend65215
+Node: Quit65547
+Node: Regions65971
+Node: Split66538
+Node: Focus66828
+Node: Only67406
+Node: Remove67570
+Node: Resize67778
+Node: Caption68426
+Node: Fit69183
+Node: Window Settings69485
+Node: Naming Windows70220
+Node: Title Command71721
+Node: Dynamic Titles71995
+Node: Title Prompts73531
+Node: Title Screenrc74612
+Node: Console76251
+Node: Kill76694
+Node: Login77583
+Node: Mode78400
+Node: Monitor78798
+Node: Windows80209
+Node: Hardstatus81269
+Node: Virtual Terminal82462
+Node: Control Sequences83520
+Node: Input Translation91007
+Node: Digraph95478
+Node: Bell96270
+Node: Clear98149
+Node: Info98352
+Node: Redisplay100453
+Node: Wrap101584
+Node: Reset102335
+Node: Window Size102653
+Node: Character Processing103506
+Node: Copy and Paste107824
+Node: Copy108429
+Node: Line Termination109276
+Node: Scrollback109685
+Node: Copy Mode Keys110422
+Node: Movement111236
+Node: Marking112390
+Node: Repeat count112765
+Node: Searching113079
+Node: Specials113470
+Node: Paste115424
+Node: Registers118182
+Node: Screen Exchange119274
+Node: History120679
+Node: Subprocess Execution121419
+Node: Exec121783
+Node: Using Exec123529
+Node: Key Binding125368
+Node: Bind126011
+Node: Bind Examples127255
+Node: Command Character128311
+Node: Help129946
+Node: Bindkey130554
+Node: Bindkey Examples132104
+Node: Bindkey Control132993
+Node: Flow Control133590
+Node: Flow Control Summary134166
+Node: Flow137100
+Node: XON/XOFF137874
+Node: Termcap138247
+Node: Window Termcap139104
+Node: Dump Termcap144345
+Node: Termcap Syntax145059
+Node: Termcap Examples147225
+Node: Special Capabilities149266
+Node: Autonuke152041
+Node: Obuflimit152691
+Node: Character Translation153520
+Node: Message Line156134
+Node: Privacy Message157045
+Node: Hardware Status Line157542
+Node: Last Message159215
+Node: Message Wait159642
+Node: Logging160068
+Node: Hardcopy160392
+Node: Log161327
+Node: Startup163104
+Node: echo163511
+Node: sleep163919
+Node: Startup Message164260
+Node: Miscellaneous164533
+Node: At165767
+Node: Break167761
+Node: Debug169407
+Node: License169884
+Node: Nethack170149
+Node: Nonblock170826
+Node: Number171280
+Node: Silence171650
+Node: Time172586
+Node: Verbose173178
+Node: Version173512
+Node: Zombie173721
+Node: Printcmd174775
+Node: Sorendition175481
+Node: Attrcolor175911
+Node: Setsid176960
+Node: Eval177477
+Node: String Escapes177671
+Node: Environment182807
+Node: Files183903
+Node: Credits184991
+Node: Bugs187001
+Node: Known Bugs187471
+Node: Reporting Bugs189565
+Node: Availability190331
+Node: Installation190875
+Node: Socket Directory191265
+Node: Compiling Screen191795
+Node: Concept Index193187
+Node: Command Index195279
+Node: Keystroke Index204113

End Tag Table
diff --git a/doc/screen.info-1 b/doc/screen.info-1
index d9d4b04..63a2c6a 100644
--- a/doc/screen.info-1
+++ b/doc/screen.info-1
@@ -1,9 +1,14 @@
-This is Info file screen.info, produced by Makeinfo-1.55 from the input
-file ./screen.texinfo.
+This is screen.info, produced by makeinfo version 4.0 from
+./screen.texinfo.
+
+INFO-DIR-SECTION General Commands
+START-INFO-DIR-ENTRY
+* Screen: (screen). Full-screen window manager.
+END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-1995 Free Software Foundation, Inc.
+ Copyright (c) 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -26,7 +31,7 @@ Screen
******
This file documents the `Screen' virtual terminal manager, version
-3.9.0.
+3.9.11.
* Menu:
@@ -96,8 +101,8 @@ window. The only exception to this is the one keystroke that is used to
initiate a command to the window manager. By default, each command
begins with a control-a (abbreviated `C-a' from now on), and is
followed by one other keystroke. The command character (*note Command
-Character::.) and all the key bindings (*note Key Binding::.) can be
-fully customized to be anything you like, though they are always two
+Character::) and all the key bindings (*note Key Binding::) can be fully
+customized to be anything you like, though they are always two
characters in length.
`Screen' does not understand the prefix `C-' to mean control.
@@ -143,16 +148,16 @@ or just `set term=mytermtype', for example.)
If you're impatient and want to get started without doing a lot more
reading, you should remember this one command: `C-a ?' (*note Key
-Binding::.). Typing these two characters will display a list of the
+Binding::). Typing these two characters will display a list of the
available `screen' commands and their bindings. Each keystroke is
-discussed in the section on keystrokes (*note Default Key Bindings::.).
-Another section (*note Customization::.) deals with the contents of your
+discussed in the section on keystrokes (*note Default Key Bindings::).
+Another section (*note Customization::) deals with the contents of your
`.screenrc'.
If your terminal is a "true" auto-margin terminal (it doesn't allow
the last position on the screen to be updated without scrolling the
screen) consider to use a version of your terminal's termcap that has
-automatic margins turned *off*. This will ensure an accurate and
+automatic margins turned _off_. This will ensure an accurate and
optimal update of the screen in all circumstances. Most terminals
nowadays have "magic" margins (automatic margins plus usable last
column). This is the VT100 style type and perfectly suited for
@@ -175,7 +180,7 @@ Invoking `Screen'
Screen has the following command-line options:
`-a'
- Include *all* capabilities (with some minor exceptions) in each
+ Include _all_ capabilities (with some minor exceptions) in each
window's termcap, even if `screen' must redraw parts of the display
in order to implement a function.
@@ -192,7 +197,7 @@ Invoking `Screen'
`-d [PID.SESSIONNAME]'
`-D [PID.SESSIONNAME]'
Do not start `screen', but instead detach a `screen' session
- running elsewhere (*note Detach::.). `-d' has the same effect as
+ running elsewhere (*note Detach::). `-d' has the same effect as
typing `C-a d' from the controlling terminal for the session.
`-D' is the equivalent to the power detach key. If no session can
be detached, this option is ignored. In combination with the
@@ -222,7 +227,7 @@ Invoking `Screen'
`-D -RR'
Attach here and now. Whatever that means, just do it.
- *Note*: It is a good idea to check the status of your sessions
+ _Note_: It is a good idea to check the status of your sessions
with `screen -list' before using this option.
`-e XY'
@@ -235,35 +240,35 @@ Invoking `Screen'
an already running session, this option only changes the command
character of the attaching user. This option is equivalent to the
commands `defescape' or `escape' respectively. (*note Command
- Character::.).
+ Character::).
`-f'
`-fn'
`-fa'
Set flow-control to on, off, or automatic switching mode,
respectively. This option is equivalent to the `defflow' command
- (*note Flow Control::.).
+ (*note Flow Control::).
`-h NUM'
Set the history scrollback buffer to be NUM lines high.
- Equivalent to the `defscrollback' command (*note Copy::.).
+ Equivalent to the `defscrollback' command (*note Copy::).
`-i'
Cause the interrupt key (usually `C-c') to interrupt the display
immediately when flow control is on. This option is equivalent to
the `interrupt' argument to the `defflow' command (*note Flow
- Control::.). Its use is discouraged.
+ Control::). Its use is discouraged.
`-l'
`-ln'
Turn login mode on or off (for `/etc/utmp' updating). This option
- is equivalent to the `deflogin' command (*note Login::.).
+ is equivalent to the `deflogin' command (*note Login::).
`-ls [MATCH]'
`-list [MATCH]'
Do not start `screen', but instead print a list of session
identification strings (usually of the form PID.TTY.HOST; *note
- Session Name::.). Sessions marked `detached' can be resumed with
+ Session Name::). Sessions marked `detached' can be resumed with
`screen -r'. Those marked `attached' are running and have a
controlling terminal. If the session runs in multiuser mode, it
is marked `multi'. Sessions marked as `unreachable' either live
@@ -279,7 +284,7 @@ Invoking `Screen'
Tell `screen' that your auto-margin terminal allows programs to
write to the last column of the last row of the screen without
scrolling. This can also be set in your `.screenrc' by specifying
- `xn' in a `termcap' command (*note Termcap::.).
+ `xn' in a `termcap' command (*note Termcap::).
`-m'
Tell `screen' to ignore the `$STY' environment variable. When
@@ -287,13 +292,13 @@ Invoking `Screen'
regardless of whether `screen' is being called from within another
`screen' session or not. This flag has a special meaning in
connection with the `-d' option:
- `-m -d'
- Start `screen' in *detached* mode. This creates a new session
+ `-d -m'
+ Start `screen' in _detached_ mode. This creates a new session
but doesn't attach to it. This is useful for system startup
scripts.
- `-m -D'
- This also starts `screen' in *detached* mode, but doesn't fork
+ `-D -m'
+ This also starts `screen' in _detached_ mode, but doesn't fork
a new process. The command exits if the session terminates.
`-q'
@@ -310,7 +315,7 @@ Invoking `Screen'
`-r SESSIONOWNER/[PID.SESSIONNAME]'
Resume a detached `screen' session. No other options (except
combinations with `-d' or `-D') may be specified, though the
- session name (*note Session Name::.) may be needed to distinguish
+ session name (*note Session Name::) may be needed to distinguish
between multiple detached `screen' sessions. The second form is
used to connect to another user's screen session which runs in
multiuser mode. This indicates that screen should look for
@@ -321,26 +326,32 @@ Invoking `Screen'
successful, all other command-line options are ignored. If no
detached session exists, start a new session using the specified
options, just as if `-R' had not been specified. This option is
- set by default if screen is run as a login-shell. For combinations
- with the `-D'/`-d' option see there.
+ set by default if screen is run as a login-shell (actually screen
+ uses `-xRR' in that case). For combinations with the `-D'/`-d'
+ option see there.
`-s PROGRAM'
Set the default shell to be PROGRAM. By default, `screen' uses
the value of the environment variable `$SHELL', or `/bin/sh' if it
is not defined. This option is equivalent to the `shell' command
- (*note Shell::.).
+ (*note Shell::).
`-S SESSIONNAME'
Set the name of the new session to SESSIONNAME. This option can
be used to specify a meaningful name for the session in place of
the default TTY.HOST suffix. This name identifies the session for
the `screen -list' and `screen -r' commands. This option is
- equivalent to the `sessionname' command (*note Session Name::.).
+ equivalent to the `sessionname' command (*note Session Name::).
`-t NAME'
Set the title (name) for the default shell or specified program.
This option is equivalent to the `shelltitle' command (*note
- Shell::.).
+ Shell::).
+
+`-U'
+ Run screen in UTF-8 mode. This option tells screen that your
+ terminal sends and understands UTF-8 encoded characters. It also
+ sets the default encoding for new windows to `utf8'.
`-v'
Print the version number.
@@ -356,6 +367,12 @@ Invoking `Screen'
Attach to a session which is already attached elsewhere
(multi-display mode).
+`-X'
+ Send the specified command to a running screen session. You can use
+ the `-d' or `-r' option to tell screen to look only for attached
+ or detached screen sessions. Note that this command doesn't work
+ if the session is password protected.
+

File: screen.info, Node: Customization, Next: Commands, Prev: Invoking Screen, Up: Top
@@ -369,10 +386,11 @@ be executed at startup, or on the fly using the `colon' command.
* Menu:
* Startup Files:: The `.screenrc' file.
+* Source:: Read commands from a file.
* Colon:: Entering customization commands interactively.

-File: screen.info, Node: Startup Files, Next: Colon, Up: Customization
+File: screen.info, Node: Startup Files, Next: Source, Up: Customization
The `.screenrc' file
====================
@@ -384,8 +402,8 @@ following ways: For the global screenrc file `screen' searches for the
environment variable `$SYSSCREENRC' (this override feature may be
disabled at compile-time). The user specific screenrc file is searched
for in `$SCREENRC', then ``$HOME'/.screenrc'. The command line option
-`-c' specifies which file to use (*note Invoking Screen::.. Commands
-in these files are used to set options, bind commands to keys, and to
+`-c' specifies which file to use (*note Invoking Screen::. Commands in
+these files are used to set options, bind commands to keys, and to
automatically establish one or more windows at the beginning of your
`screen' session. Commands are listed one per line, with empty lines
being ignored. A command's arguments are separated by tabs or spaces,
@@ -403,7 +421,25 @@ distribution: `etc/screenrc' and `etc/etcscreenrc'. They contain a
number of useful examples for various commands.

-File: screen.info, Node: Colon, Prev: Startup Files, Up: Customization
+File: screen.info, Node: Source, Next: Colon, Prev: Startup Files, Up: Customization
+
+Source
+======
+
+ - Command: source file
+ (none)
+ Read and execute commands from file FILE. Source commands may be
+ nested to a maximum recursion level of ten. If FILE is not an
+ absolute path and screen already processes a source command,
+ the parent directory of the running source command file is used to
+ search for the new command file before screen's current directory.
+
+ Note that termcap/terminfo/termcapinfo commands only work at
+ startup and reattach time, so they must be reached via the
+ default screenrc files to have an effect.
+
+
+File: screen.info, Node: Colon, Prev: Source, Up: Customization
Colon
=====
@@ -418,7 +454,7 @@ Colon
exists, as of version 3.3. Change default settings with commands
starting with `def'. You might think of this as the `ex' command
mode of `screen', with `copy' as its `vi' command mode (*note Copy
- and Paste::.).
+ and Paste::).

File: screen.info, Node: Commands, Next: New Window, Prev: Customization, Up: Top
@@ -428,7 +464,7 @@ Commands
A command in `screen' can either be bound to a key, invoked from a
screenrc file, or called from the `colon' prompt (*note
-Customization::.). As of version 3.3, all commands can be bound to
+Customization::). As of version 3.3, all commands can be bound to
keys, although some may be less useful than others. For a number of
real life working examples of the most important commands see the files
`etc/screenrc' and `etc/etcscreenrc' of your screen distribution.
@@ -463,16 +499,19 @@ Thus, both `C-a c' and `C-a C-c' can be used to create a window.
The following table shows the default key bindings:
`C-a ''
-`C-a "'
(select)
Prompt for a window identifier and switch. *Note Selecting::.
+`C-a "'
+ (windowlist -b)
+ Present a list of all windows for selection. *Note Selecting::.
+
`C-a 0...9, -'
(select 0...select 9, select -)
Switch to window number 0...9, or the blank window. *Note
Selecting::.
-`C-a Tab'
+`C-a <Tab>'
(focus)
Switch the input focus to the next region. *Note Regions::.
@@ -572,7 +611,7 @@ Thus, both `C-a c' and `C-a C-c' can be used to create a window.
(monitor) Toggle monitoring of the current window. *Note
Monitor::.
-`C-a SPC'
+`C-a <SPC>'
`C-a n'
`C-a C-n'
(next)
@@ -585,7 +624,7 @@ Thus, both `C-a c' and `C-a C-c' can be used to create a window.
`C-a p'
`C-a C-p'
`C-a C-h'
-`C-a BackSpace'
+`C-a <BackSpace>'
(prev)
Switch to the previous window (opposite of `C-a n'). *Note
Selecting::.
@@ -673,7 +712,7 @@ Thus, both `C-a c' and `C-a C-c' can be used to create a window.
`C-a ['
`C-a C-['
-`C-a ESC'
+`C-a <ESC>'
(copy)
Enter copy/scrollback mode. *Note Copy::.
@@ -691,16 +730,16 @@ Thus, both `C-a c' and `C-a C-c' can be used to create a window.
`C-a >'
(writebuf)
Write the paste buffer out to the screen-exchange file. *Note
- Screen-Exchange::.
+ Screen Exchange::.
`C-a <'
(readbuf)
- Read the screen-exchange file into the paste buffer. *Note
- Screen-Exchange::.
+ Read the screen-exchange file into the paste buffer. *Note Screen
+ Exchange::.
`C-a ='
(removebuf)
- Delete the screen-exchange file. *Note Screen-Exchange::.
+ Delete the screen-exchange file. *Note Screen Exchange::.
`C-a _'
(silence)
@@ -734,7 +773,7 @@ Command Summary
Inherit permissions granted to a group leader. *Note Multiuser
Session::.
-`aclumask [USERS]+\-BITS ...'
+`aclumask [USERS]+/-BITS ...'
Predefine access to new windows. *Note Umask::.
`activity MESSAGE'
@@ -746,9 +785,12 @@ Command Summary
`allpartial STATE'
Set all windows to partial refresh. *Note Redisplay::.
-`at [IDENT][`#'|`*'|`%'] COMMAND [ARGS]'
+`at [IDENT][#|*|%] COMMAND [ARGS]'
Execute a command at other displays or windows. *Note At::.
+`attrcolor ATTRIB [ATTRIBUTE/COLOR-MODIFIER]'
+ Map attributes to colors. *Note Attrcolor::.
+
`autodetach STATE'
Automatically detach the session on SIGHUP. *Note Detach::.
@@ -756,10 +798,13 @@ Command Summary
Enable a clear screen to discard unwritten output. *Note
Autonuke::.
+`bce [STATE]'
+ Change background color erase. *Note Character Processing::.
+
`bell_msg [MESSAGE]'
Set the bell notification message. *Note Bell::.
-`bind KEY [COMMAND [ARGS]]'
+`bind [-c CLASS] KEY [COMMAND [ARGS]]'
Bind a command to a key. *Note Bind::.
`bindkey [OPTS] [STRING [CMD ARGS]]'
@@ -772,7 +817,7 @@ Command Summary
Specify how to generate breaks. *Note Break::.
`bufferfile [EXCHANGE-FILE]'
- Select a file for screen-exchange. *Note Screen-Exchange::.
+ Select a file for screen-exchange. *Note Screen Exchange::.
`c1 [STATE]'
Change c1 code processing. *Note Character Processing::.
@@ -796,7 +841,7 @@ Command Summary
`colon'
Enter a `screen' command. *Note Colon::.
-`command'
+`command [-c CLASS]'
Simulate the screen escape key. *Note Command Character::.
`compacthist [STATE]'
@@ -820,6 +865,9 @@ Command Summary
`defautonuke STATE'
Select default autonuke behavior. *Note Autonuke::.
+`defbce STATE'
+ Select background color erase. *Note Character Processing::.
+
`defbreaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]'
Specify the default for generating breaks. *Note Break::.
@@ -831,6 +879,9 @@ Command Summary
Change defaul character set slot designation. *Note Character
Processing::.
+`defencoding ENC'
+ Select default window encoding. *Note Character Processing::.
+
`defescape XY'
Set the default command and `meta' characters. *Note Command
Character::.
@@ -845,9 +896,8 @@ Command Summary
`defhstatus [STATUS]'
Select default window hardstatus line. *Note Hardstatus::.
-`defkanji WTYPE'
- Select default GR processing behavior. *Note Character
- Processing::.
+`deflog STATE'
+ Select default window logging behavior. *Note Log::.
`deflogin STATE'
Select default utmp logging behavior. *Note Login::.
@@ -874,6 +924,9 @@ Command Summary
Select the default inter-character timeout when pasting. *Note
Paste::.
+`defutf8 STATE'
+ Select default character encoding. *Note Character Processing::.
+
`defwrap STATE'
Set default line-wrapping behavior. *Note Wrap::.
@@ -883,12 +936,15 @@ Command Summary
`defzombie [KEYS]'
Keep dead windows. *Note Zombie::.
-`detach'
+`detach [-h]'
Disconnect `screen' from the terminal. *Note Detach::.
`digraph'
Enter digraph sequence. *Note Digraph::.
+`dinfo'
+ Display terminal information. *Note Info::.
+
`displays'
List currently active user interfaces. *Note Displays::.
@@ -898,9 +954,15 @@ Command Summary
`echo [-n] MESSAGE'
Display a message on startup. *Note Startup::.
+`encoding ENC [DENC]'
+ Set the encoding of a window. *Note Character Processing::.
+
`escape XY'
Set the command and `meta' characters. *Note Command Character::.
+`eval COMMAND1 [COMMAND2 ...]'
+ Parse and execute each argument. *Note Eval::.
+
`exec [[FDPAT] COMMAND [ARGS ...]]'
Run a subprocess (filter). *Note Exec::.
@@ -916,7 +978,7 @@ Command Summary
`gr [STATE]'
Change GR charset processing. *Note Character Processing::.
-`hardcopy'
+`hardcopy [-h] [FILE]'
Write out the contents of the current window. *Note Hardcopy::.
`hardcopy_append STATE'
@@ -928,10 +990,10 @@ Command Summary
`hardstatus [STATE]'
Use the hardware status line. *Note Hardware Status Line::.
-`height [LINES]'
+`height [LINES [COLS]]'
Set display height. *Note Window Size::.
-`help'
+`help [-c CLASS]'
Display current key bindings. *Note Help::.
`history'
@@ -940,15 +1002,15 @@ Command Summary
`hstatus STATUS'
Change the window's hardstatus line. *Note Hardstatus::.
+`ignorecase [STATE]'
+ Ignore character case in searches. *Note Searching::.
+
`info'
- Display terminal settings. *Note Info::.
+ Display window settings. *Note Info::.
`ins_reg [KEY]'
Removed, use `paste' instead. *Note Registers::.
-`kanji WTYPE [DTYPE]'
- Set the kanji type of a window. *Note Character Processing::.
-
`kill'
Destroy the current window. *Note Kill::.
@@ -1058,28 +1120,31 @@ Command Summary
`quit'
Kill all windows and exit. *Note Quit::.
-`readbuf'
- Read the paste buffer from the screen-exchange file. *Note
- Screen-Exchange::.
+`readbuf [-e ENCODING] [FILENAME]'
+ Read the paste buffer from the screen-exchange file. *Note Screen
+ Exchange::.
-`readreg [REG [FILE]]'
+`readreg [-e ENCODING] [REG [FILE]]'
Load a register from paste buffer or file. *Note Registers::.
`redisplay'
Redisplay the current window. *Note Redisplay::.
-`register KEY STRING'
+`register [-e ENCODING] KEY STRING'
Store a string to a register. *Note Registers::.
`remove'
Kill current region. *Note Regions::.
`removebuf'
- Delete the screen-exchange file. *Note Screen-Exchange::.
+ Delete the screen-exchange file. *Note Screen Exchange::.
`reset'
Reset the terminal settings for the window. *Note Reset::.
+`resize [(+/-)lines]'
+ Grow or shrink a region
+
`screen [OPTS] [N] [CMD [ARGS]]'
Create a new window. *Note Screen Command::.
@@ -1095,6 +1160,9 @@ Command Summary
`setenv [VAR [STRING]]'
Set an environment variable for new windows. *Note Setenv::.
+`setsid STATE'
+ Controll process group creation for windows. *Note Setsid::.
+
`shell COMMAND'
Set the default program for new windows. *Note Shell::.
@@ -1113,6 +1181,9 @@ Command Summary
`slowpaste MSEC'
Slow down pasting in windows. *Note Paste::.
+`source FILE'
+ Run commands from a file. *Note Source::.
+
`sorendition [ATTR [COLOR]]'
Change text highlighting. *Note Sorendition::.
@@ -1144,18 +1215,22 @@ Command Summary
`termcapinfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
Ditto, for both systems. *Note Termcap Syntax::.
-`time'
+`time [STRING]'
Display time and load average. *Note Time::.
`title [WINDOWTITLE]'
Set the name of the current window. *Note Title Command::.
-`umask [USERS]+\-BITS ...'
+`umask [USERS]+/-BITS ...'
Synonym to `aclumask'. *Note Umask::.
`unsetenv VAR'
Unset environment variable for new windows. *Note Setenv::.
+`utf8 [STATE [DSTATE]]'
+ Select character encoding of the current window. *Note Character
+ Processing::.
+
`vbell [STATE]'
Use visual bell. *Note Bell::.
@@ -1171,18 +1246,21 @@ Command Summary
`wall MESSAGE'
Write a message to all displays. *Note Multiuser Session::.
-`width [NUM]'
+`width [COLS [LINES]]'
Set the width of the window. *Note Window Size::.
+`windowlist [-b] | string [STRING] | title [TITLE]'
+ Present a list of all windows for selection. *Note Windowlist::.
+
`windows'
List active windows. *Note Windows::.
`wrap [STATE]'
Control line-wrap behavior. *Note Wrap::.
-`writebuf'
- Write paste buffer to screen-exchange file. *Note
- Screen-Exchange::.
+`writebuf [-e ENCODING] [FILENAME]'
+ Write paste buffer to screen-exchange file. *Note Screen
+ Exchange::.
`writelock ON|OFF|AUTO'
Grant exclusive write permission. *Note Multiuser Session::.
@@ -1204,9 +1282,8 @@ New Window
This section describes the commands for creating a new window for
running programs. When a new window is created, the first available
-number from the range 0...9 is assigned to it. There can be no more
-than 10 windows active at any one time unless `screen' was compiled
-with a higher MAXWIN setting.
+number from the range 0...9 is assigned to it. The number of windows
+is limited at compile-time by the MAXWIN configuration parameter.
* Menu:
@@ -1223,7 +1300,7 @@ File: screen.info, Node: Chdir, Next: Screen Command, Up: New Window
Chdir
=====
- - Command: chdir [DIRECTORY]
+ - Command: chdir [directory]
(none)
Change the current directory of `screen' to the specified directory
or, if called without an argument, to your home directory (the
@@ -1232,7 +1309,7 @@ Chdir
or by means of `C-a : screen ...' or `C-a c' use this as their
default directory. Without a `chdir' command, this would be the
directory from which `screen' was invoked. Hardcopy and log files
- are always written to the *window's* default directory, *not* the
+ are always written to the _window's_ default directory, _not_ the
current directory of the process running in the window. You can
use this command multiple times in your `.screenrc' to start
various windows in different default directories, but the last
@@ -1244,7 +1321,7 @@ File: screen.info, Node: Screen Command, Next: Setenv, Prev: Chdir, Up: New
Screen Command
==============
- - Command: screen [OPTS] [N] [CMD [ARGS]]
+ - Command: screen [opts] [n] [cmd [args]]
(`C-a c', `C-a C-c')
Establish a new window. The flow-control options (`-f', `-fn' and
`-fa'), title option (`-t'), login options (`-l' and `-ln') ,
@@ -1282,7 +1359,7 @@ File: screen.info, Node: Setenv, Next: Shell, Prev: Screen Command, Up: New
Setenv
======
- - Command: setenv VAR STRING
+ - Command: setenv var string
(none)
Set the environment variable VAR to value STRING. If only VAR is
specified, the user will be prompted to enter a value. If no
@@ -1290,7 +1367,7 @@ Setenv
variable and value. The environment is inherited by all
subsequently forked shells.
- - Command: unsetenv VAR
+ - Command: unsetenv var
(none)
Unset an environment variable.
@@ -1300,8 +1377,8 @@ File: screen.info, Node: Shell, Next: Term, Prev: Setenv, Up: New Window
Shell
=====
- - Command: shell COMMAND
- - Command: defshell COMMAND
+ - Command: shell command
+ - Command: defshell command
(none)
Set the command to be used to create a new shell. This overrides
the value of the environment variable `$SHELL'. This is useful if
@@ -1311,7 +1388,7 @@ Shell
`defshell' is currently a synonym to the `shell' command.
- - Command: shelltitle TITLE
+ - Command: shelltitle title
(none)
Set the title for all shells created during startup or by the C-a
C-c command. *Note Naming Windows::, for details about what
@@ -1323,7 +1400,7 @@ File: screen.info, Node: Term, Next: Window Types, Prev: Shell, Up: New Wind
Term
====
- - Command: term TERM
+ - Command: term term
(none)
In each window `screen' opens, it sets the `$TERM' variable to
`screen' by default, unless no description for `screen' is
@@ -1343,7 +1420,7 @@ Window Types
============
Screen provides three different window types. New windows are created
-with `screen''s `screen' command (*note Screen Command::.). The first
+with `screen''s `screen' command (*note Screen Command::). The first
parameter to the `screen' command defines which type of window is
created. The different window types are all special cases of the normal
type. They have been added in order to allow `screen' to be used
@@ -1432,12 +1509,13 @@ efficiently as a console with 100 or more windows.
`f'
LFLOW. The remote host will send flow control information.
- (Ignored at the moment.) Additional flags for debugging are
+ (Ignored at the moment.) Additional flags for debugging are
`x', `t' and `n' (XDISPLOC, TSPEED and NEWENV).
For telnet windows, the command `break' sends the telnet code `IAC
BREAK' (decimal 243) to the remote host.
+

File: screen.info, Node: Selecting, Next: Session Management, Prev: New Window, Up: Top
@@ -1446,79 +1524,12 @@ Selecting a Window
This section describes the commands for switching between windows in
an `screen' session. The windows are numbered from 0 to 9, and are
-created in that order by default (*note New Window::.).
+created in that order by default (*note New Window::).
* Menu:
* Next and Previous:: Forward or back one window.
* Other Window:: Switch back and forth between two windows.
* Select:: Switch to a window (and to one after `kill').
-
-
-File: screen.info, Node: Next and Previous, Next: Other Window, Up: Selecting
-
-Moving Back and Forth
-=====================
-
- - Command: next
- (`C-a SPC', `C-a n', `C-a C-n')
- Switch to the next window. This command can be used repeatedly to
- cycle through the list of windows. (On some terminals, C-SPC
- generates a NUL character, so you must release the control key
- before pressing space.)
-
- - Command: prev
- (`C-a p', `C-a C-p')
- Switch to the previous window (the opposite of `C-a n').
-
-
-File: screen.info, Node: Other Window, Next: Select, Prev: Next and Previous, Up: Selecting
-
-Other Window
-============
-
- - Command: other
- (`C-a C-a')
- Switch to the last window displayed. Note that this command
- defaults to the command character typed twice, unless overridden.
- For instance, if you use the option `-e]x', this command becomes
- `]]' (*note Command Character::.).
-
-
-File: screen.info, Node: Select, Prev: Other Window, Up: Selecting
-
-Select
-======
-
- - Command: select [N]
- (`C-a N', `C-a '', `C-a "')
- Switch to the window with the number N. If no window number is
- specified, you get prompted for an identifier. This can be a
- window name (title) or a number. When a new window is
- established, the lowest available number is assigned to this
- window. Thus, the first window can be activated by `select 0';
- there can be no more than 10 windows present simultaneously
- (unless screen is compiled with a higher MAXWIN setting). The
- special command `select -' switches to a blank window.
-
-
-File: screen.info, Node: Session Management, Next: Regions, Prev: Selecting, Up: Top
-
-Session Management Commands
-***************************
-
- Perhaps the most useful feature of `screen' is the way it allows the
-user to move a session between terminals, by detaching and reattaching.
-This also makes life easier for modem users who have to deal with
-unexpected loss of carrier.
-
-* Menu:
-
-* Detach:: Disconnect `screen' from your terminal.
-* Power Detach:: Detach and log out.
-* Lock:: Lock your terminal temporarily.
-* Multiuser Session:: Changing number of allowed users.
-* Session Name:: Rename your session for later reattachment.
-* Suspend:: Suspend your session.
-* Quit:: Terminate your session.
+* Windowlist:: Present a list of all windows for selection.
diff --git a/doc/screen.info-2 b/doc/screen.info-2
index 2995343..21dfb8d 100644
--- a/doc/screen.info-2
+++ b/doc/screen.info-2
@@ -1,9 +1,14 @@
-This is Info file screen.info, produced by Makeinfo-1.55 from the input
-file ./screen.texinfo.
+This is screen.info, produced by makeinfo version 4.0 from
+./screen.texinfo.
+
+INFO-DIR-SECTION General Commands
+START-INFO-DIR-ENTRY
+* Screen: (screen). Full-screen window manager.
+END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-1995 Free Software Foundation, Inc.
+ Copyright (c) 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -20,12 +25,102 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Next and Previous, Next: Other Window, Up: Selecting
+
+Moving Back and Forth
+=====================
+
+ - Command: next
+ (`C-a <SPC>', `C-a n', `C-a C-n')
+ Switch to the next window. This command can be used repeatedly to
+ cycle through the list of windows. (On some terminals, C-<SPC>
+ generates a NUL character, so you must release the control key
+ before pressing space.)
+
+ - Command: prev
+ (`C-a p', `C-a C-p')
+ Switch to the previous window (the opposite of `C-a n').
+
+
+File: screen.info, Node: Other Window, Next: Select, Prev: Next and Previous, Up: Selecting
+
+Other Window
+============
+
+ - Command: other
+ (`C-a C-a')
+ Switch to the last window displayed. Note that this command
+ defaults to the command character typed twice, unless overridden.
+ For instance, if you use the option `-e]x', this command becomes
+ `]]' (*note Command Character::).
+
+
+File: screen.info, Node: Select, Next: Windowlist, Prev: Other Window, Up: Selecting
+
+Select
+======
+
+ - Command: select [n]
+ (`C-a N', `C-a '')
+ Switch to the window with the number N. If no window number is
+ specified, you get prompted for an identifier. This can be a
+ window name (title) or a number. When a new window is
+ established, the lowest available number is assigned to this
+ window. Thus, the first window can be activated by `select 0';
+ there can be no more than 10 windows present simultaneously
+ (unless screen is compiled with a higher MAXWIN setting). The
+ special command `select -' switches to a blank window.
+
+
+File: screen.info, Node: Windowlist, Prev: Select, Up: Selecting
+
+Windowlist
+==========
+
+ - Command: windowlist [-b] | string [STRING] | title [TITLE]
+ (`C-a "')
+ Display all windows in a table for visual window selection. The
+ desired window can be selected via the standard movement keys
+ (*note Movement::) and activated via the return key. If the `-b'
+ option is given, screen will switch to the blank window before
+ presenting the list, so that the current window is also selectable.
+
+ The table format can be changed with the string and title option,
+ the title is displayed as table heading, while the lines are made
+ by using the string setting. The default setting is `Num
+ Name%=Flags' for the title and `%3n %t%=%f' for the lines. See the
+ string escapes chapter (*note String Escapes::) for more codes
+ (e.g. color settings).
+
+
+
+File: screen.info, Node: Session Management, Next: Regions, Prev: Selecting, Up: Top
+
+Session Management Commands
+***************************
+
+ Perhaps the most useful feature of `screen' is the way it allows the
+user to move a session between terminals, by detaching and reattaching.
+This also makes life easier for modem users who have to deal with
+unexpected loss of carrier.
+
+* Menu:
+
+* Detach:: Disconnect `screen' from your terminal.
+* Power Detach:: Detach and log out.
+* Lock:: Lock your terminal temporarily.
+* Multiuser Session:: Changing number of allowed users.
+* Session Name:: Rename your session for later reattachment.
+* Suspend:: Suspend your session.
+* Quit:: Terminate your session.
+
+
File: screen.info, Node: Detach, Next: Power Detach, Up: Session Management
Detach
======
- - Command: autodetach STATE
+ - Command: autodetach state
(none)
Sets whether `screen' will automatically detach upon hangup, which
saves all your running programs until they are resumed with a
@@ -37,9 +132,11 @@ Detach
(`C-a d', `C-a C-d')
Detach the `screen' session (disconnect it from the terminal and
put it into the background). A detached `screen' can be resumed by
- invoking `screen' with the `-r' option. (*note Invoking Screen::.)
+ invoking `screen' with the `-r' option (*note Invoking Screen::).
+ The `-h' option tells screen to immediately close the connection
+ to the terminal (`hangup').
- - Command: password [CRYPTED_PW]
+ - Command: password [crypted_pw]
(none)
Present a crypted password in your `.screenrc' file and screen will
ask for it, whenever someone attempts to resume a detached
@@ -60,10 +157,10 @@ Power Detach
(`C-a D')
Mainly the same as `detach', but also sends a HANGUP signal to the
parent process of `screen'.
- *Caution*: This will result in a logout if `screen' was started
+ _Caution_: This will result in a logout if `screen' was started
from your login shell.
- - Command: pow_detach_msg [MESSAGE]
+ - Command: pow_detach_msg [message]
(none)
The MESSAGE specified here is output whenever a power detach is
performed. It may be used as a replacement for a logout message or
@@ -219,8 +316,8 @@ File: screen.info, Node: Umask, Next: Wall, Prev: Displays, Up: Multiuser Se
aclumask
--------
- - Command: aclumask [[USERS]+BITS |[USERS]-BITS .... ]
- - Command: umask [[USERS]+BITS |[USERS]-BITS .... ]
+ - Command: aclumask [USERS]+/-BITS ...
+ - Command: umask [USERS]+/-BITS ...
(none)
This specifies the access other users have to windows that will
be created by the caller of the command. USERS may be no, one
@@ -298,7 +395,7 @@ Session Name
Rename the current session. Note that for `screen -list' the name
shows up with the process-id prepended. If the argument NAME is
omitted, the name of this session is displayed.
- *Caution*: The `$STY' environment variable still reflects the old
+ _Caution_: The `$STY' environment variable still reflects the old
name. This may result in confusion. The default is constructed
from the tty and host names.
@@ -326,7 +423,7 @@ Quit
terminals the keys `C-4' and `C-\' are identical. So be careful
not to type `C-a C-4' when selecting window no. 4. Use the empty
bind command (as in `bind "^\"') to remove a key binding (*note
- Key Binding::.).
+ Key Binding::).

File: screen.info, Node: Regions, Next: Window Settings, Prev: Session Management, Up: Top
@@ -344,7 +441,9 @@ contain different windows.
* Focus:: Change to the next region
* Only:: Delete all other regions
* Remove:: Delete the current region
+* Resize:: Grow or shrink a region
* Caption:: Control the window's caption
+* Fit:: Resize a window to fit the region

File: screen.info, Node: Split, Next: Focus, Up: Regions
@@ -365,9 +464,16 @@ Focus
=====
- Command: focus
- (`C-a Tab')
+ (`C-a <Tab>')
Move the input focus to the next region. This is done in a cyclic
- way so that the top region is selected after the bottom one.
+ way so that the top region is selected after the bottom one. If no
+ subcommand is given it defaults to `down'. `up' cycles in the
+ opposite order, `top' and `bottom' go to the top and bottom region
+ respectively. Useful bindings are (j and k as in vi)
+ bind j focus down
+ bind k focus up
+ bind t focus top
+ bind b focus bottom

File: screen.info, Node: Only, Next: Remove, Prev: Focus, Up: Regions
@@ -380,7 +486,7 @@ Only
Kill all regions but the current one.

-File: screen.info, Node: Remove, Next: Caption, Prev: Only, Up: Regions
+File: screen.info, Node: Remove, Next: Resize, Prev: Only, Up: Regions
Remove
======
@@ -391,13 +497,31 @@ Remove
region.

-File: screen.info, Node: Caption, Prev: Remove, Up: Regions
+File: screen.info, Node: Resize, Next: Caption, Prev: Remove, Up: Regions
+
+Resize
+======
+
+ - Command: resize [(+/-)LINES]
+ (none)
+ Resize the current region. The space will be removed from or added
+ to the region below or if there's not enough space from the region
+ above.
+ resize +N increase current region height by N
+ resize -N decrease current region height by N
+ resize N set current region height to N
+ resize = make all windows equally high
+ resize max maximize current region height
+ resize min minimize current region height
+
+
+File: screen.info, Node: Caption, Next: Fit, Prev: Resize, Up: Regions
Caption
=======
- - Command: caption `always'|`splitonly' [STRING]
- - Command: caption `string' [STRING]
+ - Command: caption `always'|`splitonly' [string]
+ - Command: caption `string' [string]
(none)
This command controls the display of the window captions. Normally
a caption is only used if more than one window is shown on the
@@ -406,13 +530,25 @@ Caption
default is `splitonly'.
The second form changes the text used for the caption. You can use
- all string escapes (*Note String Escapes::). `Screen' uses a
+ all string escapes (*note String Escapes::). `Screen' uses a
default of `%3n %t'.
You can mix both forms by providing the string as an additional
argument.

+File: screen.info, Node: Fit, Prev: Caption, Up: Regions
+
+Fit
+===
+
+ - Command: fit
+ (`C-a F')
+ Change the window size to the size of the current region. This
+ command is needed because screen doesn't adapt the window size
+ automatically if the window is displayed more than once.
+
+
File: screen.info, Node: Window Settings, Next: Virtual Terminal, Prev: Regions, Up: Top
Window Settings
@@ -440,19 +576,19 @@ Naming Windows (Titles)
=======================
You can customize each window's name in the window display (viewed
-with the `windows' command (*note Windows::.) by setting it with one of
+with the `windows' command (*note Windows::) by setting it with one of
the title commands. Normally the name displayed is the actual command
name of the program created in the window. However, it is sometimes
useful to distinguish various programs of the same name or to change
the name on-the-fly to reflect the current state of the window.
The default name for all shell windows can be set with the
-`shelltitle' command (*note Shell::.). You can specify the name you
+`shelltitle' command (*note Shell::). You can specify the name you
want for a window with the `-t' option to the `screen' command when the
-window is created (*note Screen Command::.). To change the name after
+window is created (*note Screen Command::). To change the name after
the window has been created you can use the title-string escape-sequence
-(`ESC k NAME ESC \') and the `title' command (C-a A). The former can
-be output from an application to control the window's name under
+(`<ESC> k NAME <ESC> \') and the `title' command (C-a A). The former
+can be output from an application to control the window's name under
software control, and the latter will prompt for a name when typed.
You can also bind predefined names to keys with the `title' command to
set things quickly without prompting.
@@ -470,7 +606,7 @@ File: screen.info, Node: Title Command, Next: Dynamic Titles, Up: Naming Wind
Title Command
-------------
- - Command: title [WINDOWTITLE]
+ - Command: title [windowtitle]
(`C-a A')
Set the name of the current window to WINDOWALIAS. If no name is
specified, screen prompts for one.
@@ -492,16 +628,16 @@ Otherwise the current command name supersedes the shell name while it
is running.
Here's how it works: you must modify your shell prompt to output a
-null title-escape-sequence (ESC k ESC \) as a part of your prompt. The
-last part of your prompt must be the same as the string you specified
-for the SEARCH portion of the title. Once this is set up, `screen'
-will use the title-escape-sequence to clear the previous command name
-and get ready for the next command. Then, when a newline is received
-from the shell, a search is made for the end of the prompt. If found,
-it will grab the first word after the matched string and use it as the
-command name. If the command name begins with `!', `%', or `^',
-`screen' will use the first word on the following line (if found) in
-preference to the just-found name. This helps csh users get more
+null title-escape-sequence (<ESC> k <ESC> \) as a part of your prompt.
+The last part of your prompt must be the same as the string you
+specified for the SEARCH portion of the title. Once this is set up,
+`screen' will use the title-escape-sequence to clear the previous
+command name and get ready for the next command. Then, when a newline
+is received from the shell, a search is made for the end of the prompt.
+If found, it will grab the first word after the matched string and use
+it as the command name. If the command name begins with `!', `%', or
+`^', `screen' will use the first word on the following line (if found)
+in preference to the just-found name. This helps csh users get more
accurate titles when using job control or history recall commands.

@@ -593,7 +729,7 @@ Console
- Command: console [STATE]
(none)
Grabs or un-grabs the machines console output to a window. When
- the argument is omitted the current state is displayed. *Note*:
+ the argument is omitted the current state is displayed. _Note_:
Only the owner of `/dev/console' can grab the console output. This
command is only available if the host supports the ioctl
`TIOCCONS'.
@@ -607,17 +743,17 @@ Kill
- Command: kill
(`C-a k', `C-a C-k')
Kill the current window.
- If there is an `exec' command running (*note Exec::.) then it is
+ If there is an `exec' command running (*note Exec::) then it is
killed. Otherwise the process (e.g. shell) running in the window
receives a `HANGUP' condition, the window structure is removed and
screen (your display) switches to another window. When the last
window is destroyed, `screen' exits. After a kill screen switches
to the previously displayed window.
- *Caution*: `emacs' users may find themselves killing their `emacs'
+ _Caution_: `emacs' users may find themselves killing their `emacs'
session when trying to delete the current line. For this reason,
it is probably wise to use a different command character (*note
- Command Character::.) or rebind `kill' to another key sequence,
- such as `C-a K' (*note Key Binding::.).
+ Command Character::) or rebind `kill' to another key sequence,
+ such as `C-a K' (*note Key Binding::).

File: screen.info, Node: Login, Next: Mode, Prev: Kill, Up: Window Settings
@@ -625,21 +761,21 @@ File: screen.info, Node: Login, Next: Mode, Prev: Kill, Up: Window Settings
Login
=====
- - Command: deflogin STATE
+ - Command: deflogin state
(none)
Same as the `login' command except that the default setting for new
windows is changed. This defaults to `on' unless otherwise
- specified at compile time (*note Installation::.). Both commands
+ specified at compile time (*note Installation::). Both commands
are only present when `screen' has been compiled with utmp support.
- - Command: login [STATE]
+ - Command: login [state]
(`C-a L')
Adds or removes the entry in `/etc/utmp' for the current window.
This controls whether or not the window is "logged in". In
addition to this toggle, it is convenient to have "log in" and
"log out" keys. For instance, `bind I login on' and `bind O login
off' will map these keys to be `C-a I' and `C-a O' (*note Key
- Binding::.).
+ Binding::).

File: screen.info, Node: Mode, Next: Monitor, Prev: Login, Up: Window Settings
@@ -647,12 +783,12 @@ File: screen.info, Node: Mode, Next: Monitor, Prev: Login, Up: Window Settin
Mode
====
- - Command: defmode MODE
+ - Command: defmode mode
(none)
The mode of each newly allocated pseudo-tty is set to MODE. MODE
is an octal number as used by chmod(1). Defaults to 0622 for
windows which are logged in, 0600 for others (e.g. when `-ln' was
- specified for creation. *note Screen Command::.).
+ specified for creation, *note Screen Command::).

File: screen.info, Node: Monitor, Next: Windows, Prev: Mode, Up: Window Settings
@@ -660,7 +796,7 @@ File: screen.info, Node: Monitor, Next: Windows, Prev: Mode, Up: Window Sett
Monitoring
==========
- - Command: activity MESSAGE
+ - Command: activity message
(none)
When any activity occurs in a background window that is being
monitored, `screen' displays a notification in the message line.
@@ -675,19 +811,19 @@ Monitoring
Note that monitoring is off for all windows by default, but can be
altered by use of the `monitor' command (`C-a M').
- - Command: defmonitor STATE
+ - Command: defmonitor state
(none)
Same as the `monitor' command except that the default setting for
new windows is changed. Initial setting is `off'.
- - Command: monitor [STATE]
+ - Command: monitor [state]
(`C-a M')
Toggles monitoring of the current window. When monitoring is
turned on and the affected window is switched into the background,
the activity notification message will be displayed in the status
line at the first sign of output, and the window will also be
- marked with an `@' in the window-status display (*note
- Windows::.). Monitoring defaults to `off' for all windows.
+ marked with an `@' in the window-status display (*note Windows::).
+ Monitoring defaults to `off' for all windows.

File: screen.info, Node: Windows, Next: Hardstatus, Prev: Monitor, Up: Window Settings
@@ -703,10 +839,10 @@ Windows
The current window is marked with a `*'; the previous window is
marked with a `-'; all the windows that are logged in are marked
- with a `$' (*note Login::.); a background window that has received
+ with a `$' (*note Login::); a background window that has received
a bell is marked with a `!'; a background window that is being
monitored and has had activity occur is marked with an `@' (*note
- Monitor::.); a window which has output logging turned on is marked
+ Monitor::); a window which has output logging turned on is marked
with `(L)'; windows occupied by other users are marked with `&' or
`&&' if the window is shared by other users; windows in the zombie
state are marked with `Z'.
@@ -727,7 +863,7 @@ ANSI Application Program Command (APC): `ESC_<string>ESC\'. As a
convenience for xterm users the sequence `ESC]0..2;<string>^G' is also
accepted.
- - Command: defhstatus [STATUS]
+ - Command: defhstatus [status]
(none)
The hardstatus line that all new windows will get is set to STATUS.
This command is useful to make the hardstatus of every window
@@ -739,7 +875,7 @@ accepted.
the current default string is displayed. Per default the
hardstatus line of new windows is empty.
- - Command: hstatus STATUS
+ - Command: hstatus status
(none)
Changes the current window's hardstatus line to STATUS.
@@ -803,8 +939,14 @@ functions, respectively.
Outputs a string directly to the host
terminal without interpretation.
ESC _ (A) Application Program Command (Hardstatus)
- ESC ] (A) Operating System Command (Hardstatus, xterm
+ ESC ] 0 ; string ^G (A) Operating System Command (Hardstatus, xterm
title hack)
+ ESC ] 83 ; cmd ^G (A) Execute screen command. This only works if
+ multi-user support is compiled into screen.
+ The pseudo-user ":window:" is used to check
+ the access control list. Use "addacl :window:
+ -rwx #?" to create a user with no rights and
+ allow only the needed commands.
Control-N (A) Lock Shift G1 (SO)
Control-O (A) Lock Shift G0 (SI)
ESC n (A) Lock Shift G2
@@ -825,6 +967,7 @@ functions, respectively.
Pn = None or 0 From Cursor to End of Line
1 From Beginning of Line to Cursor
2 Entire Line
+ ESC [ Pn X Erase character
ESC [ Pn A Cursor Up
ESC [ Pn B Cursor Down
ESC [ Pn C Cursor Right
@@ -857,8 +1000,8 @@ functions, respectively.
37 (A) Foreground White
39 (A) Foreground Default
40 (A) Background Black
- ... ...
- 49 (A) Background Default
+ ... ...
+ 49 (A) Background Default
ESC [ Pn g Tab Clear
Pn = None or 0 Clear Tab at Current Position
3 Clear All Tabs
@@ -882,7 +1025,9 @@ functions, respectively.
?5 (V) Reverse Video
?6 (V) `Origin' Mode
?7 (V) `Wrap' Mode
+ ?9 X10 mouse tracking
?25 (V) Visible Cursor
+ ?1000 (V) VT200 mouse tracking
ESC [ 5 i (A) Start relay to printer (ANSI Media Copy)
ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy)
ESC [ 8 ; Ph ; Pw t Resize the window to `Ph' lines and
@@ -904,11 +1049,11 @@ on the user's keyboard and insert the VT100 style escape sequence.
`Screen' has a very flexible way of doing this by making it possible to
map arbitrary commands on arbitrary sequences of characters. For
standard VT100 emulation the command will always insert a string in the
-input buffer of the window (see also command `stuff', *note Paste::.).
+input buffer of the window (see also command `stuff', *note Paste::).
Because the sequences generated by a keypress can change after a
reattach from a different terminal type, it is possible to bind
commands to the termcap name of the keys. `Screen' will insert the
-correct binding after each reattach. *Note Bindkey:: for further
+correct binding after each reattach. See *Note Bindkey:: for further
details on the syntax and examples.
Here is the table of the default key bindings. (A) means that the
@@ -935,9 +1080,8 @@ command is executed if the keyboard is switched into application mode.
Function key 8 k8 stuff \033[19~
Function key 9 k9 stuff \033[20~
Function key 10 k; stuff \033[21~
- Function key 11 F1 stuff \033[22~
- Function key 12 F2 stuff \033[23~
- Backspace kb stuff \010
+ Function key 11 F1 stuff \033[23~
+ Function key 12 F2 stuff \033[24~
Home kh stuff \033[1~
End kH stuff \033[4~
Insert kI stuff \033[2~
@@ -987,7 +1131,7 @@ File: screen.info, Node: Digraph, Next: Bell, Prev: Input Translation, Up: V
Digraph
=======
- - Command: digraph [PRESET]
+ - Command: digraph [preset]
(none)
This command prompts the user for a digraph sequence. The next two
characters typed are looked up in a builtin table and the
@@ -1006,7 +1150,7 @@ File: screen.info, Node: Bell, Next: Clear, Prev: Digraph, Up: Virtual Termi
Bell
====
- - Command: bell_msg [MESSAGE]
+ - Command: bell_msg [message]
(none)
When a bell character is sent to a background window, `screen'
displays a notification in the message line. The notification
@@ -1022,7 +1166,7 @@ Bell
suppress output of a message line (`bell_msg ""'). Without
parameter, the current message is shown.
- - Command: vbell [STATE]
+ - Command: vbell [state]
(`C-a C-g')
Sets or toggles the visual bell setting for the current window. If
`vbell' is switched to `on', but your terminal does not support a
@@ -1034,7 +1178,7 @@ Bell
Per default, `vbell' is `off', thus the audible bell is used.
- - Command: vbell_msg [MESSAGE]
+ - Command: vbell_msg [message]
(none)
Sets the visual bell message. MESSAGE is printed to the status
line if the window receives a bell character (^G), `vbell' is set
@@ -1042,7 +1186,7 @@ Bell
default message is `Wuff, Wuff!!'. Without parameter, the current
message is shown.
- - Command: vbellwait SEC
+ - Command: vbellwait sec
(none)
Define a delay in seconds after each display of `screen' 's visual
bell message. The default is 1 second.
@@ -1069,8 +1213,8 @@ Info
window: the cursor position in the form `(COLUMN,ROW)' starting
with `(1,1)', the terminal width and height plus the size of the
scrollback buffer in lines, like in `(80,24)+50', the current
- state of window XON/XOFF flow control is shown like this (see also
- *Note Flow Control::):
+ state of window XON/XOFF flow control is shown like this (*note
+ Flow Control::):
+flow automatic flow control, currently on.
-flow automatic flow control, currently off.
+(+)flow flow control enabled. Agrees with automatic control.
@@ -1087,9 +1231,10 @@ Info
The currently active character set (`G0', `G1', `G2', or `G3'),
and in square brackets the terminal character sets that are
- currently designated as `G0' through `G3'. Additional modes
+ currently designated as `G0' through `G3'. If the window is in
+ UTF-8 mode, the string `UTF-8' is shown instead. Additional modes
depending on the type of the window are displayed at the end of
- the status line (*note Window Types::.).
+ the status line (*note Window Types::).
If the state machine of the terminal emulator is in a non-default
state, the info line is started with a string identifying the
@@ -1097,159 +1242,8 @@ Info
For system information use `time'.
-
-File: screen.info, Node: Redisplay, Next: Wrap, Prev: Info, Up: Virtual Terminal
-
-Redisplay
-=========
-
- - Command: allpartial STATE
- (none)
- If set to on, only the current cursor line is refreshed on window
- change. This affects all windows and is useful for slow terminal
- lines. The previous setting of full/partial refresh for each
- window is restored with `allpartial off'. This is a global flag
- that immediately takes effect on all windows overriding the
- `partial' settings. It does not change the default redraw behavior
- of newly created windows.
-
- - Command: partial STATE
- (none)
- Defines whether the display should be refreshed (as with
- `redisplay') after switching to the current window. This command
- only affects the current window. To immediately affect all
- windows use the `allpartial' command. Default is `off', of
- course. This default is fixed, as there is currently no
- `defpartial' command.
-
- - Command: redisplay
- (`C-a l', `C-a C-l')
- Redisplay the current window. Needed to get a full redisplay in
- partial redraw mode.
-
-
-File: screen.info, Node: Wrap, Next: Reset, Prev: Redisplay, Up: Virtual Terminal
-
-Wrap
-====
-
- - Command: wrap STATE
- (`C-a r', `C-a C-r')
- Sets the line-wrap setting for the current window. When line-wrap
- is on, the second consecutive printable character output at the
- last column of a line will wrap to the start of the following
- line. As an added feature, backspace (^H) will also wrap through
- the left margin to the previous line. Default is `on'.
-
- - Command: defwrap STATE
+ - Command: dinfo
(none)
- Same as the `wrap' command except that the default setting for new
- windows is changed. Initially line-wrap is on and can be toggled
- with the `wrap' command (`C-a r') or by means of "C-a : wrap
- on|off".
-
-
-File: screen.info, Node: Reset, Next: Window Size, Prev: Wrap, Up: Virtual Terminal
-
-Reset
-=====
-
- - Command: reset
- (`C-a Z')
- Reset the virtual terminal to its "power-on" values. Useful when
- strange settings (like scroll regions or graphics character set)
- are left over from an application.
-
-
-File: screen.info, Node: Window Size, Next: Character Processing, Prev: Reset, Up: Virtual Terminal
-
-Window Size
-===========
-
- - Command: width [NUM]
- (`C-a W')
- Toggle the window width between 80 and 132 columns, or set it to
- NUM columns if an argument is specified. This requires a capable
- terminal and the termcap entries `Z0' and `Z1'. See the `termcap'
- command (*note Termcap::.), for more information.
-
- - Command: height [LINES]
- (none)
- Set the display height to a specified number of lines. When no
- argument is given it toggles between 24 and 42 lines display.
-
- - Command: fit
- (`C-a F')
- Change the window size to the size of the current region. This
- command is needed because screen doesn't adapt the window size
- automatically if the window is displayed more than once.
-
-
-File: screen.info, Node: Character Processing, Prev: Window Size, Up: Virtual Terminal
-
-Character Processing
-====================
-
- - Command: c1 [STATE]
- (none)
- Change c1 code processing. `c1 on' tells screen to treat 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 and can be changed with the `defc1' command. Users with
- fonts that have usable characters in the c1 positions may want to
- turn this off.
-
-
- - Command: gr [STATE]
- (none)
- Turn GR charset switching on/off. Whenever screen 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 (see also `defgr') is not to process GR switching because
- otherwise the ISO88591 charset would not work.
-
- - Command: kanji WTYPE [DTYPE]
- (none)
- Tell screen how to process kanji input/output. WTYPE and DTYPE
- must be one of the strings `jis', `euc' or `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 the display type is to use the `KJ'
- termcap entry. *Note Special Capabilities::. See also `defkanji',
- which changes the default setting of a new window.
-
- - Command: charset SET
- (none)
- Change the current character set slot designation and charset
- mapping. The first four character of SET are treated as charset
- designators while the fifth and sixth character must be in range
- `0' to `3' and set the GL/GR charset mapping. On every position a
- `.' may be used to indicate that the corresponding charset/mapping
- should not be changed (SET is padded to six characters internally
- by appending `.' chars). New windows have `BBBB02' as default
- charset, unless a `kanji' command is active.
-
- The current setting can be viewed with the *Note Info:: command.
-
- - Command: defc1 STATE
- (none)
- Same as the `c1' command except that the default setting for new
- windows is changed. Initial setting is `on'.
-
- - Command: defgr STATE
- (none)
- Same as the `gr' command except that the default setting for new
- windows is changed. Initial setting is `off'.
-
- - Command: defkanji WTYPE
- (none)
- Same as the `kanji' command except that the default setting for
- new windows is changed. Initial setting is `off', i.e. `jis'.
-
- - Command: defcharset [SET]
- Like the `charset' command except that the default setting for new
- windows is changed. Shows current default if called without
- argument.
+ Show what screen thinks about your terminal. Useful if you want to
+ know why features like color or the alternate charset don't work.
diff --git a/doc/screen.info-3 b/doc/screen.info-3
index 809a4e8..298f9e3 100644
--- a/doc/screen.info-3
+++ b/doc/screen.info-3
@@ -1,9 +1,14 @@
-This is Info file screen.info, produced by Makeinfo-1.55 from the input
-file ./screen.texinfo.
+This is screen.info, produced by makeinfo version 4.0 from
+./screen.texinfo.
+
+INFO-DIR-SECTION General Commands
+START-INFO-DIR-ENTRY
+* Screen: (screen). Full-screen window manager.
+END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-1995 Free Software Foundation, Inc.
+ Copyright (c) 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -20,6 +25,194 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Redisplay, Next: Wrap, Prev: Info, Up: Virtual Terminal
+
+Redisplay
+=========
+
+ - Command: allpartial state
+ (none)
+ If set to on, only the current cursor line is refreshed on window
+ change. This affects all windows and is useful for slow terminal
+ lines. The previous setting of full/partial refresh for each
+ window is restored with `allpartial off'. This is a global flag
+ that immediately takes effect on all windows overriding the
+ `partial' settings. It does not change the default redraw behavior
+ of newly created windows.
+
+ - Command: partial state
+ (none)
+ Defines whether the display should be refreshed (as with
+ `redisplay') after switching to the current window. This command
+ only affects the current window. To immediately affect all
+ windows use the `allpartial' command. Default is `off', of
+ course. This default is fixed, as there is currently no
+ `defpartial' command.
+
+ - Command: redisplay
+ (`C-a l', `C-a C-l')
+ Redisplay the current window. Needed to get a full redisplay in
+ partial redraw mode.
+
+
+File: screen.info, Node: Wrap, Next: Reset, Prev: Redisplay, Up: Virtual Terminal
+
+Wrap
+====
+
+ - Command: wrap state
+ (`C-a r', `C-a C-r')
+ Sets the line-wrap setting for the current window. When line-wrap
+ is on, the second consecutive printable character output at the
+ last column of a line will wrap to the start of the following
+ line. As an added feature, backspace (^H) will also wrap through
+ the left margin to the previous line. Default is `on'.
+
+ - Command: defwrap state
+ (none)
+ Same as the `wrap' command except that the default setting for new
+ windows is changed. Initially line-wrap is on and can be toggled
+ with the `wrap' command (`C-a r') or by means of "C-a : wrap
+ on|off".
+
+
+File: screen.info, Node: Reset, Next: Window Size, Prev: Wrap, Up: Virtual Terminal
+
+Reset
+=====
+
+ - Command: reset
+ (`C-a Z')
+ Reset the virtual terminal to its "power-on" values. Useful when
+ strange settings (like scroll regions or graphics character set)
+ are left over from an application.
+
+
+File: screen.info, Node: Window Size, Next: Character Processing, Prev: Reset, Up: Virtual Terminal
+
+Window Size
+===========
+
+ - Command: width [`-w'|`-d'] [cols [lines]]
+ (`C-a W')
+ Toggle the window width between 80 and 132 columns, or set it to
+ COLS columns if an argument is specified. This requires a capable
+ terminal and the termcap entries `Z0' and `Z1'. See the `termcap'
+ command (*note Termcap::), for more information. You can also
+ specify a height if you want to change both values. The `-w'
+ option tells screen to leave the display size unchanged and just
+ set the window size, `-d' vice versa.
+
+ - Command: height [`-w'|`-d'] [lines [cols]]
+ (none)
+ Set the display height to a specified number of lines. When no
+ argument is given it toggles between 24 and 42 lines display.
+
+
+File: screen.info, Node: Character Processing, Prev: Window Size, Up: Virtual Terminal
+
+Character Processing
+====================
+
+ - Command: c1 [state]
+ (none)
+ Change c1 code processing. `c1 on' tells screen to treat 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 and can be changed with the `defc1' command. Users with
+ fonts that have usable characters in the c1 positions may want to
+ turn this off.
+
+
+ - Command: gr [state]
+ (none)
+ Turn GR charset switching on/off. Whenever screen 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 (see also `defgr') is not to process GR switching because
+ otherwise the ISO88591 charset would not work.
+
+ - Command: bce [state]
+ (none)
+ Change background-color-erase setting. If `bce' is set to on, all
+ characters cleared by an erase/insert/scroll/clear operation will
+ be displayed in the current background color. Otherwise the
+ default background color is used.
+
+ - Command: encoding enc [denc]
+ (none)
+ Tell screen how to interpret the input/output. The first argument
+ sets the encoding of the current window. Each window can emulate
+ a different encoding. The optional second parameter overwrites the
+ encoding of the connected terminal. It should never be needed as
+ screen uses the locale setting to detect the encoding. There is
+ also a way to select a terminal encoding depending on the terminal
+ type by using the `KJ' termcap entry. *Note Special Capabilities::.
+
+ Supported encodings are `eucJP', `SJIS', `eucKR', `eucCN', `Big5',
+ `KOI8-R', `CP1251', `UTF-8', `ISO8859-2', `ISO8859-3',
+ `ISO8859-4', `ISO8859-5', `ISO8859-6', `ISO8859-7', `ISO8859-8',
+ `ISO8859-9', `ISO8859-10', `ISO8859-15', `jis'.
+
+ See also `defencoding', which changes the default setting of a new
+ window.
+
+ - Command: charset set
+ (none)
+ Change the current character set slot designation and charset
+ mapping. The first four character of SET are treated as charset
+ designators while the fifth and sixth character must be in range
+ `0' to `3' and set the GL/GR charset mapping. On every position a
+ `.' may be used to indicate that the corresponding charset/mapping
+ should not be changed (SET is padded to six characters internally
+ by appending `.' chars). New windows have `BBBB02' as default
+ charset, unless a `encoding' command is active.
+
+ The current setting can be viewed with the *Note Info:: command.
+
+ - Command: utf8 [state [dstate]]
+ (none)
+ Change the encoding used in the current window. If utf8 is
+ enabled, the strings sent to the window will be UTF-8 encoded and
+ vice versa. Omitting the parameter toggles the setting. If a
+ second parameter is given, the display's encoding is also changed
+ (this should rather be done with screen's `-U' option). See also
+ `defutf8', which changes the default setting of a new window.
+
+ - Command: defc1 state
+ (none)
+ Same as the `c1' command except that the default setting for new
+ windows is changed. Initial setting is `on'.
+
+ - Command: defgr state
+ (none)
+ Same as the `gr' command except that the default setting for new
+ windows is changed. Initial setting is `off'.
+
+ - Command: defbce state
+ (none)
+ Same as the `bce' command except that the default setting for new
+ windows is changed. Initial setting is `off'.
+
+ - Command: defencoding enc
+ (none)
+ Same as the `encoding' command except that the default setting for
+ new windows is changed. Initial setting is the encoding taken from
+ the terminal.
+
+ - Command: defcharset [set]
+ Like the `charset' command except that the default setting for new
+ windows is changed. Shows current default if called without
+ argument.
+
+ - Command: defutf8 state
+ (none)
+ Same as the `utf8' command except that the default setting for new
+ windows is changed. Initial setting is `on' if screen was started
+ with `-U', otherwise `off'.
+
+
File: screen.info, Node: Copy and Paste, Next: Subprocess Execution, Prev: Virtual Terminal, Up: Top
Copy and Paste
@@ -34,7 +227,7 @@ windowing systems.
* Copy:: Copy from scrollback to buffer
* Paste:: Paste from buffer into window
* Registers:: Longer-term storage
-* Screen-Exchange:: Sharing data between screen users
+* Screen Exchange:: Sharing data between screen users
* History:: Recalling previous input

@@ -44,7 +237,7 @@ Copying
=======
- Command: copy
- (`C-a [', `C-a C-[', `C-a ESC')
+ (`C-a [', `C-a C-[', `C-a <ESC>')
Enter copy/scrollback mode. This allows you to copy text from the
current window and its history into the paste buffer. In this mode
a `vi'-like full screen editor is active, with controls as
@@ -67,7 +260,7 @@ File: screen.info, Node: Line Termination, Next: Scrollback, Up: Copy
CR/LF
-----
- - Command: crlf [STATE]
+ - Command: crlf [state]
(none)
This affects the copying of text regions with the `C-a [' command.
If it is set to `on', lines will be separated by the two character
@@ -80,18 +273,18 @@ File: screen.info, Node: Scrollback, Next: Copy Mode Keys, Prev: Line Termina
Scrollback
----------
- - Command: defscrollback NUM
+ - Command: defscrollback num
(none)
Same as the `scrollback' command except that the default setting
for new windows is changed. Defaults to 100.
- - Command: scrollback NUM
+ - Command: scrollback num
(none)
Set the size of the scrollback buffer for the current window to
NUM lines. The default scrollback is 100 lines. Use `C-a i' to
view the current setting.
- - Command: compacthist [STATE]
+ - Command: compacthist [state]
(none)
This tells screen weather to suppress trailing blank lines when
scrolling up text into the history buffer. Turn compacting `on' to
@@ -103,7 +296,7 @@ File: screen.info, Node: Copy Mode Keys, Next: Movement, Prev: Scrollback, U
markkeys
--------
- - Command: markkeys STRING
+ - Command: markkeys string
(none)
This is a method of changing the keymap used for copy/history
mode. The string is made up of OLDCHAR=NEWCHAR pairs which are
@@ -111,7 +304,7 @@ markkeys
would set some keys to be more familiar to `emacs' users. If your
terminal sends characters, that cause you to abort copy mode, then
this command may help by binding these characters to do nothing.
- The no-op character is `' and is used like this: `markkeys @=L=H'
+ The no-op character is `a'nd is used like this: `markkeys @=L=H'
if you do not want to use the `H' or `L' commands any longer. As
shown in this example, multiple keys can be assigned to one
function in a single statement.
@@ -192,6 +385,11 @@ Searching
`C-r' `emacs' style reverse i-search.
+ - Command: ignorecase [state]
+ (none)
+ Tell screen to ignore the case of caracters in searches. Default is
+ `off'.
+

File: screen.info, Node: Specials, Prev: Searching, Up: Copy
@@ -231,7 +429,7 @@ of the paste buffer will not be overwritten, but appended to.
`>' sets the (second) mark and writes the contents of the paste buffer
to the screen-exchange file (`/tmp/screen-exchange' per default) once
-copy-mode is finished. *Note Screen-Exchange::.
+copy-mode is finished. *Note Screen Exchange::.
This example demonstrates how to dump the whole scrollback buffer to
that file:
`C-a [ g SPACE G $ >'.
@@ -251,7 +449,7 @@ File: screen.info, Node: Paste, Next: Registers, Prev: Copy, Up: Copy and Pa
Paste
=====
- - Command: paste [REGISTERS [DESTINATION]]
+ - Command: paste [registers [destination]]
(`C-a ]', `C-a C-]')
Write the (concatenated) contents of the specified registers to
the stdin stream of the current window. The register `.' is
@@ -271,13 +469,13 @@ Paste
attached), as the registers are a global resource. The paste
buffer exists once for every user.
- - Command: pastefont [STATE]
+ - Command: pastefont [state]
Tell screen to include font information in the paste buffer. The
default is not to do so. This command is especially usefull for
multi character fonts like kanji.
- - Command: slowpaste MSEC
- - Command: defslowpaste MSEC
+ - Command: slowpaste msec
+ - Command: defslowpaste msec
(none)
Define the speed text is inserted in the current window by the
`paste' command. If the slowpaste value is nonzero text is written
@@ -287,35 +485,36 @@ Paste
control problems while pasting large amounts of text.
`defslowpaste' specifies the default for new windows.
- - Command: readreg [REGISTER [FILENAME]]
+ - Command: readreg [-e encoding] [register [filename]]
(none)
Does one of two things, dependent on number of arguments: with
zero or one arguments it it duplicates the paste buffer contents
into the register specified or entered at the prompt. With two
arguments it reads the contents of the named file into the
register, just as `readbuf' reads the screen-exchange file into
- the paste buffer. The following example will paste the system's
- password file into the screen window (using register p, where a
- copy remains):
+ the paste buffer. You can tell screen the encoding of the file
+ via the `-e' option. The following example will paste the
+ system's password file into the screen window (using register p,
+ where a copy remains):
C-a : readreg p /etc/passwd
C-a : paste p

-File: screen.info, Node: Registers, Next: Screen-Exchange, Prev: Paste, Up: Copy and Paste
+File: screen.info, Node: Registers, Next: Screen Exchange, Prev: Paste, Up: Copy and Paste
Registers
=========
- - Command: copy_reg [KEY]
+ - Command: copy_reg [key]
(none)
Removed. Use `readreg' instead.
- - Command: ins_reg [KEY]
+ - Command: ins_reg [key]
(none)
Removed. Use `paste' instead.
- - Command: process [KEY]
+ - Command: process [key]
(none)
Stuff the contents of the specified register into the `screen'
input queue. If no argument is given you are prompted for a
@@ -323,22 +522,23 @@ Registers
the user's keyboard. This command can be used to bind multiple
actions to a single key.
- - Command: register KEY STRING
+ - Command: register [-e encoding] key string
(none)
- Save the specified STRING to the register KEY.
+ Save the specified STRING to the register KEY. The encoding of
+ the string can be specified via the `-e' option.
- - Command: stuff STRING
+ - Command: stuff string
(none)
Stuff the string STRING in the input buffer of the current window.
This is like the `paste' command, but with much less overhead.
You cannot paste large buffers with the `stuff' command. It is most
- useful for key bindings. *Note Bindkey::
+ useful for key bindings. *Note Bindkey::.

-File: screen.info, Node: Screen-Exchange, Next: History, Prev: Registers, Up: Copy and Paste
+File: screen.info, Node: Screen Exchange, Next: History, Prev: Registers, Up: Copy and Paste
-Screen-Exchange
+Screen Exchange
===============
- Command: bufferfile [EXCHANGE-FILE]
@@ -353,24 +553,27 @@ Screen-Exchange
C-a < C-a ]
C-a : bufferfile
- - Command: readbuf
+ - Command: readbuf [-e ENCODING] [FILENAME]
(`C-a <')
- Reads the contents of the current screen-exchange file into the
- paste buffer.
+ Reads the contents of the specified file into the paste buffer.
+ You can tell screen the encoding of the file via the `-e' option.
+ If no file is specified, the screen-exchange filename is used.
- Command: removebuf
(`C-a =')
Unlinks the screen-exchange file.
- - Command: writebuf
+ - Command: writebuf [-e ENCODING] [FILENAME]
(`C-a >')
- Writes the contents of the paste buffer to a public accessible
- screen-exchange file. This is thought of as a primitive means of
- communication between `screen' users on the same host. See also
- `C-a ESC' (*note Copy::.).
+ Writes the contents of the paste buffer to the specified file, or
+ the public accessible screen-exchange file if no filename is given.
+ This is thought of as a primitive means of communication between
+ `screen' users on the same host. If an encoding is specified the
+ paste buffer is recoded on the fly to match the encoding. See also
+ `C-a <ESC>' (*note Copy::).

-File: screen.info, Node: History, Prev: Screen-Exchange, Up: Copy and Paste
+File: screen.info, Node: History, Prev: Screen Exchange, Up: Copy and Paste
History
=======
@@ -513,7 +716,7 @@ File: screen.info, Node: Bind, Next: Bind Examples, Up: Key Binding
The `bind' command
==================
- - Command: bind KEY [COMMAND [ARGS]]
+ - Command: bind [-c class] key [command [args]]
(none)
Bind a command to a key. The KEY argument is either a single
character, a two-character sequence of the form `^x' (meaning
@@ -522,13 +725,17 @@ The `bind' command
character, such as `\^' or `\\'. The argument can also be quoted,
if you like. If no further argument is given, any previously
established binding for this key is removed. The COMMAND argument
- can be any command (*note Command Index::.).
+ can be any command (*note Command Index::).
+
+ If a command class is specified via the `-c' option, the key is
+ bound for the specified class. Use the `command' command to
+ activate a class. Command classes can be used to create multiple
+ command keys or multi-character bindings.
By default, most suitable commands are bound to one or more keys
- (*note Default Key Bindings::.; for instance, the command to
- create a new window is bound to `C-c' and `c'. The `bind' command
- can be used to redefine the key bindings and to define new
- bindings.
+ (*note Default Key Bindings::; for instance, the command to create
+ a new window is bound to `C-c' and `c'. The `bind' command can be
+ used to redefine the key bindings and to define new bindings.

File: screen.info, Node: Bind Examples, Next: Command Character, Prev: Bind, Up: Key Binding
@@ -545,17 +752,29 @@ Some examples:
would bind the space key to the command that displays a list of windows
(so that the command usually invoked by `C-a C-w' would also be
available as `C-a space'), bind `C-f' to the command "create a window
-with a TELNET connection to foobar", and bind ESC to the command that
+with a TELNET connection to foobar", and bind <ESC> to the command that
creates an non-login window with title `root' in slot #9, with a
superuser shell and a scrollback buffer of 1000 lines.
+ bind -c demo1 0 select 10
+ bind -c demo1 1 select 11
+ bind -c demo1 2 select 12
+ bindkey "^B" command -c demo1
+ makes `C-b 0' select window 10, `C-b 1' window 11, etc.
+
+ bind -c demo2 0 select 10
+ bind -c demo2 1 select 11
+ bind -c demo2 2 select 12
+ bind - command -c demo2
+ makes `C-a - 0' select window 10, `C-a - 1' window 11, etc.
+

File: screen.info, Node: Command Character, Next: Help, Prev: Bind Examples, Up: Key Binding
Command Character
=================
- - Command: escape XY
+ - Command: escape xy
(none)
Set the command character to X and the character generating a
literal command character (by triggering the `meta' command) to Y
@@ -566,7 +785,7 @@ Command Character
character, such as `\^' or `\\'. The default is `^Aa', but ```'
is recommended by one of the authors.
- - Command: defescape XY
+ - Command: defescape xy
(none)
Set the default command characters. This is equivalent to the
command `escape' except that it is useful for multiuser sessions
@@ -578,14 +797,15 @@ Command Character
(`C-a a')
Send the command character (`C-a') to the process in the current
window. The keystroke for this command is the second parameter to
- the `-e' command line switch (*note Invoking Screen::.), or the
+ the `-e' command line switch (*note Invoking Screen::), or the
`escape' .screenrc directive.
- - Command: command
+ - Command: command [-c CLASS]
(none)
This command has the same effect as typing the screen escape
character (`C-a'). It is probably only useful for key bindings.
- *Note Bindkey::.
+ If the `-c' option is given, select the specified command class.
+ *Note Bind::, *Note Bindkey::.

File: screen.info, Node: Help, Next: Bindkey, Prev: Command Character, Up: Key Binding
@@ -599,8 +819,9 @@ Help
pages list all the internal commands followed by their bindings.
Subsequent pages will display the custom commands, one command per
key. Press space when you're done reading each page, or return to
- exit early. All other characters are ignored. *Note Default Key
- Bindings::.
+ exit early. All other characters are ignored. If the `-c' option
+ is given, display all bound commands for the specified command
+ class. *Note Default Key Bindings::.

File: screen.info, Node: Bindkey, Next: Bindkey Examples, Prev: Help, Up: Key Binding
@@ -615,8 +836,8 @@ Bindkey
sequence of characters is encountered. There are three tables: one
that should contain actions programmed by the user, one for the
default actions used for terminal emulation and one for screen's
- copy mode to do cursor movement. *Note Input Translation:: for a
- list of default key bindings.
+ copy mode to do cursor movement. See *Note Input Translation:: for
+ a list of default key bindings.
If the `-d' option is given, bindkey modifies the default table,
`-m' changes the copy mode table and with neither option the user
@@ -685,7 +906,7 @@ Bindkey Control
(none)
Like mapdefault, but don't even look in the default bindkey table.
- - Command: maptimeout TIMO
+ - Command: maptimeout timo
(none)
Set the intercharacter timer for input sequence detection to a
timeout of TIMO ms. The default timeout is 300ms. Maptimeout with
@@ -766,7 +987,7 @@ File: screen.info, Node: Flow, Next: XON/XOFF, Prev: Flow Control Summary, U
Flow
====
- - Command: defflow FSTATE [INTERRUPT]
+ - Command: defflow fstate [interrupt]
(none)
Same as the `flow' command except that the default setting for new
windows is changed. Initial setting is `auto'. Specifying `flow
@@ -774,7 +995,7 @@ Flow
`-fa' and `-i'. Note that if `interrupt' is enabled, all existing
displays are changed immediately to forward interrupt signals.
- - Command: flow [FSTATE]
+ - Command: flow [fstate]
(`C-a f', `C-a C-f')
Sets the flow-control mode for this window to FSTATE, which can be
`on', `off' or `auto'. Without parameters it cycles the current
@@ -872,7 +1093,7 @@ the full terminal definition, or a filename where the terminal `screen'
Note that `screen' honors the `terminfo' command if the system uses
the terminfo database rather than termcap. On such machines the
`$TERMCAP' variable has no effect and you must use the `dumptermcap'
-command (*note Dump Termcap::.) and the `tic' program to generate
+command (*note Dump Termcap::) and the `tic' program to generate
terminfo entries for `screen' windows.
When the boolean `G0' capability is present in the termcap entry for
@@ -910,7 +1131,7 @@ or scrolling regions. Note that this may provoke confusion, when the
session is reattached on a different terminal, as the value of
`$TERMCAP' cannot be modified by parent processes. You can force
`screen' to include all capabilities in `$TERMCAP' with the `-a'
-command-line option (*note Invoking Screen::.).
+command-line option (*note Invoking Screen::).

File: screen.info, Node: Dump Termcap, Next: Termcap Syntax, Prev: Window Termcap, Up: Termcap
@@ -923,7 +1144,7 @@ Write out the window's termcap entry
Write the termcap entry for the virtual terminal optimized for the
currently active window to the file `.termcap' in the user's
`$HOME/.screen' directory (or wherever `screen' stores its
- sockets. *note Files::.). This termcap entry is identical to the
+ sockets. *note Files::). This termcap entry is identical to the
value of the environment variable `$TERMCAP' that is set up by
`screen' for each window. For terminfo based systems you will need
to run a converter like `captoinfo' and then compile the entry with
@@ -935,9 +1156,9 @@ File: screen.info, Node: Termcap Syntax, Next: Termcap Examples, Prev: Dump T
The `termcap' command
=====================
- - Command: termcap TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]
- - Command: terminfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]
- - Command: termcapinfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]
+ - Command: termcap term terminal-tweaks [window-tweaks]
+ - Command: terminfo term terminal-tweaks [window-tweaks]
+ - Command: termcapinfo term terminal-tweaks [window-tweaks]
(none)
Use this command to modify your terminal's termcap entry without
going through all the hassles involved in creating a custom
@@ -971,7 +1192,7 @@ your terminal's termcap, and contains definitions that your terminal
uses to perform certain functions. Specify a null string to leave this
unchanged (e.g. ""). The second (optional) tweak modifies all the
window termcaps, and should contain definitions that screen understands
-(*note Virtual Terminal::.).
+(*note Virtual Terminal::).

File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap
@@ -1022,274 +1243,3 @@ should instead set the `$SCREENCAP' variable prior to running `screen'.
emulation. *Note Termcap: (termcap)Top, for more information on
termcap definitions.
-
-File: screen.info, Node: Special Capabilities, Next: Autonuke, Prev: Termcap Examples, Up: Termcap
-
-Special Terminal Capabilities
-=============================
-
- The following table describes all terminal capabilities that are
-recognized by `screen' and are not in the termcap manual (*note
-Termcap: (termcap)Top.). You can place these capabilities in your
-termcap entries (in `/etc/termcap') or use them with the commands
-`termcap', `terminfo' and `termcapinfo' in your `screenrc' files. It is
-often not possible to place these capabilities in the terminfo database.
-`LP'
- (bool)
- Terminal has VT100 style margins (`magic margins'). Note that this
- capability is obsolete -- `screen' now uses the standard `xn'
- instead.
-
-`Z0'
- (str)
- Change width to 132 columns.
-
-`Z1'
- (str)
- Change width to 80 columns.
-
-`WS'
- (str)
- Resize display. This capability has the desired width and height as
- arguments. SunView(tm) example: `\E[8;%d;%dt'.
-
-`NF'
- (bool)
- Terminal doesn't need flow control. Send ^S and ^Q direct to the
- application. Same as `flow off'. The opposite of this capability
- is `nx'.
-
-`G0'
- (bool)
- Terminal can deal with ISO 2022 font selection sequences.
-
-`S0'
- (str)
- Switch charset `G0' to the specified charset. Default is `\E(%.'.
-
-`E0'
- (str)
- Switch charset `G0' back to standard charset. Default is `\E(B'.
-
-`C0'
- (str)
- Use the string as a conversion table for font 0. See the `ac'
- capability for more details.
-
-`CS'
- (str)
- Switch cursor-keys to application mode.
-
-`CE'
- (str)
- Switch cursor-keys to cursor mode.
-
-`AN'
- (bool)
- Enable autonuke for displays of this terminal type. (*note
- Autonuke::.).
-
-`OL'
- (num)
- Set the output buffer limit. See the `obuflimit' command (*note
- Obuflimit::.) for more details.
-
-`KJ'
- (str)
- Set the kanji type of the terminal. Valid strings are `jis', `euc'
- and `sjis'.
-
-`AF'
- (str)
- Change character foreground color in an ANSI conform way. This
- capability will almost always be set to `\E[3%dm' (`\E[3%p1%dm' on
- terminfo machines).
-
-`AB'
- (str)
- Same as `AF', but change background color.
-
-`AX'
- (bool)
- Does understand ANSI set default fg/bg color (`\E[39m / \E[49m').
-
-`XC'
- (str)
- Describe a translation of characters to strings depending on the
- current font. (*note Character Translation::.).
-
-`TF'
- (bool)
- Add missing capabilities to the termcap/info entry. (Set by
- default).
-
-
-File: screen.info, Node: Autonuke, Next: Obuflimit, Prev: Special Capabilities, Up: Termcap
-
-Autonuke
-========
-
- - Command: autonuke STATE
- (none)
- Sets whether a clear screen sequence should nuke all the output
- that has not been written to the terminal. *Note Obuflimit::.
- This property is set per display, not per window.
-
- - Command: defautonuke STATE
- (none)
- Same as the `autonuke' command except that the default setting for
- new displays is also changed. Initial setting is `off'. Note that
- you can use the special `AN' terminal capability if you want to
- have a terminal type dependent setting.
-
-
-File: screen.info, Node: Obuflimit, Next: Character Translation, Prev: Autonuke, Up: Termcap
-
-Obuflimit
-=========
-
- - Command: obuflimit [LIMIT]
- (none)
- If the output buffer contains more bytes than the specified limit,
- no more data will be read from the windows. The default value is
- 256. If you have a fast display (like `xterm'), you can set it to
- some higher value. If no argument is specified, the current
- setting is displayed. This property is set per display, not per
- window.
-
- - Command: defobuflimit LIMIT
- (none)
- Same as the `obuflimit' command except that the default setting
- for new displays is also changed. Initial setting is 256 bytes.
- Note that you can use the special `OL' terminal capability if you
- want to have a terminal type dependent limit.
-
-
-File: screen.info, Node: Character Translation, Prev: Obuflimit, Up: Termcap
-
-Character Translation
-=====================
-
- `Screen' has a powerful mechanism to translate characters to
-arbitrary strings depending on the current font and terminal type. Use
-this feature if you want to work with a common standard character set
-(say ISO8851-latin1) even on terminals that scatter the more unusual
-characters over several national language font pages.
-
- Syntax:
-
- XC=<CHARSET-MAPPING>{,,<CHARSET-MAPPING>}
- <CHARSET-MAPPING> := <DESIGNATOR><TEMPLATE>{,<MAPPING>}
- <MAPPING> := <CHAR-TO-BE-MAPPED><TEMPLATE-ARG>
-
- The things in braces may be repeated any number of times.
-
- A <CHARSET-MAPPING> tells screen how to map characters in font
-<DESIGNATOR> (`B': Ascii, `A': UK, `K': german, etc.) to strings. Every
-<MAPPING> describes to what string a single character will be
-translated. A template mechanism is used, as most of the time the codes
-have a lot in common (for example strings to switch to and from another
-charset). Each occurrence of `%' in <TEMPLATE> gets substituted with the
-TEMPLATE-ARG specified together with the character. If your strings are
-not similar at all, then use `%' as a template and place the full
-string in <TEMPLATE-ARG>. A quoting mechanism was added to make it
-possible to use a real `%'. The `\' character quotes the special
-characters `\', `%', and `,'.
-
- Here is an example:
-
- termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]'
-
- This tells `screen', how to translate ISOlatin1 (charset `B') upper
-case umlaut characters on a `hp700' terminal that has a german charset.
-`\304' gets translated to `\E(K[\E(B' and so on. Note that this line
-gets parsed *three* times before the internal lookup table is built,
-therefore a lot of quoting is needed to create a single `\'.
-
- Another extension was added to allow more emulation: If a mapping
-translates the unquoted `%' char, it will be sent to the terminal
-whenever screen switches to the corresponding <DESIGNATOR>. In this
-special case the template is assumed to be just `%' because the charset
-switch sequence and the character mappings normally haven't much in
-common.
-
- This example shows one use of the extension:
- termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334'
-
- Here, a part of the german (`K') charset is emulated on an xterm.
-If screen has to change to the `K' charset, `\E(B' will be sent to the
-terminal, i.e. the ASCII charset is used instead. The template is just
-`%', so the mapping is straightforward: `[' to `\304', `\' to `\326',
-and `]' to `\334'.
-
-
-File: screen.info, Node: Message Line, Next: Logging, Prev: Termcap, Up: Top
-
-The Message Line
-****************
-
- `screen' displays informational messages and other diagnostics in a
-"message line" at the bottom of the screen. If your terminal has a
-status line defined in its termcap, screen will use this for displaying
-its messages, otherwise the last line of the screen will be temporarily
-overwritten and output will be momentarily interrupted. The message
-line is automatically removed after a few seconds delay, but it can also
-be removed early (on terminals without a status line) by beginning to
-type.
-
-* Menu:
-
-* Privacy Message:: Using the message line from your program.
-* Hardware Status Line:: Use the terminal's hardware status line.
-* Last Message:: Redisplay the last message.
-* Message Wait:: Control how long messages are displayed.
-
-
-File: screen.info, Node: Privacy Message, Next: Hardware Status Line, Up: Message Line
-
-Using the message line from your program
-========================================
-
- The message line facility can be used by an application running in
-the current window by means of the ANSI "Privacy message" control
-sequence. For instance, from within the shell, try something like:
-
- echo "^Hello world from window $WINDOW\"
-
- where `' is ASCII ESC and `^' is a literal caret or up-arrow.
-
-
-File: screen.info, Node: Hardware Status Line, Next: Last Message, Prev: Privacy Message, Up: Message Line
-
-Hardware Status Line
-====================
-
- - Command: hardstatus [STATE]
- - Command: hardstatus [`always']`lastline'|`message'|`ignore' [STRING]
- - Command: hardstatus `string' [STRING]
- (none)
- This command configures the use and emulation of the terminal's
- hardstatus line. The first form toggles whether `screen' will use
- the hardware status line to display messages. If the flag is set
- to `off', these messages are overlaid in reverse video mode at the
- display line. The default setting is `on'.
-
- The second form tells screen what to do if the terminal doesn't
- have a hardstatus line (i.e. the termcap/terminfo capabilities
- "hs", "ts", "fs" and "ds" are not set). If the type `lastline' is
- used, screen will reserve the last line of the display for the
- hardstatus. `message' uses `screen''s message mechanism and
- `ignore' tells `screen' never to display the hardstatus. If you
- prepend the word `always' to the type, `screen' will use the type
- even if the terminal supports a hardstatus line.
-
- The third form specifies the contents of the hardstatus line.
- `%h' is used as default string, i.e. the stored hardstatus of the
- current window (settable via `\E]0;^G' or `\E_\\') is displayed.
- You can customize this to any string you like including string
- escapes (*Note String Escapes::). If you leave out the argument
- STRING, the current string is displayed.
-
- You can mix the second and third form by providing the string as
- additional argument.
-
diff --git a/doc/screen.info-4 b/doc/screen.info-4
index 727e2af..300a2ba 100644
--- a/doc/screen.info-4
+++ b/doc/screen.info-4
@@ -1,9 +1,14 @@
-This is Info file screen.info, produced by Makeinfo-1.55 from the input
-file ./screen.texinfo.
+This is screen.info, produced by makeinfo version 4.0 from
+./screen.texinfo.
+
+INFO-DIR-SECTION General Commands
+START-INFO-DIR-ENTRY
+* Screen: (screen). Full-screen window manager.
+END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-1995 Free Software Foundation, Inc.
+ Copyright (c) 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -20,6 +25,285 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Special Capabilities, Next: Autonuke, Prev: Termcap Examples, Up: Termcap
+
+Special Terminal Capabilities
+=============================
+
+ The following table describes all terminal capabilities that are
+recognized by `screen' and are not in the termcap manual (*note
+Termcap: (termcap)Top.). You can place these capabilities in your
+termcap entries (in `/etc/termcap') or use them with the commands
+`termcap', `terminfo' and `termcapinfo' in your `screenrc' files. It is
+often not possible to place these capabilities in the terminfo database.
+`LP'
+ (bool)
+ Terminal has VT100 style margins (`magic margins'). Note that this
+ capability is obsolete -- `screen' now uses the standard `xn'
+ instead.
+
+`Z0'
+ (str)
+ Change width to 132 columns.
+
+`Z1'
+ (str)
+ Change width to 80 columns.
+
+`WS'
+ (str)
+ Resize display. This capability has the desired width and height as
+ arguments. SunView(tm) example: `\E[8;%d;%dt'.
+
+`NF'
+ (bool)
+ Terminal doesn't need flow control. Send ^S and ^Q direct to the
+ application. Same as `flow off'. The opposite of this capability
+ is `nx'.
+
+`G0'
+ (bool)
+ Terminal can deal with ISO 2022 font selection sequences.
+
+`S0'
+ (str)
+ Switch charset `G0' to the specified charset. Default is `\E(%.'.
+
+`E0'
+ (str)
+ Switch charset `G0' back to standard charset. Default is `\E(B'.
+
+`C0'
+ (str)
+ Use the string as a conversion table for font 0. See the `ac'
+ capability for more details.
+
+`CS'
+ (str)
+ Switch cursor-keys to application mode.
+
+`CE'
+ (str)
+ Switch cursor-keys to cursor mode.
+
+`AN'
+ (bool)
+ Enable autonuke for displays of this terminal type. (*note
+ Autonuke::).
+
+`OL'
+ (num)
+ Set the output buffer limit. See the `obuflimit' command (*note
+ Obuflimit::) for more details.
+
+`KJ'
+ (str)
+ Set the encoding of the terminal. See the `encoding' command
+ (*note Character Processing::) for valid encodings.
+
+`AF'
+ (str)
+ Change character foreground color in an ANSI conform way. This
+ capability will almost always be set to `\E[3%dm' (`\E[3%p1%dm' on
+ terminfo machines).
+
+`AB'
+ (str)
+ Same as `AF', but change background color.
+
+`AX'
+ (bool)
+ Does understand ANSI set default fg/bg color (`\E[39m / \E[49m').
+
+`XC'
+ (str)
+ Describe a translation of characters to strings depending on the
+ current font. (*note Character Translation::).
+
+`XT'
+ (bool)
+ Terminal understands special xterm sequences (OSC, mouse tracking).
+
+`C8'
+ (bool)
+ Terminal needs bold to display high-intensity colors (e.g. Eterm).
+
+`TF'
+ (bool)
+ Add missing capabilities to the termcap/info entry. (Set by
+ default).
+
+
+File: screen.info, Node: Autonuke, Next: Obuflimit, Prev: Special Capabilities, Up: Termcap
+
+Autonuke
+========
+
+ - Command: autonuke STATE
+ (none)
+ Sets whether a clear screen sequence should nuke all the output
+ that has not been written to the terminal. *Note Obuflimit::.
+ This property is set per display, not per window.
+
+ - Command: defautonuke STATE
+ (none)
+ Same as the `autonuke' command except that the default setting for
+ new displays is also changed. Initial setting is `off'. Note that
+ you can use the special `AN' terminal capability if you want to
+ have a terminal type dependent setting.
+
+
+File: screen.info, Node: Obuflimit, Next: Character Translation, Prev: Autonuke, Up: Termcap
+
+Obuflimit
+=========
+
+ - Command: obuflimit [LIMIT]
+ (none)
+ If the output buffer contains more bytes than the specified limit,
+ no more data will be read from the windows. The default value is
+ 256. If you have a fast display (like `xterm'), you can set it to
+ some higher value. If no argument is specified, the current
+ setting is displayed. This property is set per display, not per
+ window.
+
+ - Command: defobuflimit LIMIT
+ (none)
+ Same as the `obuflimit' command except that the default setting
+ for new displays is also changed. Initial setting is 256 bytes.
+ Note that you can use the special `OL' terminal capability if you
+ want to have a terminal type dependent limit.
+
+
+File: screen.info, Node: Character Translation, Prev: Obuflimit, Up: Termcap
+
+Character Translation
+=====================
+
+ `Screen' has a powerful mechanism to translate characters to
+arbitrary strings depending on the current font and terminal type. Use
+this feature if you want to work with a common standard character set
+(say ISO8851-latin1) even on terminals that scatter the more unusual
+characters over several national language font pages.
+
+ Syntax:
+
+ XC=<CHARSET-MAPPING>{,,<CHARSET-MAPPING>}
+ <CHARSET-MAPPING> := <DESIGNATOR><TEMPLATE>{,<MAPPING>}
+ <MAPPING> := <CHAR-TO-BE-MAPPED><TEMPLATE-ARG>
+
+ The things in braces may be repeated any number of times.
+
+ A <CHARSET-MAPPING> tells screen how to map characters in font
+<DESIGNATOR> (`B': Ascii, `A': UK, `K': german, etc.) to strings.
+Every <MAPPING> describes to what string a single character will be
+translated. A template mechanism is used, as most of the time the codes
+have a lot in common (for example strings to switch to and from another
+charset). Each occurrence of `%' in <TEMPLATE> gets substituted with the
+TEMPLATE-ARG specified together with the character. If your strings are
+not similar at all, then use `%' as a template and place the full
+string in <TEMPLATE-ARG>. A quoting mechanism was added to make it
+possible to use a real `%'. The `\' character quotes the special
+characters `\', `%', and `,'.
+
+ Here is an example:
+
+ termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]'
+
+ This tells `screen', how to translate ISOlatin1 (charset `B') upper
+case umlaut characters on a `hp700' terminal that has a german charset.
+`\304' gets translated to `\E(K[\E(B' and so on. Note that this line
+gets parsed *three* times before the internal lookup table is built,
+therefore a lot of quoting is needed to create a single `\'.
+
+ Another extension was added to allow more emulation: If a mapping
+translates the unquoted `%' char, it will be sent to the terminal
+whenever screen switches to the corresponding <DESIGNATOR>. In this
+special case the template is assumed to be just `%' because the charset
+switch sequence and the character mappings normally haven't much in
+common.
+
+ This example shows one use of the extension:
+ termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334'
+
+ Here, a part of the german (`K') charset is emulated on an xterm.
+If screen has to change to the `K' charset, `\E(B' will be sent to the
+terminal, i.e. the ASCII charset is used instead. The template is just
+`%', so the mapping is straightforward: `[' to `\304', `\' to `\326',
+and `]' to `\334'.
+
+
+File: screen.info, Node: Message Line, Next: Logging, Prev: Termcap, Up: Top
+
+The Message Line
+****************
+
+ `screen' displays informational messages and other diagnostics in a
+"message line" at the bottom of the screen. If your terminal has a
+status line defined in its termcap, screen will use this for displaying
+its messages, otherwise the last line of the screen will be temporarily