summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2011-09-03 14:05:25 +0200
committerAxel Beckert <abe@deuxchevaux.org>2011-09-03 14:05:25 +0200
commit9d943c7539f59f42ba8f8052497dc541fe5f0167 (patch)
treec8725127bf7a68d3d7fe57adca45c204b25adf21
parent0e9a09d7718f02726b12924f7ddb05a992202aa3 (diff)
downloadscreen-9d943c7539f59f42ba8f8052497dc541fe5f0167.tar.gz
Imported Upstream version 4.0.2upstream/4.0.2
-rw-r--r--INSTALL10
-rw-r--r--Makefile.in64
-rw-r--r--NEWS182
-rw-r--r--NEWS.3.9205
-rw-r--r--TODO2
-rw-r--r--acls.c2
-rw-r--r--acls.h1
-rw-r--r--ansi.c176
-rw-r--r--ansi.h2
-rw-r--r--attacher.c30
-rw-r--r--braille.c14
-rw-r--r--braille_tsi.c5
-rw-r--r--comm.c17
-rw-r--r--comm.h.dist329
-rw-r--r--comm.sh4
-rw-r--r--config.h.in31
-rwxr-xr-xconfigure5535
-rw-r--r--configure.in38
-rw-r--r--display.c554
-rw-r--r--display.h46
-rw-r--r--doc/screen.1255
-rw-r--r--doc/screen.info326
-rw-r--r--doc/screen.info-1180
-rw-r--r--doc/screen.info-2358
-rw-r--r--doc/screen.info-3450
-rw-r--r--doc/screen.info-4708
-rw-r--r--doc/screen.info-5324
-rw-r--r--doc/screen.texinfo251
-rw-r--r--encoding.c272
-rw-r--r--etc/completer.zsh4
-rwxr-xr-xetc/countmail67
-rw-r--r--etc/etcscreenrc16
-rw-r--r--etc/screenrc12
-rwxr-xr-xetc/toolcheck4
-rw-r--r--extern.h45
-rw-r--r--fileio.c78
-rw-r--r--help.c314
-rw-r--r--image.h68
-rw-r--r--input.c3
-rw-r--r--kmapdef.c.dist16
-rw-r--r--layer.c171
-rw-r--r--loadav.c9
-rw-r--r--logfile.c3
-rw-r--r--mark.c21
-rw-r--r--misc.c291
-rw-r--r--nethack.c3
-rw-r--r--patchlevel.h41
-rw-r--r--process.c1113
-rw-r--r--pty.c42
-rw-r--r--putenv.c2
-rw-r--r--rcs.h46
-rw-r--r--resize.c98
-rw-r--r--sched.c12
-rw-r--r--screen.c455
-rw-r--r--screen.h8
-rw-r--r--search.c9
-rw-r--r--socket.c60
-rw-r--r--teln.c5
-rw-r--r--term.c12
-rw-r--r--term.h.dist21
-rw-r--r--term.sh3
-rw-r--r--termcap.c342
-rw-r--r--terminfo/screencap10
-rw-r--r--terminfo/screeninfo.src51
-rw-r--r--tty.c.dist50
-rw-r--r--tty.sh50
-rw-r--r--utf8encodings/19bin0 -> 95776 bytes
-rw-r--r--utmp.c12
-rw-r--r--window.c410
-rw-r--r--window.h17
70 files changed, 9829 insertions, 4536 deletions
diff --git a/INSTALL b/INSTALL
index b6c4442..17c2212 100644
--- a/INSTALL
+++ b/INSTALL
@@ -33,7 +33,7 @@ pathnames. Change them to suit your installation requirements. Usually
sysadmins discuss the location of SOCKDIR, whether it should be in /tmp or
not. At least it must be on a filesystem that supports sockets/fifos.
SOCKDIR must not point into an AFS (Andrew File System) mounted directory.
-If you are uncrertain about your NFS implementation, use a UFS directory for
+If you are uncertain about your NFS implementation, use a UFS directory for
SOCKDIR. Personally, I favour a users home directory and recommend the the
/tmp/ area.
The path for ETCSCREENRC may also need to be adapted.
@@ -57,9 +57,9 @@ consult a system administrator and discuss installing screen setuid-root
in some globally accessible directory like /usr/local/bin.
Consider this, when deciding whether you install screen setuid-root:
-- On some machines root priviliges are required to open pty's.
+- On some machines root privileges are required to open pty's.
- Pty's should be owned by the user, so that she can do chmod to prevent
- intrudor attacks. The PTYs used by screen will remain world read-writable
+ intruder attacks. The PTYs used by screen will remain world read-writable
if screen is not installed setuid-root.
- Some commands only work properly when the pty is owned by the user.
These include mesg and biff.
@@ -70,7 +70,7 @@ Consider this, when deciding whether you install screen setuid-root:
instead of the screen windows, if screen is not installed setuid-root.
- Multi-user screen sessions are only allowed when screen has a root-s-bit.
- If screen sockets of multiple users are kept in one directory (e.g.
- /tmp/screens), this directory must be world writeable when screen is not
+ /tmp/screens), this directory must be world writable when screen is not
installed setuid-root. Any user can remove or abuse any socket then.
@@ -91,7 +91,7 @@ $ETCSCREENRC -- do not just copy them. Read them. Look through the
etcscreenrc file for system wide defaults that you like to set. e.g.
autodetach off, startup_message off, vbell on, ...
Since version 3.2.15 the screenrc file syntax changed slightly. All rc files
-from previous versions should be run through the newsyntax script that comes
+from previous versions should be run through the 'newsyntax' script that comes
with this package.
If and only if you want to install screen as a console multiplexer, look
at the *.sample files and what 'make cscreen' suggests.
diff --git a/Makefile.in b/Makefile.in
index 652b75e..db683ac 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -174,7 +174,7 @@ $(SCREEN).tar: .version term.h comm.h tty.c kmapdef.c
mkdir dist
mkdir dist/$(SCREEN)
ln acls.h ansi.h display.h extern.h logfile.h mark.h os.h \
- layer.h patchlevel.h rcs.h screen.h window.h image.h \
+ layer.h patchlevel.h screen.h window.h image.h \
osdef.h.in term.sh tty.sh comm.sh osdef.sh braille.h \
sched.h \
$(CFILES) \
@@ -248,7 +248,7 @@ mdepend: $(CFILES) term.h
echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\
cc -E $$i |\
grep '^# .*"\./.*\.h"' |\
- sort -t'"' -u +1 -2 |\
+ (sort -t'"' -u -k 2,2 2>/dev/null || sort -t'"' -u +1 -2) |\
sed -e 's/.*"\.\/\(.*\)".*/\1/'\
` >> DEPEND ; \
done
@@ -266,66 +266,66 @@ depend.in: $(CFILES) term.h
###############################################################################
### Dependencies:
-screen.o: screen.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+screen.o: screen.c config.h screen.h os.h osdef.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h braille.h \
patchlevel.h logfile.h extern.h
-ansi.o: ansi.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+ansi.o: ansi.c config.h screen.h os.h osdef.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h braille.h extern.h \
logfile.h
-fileio.o: fileio.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+fileio.o: fileio.c 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
-mark.o: mark.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+mark.o: mark.c config.h screen.h os.h osdef.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h mark.h extern.h
-misc.o: misc.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+misc.o: misc.c 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
-resize.o: resize.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+resize.o: resize.c 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
-socket.o: socket.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+socket.o: socket.c 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
-search.o: search.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+search.o: search.c config.h screen.h os.h osdef.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h mark.h extern.h
-tty.o: tty.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
+tty.o: tty.c 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
-term.o: term.c rcs.h term.h
-window.o: window.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+term.o: term.c term.h
+window.o: window.c 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 logfile.h
-utmp.o: utmp.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+utmp.o: utmp.c 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
-loadav.o: loadav.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+loadav.o: loadav.c 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
-putenv.o: putenv.c rcs.h config.h
-help.o: help.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+putenv.o: putenv.c config.h
+help.o: help.c 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
-termcap.o: termcap.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+termcap.o: termcap.c 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
-input.o: input.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+input.o: input.c 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
-attacher.o: attacher.c rcs.h config.h screen.h os.h osdef.h ansi.h \
+attacher.o: attacher.c 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
-pty.o: pty.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
+pty.o: pty.c 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
-process.o: process.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+process.o: process.c 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 logfile.h
-display.o: display.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+display.o: display.c 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 braille.h
-comm.o: comm.c rcs.h config.h acls.h comm.h
+comm.o: comm.c config.h acls.h comm.h
kmapdef.o: kmapdef.c config.h
-acls.o: acls.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
+acls.o: acls.c 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
-braille.o: braille.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+braille.o: braille.c 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 braille.h
braille_tsi.o: braille_tsi.c 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 \
braille.h
-logfile.o: logfile.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+logfile.o: logfile.c 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 logfile.h
-layer.o: layer.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+layer.o: layer.c 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
-sched.o: sched.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+sched.o: sched.c 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 logfile.h
-teln.o: teln.c rcs.h config.h screen.h os.h osdef.h ansi.h acls.h \
+teln.o: teln.c 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 \
+nethack.o: nethack.c 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 \
+encoding.o: encoding.c 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 ad4b9e2..8f2db9e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,182 +1,14 @@
- -------------------------------
- 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 ?
+ What's new in screen-4.0.0 ?
------------------------------
-* 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 ?
- ----------------------------
-
-* real multiuser support
- A window can now be displayed on more than one attached displays.
- Screen does all the necessary clipping if the window size doesn't
- fit the display.
- New command:
- ^AF - fit the window size into the display size.
-
-* split screen support
- A display may now host multiple windows.
- New commands:
- ^AS - split horizontally. This add another region to the display
- ^A<Tab> - move the focus to the next region
- ^AX - kill the current region
- ^AQ - kill all other regions
-
-* hardstatus emulation support
- The last line of the display may now be used as a hardstatus
- line if the terminal doesn't have the 'hs' capability.
- New commands:
- hardstatus [always]lastline
- hardstatus [always]message
- hardstatus [always]ignore
-
-* configurable window seperator and hardstatus strings
- The window (region) seperator and the hardstatus can be set to an
- arbitrary string containing screen's % escape sequences.
- The window's hardstatus is just another escape sequence, '%h'.
- New commands:
- hardstatus string [string]
- caption string [string]
- The default strings are "%h" (hardstatus) and "%3n %t" (caption).
-
-* permanent window seperator
- The window seperator can be set to stay on screen even if
- the display contains only one region
- New commands:
- caption always
- caption splitonly
-
-* many new escapes
- %c - current time HH:MM (*CHANGE*: this was %w in screen-3.7)
- %C - current time HH:MM in 24h format
- %l - the load of the system
- %h - hardstatus of the window
- %w - all window names
- %W - all window names except the current window
- %u - all other users on this window
- %? - the part to the next %? is displayed only if an escape
- expands to an nonempty string.
- %: - "else" part of %?
- Some escapes like %c may be qualified with a '0' (like %0c)
- to make screen use '0' instead of space as a filler.
- Others understand a length qualifier, like %3n.
- If escapes like the current time are used as hardstatus/caption
- string screen will update them so that you can always have
- the current time onscreen.
- *CHANGE* ~ is no longer used as bell character, use ^G instead!
-
-* logfile timestamps and flush timeout
- New commands:
- logfile flush <secs>
- logtstamp [on|off]
- logtstamp string [string]
- logtstamp after [secs]
-
-* configurable breaktype
- You can now choose one of TIOCSBRK, TCSBRK, tcsendbreak.
- New commands:
- breaktype
- defbreaktype
-
-* other new commands:
- hstatus - set the window's hardstatus
- defslowpaste
- defsilence
-
-* optional builtin telnet.
- This is useful if screen is used as frontend to a terminal
- multiplexor. Use //telnet to access the builtin telnet program,
- as in: 'screen //telnet host [port]'
+* new screenrc parser, not 100% compatible.
-* remote detach and reattach change:
- '-d' is now ignored if the screen is already detached and you
- want to reattach. You can also use '-RR' to make screen use
- the first session found if more than one session is available.
- Thus '-d -RR' or '-x -RR' always gets you a screen.
+* screenblanker support: new 'idle', 'blanker', 'blankerprg'
+ commands.
-* support for history compaction
- You can tell screen to suppress trailing blank lines when
- scolling up text into the history buffer. (Wayne Davison)
- New command:
- compacthist
+* zmodem support via the 'zmodem' command.
-* optional Braille support. If you can read Braille and have one of
- the devices listed in README.DOTSCREEN, please compile with
- -DHAVE_BRAILLE and let us know if this feature is useful.
+* nonblock code rewritten, nonblock now understands a timeout.
+ new command 'defnonblock'.
diff --git a/NEWS.3.9 b/NEWS.3.9
new file mode 100644
index 0000000..4dc7891
--- /dev/null
+++ b/NEWS.3.9
@@ -0,0 +1,205 @@
+ -------------------------------
+ What's new in screen-3.9.15 ?
+ -------------------------------
+
+* unicode combining character support
+
+* new encoding: chinese GBK
+
+* new 'backtick' command and string escape to embed command
+ output into e.g. the hardstatus line
+
+
+ -------------------------------
+ What's new in screen-3.9.13 ?
+ -------------------------------
+
+* altscreen support from Gurusamy Sarathy
+
+* new command "maxwin" to set a limit on the number of windows
+
+* new keys in copy&paste mode: 'B' and 'E'
+
+
+ -------------------------------
+ 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 ?
+ ----------------------------
+
+* real multiuser support
+ A window can now be displayed on more than one attached displays.
+ Screen does all the necessary clipping if the window size doesn't
+ fit the display.
+ New command:
+ ^AF - fit the window size into the display size.
+
+* split screen support
+ A display may now host multiple windows.
+ New commands:
+ ^AS - split horizontally. This add another region to the display
+ ^A<Tab> - move the focus to the next region
+ ^AX - kill the current region
+ ^AQ - kill all other regions
+
+* hardstatus emulation support
+ The last line of the display may now be used as a hardstatus
+ line if the terminal doesn't have the 'hs' capability.
+ New commands:
+ hardstatus [always]lastline
+ hardstatus [always]message
+ hardstatus [always]ignore
+
+* configurable window seperator and hardstatus strings
+ The window (region) seperator and the hardstatus can be set to an
+ arbitrary string containing screen's % escape sequences.
+ The window's hardstatus is just another escape sequence, '%h'.
+ New commands:
+ hardstatus string [string]
+ caption string [string]
+ The default strings are "%h" (hardstatus) and "%3n %t" (caption).
+
+* permanent window seperator
+ The window seperator can be set to stay on screen even if
+ the display contains only one region
+ New commands:
+ caption always
+ caption splitonly
+
+* many new escapes
+ %c - current time HH:MM (*CHANGE*: this was %w in screen-3.7)
+ %C - current time HH:MM in 24h format
+ %l - the load of the system
+ %h - hardstatus of the window
+ %w - all window names
+ %W - all window names except the current window
+ %u - all other users on this window
+ %? - the part to the next %? is displayed only if an escape
+ expands to an nonempty string.
+ %: - "else" part of %?
+ Some escapes like %c may be qualified with a '0' (like %0c)
+ to make screen use '0' instead of space as a filler.
+ Others understand a length qualifier, like %3n.
+ If escapes like the current time are used as hardstatus/caption
+ string screen will update them so that you can always have
+ the current time onscreen.
+ *CHANGE* ~ is no longer used as bell character, use ^G instead!
+
+* logfile timestamps and flush timeout
+ New commands:
+ logfile flush <secs>
+ logtstamp [on|off]
+ logtstamp string [string]
+ logtstamp after [secs]
+
+* configurable breaktype
+ You can now choose one of TIOCSBRK, TCSBRK, tcsendbreak.
+ New commands:
+ breaktype
+ defbreaktype
+
+* other new commands:
+ hstatus - set the window's hardstatus
+ defslowpaste
+ defsilence
+
+* optional builtin telnet.
+ This is useful if screen is used as frontend to a terminal
+ multiplexor. Use //telnet to access the builtin telnet program,
+ as in: 'screen //telnet host [port]'
+
+* remote detach and reattach change:
+ '-d' is now ignored if the screen is already detached and you
+ want to reattach. You can also use '-RR' to make screen use
+ the first session found if more than one session is available.
+ Thus '-d -RR' or '-x -RR' always gets you a screen.
+
+* support for history compaction
+ You can tell screen to suppress trailing blank lines when
+ scolling up text into the history buffer. (Wayne Davison)
+ New command:
+ compacthist
+
+* optional Braille support. If you can read Braille and have one of
+ the devices listed in README.DOTSCREEN, please compile with
+ -DHAVE_BRAILLE and let us know if this feature is useful.
+
diff --git a/TODO b/TODO
index 01912af..54b2b9f 100644
--- a/TODO
+++ b/TODO
@@ -2,6 +2,6 @@
- process.c cleanup via comm splitting
- writelocks?
- partial?
-- nonblock?
- type into several windows at once (for cluster admins)
- configurable digraph table
+- command line options should overwrite config files.
diff --git a/acls.c b/acls.c
index 93b951a..0f98df2 100644
--- a/acls.c
+++ b/acls.c
@@ -20,8 +20,6 @@
*
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: acls.c,v 1.12 1994/05/31 12:31:21 mlschroe Exp $ FAU")
#include <sys/types.h>
diff --git a/acls.h b/acls.h
index b71b573..c41b714 100644
--- a/acls.h
+++ b/acls.h
@@ -19,7 +19,6 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
****************************************************************
- * RCS_ID("$Id: acl.h,v 1.7 1993/07/30 01:24:06 jnweiger Exp $ FAU")
*/
#ifdef MULTIUSER
diff --git a/ansi.c b/ansi.c
index 925735d..4f92e58 100644
--- a/ansi.c
+++ b/ansi.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: ansi.c,v 1.22 1994/05/31 12:31:25 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <fcntl.h>
#ifndef sun /* we want to know about TIOCPKT. */
@@ -37,6 +34,8 @@ RCS_ID("$Id: ansi.c,v 1.22 1994/05/31 12:31:25 mlschroe Exp $ FAU")
#include "logfile.h"
extern struct display *display, *displays;
+extern struct win *fore; /* for 83 escape */
+extern struct layer *flayer; /* for 83 escape */
extern struct NewWindow nwin_default; /* for ResetWindow() */
extern int nversion; /* numerical version of screen */
@@ -61,6 +60,7 @@ static int rows, cols; /* window size of the curr window */
int visual_bell = 0;
int use_hardstatus = 1; /* display status line in hs */
char *printcmd = 0;
+int use_altscreen = 0; /* enable alternate screen support? */
unsigned char *blank; /* line filled with spaces */
unsigned char *null; /* line filled with '\0' */
@@ -283,10 +283,6 @@ char *s;
* - record program output in window scrollback
* - translate program output for the display and put it into the obuf.
*
- * Output is only supressed, where obuf is beyond maximum and the flag
- * nonblock is set. Then we set nonblock from 1 to 2 and output a '~'
- * character instead. nonblock should be reset to 1 by a successfull
- * write. Where nonblock isn't set, the obufmax is ignored.
*/
void
WriteString(wp, buf, len)
@@ -310,23 +306,6 @@ register int len;
cols = curr->w_width;
rows = curr->w_height;
- /* The status should be already gone, so this is "Just in Case" */
- 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 */
- AddChar('~');
- /* private flag that prevents more output */
- D_nonblock = 2;
- }
- }
-
if (curr->w_silence)
SetTimeout(&curr->w_silenceev, curr->w_silencewait * 1000);
@@ -589,14 +568,16 @@ register int len;
break;
case ';':
case ':':
- curr->w_NumArgs++;
+ if (curr->w_NumArgs < MAXARGS)
+ curr->w_NumArgs++;
break;
default:
if (Special(c))
break;
if (c >= '@' && c <= '~')
{
- curr->w_NumArgs++;
+ if (curr->w_NumArgs < MAXARGS)
+ curr->w_NumArgs++;
DoCSI(c, curr->w_intermediate);
if (curr->w_state != PRIN)
curr->w_state = LIT;
@@ -669,15 +650,74 @@ register int len;
#ifdef FONT
# ifdef DW_CHARS
if (!curr->w_mbcs)
+ {
+# endif
+ if (c < 0x80 || curr->w_gr == 0)
+ curr->w_rend.font = curr->w_FontL;
+# ifdef ENCODINGS
+ else if (curr->w_gr == 2 && !curr->w_ss)
+ curr->w_rend.font = curr->w_FontE;
+# endif
+ else
+ curr->w_rend.font = curr->w_FontR;
+# ifdef DW_CHARS
+ }
# 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;
+ {
+ if (curr->w_rend.font == '0')
+ {
+ struct mchar mc, *mcp;
+
+ debug1("SPECIAL %x\n", c);
+ mc.image = c;
+ mc.mbcs = 0;
+ mc.font = '0';
+ mcp = recode_mchar(&mc, 0, UTF8);
+ debug2("%02x %02x\n", mcp->image, mcp->font);
+ c = mcp->image | mcp->font << 8;
+ }
+ curr->w_rend.font = 0;
+ }
# ifdef DW_CHARS
- if (curr->w_encoding == UTF8 && utf8_isdouble(c))
+ if (curr->w_encoding == UTF8 && c >= 0x1100 && utf8_isdouble(c))
curr->w_mbcs = 0xff;
# endif
+ if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c))
+ {
+ int ox, oy;
+ struct mchar omc;
+
+ ox = curr->w_x - 1;
+ oy = curr->w_y;
+ if (ox < 0)
+ {
+ ox = curr->w_width - 1;
+ oy--;
+ }
+ if (oy < 0)
+ oy = 0;
+ copy_mline2mchar(&omc, &curr->w_mlines[oy], ox);
+ if (omc.image == 0xff && omc.font == 0xff)
+ {
+ ox--;
+ if (ox >= 0)
+ {
+ copy_mline2mchar(&omc, &curr->w_mlines[oy], ox);
+ omc.mbcs = 0xff;
+ }
+ }
+ if (ox >= 0)
+ {
+ utf8_handle_comb(c, &omc);
+ MFixLine(curr, oy, &omc);
+ copy_mchar2mline(&omc, &curr->w_mlines[oy], ox);
+ LPutChar(&curr->w_layer, &omc, ox, oy);
+ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
+ }
+ break;
+ }
font = curr->w_rend.font;
# endif
# ifdef DW_CHARS
@@ -694,6 +734,8 @@ register int len;
}
}
# endif
+ if (font == 031 && c == 0x80 && !curr->w_mbcs)
+ font = curr->w_rend.font = 0;
if (is_dw_font(font) && c == ' ')
font = curr->w_rend.font = 0;
if (is_dw_font(font) || curr->w_mbcs)
@@ -746,7 +788,7 @@ register int len;
debug2("SJIS after %x %x\n", c, t);
}
# endif
- if (t && curr->w_gr && font != 030)
+ if (t && curr->w_gr && font != 030 && font != 031)
{
t &= 0x7f;
if (t < ' ')
@@ -769,9 +811,18 @@ register int len;
else if (curr->w_gr)
# endif
{
+#ifdef ENCODINGS
+ if (c == 0x80 && font == 0 && curr->w_encoding == GBK)
+ c = 0xa4;
+ else
+ c &= 0x7f;
+ if (c < ' ' && font != 031)
+ goto tryagain;
+#else
c &= 0x7f;
if (c < ' ') /* this is ugly but kanji support */
goto tryagain; /* prevents nicer programming */
+#endif
}
#endif /* FONT */
if (c == '\177')
@@ -1181,6 +1232,8 @@ int c, intermediate;
a1 = curr->w_width;
if (a2 < 1)
a2 = curr->w_height;
+ if (a1 > 10000 || a2 > 10000)
+ break;
WChangeSize(curr, a1, a2);
cols = curr->w_width;
rows = curr->w_height;
@@ -1334,10 +1387,28 @@ int c, intermediate;
/* case 40: 132 col enable */
/* case 42: NRCM: 7bit NRC character mode */
/* case 44: margin bell enable */
+ case 47: /* xterm-like alternate screen */
+ case 1047: /* xterm-like alternate screen */
+ case 1049: /* xterm-like alternate screen */
+ if (use_altscreen)
+ {
+ if (i)
+ EnterAltScreen(curr);
+ else
+ LeaveAltScreen(curr);
+ if (a1 == 47 && !i)
+ curr->w_saved = 0;
+ LRefreshAll(&curr->w_layer, 0);
+ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
+ }
+ break;
/* 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;
+ case 1001: /* VT200 highlight mouse */
+ case 1002: /* button event mouse*/
+ case 1003: /* any event mouse*/
+ curr->w_mouse = i ? a1 : 0;
LMouseMode(&curr->w_layer, curr->w_mouse);
break;
}
@@ -1400,19 +1471,26 @@ StringEnd()
{
/* special execute commands sequence */
char *args[MAXARGS];
+ int argl[MAXARGS];
struct acluser *windowuser;
windowuser = *FindUserPtr(":window:");
- if (windowuser && Parse(p, args))
+ if (windowuser && Parse(p, sizeof(curr->w_string) - (p - curr->w_string), args, argl))
{
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;
+ if (display == 0)
+ display = displays;
EffectiveAclUser = windowuser;
- DoCommand(args);
+ fore = curr;
+ flayer = fore->w_savelayer ? fore->w_savelayer : &fore->w_layer;
+ DoCommand(args, argl);
EffectiveAclUser = 0;
+ fore = 0;
+ flayer = 0;
}
break;
}
@@ -1481,7 +1559,7 @@ StringEnd()
case AKA:
if (curr->w_title == curr->w_akabuf && !*curr->w_string)
break;
- ChangeAKA(curr, curr->w_string, 20);
+ ChangeAKA(curr, curr->w_string, strlen(curr->w_string));
if (!*curr->w_string)
curr->w_autoaka = curr->w_y + 1;
break;
@@ -1497,9 +1575,11 @@ PrintStart()
curr->w_pdisplay = 0;
/* find us a nice display to print on, fore prefered */
- for (display = displays; display; display = display->d_next)
- if (curr == D_fore && (printcmd || D_PO))
- break;
+ display = curr->w_lastdisp;
+ if (!(display && curr == D_fore && (printcmd || D_PO)))
+ for (display = displays; display; display = display->d_next)
+ if (curr == D_fore && (printcmd || D_PO))
+ break;
if (!display)
{
struct canvas *cv;
@@ -2046,7 +2126,7 @@ SelectRendition()
cx &= 0x0f;
# endif
#endif
- if (j < 0 || j >= (sizeof(rendlist)/sizeof(*rendlist)))
+ if (j < 0 || j >= (int)(sizeof(rendlist)/sizeof(*rendlist)))
continue;
j = rendlist[j];
if (j & (1 << NATTR))
@@ -2097,10 +2177,20 @@ struct win *p;
char *s;
int l;
{
- if (l > 20)
- l = 20;
- strncpy(p->w_akachange, s, l);
- p->w_akachange[l] = 0;
+ int i, c;
+
+ for (i = 0; l > 0; l--)
+ {
+ if (p->w_akachange + i == p->w_akabuf + sizeof(p->w_akabuf) - 1)
+ break;
+ c = (unsigned char)*s++;
+ if (c == 0)
+ break;
+ if (c < 32 || c == 127 || (c >= 128 && c < 160 && p->w_c1))
+ continue;
+ p->w_akachange[i++] = c;
+ }
+ p->w_akachange[i] = 0;
p->w_title = p->w_akachange;
if (p->w_akachange != p->w_akabuf)
if (p->w_akachange[0] == 0 || p->w_akachange[-1] == ':')
@@ -2543,6 +2633,7 @@ int x, y;
MFixLine(p, y, c);
ml = &p->w_mlines[y];
MKillDwRight(p, ml, x);
+ MKillDwLeft(p, ml, x);
copy_mchar2mline(c, ml, x);
#ifdef DW_CHARS
if (c->mbcs)
@@ -2967,3 +3058,4 @@ int what;
}
display = olddisplay;
}
+
diff --git a/ansi.h b/ansi.h
index 1ac661b..31a8818 100644
--- a/ansi.h
+++ b/ansi.h
@@ -127,6 +127,7 @@ enum move_t {
#define BIG5 5
#define KOI8R 6
#define CP1251 7
+#define GBK 20
#define EUC EUC_JP
@@ -167,4 +168,3 @@ enum move_t {
# define dw_left(ml, x, enc) 0
# define dw_right(ml, x, enc) 0
#endif
-
diff --git a/attacher.c b/attacher.c
index 92de3ce..792ff97 100644
--- a/attacher.c
+++ b/attacher.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: attacher.c,v 1.8 1994/05/31 12:31:32 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -660,7 +657,7 @@ LockTerminal()
sigret_t (*sigs[NSIG])__P(SIGPROTOARG);
for (sig = 1; sig < NSIG; sig++)
- sigs[sig] = signal(sig, SIG_IGN);
+ sigs[sig] = signal(sig, sig == SIGCHLD ? SIG_DFL : SIG_IGN);
signal(SIGHUP, LockHup);
printf("\n");
@@ -810,7 +807,7 @@ screen_builtin_lck()
pam_handle_t *pamh = 0;
int pam_error;
#else
- char *pass, mypass[9];
+ char *pass, mypass[16 + 1], salt[3];
#endif
#ifndef USE_PAM
@@ -819,8 +816,8 @@ screen_builtin_lck()
{
if ((pass = getpass("Key: ")))
{
- strncpy(mypass, pass, 8);
- mypass[8] = 0;
+ strncpy(mypass, pass, sizeof(mypass) - 1);
+ mypass[sizeof(mypass) - 1] = 0;
if (*mypass == 0)
return;
if ((pass = getpass("Again: ")))
@@ -839,7 +836,12 @@ screen_builtin_lck()
sleep(2);
return;
}
- pass = 0;
+
+ salt[0] = 'A' + (int)(time(0) % 26);
+ salt[1] = 'A' + (int)((time(0) >> 6) % 26);
+ salt[2] = 0;
+ pass = crypt(mypass, salt);
+ pass = ppp->pw_passwd = SaveStr(pass);
}
#endif
@@ -881,16 +883,8 @@ screen_builtin_lck()
if (pam_error == PAM_SUCCESS)
break;
#else
- if (pass)
- {
- if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
- break;
- }
- else
- {
- if (!strcmp(cp1, mypass))
- break;
- }
+ if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
+ break;
#endif
debug("screen_builtin_lck: NO!!!!!\n");
bzero(cp1, strlen(cp1));
diff --git a/braille.c b/braille.c
index a0c1bc6..9951087 100644
--- a/braille.c
+++ b/braille.c
@@ -24,8 +24,6 @@
*
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: braille.c,v 1.1 1995/09/06 15:45:26 jnweiger Exp jnweiger $")
#include <stdio.h>
#include <fcntl.h>
@@ -229,17 +227,23 @@ char *tablename;
FILE *fp;
char buffer[80], a[10];
- if ((fp = fopen(tablename, "r")) == 0)
+ if ((fp = secfopen(tablename, "r")) == 0)
{
- Msg(0, "Braille table not found: %s ", tablename);
+ Msg(errno, "Braille table not found: %s ", tablename);
return -1;
}
bzero(bd.bd_btable, 256);
+ /* format:
+ * Dec Hex Braille Description
+ * 7 07 (12-45--8) BEL
+ */
while (fgets(buffer, sizeof(buffer), fp))
{
if (buffer[0] == '#')
continue;
- sscanf(buffer,"%d %x %s", &i, &j, a);
+ sscanf(buffer,"%d %x %8s", &i, &j, a);
+ if (i < 0 || i > 255)
+ continue;
for (j=1, p=1, c=0; j<9; j++, p*=2)
if (a[j] == '0' + j)
c += p;
diff --git a/braille_tsi.c b/braille_tsi.c
index 672a85d..eed260a 100644
--- a/braille_tsi.c
+++ b/braille_tsi.c
@@ -24,7 +24,6 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
****************************************************************
- * $Id: bd-tsi.c,v 1.1 1995/09/06 15:46:36 jnweiger Exp jnweiger $
*/
#include "config.h"
@@ -281,13 +280,17 @@ struct key2rc *tab;
if (tab[i].key != -1 && tab[i].nr != RC_ILLEGAL)
{
char *args[3];
+ int argl[2];
struct action act;
args[0] = tab[i].arg1;
args[1] = tab[i].arg2;
args[2] = 0;
+ argl[0] = args[0] ? strlen(args[0]) : 0;
+ argl[1] = args[1] ? strlen(args[1]) : 0;
act.nr = tab[i].nr;
act.args = args;
+ act.argl = argl;
display = bd.bd_dpy;
DoAction(&act, -2);
}
diff --git a/comm.c b/comm.c
index e053ec7..0934847 100644
--- a/comm.c
+++ b/comm.c
@@ -30,9 +30,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: comm.c,v 1.10 1993/11/30 19:28:07 mlschroe Exp $ FAU")
-
#include "config.h"
#include "acls.h"
#include "comm.h"
@@ -55,6 +52,7 @@ struct comm comms[RC_LAST + 1] =
{ "addacl", ARGS_1234 },
#endif
{ "allpartial", NEED_DISPLAY|ARGS_1 },
+ { "altscreen", ARGS_01 },
{ "at", NEED_DISPLAY|ARGS_2|ARGS_ORMORE },
#ifdef COLOR
{ "attrcolor", ARGS_12 },
@@ -63,6 +61,7 @@ struct comm comms[RC_LAST + 1] =
#ifdef AUTO_NUKE
{ "autonuke", NEED_DISPLAY|ARGS_1 },
#endif
+ { "backtick", ARGS_1|ARGS_ORMORE },
#ifdef COLOR
{ "bce", NEED_FORE|ARGS_01 },
#endif
@@ -97,6 +96,10 @@ struct comm comms[RC_LAST + 1] =
#ifdef MAPKEYS
{ "bindkey", ARGS_0|ARGS_ORMORE },
#endif
+ { "blanker", NEED_DISPLAY|ARGS_0},
+#ifdef BLANKER_PRG
+ { "blankerprg", ARGS_1|ARGS_ORMORE },
+#endif
{ "break", NEED_FORE|ARGS_01 },
{ "breaktype", NEED_FORE|ARGS_01 },
#ifdef COPY_PASTE
@@ -146,6 +149,9 @@ struct comm comms[RC_LAST + 1] =
#endif
{ "defmode", ARGS_1 },
{ "defmonitor", ARGS_1 },
+#ifdef MULTI
+ { "defnonblock", ARGS_1 },
+#endif
{ "defobuflimit", ARGS_1 },
#ifdef COPY_PASTE
{ "defscrollback", ARGS_1 },
@@ -188,6 +194,7 @@ struct comm comms[RC_LAST + 1] =
{ "history", NEED_DISPLAY|NEED_FORE|ARGS_0 },
#endif
{ "hstatus", NEED_FORE|ARGS_1 },
+ { "idle", ARGS_0|ARGS_ORMORE },
{ "ignorecase", ARGS_01 },
{ "info", NEED_LAYER|ARGS_0 },
#ifdef ENCODINGS
@@ -213,6 +220,7 @@ struct comm comms[RC_LAST + 1] =
#ifdef COPY_PASTE
{ "markkeys", ARGS_1 },
#endif
+ { "maxwin", ARGS_1 },
{ "meta", NEED_LAYER|ARGS_0 },
{ "monitor", NEED_FORE|ARGS_01 },
{ "msgminwait", ARGS_1 },
@@ -312,5 +320,8 @@ struct comm comms[RC_LAST + 1] =
{ "writelock", NEED_FORE|ARGS_01 },
{ "xoff", NEED_LAYER|ARGS_0 },
{ "xon", NEED_LAYER|ARGS_0 },
+#ifdef ZMODEM
+ { "zmodem", ARGS_012 },
+#endif
{ "zombie", ARGS_01 }
};
diff --git a/comm.h.dist b/comm.h.dist
index 3ddd8e4..bdc620e 100644
--- a/comm.h.dist
+++ b/comm.h.dist
@@ -43,6 +43,7 @@ struct action
{
int nr;
char **args;
+ int *argl;
};
#define RC_ILLEGAL -1
@@ -55,164 +56,172 @@ struct action
#define RC_ACTIVITY 5
#define RC_ADDACL 6
#define RC_ALLPARTIAL 7
-#define RC_AT 8
-#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_ALTSCREEN 8
+#define RC_AT 9
+#define RC_ATTRCOLOR 10
+#define RC_AUTODETACH 11
+#define RC_AUTONUKE 12
+#define RC_BACKTICK 13
+#define RC_BCE 14
+#define RC_BELL 15
+#define RC_BELL_MSG 16
+#define RC_BIND 17
+#define RC_BINDKEY 18
+#define RC_BLANKER 19
+#define RC_BLANKERPRG 20
+#define RC_BREAK 21
+#define RC_BREAKTYPE 22
+#define RC_BUFFERFILE 23
+#define RC_C1 24
+#define RC_CAPTION 25
+#define RC_CHACL 26
+#define RC_CHARSET 27
+#define RC_CHDIR 28
+#define RC_CLEAR 29
+#define RC_COLON 30
+#define RC_COMMAND 31
+#define RC_COMPACTHIST 32
+#define RC_CONSOLE 33
+#define RC_COPY 34
+#define RC_CRLF 35
+#define RC_DEBUG 36
+#define RC_DEFAUTONUKE 37
+#define RC_DEFBCE 38
+#define RC_DEFBREAKTYPE 39
+#define RC_DEFC1 40
+#define RC_DEFCHARSET 41
+#define RC_DEFENCODING 42
+#define RC_DEFESCAPE 43
+#define RC_DEFFLOW 44
+#define RC_DEFGR 45
+#define RC_DEFHSTATUS 46
+#define RC_DEFKANJI 47
+#define RC_DEFLOG 48
+#define RC_DEFLOGIN 49
+#define RC_DEFMODE 50
+#define RC_DEFMONITOR 51
+#define RC_DEFNONBLOCK 52
+#define RC_DEFOBUFLIMIT 53
+#define RC_DEFSCROLLBACK 54
+#define RC_DEFSHELL 55
+#define RC_DEFSILENCE 56
+#define RC_DEFSLOWPASTE 57
+#define RC_DEFUTF8 58
+#define RC_DEFWRAP 59
+#define RC_DEFWRITELOCK 60
+#define RC_DETACH 61
+#define RC_DIGRAPH 62
+#define RC_DINFO 63
+#define RC_DISPLAYS 64
+#define RC_DUMPTERMCAP 65
+#define RC_ECHO 66
+#define RC_ENCODING 67
+#define RC_ESCAPE 68
+#define RC_EVAL 69
+#define RC_EXEC 70
+#define RC_FIT 71
+#define RC_FLOW 72
+#define RC_FOCUS 73
+#define RC_GR 74
+#define RC_HARDCOPY 75
+#define RC_HARDCOPY_APPEND 76
+#define RC_HARDCOPYDIR 77
+#define RC_HARDSTATUS 78
+#define RC_HEIGHT 79
+#define RC_HELP 80
+#define RC_HISTORY 81
+#define RC_HSTATUS 82
+#define RC_IDLE 83
+#define RC_IGNORECASE 84
+#define RC_INFO 85
+#define RC_KANJI 86
+#define RC_KILL 87
+#define RC_LASTMSG 88
+#define RC_LICENSE 89
+#define RC_LOCKSCREEN 90
+#define RC_LOG 91
+#define RC_LOGFILE 92
+#define RC_LOGIN 93
+#define RC_LOGTSTAMP 94
+#define RC_MAPDEFAULT 95
+#define RC_MAPNOTNEXT 96
+#define RC_MAPTIMEOUT 97
+#define RC_MARKKEYS 98
+#define RC_MAXWIN 99
+#define RC_META 100
+#define RC_MONITOR 101
+#define RC_MSGMINWAIT 102
+#define RC_MSGWAIT 103
+#define RC_MULTIUSER 104
+#define RC_NETHACK 105
+#define RC_NEXT 106
+#define RC_NONBLOCK 107
+#define RC_NUMBER 108
+#define RC_OBUFLIMIT 109
+#define RC_ONLY 110
+#define RC_OTHER 111
+#define RC_PARTIAL 112
+#define RC_PASSWORD 113
+#define RC_PASTE 114
+#define RC_PASTEFONT 115
+#define RC_POW_BREAK 116
+#define RC_POW_DETACH 117
+#define RC_POW_DETACH_MSG 118
+#define RC_PREV 119
+#define RC_PRINTCMD 120
+#define RC_PROCESS 121
+#define RC_QUIT 122
+#define RC_READBUF 123
+#define RC_READREG 124
+#define RC_REDISPLAY 125
+#define RC_REGISTER 126
+#define RC_REMOVE 127
+#define RC_REMOVEBUF 128
+#define RC_RESET 129
+#define RC_RESIZE 130
+#define RC_SCREEN 131
+#define RC_SCROLLBACK 132
+#define RC_SELECT 133
+#define RC_SESSIONNAME 134
+#define RC_SETENV 135
+#define RC_SETSID 136
+#define RC_SHELL 137
+#define RC_SHELLTITLE 138
+#define RC_SILENCE 139
+#define RC_SILENCEWAIT 140
+#define RC_SLEEP 141
+#define RC_SLOWPASTE 142
+#define RC_SORENDITION 143
+#define RC_SOURCE 144
+#define RC_SPLIT 145
+#define RC_STARTUP_MESSAGE 146
+#define RC_STUFF 147
+#define RC_SU 148
+#define RC_SUSPEND 149
+#define RC_TERM 150
+#define RC_TERMCAP 151
+#define RC_TERMCAPINFO 152
+#define RC_TERMINFO 153
+#define RC_TIME 154
+#define RC_TITLE 155
+#define RC_UMASK 156
+#define RC_UNSETENV 157
+#define RC_UTF8 158
+#define RC_VBELL 159
+#define RC_VBELL_MSG 160
+#define RC_VBELLWAIT 161
+#define RC_VERBOSE 162
+#define RC_VERSION 163
+#define RC_WALL 164
+#define RC_WIDTH 165
+#define RC_WINDOWLIST 166
+#define RC_WINDOWS 167
+#define RC_WRAP 168
+#define RC_WRITEBUF 169
+#define RC_WRITELOCK 170
+#define RC_XOFF 171
+#define RC_XON 172
+#define RC_ZMODEM 173
+#define RC_ZOMBIE 174
-#define RC_LAST 166
+#define RC_LAST 174
diff --git a/comm.sh b/comm.sh
index 3d09f81..44c83dd 100644
--- a/comm.sh
+++ b/comm.sh
@@ -10,6 +10,9 @@ if test -z "$srcdir"; then
srcdir=.
fi
+LC_ALL=C
+export LC_ALL
+
rm -f comm.h
cat << EOF > comm.h
/*
@@ -57,6 +60,7 @@ struct action
{
int nr;
char **args;
+ int *argl;
};
#define RC_ILLEGAL -1
diff --git a/config.h.in b/config.h.in
index e96e9fb..4327855 100644
--- a/config.h.in
+++ b/config.h.in
@@ -34,7 +34,9 @@
/*
* Maximum of simultaneously allowed windows per screen session.
*/
-#define MAXWIN 40
+#ifndef MAXWIN
+# define MAXWIN 40
+#endif
/*
* Define SOCKDIR to be the directory to contain the named sockets
@@ -99,9 +101,13 @@
* tty to be in "your" group.
* Note, screen is unable to change mode or group of the pty if it
* is not installed with sufficient privilege. (e.g. set-uid-root)
+ * define PTYROFS if the /dev/pty devices are mounted on a read-only
+ * filesystem so screen should not even attempt to set mode or group
+ * even if running as root (e.g. on TiVo).
*/
#undef PTYMODE
#undef PTYGROUP
+#undef PTYROFS
/*
* If screen is NOT installed set-uid root, screen can provide tty
@@ -170,6 +176,8 @@
# define ENCODINGS
# define UTF8
# define COLORS16
+# define ZMODEM
+# define BLANKER_PRG
#endif /* SIMPLESCREEN */
#undef BUILTIN_TELNET
@@ -181,6 +189,8 @@
* If you have a braille display you should define HAVE_BRAILLE.
* The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi
* Rangin (bargi@dots.physics.orst.edu).
+ * WARNING: this is more or less unsupported code, it may be full of
+ * bugs leading to security holes, enable at your own risk!
*/
#undef HAVE_BRAILLE
@@ -290,6 +300,13 @@
*/
#undef USE_PAM
+/*
+ * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w
+ * if the terminal width is greater than 131 columns. No longer needed
+ * on modern systems which use $COLUMNS or the tty settings instead.
+ */
+#undef CHECK_SCREEN_W
+
/**********************************************************************
*
* End of User Configuration Section
@@ -606,6 +623,13 @@
#undef HAVE_NL_LANGINFO
/*
+ * Newer versions of Solaris include fdwalk, which can greatly improve
+ * the startup time of screen; otherwise screen spends a lot of time
+ * closing file descriptors.
+ */
+#undef HAVE_FDWALK
+
+/*
* define HAVE_DEV_PTC if you have a /dev/ptc character special
* device.
*/
@@ -622,6 +646,11 @@
*/
#undef HAVE_GETPT
+/*
+ * define HAVE_OPENPTY if your system has the openpty() call.
+ */
+#undef HAVE_OPENPTY
+
/*
* 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 7426457..75675fc 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,82 @@
#! /bin/sh
# From configure.in Revision: 1.18 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.
+# Generated by GNU Autoconf 2.57.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -15,22 +84,113 @@ 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"
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
-# 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
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
-# Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+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
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
@@ -56,24 +216,20 @@ else
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
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
else
- as_unset=false
+ as_mkdir_p=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; }
+as_executable_p="test -f"
+
+# 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"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
# IFS
# We need space, tab and new line, in precisely that order.
@@ -82,7 +238,8 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+$as_unset CDPATH
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -95,9 +252,11 @@ exec 6>&1
# Initializations.
#
ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
cross_compiling=no
subdirs=
-MFLAGS= MAKEFLAGS=
+MFLAGS=
+MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
@@ -105,7 +264,53 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
ac_unique_file="screen.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
@@ -145,13 +350,6 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
ac_prev=
for ac_option
do
@@ -284,7 +482,7 @@ do
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -463,7 +661,7 @@ 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
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
@@ -475,18 +673,19 @@ do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
+# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
-# FIXME: should be removed in autoconf 3.0.
+# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
@@ -502,13 +701,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
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%[\\/][^\\/][^\\/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -518,13 +727,16 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
else
- { echo "$as_me: error: cannot find sources in $srcdir" >&2
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
@@ -565,7 +777,7 @@ ac_cv_env_CPP_value=$CPP
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
+ cat <<_ACEOF
\`configure' configures this package to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -586,9 +798,9 @@ Configuration:
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-EOF
+_ACEOF
- cat <<EOF
+ cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
@@ -615,15 +827,15 @@ Fine tuning of the installation directories:
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
-EOF
+_ACEOF
- cat <<\EOF
-EOF
+ cat <<\_ACEOF
+_ACEOF
fi
if test -n "$ac_init_help"; then
- cat <<\EOF
+ cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
@@ -639,6 +851,8 @@ 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-pty-mode=mode default mode for ptys
+ --with-pty-group=group default group for ptys
--with-sys-screenrc=path where to put the global screenrc file
Some influential environment variables:
@@ -653,40 +867,60 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-EOF
+_ACEOF
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
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure.gnu; then
+ if test -f $ac_srcdir/configure.gnu; then
echo
- $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
- elif test -f $ac_sub_srcdir/configure; then
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_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
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
- echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd $ac_popdir
done
@@ -694,31 +928,31 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
- cat <<\EOF
+ cat <<\_ACEOF
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
-EOF
+_ACEOF
exit 0
fi
exec 5>config.log
-cat >&5 <<EOF
+cat >&5 <<_ACEOF
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
+generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
-EOF
+_ACEOF
{
cat <<_ASUNAME
-## ---------- ##
-## Platform. ##
-## ---------- ##
+## --------- ##
+## Platform. ##
+## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
@@ -737,51 +971,96 @@ hostinfo = `(hostinfo) 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
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
} >&5
-cat >&5 <<EOF
-## ------------ ##
-## Core tests. ##
-## ------------ ##
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
-EOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
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.
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# 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.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
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,
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
{
(set) 2>&1 |
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
@@ -795,21 +1074,53 @@ trap 'exit_status=$?
"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 &&
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
@@ -822,6 +1133,33 @@ rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo >confdefs.h
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
# 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
@@ -833,9 +1171,9 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- { echo "$as_me:836: loading site script $ac_site_file" >&5
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
- cat "$ac_site_file" >&5
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
@@ -844,7 +1182,7 @@ if test -r "$cache_file"; then
# 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:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -852,7 +1190,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { echo "$as_me:855: creating cache $cache_file" >&5
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -868,42 +1206,42 @@ for ac_var in `(set) 2>&1 |
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:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO: 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).
+ # Pass precious variables to config.status.
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"
- ;;
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
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:$LINENO: 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:$LINENO: 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
@@ -914,28 +1252,27 @@ 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_path_separator=:
-fi
-PATH_SEPARATOR="$ac_path_separator"
-rm -f conftest.sh
-ac_config_headers="$ac_config_headers config.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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'`
@@ -943,58 +1280,63 @@ 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 $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 "$as_me:950: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_SCREEN+set}" = set; then
+if test "${ac_cv_path_ac_prefix_program+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $SCREEN in
+ case $ac_prefix_program in
[\\/]* | ?:[\\/]*)
- ac_cv_path_SCREEN="$SCREEN" # Let the user override the test with a path.
+ ac_cv_path_ac_prefix_program="$ac_prefix_program" # 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_SCREEN="$ac_dir/$ac_word"
- echo "$as_me:967: found $ac_dir/$ac_word" >&5
- break
-fi
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
;;
esac
fi
-SCREEN=$ac_cv_path_SCREEN
+ac_prefix_program=$ac_cv_path_ac_prefix_program
-if test -n "$SCREEN"; then
- echo "$as_me:978: result: $SCREEN" >&5
-echo "${ECHO_T}$SCREEN" >&6
+if test -n "$ac_prefix_program"; then
+ echo "$as_me:$LINENO: result: $ac_prefix_program" >&5
+echo "${ECHO_T}$ac_prefix_program" >&6
else
- echo "$as_me:981: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- if test -n "$ac_cv_path_SCREEN"; then
- 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\(/\)' \| \
+ if test -n $ac_prefix_program; then
+ prefix=`(dirname "$ac_prefix_program") 2>/dev/null ||
+$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \
+ X"$ac_prefix_program" : 'X\(//\)$' \| \
+ X"$ac_prefix_program" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
-echo X"$ac_cv_path_SCREEN" |
+echo X"$ac_prefix_program" |
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\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ prefix=`(dirname "$prefix") 2>/dev/null ||
+$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$prefix" : 'X\(//\)[^/]' \| \
X"$prefix" : 'X\(//\)$' \| \
X"$prefix" : 'X\(/\)' \| \
@@ -1012,54 +1354,58 @@ if test "x$prefix" = xNONE; then
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 "$as_me:1015: checking for $ac_word" >&5
+echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GZIP+set}" = set; then
+if test "${ac_cv_path_ac_prefix_program+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $GZIP in
+ case $ac_prefix_program in
[\\/]* | ?:[\\/]*)
- ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ac_cv_path_ac_prefix_program="$ac_prefix_program" # 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_GZIP="$ac_dir/$ac_word"
- echo "$as_me:1032: found $ac_dir/$ac_word" >&5
- break
-fi
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
;;
esac
fi
-GZIP=$ac_cv_path_GZIP
+ac_prefix_program=$ac_cv_path_ac_prefix_program
-if test -n "$GZIP"; then
- echo "$as_me:1043: result: $GZIP" >&5
-echo "${ECHO_T}$GZIP" >&6
+if test -n "$ac_prefix_program"; then
+ echo "$as_me:$LINENO: result: $ac_prefix_program" >&5
+echo "${ECHO_T}$ac_prefix_program" >&6
else
- echo "$as_me:1046: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- if test -n "$ac_cv_path_GZIP"; then
- 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\(/\)' \| \
+ if test -n $ac_prefix_program; then
+ prefix=`(dirname "$ac_prefix_program") 2>/dev/null ||
+$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \
+ X"$ac_prefix_program" : 'X\(//\)$' \| \
+ X"$ac_prefix_program" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
-echo X"$ac_cv_path_GZIP" |
+echo X"$ac_prefix_program" |
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\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ prefix=`(dirname "$prefix") 2>/dev/null ||
+$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$prefix" : 'X\(//\)[^/]' \| \
X"$prefix" : 'X\(//\)$' \| \
X"$prefix" : 'X\(/\)' \| \
@@ -1073,6 +1419,7 @@ echo X"$prefix" |
fi
fi
+
old_CFLAGS="$CFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1082,7 +1429,7 @@ 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 "$as_me:$LINENO: 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
@@ -1090,25 +1437,28 @@ 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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1108: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1111: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1117,7 +1467,7 @@ 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 "$as_me:1120: checking for $ac_word" >&5
+echo "$as_me:$LINENO: 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
@@ -1125,25 +1475,28 @@ 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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
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 "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1146: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1156,7 +1509,7 @@ 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 "$as_me:$LINENO: 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
@@ -1164,25 +1517,28 @@ 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}cc"
-echo "$as_me:1174: found $ac_dir/$ac_word" >&5
-break
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1182: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1185: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1191,7 +1547,7 @@ 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 "$as_me:$LINENO: 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
@@ -1199,25 +1555,28 @@ 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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
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 "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1220: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1230,7 +1589,7 @@ 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 "$as_me:1233: checking for $ac_word" >&5
+echo "$as_me:$LINENO: 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
@@ -1239,19 +1598,22 @@ else
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
- 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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
if test $ac_prog_rejected = yes; then
@@ -1263,19 +1625,17 @@ if test $ac_prog_rejected = yes; then
# 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" ${1+"$@"}
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1275: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1278: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1286,7 +1646,7 @@ if test -z "$CC"; then
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 "$as_me:$LINENO: 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
@@ -1294,25 +1654,28 @@ 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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1312: result: $CC" >&5
+ echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1315: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1325,7 +1688,7 @@ if test -z "$CC"; then
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 "$as_me:$LINENO: 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
@@ -1333,25 +1696,28 @@ 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
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
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 "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1354: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1363,33 +1729,40 @@ 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;}
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:1371:" \
+echo "$as_me:$LINENO:" \
"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 echo "$as_me:$LINENO: \"$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
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1379: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:$LINENO: \"$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
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1384: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:$LINENO: \"$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
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line 1391 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -1400,100 +1773,120 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
# 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 "$as_me:$LINENO: 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
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
- echo "$as_me:1413: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
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;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].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,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain 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;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
-echo "$as_me:1442: result: $ac_file" >&5
+echo "$as_me:$LINENO: 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 "$as_me:$LINENO: 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 echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1456: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
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:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi
-echo "$as_me:1471: result: yes" >&5
+echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
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 "$as_me:$LINENO: 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 "$as_me:$LINENO: 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
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:1488: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
@@ -1501,26 +1894,32 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
-echo "$as_me:1510: result: $ac_cv_exeext" >&5
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&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
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1522 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -1531,40 +1930,47 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1534: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1537: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
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;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&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 "$as_me:$LINENO: 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 "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -1578,41 +1984,46 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1584: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1587: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1590: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' 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 "$as_me:$LINENO: 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 "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -1623,26 +2034,27 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1626: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1629: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1632: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1635: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:1645: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:$LINENO: 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
@@ -1659,6 +2071,102 @@ else
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
# 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
@@ -1669,16 +2177,16 @@ cat >conftest.$ac_ext <<_ACEOF
#endif
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1675: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1678: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1681: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
@@ -1690,8 +2198,12 @@ if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 1693 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
$ac_declaration
int
@@ -1703,27 +2215,32 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1706: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1709: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1712: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1715: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
int
main ()
@@ -1734,21 +2251,22 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1737: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1740: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1743: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1746: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -1761,7 +2279,8 @@ fi
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
@@ -1775,7 +2294,7 @@ 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 "$as_me:$LINENO: 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
@@ -1793,21 +2312,31 @@ 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.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# 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 1799 "configure"
-#include "confdefs.h"
-#include <assert.h>
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:1804: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1810: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1821,7 +2350,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -1830,17 +2360,21 @@ 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:1837: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1843: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1855,7 +2389,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -1877,28 +2412,38 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:1880: result: $CPP" >&5
+echo "$as_me:$LINENO: 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.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# 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>
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:1895: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1901: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1912,7 +2457,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -1921,17 +2467,21 @@ 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:1928: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1934: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1946,7 +2496,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -1959,8 +2510,10 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:1962: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1970,99 +2523,216 @@ 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:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
if test $ac_cv_c_compiler_gnu = yes; then
- echo "$as_me:1974: checking whether $CC needs -traditional" >&5
+ echo "$as_me:$LINENO: 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 <<_ACEOF
-#line 1981 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sgtty.h>
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
else
ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*
+
if test $ac_cv_prog_gcc_traditional = no; then
cat >conftest.$ac_ext <<_ACEOF
-#line 1996 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termio.h>
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*
fi
fi
-echo "$as_me:2009: result: $ac_cv_prog_gcc_traditional" >&5
+echo "$as_me:$LINENO: 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 "$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
-then
- echo "$as_me:2021: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- ISC=yes # If later tests want to check for ISC.
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-cat >>confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
+/* 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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
else
- echo "$as_me:2035: result: no" >&5
-echo "${ECHO_T}no" >&6
- ISC=
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2046 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main(){exit(0);}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:2051: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2054: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:2056: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2059: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
if test $CC != cc ; then
echo "Your $CC failed - restarting with CC=cc" 1>&6
@@ -2075,56 +2745,70 @@ exec $0 $configure_args
fi
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2087 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main(){exit(0);}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:2092: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2095: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:2097: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2100: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
exec 5>&2
eval $ac_link
echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6
echo "$ac_compile" 1>&6
-{ { echo "$as_me:2113: error: Can't run the compiler - sorry" >&5
+{ { echo "$as_me:$LINENO: 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 -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2126 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main()
{
@@ -2134,32 +2818,33 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:2137: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2140: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:2142: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2145: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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:$LINENO: 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
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
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:2162: checking for $ac_word" >&5
+echo "$as_me:$LINENO: 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
@@ -2167,31 +2852,35 @@ else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
-echo "$as_me:2177: found $ac_dir/$ac_word" >&5
-break
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$as_me:2185: result: $AWK" >&5
+ echo "$as_me:$LINENO: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
- echo "$as_me:2188: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$AWK" && break
done
+
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -2209,7 +2898,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:2212: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+ { { echo "$as_me:$LINENO: 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
@@ -2229,43 +2918,48 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# 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 "$as_me:2232: checking for a BSD compatible install" >&5
-echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+echo "$as_me:$LINENO: 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 test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- 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
- / | ./ | .// | /cC/* \
- | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
- | /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # 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
- # AIX install. It has an incompatible calling convention.
- :
- 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"
- break 2
- fi
- fi
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_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.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
done
- ;;
- esac
- done
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -2278,7 +2972,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:2281: result: $INSTALL" >&5
+echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2289,26 +2983,29 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
if test -f etc/toolcheck; then
-{ echo "$as_me:2293: checking for buggy tools..." >&5
+{ echo "$as_me:$LINENO: 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 "$as_me:$LINENO: 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 "$as_me:$LINENO: 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 "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
- echo "$as_me:2311: checking for the socket dir" >&5
+ echo "$as_me:$LINENO: checking for the socket dir" >&5
echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6
SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")"
@@ -2317,38 +3014,46 @@ if test "${with_socket_dir+set}" = set; then
withval="$with_socket_dir"
SOCKDIR="\"${withval}\""
fi;
- echo "$as_me:2320: result: ${SOCKDIR}" >&5
+ echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5
echo "${ECHO_T}${SOCKDIR}" >&6
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define SOCKDIR $SOCKDIR
-EOF
+_ACEOF
+
+
fi;
+
if test -n "$ISC"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define ISC 1
-EOF
+_ACEOF
LIBS="$LIBS -linet"
fi
+
if test -f /sysV68 ; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define sysV68 1
-EOF
+_ACEOF
fi
-{ echo "$as_me:2342: checking for MIPS..." >&5
+{ echo "$as_me:$LINENO: 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 "$as_me:2347: checking mld library..." >&5
+{ echo "$as_me:$LINENO: checking mld library..." >&5
echo "$as_me: checking mld library..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2350 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2359,34 +3064,39 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2362: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2365: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2368: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2371: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$oldlibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test -r /dev/ptc; then
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define MIPS 1
-EOF
+_ACEOF
-{ echo "$as_me:2385: checking wait3..." >&5
+{ echo "$as_me:$LINENO: checking wait3..." >&5
echo "$as_me: checking wait3..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2388 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2397,26 +3107,31 @@ wait3();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2400: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2403: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2406: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2409: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ echo "$as_me:2415: checking wait2..." >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ echo "$as_me:$LINENO: checking wait2..." >&5
echo "$as_me: checking wait2..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2418 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2427,25 +3142,26 @@ wait2();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2430: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2433: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2436: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2439: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USE_WAIT2 1
-EOF
+_ACEOF
LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
@@ -2453,30 +3169,40 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-{ echo "$as_me:2456: checking for Ultrix..." >&5
+
+{ echo "$as_me:$LINENO: checking for Ultrix..." >&5
echo "$as_me: checking for Ultrix..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2459 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(ultrix) || defined(__ultrix)
yes;
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ULTRIX=1
fi
rm -f conftest*
+
if test -f /usr/lib/libpyr.a ; then
oldlibs="$LIBS"
LIBS="$LIBS -lpyr"
-{ echo "$as_me:2475: checking Pyramid OSX..." >&5
+{ echo "$as_me:$LINENO: checking Pyramid OSX..." >&5
echo "$as_me: checking Pyramid OSX..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2478 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2487,54 +3213,64 @@ open_controlling_pty("")
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2490: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2493: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2496: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2499: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define OSX 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$oldlibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-{ echo "$as_me:2513: checking for butterfly..." >&5
+{ echo "$as_me:$LINENO: checking for butterfly..." >&5
echo "$as_me: checking for butterfly..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2516 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(butterfly)
yes;
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
butterfly=1
fi
rm -f conftest*
+
if test -z "$butterfly"; then
if test -n "$ULTRIX"; then
test -z "$GCC" && CC="$CC -YBSD"
fi
-{ echo "$as_me:2533: checking for POSIX.1..." >&5
+{ echo "$as_me:$LINENO: checking for POSIX.1..." >&5
echo "$as_me: checking for POSIX.1..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2536 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <unistd.h>
main () {
@@ -2544,22 +3280,26 @@ main () {
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
echo "- you have a POSIX system" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define POSIX 1
-EOF
+_ACEOF
posix=1
fi
rm -f conftest*
fi
-{ echo "$as_me:2558: checking for System V..." >&5
+{ echo "$as_me:$LINENO: checking for System V..." >&5
echo "$as_me: checking for System V..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2561 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
@@ -2572,51 +3312,284 @@ int x = SIGCHLD | FNDELAY;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2575: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2578: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2581: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2584: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cat >>confdefs.h <<\EOF
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >>confdefs.h <<\_ACEOF
#define SYSV 1
-EOF
+_ACEOF
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:2597: checking for sequent/ptx..." >&5
+{ echo "$as_me:$LINENO: checking for sequent/ptx..." >&5
echo "$as_me: checking for sequent/ptx..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2600 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef _SEQUENT_
yes;
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
LIBS="$LIBS -lsocket -linet";seqptx=1
fi
rm -f conftest*
+
oldlibs="$LIBS"
LIBS="$LIBS -lelf"
-{ echo "$as_me:2615: checking SVR4..." >&5
+{ echo "$as_me:$LINENO: checking SVR4..." >&5
echo "$as_me: checking SVR4..." >&6;}
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $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 $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
cat >conftest.$ac_ext <<_ACEOF
-#line 2618 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <utmpx.h>
int
@@ -2628,34 +3601,81 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2631: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2634: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2637: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2640: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:2642: checking for dwarf.h" >&5
+ if test "${ac_cv_header_dwarf_h+set}" = set; then
+ echo "$as_me:$LINENO: 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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5
+echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 2648 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dwarf.h usability" >&5
+echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dwarf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dwarf.h presence" >&5
+echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <dwarf.h>
_ACEOF
-if { (eval echo "$as_me:2652: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2658: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2666,42 +3686,134 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_cv_header_dwarf_h=yes
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_dwarf_h=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: dwarf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dwarf.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: 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
+ ac_cv_header_dwarf_h=$ac_header_preproc
fi
-echo "$as_me:2677: result: $ac_cv_header_dwarf_h" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5
echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6
+
+fi
if test $ac_cv_header_dwarf_h = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define SVR4 1
-EOF
- cat >>confdefs.h <<\EOF
+_ACEOF
+ cat >>confdefs.h <<\_ACEOF
#define BUGGYGETLOGIN 1
-EOF
+_ACEOF
else
- echo "$as_me:2688: checking for elf.h" >&5
+ if test "${ac_cv_header_elf_h+set}" = set; then
+ echo "$as_me:$LINENO: 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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5
+echo "${ECHO_T}$ac_cv_header_elf_h" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 2694 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking elf.h usability" >&5
+echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <elf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking elf.h presence" >&5
+echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <elf.h>
_ACEOF
-if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2704: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2712,56 +3824,116 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_cv_header_elf_h=yes
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_elf_h=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: elf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: elf.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: 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
+ ac_cv_header_elf_h=$ac_header_preproc
fi
-echo "$as_me:2723: result: $ac_cv_header_elf_h" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5
echo "${ECHO_T}$ac_cv_header_elf_h" >&6
+
+fi
if test $ac_cv_header_elf_h = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define SVR4 1
-EOF
- cat >>confdefs.h <<\EOF
+_ACEOF
+ cat >>confdefs.h <<\_ACEOF
#define BUGGYGETLOGIN 1
-EOF
+_ACEOF
fi
+
fi
+
+
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$oldlibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:2744: checking for Solaris 2.x..." >&5
+{ echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(SVR4) && defined(sun)
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
LIBS="$LIBS -lsocket -lnsl -lkstat"
fi
rm -f conftest*
-{ echo "$as_me:2760: checking BSD job jontrol..." >&5
+
+
+
+{ echo "$as_me:$LINENO: checking BSD job jontrol..." >&5
echo "$as_me: checking BSD job jontrol..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2763 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -2785,35 +3957,40 @@ int y = TIOCNOTTY;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2788: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2791: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2794: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2797: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- you have jobcontrol" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define BSDJOBS 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
echo "- you don't have jobcontrol" 1>&6
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:2812: checking setreuid..." >&5
+{ echo "$as_me:$LINENO: checking setreuid..." >&5
echo "$as_me: checking setreuid..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2815 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2830,31 +4007,36 @@ setreuid(0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2833: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2836: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2839: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2842: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SETREUID 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:2853: checking seteuid..." >&5
+{ echo "$as_me:$LINENO: checking seteuid..." >&5
echo "$as_me: checking seteuid..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2856 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2871,32 +4053,38 @@ seteuid(0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2874: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2877: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2880: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2883: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SETEUID 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:2895: checking select..." >&5
+
+{ echo "$as_me:$LINENO: checking select..." >&5
echo "$as_me: checking select..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2898 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2907,27 +4095,32 @@ select(0, 0, 0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2910: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2913: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2916: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2919: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$LIBS -lnet -lnsl"
-{ echo "$as_me:2926: checking select with $LIBS..." >&5
+{ echo "$as_me:$LINENO: checking select with $LIBS..." >&5
echo "$as_me: checking select with $LIBS..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 2929 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2938,22 +4131,23 @@ select(0, 0, 0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2941: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2944: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2947: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2950: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:2956: error: !!! no select - no screen" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
echo "$as_me: error: !!! no select - no screen" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2962,16 +4156,22 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:2965: checking fifos..." >&5
+{ echo "$as_me:$LINENO: checking fifos..." >&5
echo "$as_me: checking fifos..." >&6;}
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2973 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -3039,40 +4239,48 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3042: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3045: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3047: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3050: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- your fifos are usable" 1>&6
fifo=1
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
echo "- your fifos are not usable" 1>&6
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f /tmp/conftest*
if test -n "$fifo"; then
-{ echo "$as_me:3066: checking for broken fifo implementation..." >&5
+{ echo "$as_me:$LINENO: checking for broken fifo implementation..." >&5
echo "$as_me: checking for broken fifo implementation..." >&6;}
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3074 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <fcntl.h>
@@ -3120,43 +4328,52 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3123: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3126: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3128: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3131: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- your implementation is ok" 1>&6
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
echo "- you have a broken implementation" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define BROKEN_PIPE 1
-EOF
+_ACEOF
fifobr=1
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f /tmp/conftest*
fi
-{ echo "$as_me:3150: checking sockets..." >&5
+
+{ echo "$as_me:$LINENO: checking sockets..." >&5
echo "$as_me: checking sockets..." >&6;}
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3158 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/socket.h>
@@ -3210,40 +4427,48 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3213: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3216: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3218: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3221: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- your sockets are usable" 1>&6
sock=1
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
echo "- your sockets are not usable" 1>&6
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f /tmp/conftest*
if test -n "$sock"; then
-{ echo "$as_me:3237: checking socket implementation..." >&5
+{ echo "$as_me:$LINENO: checking socket implementation..." >&5
echo "$as_me: checking socket implementation..." >&6;}
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3245 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -3272,42 +4497,45 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3275: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3278: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3280: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3283: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- you are normal" 1>&6
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
echo "- unix domain sockets are not kept in the filesystem" 1>&6
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define SOCK_NOT_IN_FS 1
-EOF
+_ACEOF
socknofs=1
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out 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 <<\_ACEOF
#define NAMEDPIPE 1
-EOF
+_ACEOF
elif test -n "$fifobr"; then
echo "- as your fifos are broken lets use the sockets." 1>&6
@@ -3315,38 +4543,45 @@ EOF
else
echo "- both sockets and fifos usable. let's take fifos." 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define NAMEDPIPE 1
-EOF
+_ACEOF
fi
else
echo "- using named pipes" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define NAMEDPIPE 1
-EOF
+_ACEOF
fi
elif test -n "$sock"; then
echo "- using unix-domain sockets" 1>&6
else
- { { echo "$as_me:3335: error: you have neither usable sockets nor usable pipes -> no screen" >&5
+ { { echo "$as_me:$LINENO: 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 "$as_me:3340: checking select return value..." >&5
+
+{ echo "$as_me:$LINENO: checking select return value..." >&5
echo "$as_me: checking select return value..." >&6;}
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3348 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -3363,6 +4598,7 @@ char *nam = "/tmp/conftest$$";
#define S_IFIFO 0010000
#endif
+
main()
{
#ifdef FD_SET
@@ -3432,6 +4668,7 @@ main()
exit(1);
#endif
+
#ifdef FD_SET
FD_SET(0, &f);
#else
@@ -3446,36 +4683,42 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3449: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3452: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3454: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3457: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- select is ok" 1>&6
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
echo "- select can't count" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define SELECT_BROKEN 1
-EOF
+_ACEOF
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:3474: checking for tgetent..." >&5
+{ echo "$as_me:$LINENO: checking for tgetent..." >&5
echo "$as_me: checking for tgetent..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 3477 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3486,28 +4729,33 @@ tgetent((char *)0, (char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3489: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3492: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3495: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3498: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
olibs="$LIBS"
LIBS="-lcurses $olibs"
-{ echo "$as_me:3506: checking libcurses..." >&5
+{ echo "$as_me:$LINENO: checking libcurses..." >&5
echo "$as_me: checking libcurses..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 3509 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3524,27 +4772,32 @@ tgetent((char *)0, (char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3527: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3530: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3533: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3536: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="-ltermcap $olibs"
-{ echo "$as_me:3543: checking libtermcap..." >&5
+{ echo "$as_me:$LINENO: checking libtermcap..." >&5
echo "$as_me: checking libtermcap..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 3546 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3555,27 +4808,32 @@ tgetent((char *)0, (char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3558: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3561: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3564: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3567: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="-ltermlib $olibs"
-{ echo "$as_me:3574: checking libtermlib..." >&5
+{ echo "$as_me:$LINENO: checking libtermlib..." >&5
echo "$as_me: checking libtermlib..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 3577 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3586,27 +4844,32 @@ tgetent((char *)0, (char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3589: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3592: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3595: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3598: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="-lncurses $olibs"
-{ echo "$as_me:3605: checking libncurses..." >&5
+{ echo "$as_me:$LINENO: checking libncurses..." >&5
echo "$as_me: checking libncurses..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 3608 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3617,22 +4880,23 @@ tgetent((char *)0, (char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3620: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3623: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3626: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3629: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:3635: error: !!! no tgetent - no screen" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
echo "$as_me: error: !!! no tgetent - no screen" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -3647,13 +4911,19 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3655 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main()
{
@@ -3661,35 +4931,41 @@ main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3664: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3667: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3669: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3672: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- you use the termcap database" 1>&6
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
echo "- you use the terminfo database" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define TERMINFO 1
-EOF
+_ACEOF
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:3688: checking ospeed..." >&5
+{ echo "$as_me:$LINENO: checking ospeed..." >&5
echo "$as_me: checking ospeed..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 3691 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
extern short ospeed;
int
main ()
@@ -3700,43 +4976,49 @@ ospeed=5;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3703: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3706: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3709: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3712: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cat >>confdefs.h <<\EOF
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_OSPEED 1
-EOF
+_ACEOF
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:3725: checking for /dev/ptc..." >&5
+{ echo "$as_me:$LINENO: 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 <<\_ACEOF
#define HAVE_DEV_PTC 1
-EOF
+_ACEOF
fi
-{ echo "$as_me:3734: checking for SVR4 ptys..." >&5
+{ echo "$as_me:$LINENO: checking for SVR4 ptys..." >&5
echo "$as_me: checking for SVR4 ptys..." >&6;}
+sysvr4ptys=
if test -c /dev/ptmx ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 3738 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3747,98 +5029,265 @@ ptsname(0);grantpt(0);unlockpt(0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3750: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3753: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3756: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3759: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_SVR4_PTYS 1
-EOF
+_ACEOF
+sysvr4ptys=1
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
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 "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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) ();
+/* 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
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
int
main ()
{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' 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:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+if test -z "$sysvr4ptys"; then
+
+for ac_func in openpty
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: 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 $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* 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 ();
/* 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;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3812: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3815: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3818: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3821: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: 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
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
+if test "${ac_cv_lib_util_openpty+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 openpty ();
+int
+main ()
+{
+openpty ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_util_openpty=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_util_openpty=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
+echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
+if test $ac_cv_lib_util_openpty = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENPTY 1
+_ACEOF
+ LIBS="$LIBS -lutil"
+fi
fi
done
-{ echo "$as_me:3841: checking for ptyranges..." >&5
+fi
+
+{ echo "$as_me:$LINENO: checking for ptyranges..." >&5
echo "$as_me: checking for ptyranges..." >&6;}
if test -d /dev/ptym ; then
pdir='/dev/ptym'
@@ -3846,15 +5295,19 @@ else
pdir='/dev'
fi
cat >conftest.$ac_ext <<_ACEOF
-#line 3849 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef M_UNIX
yes;
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
ptys=`echo /dev/ptyp??`
else
ptys=`echo $pdir/pty??`
@@ -3864,27 +5317,57 @@ 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 <<_ACEOF
#define PTYRANGE0 "$p0"
-EOF
+_ACEOF
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define PTYRANGE1 "$p1"
-EOF
+_ACEOF
fi
-{ echo "$as_me:3877: checking default tty permissions/group..." >&5
+
+# Check whether --with-pty-mode or --without-pty-mode was given.
+if test "${with_pty_mode+set}" = set; then
+ withval="$with_pty_mode"
+ ptymode="${withval}"
+fi;
+
+# Check whether --with-pty-group or --without-pty-group was given.
+if test "${with_pty_group+set}" = set; then
+ withval="$with_pty_group"
+ ptygrp="${withval}"
+fi;
+test -n "$ptymode" || ptymode=0620
+if test -n "$ptygrp" ; then
+cat >>confdefs.h <<_ACEOF
+#define PTYMODE $ptymode
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PTYGROUP $ptygrp
+_ACEOF
+
+else
+
+{ echo "$as_me:$LINENO: 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 "$as_me:3881: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3886 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
@@ -3916,28 +5399,28 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:3919: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3922: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:3924: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3927: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if test -f conftest_grp; then
ptygrp=`cat conftest_grp`
- echo "- pty mode: 0620, group: $ptygrp" 1>&6
+ echo "- pty mode: $ptymode, group: $ptygrp" 1>&6
- cat >>confdefs.h <<\EOF
-#define PTYMODE 0620
-EOF
+ cat >>confdefs.h <<_ACEOF
+#define PTYMODE $ptymode
+_ACEOF
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define PTYGROUP $ptygrp
-EOF
+_ACEOF
else
echo "- ptys are world accessable" 1>&6
@@ -3947,13 +5430,15 @@ EOF
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
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 "$as_me:$LINENO: 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
@@ -3963,16 +5448,18 @@ else
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
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_WRITEPATH="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
;;
@@ -3981,16 +5468,16 @@ fi
WRITEPATH=$ac_cv_path_WRITEPATH
if test -n "$WRITEPATH"; then
- echo "$as_me:3984: result: $WRITEPATH" >&5
+ echo "$as_me:$LINENO: result: $WRITEPATH" >&5
echo "${ECHO_T}$WRITEPATH" >&6
else
- echo "$as_me:3987: result: no" >&5
+ echo "$as_me:$LINENO: 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 "$as_me:$LINENO: 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
@@ -4000,16 +5487,18 @@ else
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
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XTERMPATH="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
;;
@@ -4018,10 +5507,10 @@ fi
XTERMPATH=$ac_cv_path_XTERMPATH
if test -n "$XTERMPATH"; then
- echo "$as_me:4021: result: $XTERMPATH" >&5
+ echo "$as_me:$LINENO: result: $XTERMPATH" >&5
echo "${ECHO_T}$XTERMPATH" >&6
else
- echo "$as_me:4024: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -4045,15 +5534,15 @@ fi
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
+ echo "- pty mode: $ptymode, group: $ptygrp" 1>&6
- cat >>confdefs.h <<\EOF
-#define PTYMODE 0620
-EOF
+ cat >>confdefs.h <<_ACEOF
+#define PTYMODE $ptymode
+_ACEOF
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define PTYGROUP $ptygrp
-EOF
+_ACEOF
else
echo "- ptys are world accessable" 1>&6
@@ -4064,16 +5553,22 @@ EOF
fi
+
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest_grp
+fi
-{ echo "$as_me:4072: checking getutent..." >&5
+{ echo "$as_me:$LINENO: checking getutent..." >&5
echo "$as_me: checking getutent..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4075 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
@@ -4096,31 +5591,36 @@ int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4099: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4102: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4105: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4108: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define GETUTENT 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
olibs="$LIBS"
LIBS="$LIBS -lgen"
-{ echo "$as_me:4119: checking getutent with -lgen..." >&5
+{ echo "$as_me:$LINENO: checking getutent with -lgen..." >&5
echo "$as_me: checking getutent with -lgen..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4122 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <time.h>
#include <sys/types.h>
@@ -4143,35 +5643,40 @@ int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4146: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4149: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4152: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4155: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define GETUTENT 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$olibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:4170: checking ut_host..." >&5
+{ echo "$as_me:$LINENO: checking ut_host..." >&5
echo "$as_me: checking ut_host..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4173 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <time.h>
#include <sys/types.h>
@@ -4191,43 +5696,91 @@ struct utmp u; u.ut_host[0] = 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4194: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4197: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4200: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4203: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define UTHOST 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:4214: checking for utempter.h" >&5
+if test "${ac_cv_header_utempter_h+set}" = set; then
+ echo "$as_me:$LINENO: 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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5
+echo "${ECHO_T}$ac_cv_header_utempter_h" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4220 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking utempter.h usability" >&5
+echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
#include <utempter.h>
_ACEOF
-if { (eval echo "$as_me:4224: \"$ac_cpp conftest.$ac_ext\"") >&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking utempter.h presence" >&5
+echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <utempter.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4230: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4238,40 +5791,90 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_cv_header_utempter_h=yes
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_utempter_h=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: utempter.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: utempter.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: 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
+ ac_cv_header_utempter_h=$ac_header_preproc
fi
-echo "$as_me:4249: result: $ac_cv_header_utempter_h" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5
echo "${ECHO_T}$ac_cv_header_utempter_h" >&6
+
+fi
if test $ac_cv_header_utempter_h = yes; then
have_utempter=yes
else
have_utempter=no
fi
+
if test "$have_utempter" = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_UTEMPTER 1
-EOF
+_ACEOF
LIBS="$LIBS -lutempter"
fi
-{ echo "$as_me:4265: checking for libutil(s)..." >&5
+{ echo "$as_me:$LINENO: 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 "$as_me:4270: checking getloadavg..." >&5
+{ echo "$as_me:$LINENO: checking getloadavg..." >&5
echo "$as_me: checking getloadavg..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4273 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -4282,32 +5885,37 @@ getloadavg((double *)0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4285: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4288: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4291: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4294: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define LOADAV_GETLOADAVG 1
-EOF
+_ACEOF
load=1
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
if test -f /usr/lib/libkvm.a ; then
olibs="$LIBS"
LIBS="$LIBS -lkvm"
-{ echo "$as_me:4306: checking getloadavg with -lkvm..." >&5
+{ echo "$as_me:$LINENO: checking getloadavg with -lkvm..." >&5
echo "$as_me: checking getloadavg with -lkvm..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4309 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -4318,24 +5926,25 @@ getloadavg((double *)0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4321: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4324: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4327: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4330: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define LOADAV_GETLOADAVG 1
-EOF
+_ACEOF
load=1
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$olibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4346,22 +5955,26 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test -z "$load" ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 4349 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(NeXT) || defined(apollo) || defined(linux)
yes;
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
load=1
fi
rm -f conftest*
fi
if test -z "$load" ; then
-{ echo "$as_me:4364: checking for kernelfile..." >&5
+{ echo "$as_me:$LINENO: 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
@@ -4375,27 +5988,74 @@ else
echo "- using kernelfile '$core'" 1>&6
if test -r $core ; then
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define LOADAV_UNIX "$core"
-EOF
+_ACEOF
- echo "$as_me:4382: checking for nlist.h" >&5
+ if test "${ac_cv_header_nlist_h+set}" = set; then
+ echo "$as_me:$LINENO: 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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5
+echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4388 "configure"
-#include "confdefs.h"
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking nlist.h usability" >&5
+echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <nlist.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking nlist.h presence" >&5
+echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <nlist.h>
_ACEOF
-if { (eval echo "$as_me:4392: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4398: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4406,26 +6066,75 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_cv_header_nlist_h=yes
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_nlist_h=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: nlist.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: nlist.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: 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
+ ac_cv_header_nlist_h=$ac_header_preproc
fi
-echo "$as_me:4417: result: $ac_cv_header_nlist_h" >&5
+echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5
echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
+
+fi
if test $ac_cv_header_nlist_h = yes; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define NLIST_STRUCT 1
-EOF
+_ACEOF
- { echo "$as_me:4424: checking n_un in struct nlist..." >&5
+ { echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <nlist.h>
int
main ()
@@ -4436,33 +6145,40 @@ struct nlist n; n.n_un.n_name = 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4439: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4442: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4445: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4448: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define NLIST_NAME_UNION 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
- { echo "$as_me:4461: checking for nlist declaration..." >&5
+
+
+ { echo "$as_me:$LINENO: checking for nlist declaration..." >&5
echo "$as_me: checking for nlist declaration..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4464 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef NLIST_STRUCT
# include <nlist.h>
@@ -4472,26 +6188,33 @@ echo "$as_me: checking for nlist declaration..." >&6;}
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "nlist(( | )( | )*.*\(|\()" >/dev/null 2>&1; then
- cat >>confdefs.h <<\EOF
+ $EGREP "nlist(( | )( | )*.*\(|\()" >/dev/null 2>&1; then
+ cat >>confdefs.h <<\_ACEOF
#define NLIST_DECLARED 1
-EOF
+_ACEOF
fi
rm -f conftest*
- { echo "$as_me:4483: checking for avenrun symbol..." >&5
+
+ { echo "$as_me:$LINENO: 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 "$as_me:4488: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4493 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#ifdef NLIST_STRUCT
@@ -4523,23 +6246,24 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4526: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4529: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:4531: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4534: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
avensym=$av;break
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "$av" = _Loadavg; then
nlist64='#define nlist nlist64'
@@ -4551,16 +6275,16 @@ fi
else
echo "- using avenrun symbol '$avensym'" 1>&6
- cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define LOADAV_AVENRUN "$avensym"
-EOF
+_ACEOF
if test -n "$nlist64"; then
echo "- used nlist64 to find it" 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define LOADAV_USE_NLIST64 1
-EOF
+_ACEOF
fi
load=1
@@ -4628,38 +6352,44 @@ eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.
. ./conftest.out
rm -f conftest*
-if test -n "$load" ; then cat >>confdefs.h <<\EOF
+
+if test -n "$load" ; then cat >>confdefs.h <<\_ACEOF
#define LOADAV 1
-EOF
+_ACEOF
fi
-if test -n "$loadtype" ; then cat >>confdefs.h <<EOF
+if test -n "$loadtype" ; then cat >>confdefs.h <<_ACEOF
#define LOADAV_TYPE $loadtype
-EOF
+_ACEOF
fi
-if test -n "$loadnum" ; then cat >>confdefs.h <<EOF
+if test -n "$loadnum" ; then cat >>confdefs.h <<_ACEOF
#define LOADAV_NUM $loadnum
-EOF
+_ACEOF
fi
-if test -n "$loadscale" ; then cat >>confdefs.h <<EOF
+if test -n "$loadscale" ; then cat >>confdefs.h <<_ACEOF
#define LOADAV_SCALE $loadscale
-EOF
+_ACEOF
fi
if test -n "$posix" ; then
echo "assuming posix signal definition" 1>&6
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define SIGVOID 1
-EOF
+_ACEOF
+
else
-{ echo "$as_me:4658: checking return type of signal handlers..." >&5
+{ echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
@@ -4675,31 +6405,36 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4678: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4681: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4684: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4687: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define SIGVOID 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:4698: checking sigset..." >&5
+{ echo "$as_me:$LINENO: checking sigset..." >&5
echo "$as_me: checking sigset..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4701 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -4719,36 +6454,43 @@ sigset(0, (int (*)())0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4722: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4725: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4728: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4731: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USESIGSET 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:4742: checking signal implementation..." >&5
+{ echo "$as_me:$LINENO: checking signal implementation..." >&5
echo "$as_me: checking signal implementation..." >&6;}
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4750 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
@@ -4785,41 +6527,48 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:4788: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4791: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:4793: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4796: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
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
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cat >>confdefs.h <<\_ACEOF
#define SYSVSIGS 1
-EOF
+_ACEOF
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-{ echo "$as_me:4813: checking for crypt and sec libraries..." >&5
+
+{ echo "$as_me:$LINENO: 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 "$as_me:4818: checking crypt..." >&5
+{ echo "$as_me:$LINENO: checking crypt..." >&5
echo "$as_me: checking crypt..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4821 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -4830,21 +6579,22 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4833: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4836: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4839: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4842: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$oldlibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4852,11 +6602,15 @@ 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 "$as_me:4855: checking IRIX sun library..." >&5
+{ echo "$as_me:$LINENO: checking IRIX sun library..." >&5
echo "$as_me: checking IRIX sun library..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4858 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -4867,30 +6621,35 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4870: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4873: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4876: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4879: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$oldlibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:4889: checking syslog..." >&5
+{ echo "$as_me:$LINENO: checking syslog..." >&5
echo "$as_me: checking syslog..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4892 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -4901,28 +6660,33 @@ closelog();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4904: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4907: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4910: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4913: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
oldlibs="$LIBS"
LIBS="$LIBS -lbsd"
-{ echo "$as_me:4921: checking syslog in libbsd.a..." >&5
+{ echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -4933,27 +6697,28 @@ closelog();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4936: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4939: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4942: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4945: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "- found." 1>&6
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS="$oldlibs"
echo "- bad news: syslog missing." 1>&6
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define NOSYSLOG 1
-EOF
+_ACEOF
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4961,24 +6726,33 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4964 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#ifdef M_UNIX
yes;
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
+ $EGREP "yes" >/dev/null 2>&1; then
LIBS="$LIBS -lsocket -lcrypt_i"
fi
rm -f conftest*
-{ echo "$as_me:4977: checking wait union..." >&5
+
+{ echo "$as_me:$LINENO: checking wait union..." >&5
echo "$as_me: checking wait union..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 4980 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/wait.h>
@@ -4997,42 +6771,47 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5000: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5003: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5006: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5009: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define BSDWAIT 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test -z "$butterfly"; then
-{ echo "$as_me:5022: checking for termio or termios..." >&5
+{ echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termio.h>
_ACEOF
-if { (eval echo "$as_me:5029: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:5035: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5043,26 +6822,31 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define TERMIO 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
if test -n "$posix"; then
cat >conftest.$ac_ext <<_ACEOF
-#line 5055 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <termios.h>
_ACEOF
-if { (eval echo "$as_me:5059: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:5065: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5073,13 +6857,14 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define TERMIO 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.err conftest.$ac_ext
@@ -5089,11 +6874,15 @@ fi
rm -f conftest.err conftest.$ac_ext
fi
-{ echo "$as_me:5092: checking getspnam..." >&5
+{ echo "$as_me:$LINENO: checking getspnam..." >&5
echo "$as_me: checking getspnam..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 5095 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <shadow.h>
int
main ()
@@ -5104,32 +6893,37 @@ getspnam("x");
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5110: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5113: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5116: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define SHADOWPW 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:5128: checking getttyent..." >&5
+{ echo "$as_me:$LINENO: checking getttyent..." >&5
echo "$as_me: checking getttyent..." >&6;}
cat >conftest.$ac_ext <<_ACEOF
-#line 5131 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -5140,37 +6934,85 @@ getttyent();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5143: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5146: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5149: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5152: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define GETTTYENT 1
-EOF
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking fdwalk..." >&5
+echo "$as_me: checking fdwalk..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+fdwalk(NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_FDWALK 1
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:5164: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5
+{ echo "$as_me:$LINENO: 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 "$as_me:5167: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5172 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main() {
char buf[10];
@@ -5186,36 +7028,43 @@ main() {
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5189: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5192: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5194: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5197: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USEBCOPY 1
-EOF
+_ACEOF
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5217 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define bcopy(s,d,l) memmove(d,s,l)
main() {
@@ -5232,36 +7081,44 @@ main() {
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5235: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5238: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5240: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5243: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USEMEMMOVE 1
-EOF
+_ACEOF
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5263 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#define bcopy(s,d,l) memcpy(d,s,l)
main() {
@@ -5278,51 +7135,56 @@ main() {
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5284: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5286: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5289: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USEMEMCPY 1
-EOF
+_ACEOF
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5303: checking long file names" >&5
+echo "$as_me:$LINENO: 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 "$as_me:5309: result: yes" >&5
+echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
-echo "$as_me:5312: result: no" >&5
+echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define NAME_MAX 14
-EOF
+_ACEOF
fi
rm -f /tmp/conftest*
-echo "$as_me:5321: checking for vsprintf" >&5
+echo "$as_me:$LINENO: checking for vsprintf" >&5
echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 5324 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -5333,41 +7195,51 @@ vsprintf(0,0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5339: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5342: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5345: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:5347: result: yes" >&5
-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
#define USEVARARGS 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-echo "$as_me:5355: result: no" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
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
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 "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
@@ -5381,31 +7253,32 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5387: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5390: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5393: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5403: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:$LINENO: 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
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-EOF
+_ACEOF
ac_header_dirent=$ac_hdr; break
fi
@@ -5413,16 +7286,20 @@ 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 "$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 "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldir $LIBS"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
cat >conftest.$ac_ext <<_ACEOF
-#line 5424 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5440,43 +7317,96 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5443: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5446: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5449: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5452: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_dir_opendir=yes
+ ac_cv_search_opendir="none required"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_dir_opendir=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in dir; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
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"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
else
- 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 "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lx $LIBS"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
cat >conftest.$ac_ext <<_ACEOF
-#line 5478 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5494,39 +7424,93 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5497: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5500: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5503: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5506: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_x_opendir=yes
+ ac_cv_search_opendir="none required"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_x_opendir=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+if test "$ac_cv_search_opendir" = no; then
+ for ac_lib in x; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_opendir="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
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"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+ test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
fi
fi
-echo "$as_me:5525: checking for setenv" >&5
+
+echo "$as_me:$LINENO: checking for setenv" >&5
echo $ECHO_N "checking for setenv... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 5528 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -5537,32 +7521,37 @@ setenv((char *)0,(char *)0);unsetenv((char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5540: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5543: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5546: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5549: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:5551: result: yes" >&5
-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
#define USESETENV 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-echo "$as_me:5559: result: no" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
-echo "$as_me:5561: checking for putenv" >&5
+echo "$as_me:$LINENO: checking for putenv" >&5
echo $ECHO_N "checking for putenv... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 5564 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -5573,36 +7562,42 @@ putenv((char *)0);unsetenv((char *)0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5579: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5582: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5585: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:5587: result: yes" >&5
+ echo "$as_me:$LINENO: 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
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\_ACEOF
#define NEEDPUTENV 1
-EOF
+_ACEOF
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:5601: checking for nl_langinfo(CODESET)" >&5
+echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <langinfo.h>
@@ -5615,112 +7610,250 @@ nl_langinfo(CODESET);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5618: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5621: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5624: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5627: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:5629: result: yes" >&5
-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
#define HAVE_NL_LANGINFO 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-echo "$as_me:5637: result: no" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+echo "$as_me:$LINENO: checking for library containing gethostname" >&5
+echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6
+if test "${ac_cv_search_gethostname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gethostname=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 gethostname ();
+int
+main ()
+{
+gethostname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_gethostname="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gethostname" = no; then
+ for ac_lib in nsl; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 gethostname ();
+int
+main ()
+{
+gethostname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_gethostname="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5
+echo "${ECHO_T}$ac_cv_search_gethostname" >&6
+if test "$ac_cv_search_gethostname" != no; then
+ test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS"
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5645: checking for $ac_func" >&5
+echo "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5682: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5685: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5688: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5691: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $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
+sed 's/^/| /' 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 "$as_me:$LINENO: 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
+ cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
+_ACEOF
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 "$as_me:$LINENO: 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"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <security/pam_appl.h>
int
main ()
@@ -5735,26 +7868,27 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5738: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5741: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5744: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5747: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:5749: result: yes" >&5
-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
#define USE_PAM 1
-EOF
+_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-echo "$as_me:5757: result: no" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6;LIBS="$oldlibs"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5766,9 +7900,9 @@ if test "${enable_use_locale+set}" = set; then
fi;
if test "$enable_use_locale" = "yes"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define USE_LOCALE 1
-EOF
+_ACEOF
fi
# Check whether --enable-telnet or --disable-telnet was given.
@@ -5777,9 +7911,9 @@ if test "${enable_telnet+set}" = set; then
fi;
if test "$enable_telnet" = "yes"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define BUILTIN_TELNET 1
-EOF
+_ACEOF
fi
# Check whether --enable-colors256 or --disable-colors256 was given.
@@ -5788,9 +7922,9 @@ if test "${enable_colors256+set}" = set; then
fi;
if test "$enable_colors256" = "yes"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define COLORS256 1
-EOF
+_ACEOF
fi
# Check whether --enable-rxvt_osc or --disable-rxvt_osc was given.
@@ -5799,9 +7933,9 @@ if test "${enable_rxvt_osc+set}" = set; then
fi;
if test "$enable_rxvt_osc" = "yes"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define RXVT_OSC 1
-EOF
+_ACEOF
fi
@@ -5813,43 +7947,51 @@ fi
test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
if test "$cross_compiling" = yes; then
- { { 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;}
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5821 "configure"
-#include "confdefs.h"
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main(){exit(0);}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5826: \"$ac_link\"") >&5
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5829: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5831: \"$ac_try\"") >&5
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5834: \$? = $ac_status" >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
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
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: 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 -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
ETCSCREENRC="\"/usr/local/etc/screenrc\""
if test -n "$prefix"; then
ETCSCREENRC="\"$prefix/etc/screenrc\""
fi
-echo "$as_me:5852: checking for the global screenrc file" >&5
+echo "$as_me:$LINENO: 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.
@@ -5857,11 +7999,11 @@ if test "${with_sys_screenrc+set}" = set; then
withval="$with_sys_screenrc"
ETCSCREENRC="\"${withval}\""
fi;
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define ETCSCREENRC $ETCSCREENRC
-EOF
+_ACEOF
-echo "$as_me:5864: result: $ETCSCREENRC" >&5
+echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5
echo "${ECHO_T}$ETCSCREENRC" >&6
SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
@@ -5869,17 +8011,17 @@ 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 "$as_me:$LINENO: checking for the utf8-encodings location" >&5
echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define SCREENENCODINGS $SCREENENCODINGS
-EOF
+_ACEOF
-echo "$as_me:5878: result: $SCREENENCODINGS" >&5
+echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5
echo "${ECHO_T}$SCREENENCODINGS" >&6
-ac_config_files="$ac_config_files Makefile doc/Makefile"
-ac_config_commands="$ac_config_commands default"
+ 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
@@ -5890,7 +8032,7 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
@@ -5925,7 +8067,7 @@ _ACEOF
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
@@ -5956,35 +8098,227 @@ fi
DEFS=-DHAVE_CONFIG_H
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
: ${CONFIG_STATUS=./config.status}
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:$LINENO: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
-# Generated automatically by configure.
+# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
-ac_cs_invocation="\$0 \$@"
-
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
# Name of the executable.
-as_me=`echo "$0" |sed 's,.*[\\/],,'`
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+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
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
@@ -6010,24 +8344,20 @@ else
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
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
else
- as_unset=false
+ as_mkdir_p=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; }
+as_executable_p="test -f"
+
+# 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"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
# IFS
# We need space, tab and new line, in precisely that order.
@@ -6036,10 +8366,34 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+$as_unset CDPATH
exec 6>&1
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
_ACEOF
# Files that config.status was made for.
@@ -6059,7 +8413,7 @@ if test -n "$ac_config_commands"; then
echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
@@ -6069,6 +8423,7 @@ Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
+ -q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
@@ -6086,12 +8441,12 @@ Configuration commands:
$config_commands
Report bugs to <bug-autoconf@gnu.org>."
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.52,
+configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -6100,9 +8455,9 @@ 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
+_ACEOF
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
# 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=:
@@ -6112,30 +8467,30 @@ do
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- shift
- set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
- shift
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
;;
- -*);;
*) # This is not an option, so the user has probably given explicit
# arguments.
+ ac_option=$1
ac_need_defaults=false;;
esac
- case $1 in
+ case $ac_option in
# Handling of the options.
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- 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
+ ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:6138: error: ambiguous option: $1
+ { { echo "$as_me:$LINENO: 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;}
@@ -6145,16 +8500,19 @@ Try \`$0 --help' for more information." >&2;}
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
- shift
- CONFIG_FILES="$CONFIG_FILES $1"
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
- shift
- CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:6157: error: unrecognized option: $1
+ -*) { { echo "$as_me:$LINENO: 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;}
@@ -6166,25 +8524,27 @@ Try \`$0 --help' for more information." >&2;}
shift
done
-exec 5>>config.log
-cat >&5 << _ACEOF
+ac_configure_extra_args=
-## ----------------------- ##
-## Running config.status. ##
-## ----------------------- ##
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
-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
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
_ACEOF
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
@@ -6193,7 +8553,7 @@ do
"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:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -6209,6 +8569,9 @@ if $ac_need_defaults; then
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
@@ -6217,23 +8580,23 @@ $debug ||
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/cs$$-$RANDOM
+ tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
#
# CONFIG_FILES section.
@@ -6246,6 +8609,12 @@ if test -n "\$CONFIG_FILES"; then
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,@PATH_SEPARATOR@,$PATH_SEPARATOR,;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,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
@@ -6261,23 +8630,16 @@ 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,@DEFS@,$DEFS,;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,@ac_prefix_program@,$ac_prefix_program,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@@ -6286,17 +8648,20 @@ 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,@EGREP@,$EGREP,;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
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
-EOF
+_ACEOF
- cat >>$CONFIG_STATUS <<\EOF
+ cat >>$CONFIG_STATUS <<\_ACEOF
# 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
@@ -6335,8 +8700,8 @@ EOF
fi
fi # test -n "$CONFIG_FILES"
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
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
@@ -6350,7 +8715,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
@@ -6361,60 +8727,84 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- { 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'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
else
- ac_dir_suffix= ac_dots=
- fi
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
- 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 ;;
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
*) # Relative path.
- ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_dots$srcdir ;;
- esac
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_dots$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:6409: creating $ac_file" >&5
+ { echo "$as_me:$LINENO: 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."
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -6424,7 +8814,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) 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
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -6437,23 +8827,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:6440: error: cannot find input file: $f" >&5
+ { { echo "$as_me:$LINENO: 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
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
$extrasub
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
@@ -6465,8 +8861,8 @@ s,@INSTALL@,$ac_INSTALL,;t t
fi
done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_HEADER section.
@@ -6498,7 +8894,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:6501: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -6509,7 +8905,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) 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
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -6522,7 +8918,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:6525: error: cannot find input file: $f" >&5
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -6531,7 +8927,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
# Remove the trailing spaces.
sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-EOF
+_ACEOF
# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
@@ -6547,16 +8943,16 @@ rm -f conftest.defines conftest.undefs
# `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
+cat >confdef2sed.sed <<\_ACEOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
-EOF
+_ACEOF
# 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.
@@ -6567,14 +8963,14 @@ 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.undefs <<\EOF
+cat >>conftest.undefs <<\_ACEOF
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-EOF
+_ACEOF
# 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 grep "^[ ]*#[ ]*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
@@ -6598,7 +8994,7 @@ do
mv conftest.tail conftest.defines
done
rm -f conftest.defines
-echo ' fi # egrep' >>$CONFIG_STATUS
+echo ' fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS
# Break up conftest.undefs because some shells have a limit on the size
@@ -6626,23 +9022,24 @@ do
done
rm -f conftest.undefs
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
# 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. */
+ # /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
- echo "/* Generated automatically by configure. */" >$tmp/config.h
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
+ echo "/* $ac_file. Generated 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
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
- ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
@@ -6653,24 +9050,31 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- { 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; }
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
- fi
rm -f $ac_file
mv $tmp/config.h $ac_file
fi
@@ -6679,8 +9083,8 @@ done; }
rm -f $tmp/config.h
fi
done
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_COMMANDS section.
@@ -6688,7 +9092,53 @@ cat >>$CONFIG_STATUS <<\EOF
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,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
default )
# a hook for preserving undef directive in config.h
@@ -6698,15 +9148,16 @@ rm -f conftest
;;
esac
done
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
-EOF
+_ACEOF
chmod +x $CONFIG_STATUS
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
@@ -6717,14 +9168,18 @@ ac_clean_files=$ac_clean_files_save
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
- $SHELL $CONFIG_STATUS || ac_cs_success=false
+ $SHELL $CONFIG_STATUS $ac_config_status_args || 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
echo "!!! Since you have no awk you must copy the files 'comm.h.dist'"
@@ -6732,7 +9187,7 @@ echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'."
echo "!!! Do _not_ change the user configuration section in config.h!"
echo "Please check the pathnames in the Makefile."
else
-echo "Now please check the pathnames in the Makefile and the user"
+echo "Now please check the pathnames in the Makefile and in the user"
echo "configuration section in config.h."
fi
echo "Then type 'make' to make screen. Good luck."
diff --git a/configure.in b/configure.in
index 98dd2cf..34c9372 100644
--- a/configure.in
+++ b/configure.in
@@ -200,8 +200,8 @@ LIBS="$LIBS -lelf"
AC_CHECKING(SVR4)
AC_TRY_LINK([#include <utmpx.h>
],,
-AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
-AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN)))
+[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
,LIBS="$oldlibs")
AC_CHECKING(for Solaris 2.x)
@@ -681,12 +681,20 @@ AC_DEFINE(HAVE_DEV_PTC)
fi
AC_CHECKING(for SVR4 ptys)
+sysvr4ptys=
if test -c /dev/ptmx ; then
-AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],AC_DEFINE(HAVE_SVR4_PTYS))
+AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+sysvr4ptys=1])
fi
AC_CHECK_FUNCS(getpt)
+dnl check for openpty()
+if test -z "$sysvr4ptys"; then
+AC_CHECK_FUNCS(openpty,,
+[AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+fi
+
AC_CHECKING(for ptyranges)
if test -d /dev/ptym ; then
pdir='/dev/ptym'
@@ -714,6 +722,14 @@ fi
dnl **** pty mode/group handling ****
dnl
dnl support provided by Luke Mewburn <lm@rmit.edu.au>, 931222
+AC_ARG_WITH(pty-mode, [ --with-pty-mode=mode default mode for ptys], [ ptymode="${withval}" ])
+AC_ARG_WITH(pty-group, [ --with-pty-group=group default group for ptys], [ ptygrp="${withval}" ])
+test -n "$ptymode" || ptymode=0620
+if test -n "$ptygrp" ; then
+AC_DEFINE_UNQUOTED(PTYMODE, $ptymode)
+AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
+else
+
AC_CHECKING(default tty permissions/group)
rm -f conftest_grp
AC_TRY_RUN([
@@ -747,8 +763,8 @@ main()
],[
if test -f conftest_grp; then
ptygrp=`cat conftest_grp`
- AC_NOTE([- pty mode: 0620, group: $ptygrp])
- AC_DEFINE(PTYMODE, 0620)
+ AC_NOTE([- pty mode: $ptymode, group: $ptygrp])
+ AC_DEFINE_UNQUOTED(PTYMODE, $ptymode)
AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
else
AC_NOTE(- ptys are world accessable)
@@ -778,8 +794,8 @@ main()
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_NOTE([- pty mode: $ptymode, group: $ptygrp])
+ AC_DEFINE_UNQUOTED(PTYMODE, $ptymode)
AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
else
AC_NOTE(- ptys are world accessable)
@@ -790,6 +806,7 @@ main()
]
)
rm -f conftest_grp
+fi
dnl
dnl **** utmp handling ****
@@ -1127,6 +1144,9 @@ AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW))
AC_CHECKING(getttyent)
AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT))
+AC_CHECKING(fdwalk)
+AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
+
AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
AC_TRY_RUN([
main() {
@@ -1201,6 +1221,8 @@ AC_TRY_LINK([
#include <langinfo.h>
],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no))
+AC_SEARCH_LIBS(gethostname, nsl)
+
AC_CHECK_FUNCS(rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime)
AC_ARG_ENABLE(pam, [ --enable-pam enable PAM support])
@@ -1278,7 +1300,7 @@ echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'."
echo "!!! Do _not_ change the user configuration section in config.h!"
echo "Please check the pathnames in the Makefile."
else
-echo "Now please check the pathnames in the Makefile and the user"
+echo "Now please check the pathnames in the Makefile and in the user"
echo "configuration section in config.h."
fi
echo "Then type 'make' to make screen. Good luck."
diff --git a/display.c b/display.c
index 00b2a22..9e09187 100644
--- a/display.c
+++ b/display.c
@@ -21,12 +21,12 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: display.c,v 1.16 1994/05/31 12:31:50 mlschroe Exp $ FAU")
-
-
#include <sys/types.h>
+#include <signal.h>
#include <fcntl.h>
+#ifndef sun
+# include <sys/ioctl.h>
+#endif
#include "config.h"
#include "screen.h"
@@ -40,12 +40,20 @@ static int CallRewrite __P((int, int, int, int));
static void FreeCanvas __P((struct canvas *));
static void disp_readev_fn __P((struct event *, char *));
static void disp_writeev_fn __P((struct event *, char *));
+#ifdef linux
+static void disp_writeev_eagain __P((struct event *, char *));
+#endif
static void disp_status_fn __P((struct event *, char *));
static void disp_hstatus_fn __P((struct event *, char *));
+static void disp_blocked_fn __P((struct event *, char *));
static void cv_winid_fn __P((struct event *, char *));
#ifdef MAPKEYS
static void disp_map_fn __P((struct event *, char *));
#endif
+static void disp_idle_fn __P((struct event *, char *));
+#ifdef BLANKER_PRG
+static void disp_blanker_fn __P((struct event *, char *));
+#endif
static void WriteLP __P((int, int));
static void INSERTCHAR __P((int));
static void RAW_PUTCHAR __P((int));
@@ -55,7 +63,7 @@ static void SetBackColor __P((int));
extern struct layer *flayer;
-extern struct win *windows;
+extern struct win *windows, *fore;
extern struct LayFuncs WinLf;
extern int use_hardstatus;
@@ -65,12 +73,23 @@ 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;
+extern struct action idleaction;
/* XXX shouldn't be here */
extern char *hstatusstring;
extern char *captionstring;
extern int pastefont;
+extern int idletimo;
+
+#ifdef BLANKER_PRG
+extern int pty_preopen;
+#if defined(TIOCSWINSZ) || defined(TIOCGWINSZ)
+extern struct winsize glwz;
+#endif
+extern char **NewEnv;
+extern int real_uid, real_gid;
+#endif
/*
* tputs needs this to calculate the padding
@@ -83,7 +102,7 @@ short ospeed;
struct display *display, *displays;
#ifdef COLOR
-int attr2color[8];
+int attr2color[8][4];
int nattr2color;
#endif
@@ -95,6 +114,7 @@ struct display TheDisplay;
* The default values
*/
int defobuflimit = OBUF_MAX;
+int defnonblock = -1;
#ifdef AUTO_NUKE
int defautonuke = 0;
#endif
@@ -215,7 +235,7 @@ struct mode *Mode;
display->d_next = displays;
displays = display;
D_flow = 1;
- D_nonblock = 0;
+ D_nonblock = defnonblock;
D_userfd = fd;
D_readev.fd = D_writeev.fd = fd;
D_readev.type = EV_READ;
@@ -233,11 +253,26 @@ struct mode *Mode;
D_hstatusev.type = EV_TIMEOUT;
D_hstatusev.data = (char *)display;
D_hstatusev.handler = disp_hstatus_fn;
+ D_blockedev.type = EV_TIMEOUT;
+ D_blockedev.data = (char *)display;
+ D_blockedev.handler = disp_blocked_fn;
+ D_blockedev.condpos = &D_obuffree;
+ D_blockedev.condneg = &D_obuflenmax;
+ D_hstatusev.handler = disp_hstatus_fn;
#ifdef MAPKEYS
D_mapev.type = EV_TIMEOUT;
D_mapev.data = (char *)display;
D_mapev.handler = disp_map_fn;
#endif
+ D_idleev.type = EV_TIMEOUT;
+ D_idleev.data = (char *)display;
+ D_idleev.handler = disp_idle_fn;
+#ifdef BLANKER_PRG
+ D_blankerev.type = EV_READ;
+ D_blankerev.data = (char *)display;
+ D_blankerev.handler = disp_blanker_fn;
+ D_blankerev.fd = -1;
+#endif
D_OldMode = *Mode;
D_status_obuffree = -1;
Resize_obuf(); /* Allocate memory for buffer */
@@ -285,6 +320,9 @@ FreeDisplay()
#ifdef FONT
FreeTransTable();
#endif
+#ifdef BLANKER_PRG
+ KillBlanker();
+#endif
if (D_userfd >= 0)
{
Flush();
@@ -305,8 +343,23 @@ FreeDisplay()
evdeq(&D_statusev);
evdeq(&D_readev);
evdeq(&D_writeev);
+ evdeq(&D_blockedev);
#ifdef MAPKEYS
evdeq(&D_mapev);
+ if (D_kmaps)
+ {
+ free(D_kmaps);
+ D_kmaps = 0;
+ D_aseqs = 0;
+ D_nseqs = 0;
+ D_seqp = 0;
+ D_seql = 0;
+ D_seqh = 0;
+ }
+#endif
+ evdeq(&D_idleev);
+#ifdef BLANKER_PRG
+ evdeq(&D_blankerev);
#endif
#ifdef HAVE_BRAILLE
if (bd.bd_dpy == display)
@@ -339,6 +392,8 @@ FreeDisplay()
{
if (p->w_pdisplay == display)
p->w_pdisplay = 0;
+ if (p->w_lastdisp == display)
+ p->w_lastdisp = 0;
if (p->w_readev.condneg == &D_status || p->w_readev.condneg == &D_obuflenmax)
p->w_readev.condpos = p->w_readev.condneg = 0;
}
@@ -347,6 +402,11 @@ FreeDisplay()
cvp = cv->c_next;
FreeCanvas(cv);
}
+#ifdef ZMODEM
+ for (p = windows; p; p = p->w_next)
+ if (p->w_zdisplay == display)
+ zmodem_abort(p, 0);
+#endif
#ifdef MULTI
free((char *)display);
#endif
@@ -701,6 +761,9 @@ void
FinitTerm()
{
ASSERT(display);
+#ifdef BLANKER_PRG
+ KillBlanker();
+#endif
if (D_tcinited)
{
ResizeDisplay(D_defwidth, D_defheight);
@@ -833,6 +896,13 @@ int c;
return;
}
# endif
+ if (c < 32)
+ {
+ AddCStr2(D_CS0, '0');
+ AddChar(c + 0x5f);
+ AddCStr(D_CE0);
+ goto addedutf8;
+ }
AddUtf8(c);
goto addedutf8;
}
@@ -1021,12 +1091,19 @@ int mode;
{
if (display && D_mouse != mode)
{
+ char mousebuf[20];
if (!D_CXT)
return;
if (D_mouse)
- AddStr(D_mouse == 9 ? "\033[?9l" : "\033[?1000l");
+ {
+ sprintf(mousebuf, "\033[?%dl", D_mouse);
+ AddStr(mousebuf);
+ }
if (mode)
- AddStr(mode == 9 ? "\033[?9h" : "\033[?1000h");
+ {
+ sprintf(mousebuf, "\033[?%dh", mode);
+ AddStr(mousebuf);
+ }
D_mouse = mode;
}
}
@@ -1751,6 +1828,7 @@ register int new;
return;
}
#endif
+ D_rend.attr = new;
typ = D_atyp;
if ((new & old) != old)
{
@@ -1792,7 +1870,6 @@ register int new;
typ |= D_attrtyp[i];
}
}
- D_rend.attr = new;
D_atyp = typ;
}
@@ -1801,7 +1878,8 @@ void
SetFont(new)
int new;
{
- if (!display || D_rend.font == new)
+ int old = D_rend.font;
+ if (!display || old == new)
return;
D_rend.font = new;
#ifdef ENCODINGS
@@ -1819,7 +1897,11 @@ int new;
}
if (!D_CG0 && new != '0')
- new = ASCII;
+ {
+ new = ASCII;
+ if (old == new)
+ return;
+ }
if (new == ASCII)
AddCStr(D_CE0);
@@ -1902,8 +1984,17 @@ int f, b;
of = rend_getfg(&D_rend);
ob = rend_getbg(&D_rend);
+#ifdef COLORS16
+ /* intense default not invented yet */
+ if (f == 0x100)
+ f = 0;
+ if (b == 0x100)
+ b = 0;
+#endif
debug2("SetColor %d %d", coli2e(of), coli2e(ob));
debug2(" -> %d %d\n", coli2e(f), coli2e(b));
+ debug2("(%d %d", of, ob);
+ debug2(" -> %d %d)\n", f, b);
if (!D_CAX && D_hascolor && ((f == 0 && f != of) || (b == 0 && b != ob)))
{
@@ -2018,7 +2109,16 @@ struct mchar *mc;
mmc = *mc;
for (i = 0; i < 8; i++)
if (attr2color[i] && (mc->attr & (1 << i)) != 0)
- ApplyAttrColor(attr2color[i], &mmc);
+ {
+ if (mc->color == 0 && attr2color[i][3])
+ ApplyAttrColor(attr2color[i][3], &mmc);
+ else if ((mc->color & 0x0f) == 0 && attr2color[i][2])
+ ApplyAttrColor(attr2color[i][2], &mmc);
+ else if ((mc->color & 0xf0) == 0 && attr2color[i][1])
+ ApplyAttrColor(attr2color[i][1], &mmc);
+ else
+ ApplyAttrColor(attr2color[i][0], &mmc);
+ }
mc = &mmc;
debug2("SetRendition: mapped to %02x %02x\n", (unsigned char)mc->attr, 0x99 - (unsigned char)mc->color);
}
@@ -2103,11 +2203,13 @@ MakeStatus(msg)
char *msg;
{
register char *s, *t;
- register int max, ti;
+ register int max;
if (!display)
return;
+ if (D_blocked)
+ return;
if (!D_tcinited)
{
debug("tc not inited, just writing msg\n");
@@ -2132,14 +2234,17 @@ char *msg;
if (strcmp(msg, D_status_lastmsg) == 0)
{
debug("same message - increase timeout");
- SetTimeout(&D_statusev, MsgWait * 1000);
+ SetTimeout(&D_statusev, MsgWait);
return;
}
if (!D_status_bell)
{
- ti = time((time_t *)0) - D_status_time;
+ struct timeval now;
+ int ti;
+ gettimeofday(&now, NULL);
+ ti = (now.tv_sec - D_status_time.tv_sec) * 1000 + (now.tv_usec - D_status_time.tv_usec) / 1000;
if (ti < MsgMinWait)
- DisplaySleep(MsgMinWait - ti, 0);
+ DisplaySleep1000(MsgMinWait - ti, 0);
}
RemoveStatus();
}
@@ -2222,8 +2327,8 @@ char *msg;
D_obuffree = D_obuflen = 0;
D_status = STATUS_ON_WIN;
}
- (void) time(&D_status_time);
- SetTimeout(&D_statusev, MsgWait * 1000);
+ gettimeofday(&D_status_time, NULL);
+ SetTimeout(&D_statusev, MsgWait);
evenq(&D_statusev);
#ifdef HAVE_BRAILLE
RefreshBraille(); /* let user see multiple Msg()s */
@@ -2282,6 +2387,8 @@ char *str;
if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE == D_height-1)
return; /* sorry, in use */
+ if (D_blocked)
+ return;
if (D_HS && D_has_hstatus == HSTATUS_HS)
{
@@ -2297,7 +2404,7 @@ char *str;
return;
AddCStr2(D_TS, 0);
max = D_WS > 0 ? D_WS : (D_width - !D_CLP);
- if (strlen(str) > max)
+ if ((int)strlen(str) > max)
AddStrn(str, max);
else
AddStr(str);
@@ -2347,7 +2454,7 @@ RefreshHStatus()
evdeq(&D_hstatusev);
if (D_status == STATUS_ON_HS)
return;
- buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS) ? D_WS : D_width - !D_CLP, &D_hstatusev);
+ buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS > 0) ? D_WS : D_width - !D_CLP, &D_hstatusev, 0);
if (buf && *buf)
{
ShowHStatus(buf);
@@ -2513,7 +2620,7 @@ int y, from, to, isblank;
}
p = Layer2Window(cv->c_layer);
- buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev);
+ buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev, 0);
if (cv->c_captev.timeout.tv_sec)
evenq(&cv->c_captev);
xx = strlen(buf);
@@ -2843,11 +2950,11 @@ int ins;
y--;
}
}
- else if (y == D_bot)
- ChangeScrollRegion(ys, ye); /* remove unusable region */
+ else if (y == D_bot) /* remove unusable region? */
+ ChangeScrollRegion(0, D_height - 1);
if (D_x != D_width || D_y != y)
{
- if (D_CLP) /* don't even try if !LP */
+ if (D_CLP && y >= 0) /* 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 */
@@ -2919,6 +3026,8 @@ int newtop, newbot;
{
if (display == 0)
return;
+ if (newtop == newbot)
+ return; /* xterm etc can't do it */
if (newtop == -1)
newtop = 0;
if (newbot == -1)
@@ -3063,10 +3172,11 @@ Flush()
}
D_obuffree += l;
D_obufp = D_obuf;
- if (D_nonblock > 1)
- D_nonblock = 1; /* reenable flow control for WriteString */
if (fcntl(D_userfd, F_SETFL, FNBLOCK))
debug1("Warning: NBLOCK fcntl failed: %d\n", errno);
+ if (D_blocked == 1)
+ D_blocked = 0;
+ D_blocked_fuzz = 0;
}
void
@@ -3083,6 +3193,8 @@ freetty()
D_obuf = 0;
D_obuflen = 0;
D_obuflenmax = -D_obufmax;
+ D_blocked = 0;
+ D_blocked_fuzz = 0;
}
/*
@@ -3101,9 +3213,12 @@ Resize_obuf()
ASSERT(D_obuffree == -1);
if (!D_status_bell)
{
- int ti = time((time_t *)0) - D_status_time;
+ struct timeval now;
+ int ti;
+ gettimeofday(&now, NULL);
+ ti = (now.tv_sec - D_status_time.tv_sec) * 1000 + (now.tv_usec - D_status_time.tv_usec) / 1000;
if (ti < MsgMinWait)
- DisplaySleep(MsgMinWait - ti, 0);
+ DisplaySleep1000(MsgMinWait - ti, 0);
}
RemoveStatus();
if (--D_obuffree > 0) /* redo AddChar decrement */
@@ -3130,6 +3245,36 @@ Resize_obuf()
debug1("ResizeObuf: resized to %d\n", D_obuflen);
}
+void
+DisplaySleep1000(n, eat)
+int n;
+int eat;
+{
+ char buf;
+ fd_set r;
+ struct timeval t;
+
+ if (n <= 0)
+ return;
+ if (!display)
+ {
+ debug("DisplaySleep has no display sigh\n");
+ sleep1000(n);
+ return;
+ }
+ t.tv_usec = (n % 1000) * 1000;
+ t.tv_sec = n / 1000;
+ FD_ZERO(&r);
+ FD_SET(D_userfd, &r);
+ if (select(FD_SETSIZE, &r, (fd_set *)0, (fd_set *)0, &t) > 0)
+ {
+ debug("display activity stopped sleep\n");
+ if (eat)
+ read(D_userfd, &buf, 1);
+ }
+ debug2("DisplaySleep(%d) ending, eat was %d\n", n, eat);
+}
+
#ifdef AUTO_NUKE
void
NukePending()
@@ -3215,6 +3360,23 @@ NukePending()
}
#endif /* AUTO_NUKE */
+#ifdef linux
+/* linux' select can't handle flow control, so wait 100ms if
+ * we get EAGAIN
+ */
+static void
+disp_writeev_eagain(ev, data)
+struct event *ev;
+char *data;
+{
+ display = (struct display *)data;
+ evdeq(&D_writeev);
+ D_writeev.type = EV_WRITE;
+ D_writeev.handler = disp_writeev_fn;
+ evenq(&D_writeev);
+}
+#endif
+
static void
disp_writeev_fn(ev, data)
struct event *ev;
@@ -3236,18 +3398,53 @@ char *data;
bcopy(D_obuf + size, D_obuf, len);
debug2("ASYNC: wrote %d - remaining %d\n", size, len);
}
- /* Great, reenable flow control for WriteString now. */
- if ((D_nonblock > 1) && (len < D_obufmax/2))
- D_nonblock = 1;
D_obufp -= size;
D_obuffree += size;
+ if (D_blocked_fuzz)
+ {
+ D_blocked_fuzz -= size;
+ if (D_blocked_fuzz < 0)
+ D_blocked_fuzz = 0;
+ }
+ if (D_blockedev.queued)
+ {
+ if (D_obufp - D_obuf > D_obufmax / 2)
+ {
+ debug2("%s: resetting timeout to %g secs\n", D_usertty, D_nonblock/1000.);
+ SetTimeout(&D_blockedev, D_nonblock);
+ }
+ else
+ {
+ debug1("%s: deleting blocked timeout\n", D_usertty);
+ evdeq(&D_blockedev);
+ }
+ }
+ if (D_blocked == 1 && D_obuf == D_obufp)
+ {
+ /* empty again, restart output */
+ debug1("%s: buffer empty, unblocking\n", D_usertty);
+ D_blocked = 0;
+ Activate(D_fore ? D_fore->w_norefresh : 0);
+ D_blocked_fuzz = D_obufp - D_obuf;
+ }
}
else
{
+#ifdef linux
+ /* linux flow control is badly broken */
+ if (errno == EAGAIN)
+ {
+ evdeq(&D_writeev);
+ D_writeev.type = EV_TIMEOUT;
+ D_writeev.handler = disp_writeev_eagain;
+ SetTimeout(&D_writeev, 100);
+ evenq(&D_writeev);
+ }
+#endif
if (errno != EINTR && errno != EAGAIN)
-# if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
+#if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
if (errno != EWOULDBLOCK)
-# endif
+#endif
Msg(errno, "Error writing output to display");
}
}
@@ -3311,6 +3508,40 @@ char *data;
sleep(1);
return;
}
+ if (D_blocked == 4)
+ {
+ D_blocked = 0;
+#ifdef BLANKER_PRG
+ KillBlanker();
+#endif
+ Activate(D_fore ? D_fore->w_norefresh : 0);
+ ResetIdle();
+ return;
+ }
+#ifdef ZMODEM
+ if (D_blocked > 1) /* 2, 3 */
+ {
+ char *bufp;
+ struct win *p;
+
+ flayer = 0;
+ for (p = windows; p ; p = p->w_next)
+ if (p->w_zdisplay == display)
+ {
+ flayer = &p->w_layer;
+ bufp = buf;
+ while (size > 0)
+ LayProcess(&bufp, &size);
+ return;
+ }
+ debug("zmodem window gone, deblocking display");
+ zmodem_abort(0, display);
+ }
+#endif
+ if (idletimo > 0)
+ ResetIdle();
+ if (D_fore)
+ D_fore->w_lastdisp = display;
if (D_mouse && D_forecv)
{
unsigned char *bp = (unsigned char *)buf;
@@ -3357,8 +3588,9 @@ char *data;
#ifdef ENCODINGS
if (D_encoding != (D_forecv ? D_forecv->c_layer->l_encoding : 0))
{
- int i, j, c;
+ int i, j, c, enc;
char buf2[IOSIZE * 2 + 10];
+ enc = D_forecv ? D_forecv->c_layer->l_encoding : 0;
for (i = j = 0; i < size; i++)
{
c = ((unsigned char *)buf)[i];
@@ -3370,12 +3602,12 @@ char *data;
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);
+ j += EncodeChar(buf2 + j, c, enc, &font);
+ j += EncodeChar(buf2 + j, -1, enc, &font);
}
else
- j += EncodeChar(buf2 + j, c, D_forecv->c_layer->l_encoding, 0);
- if (j > sizeof(buf2) - 10) /* just in case... */
+ j += EncodeChar(buf2 + j, c, enc, 0);
+ if (j > (int)sizeof(buf2) - 10) /* just in case... */
break;
}
(*D_processinput)(buf2, j);
@@ -3412,6 +3644,29 @@ char *data;
}
static void
+disp_blocked_fn(ev, data)
+struct event *ev;
+char *data;
+{
+ struct win *p;
+
+ display = (struct display *)data;
+ debug1("blocked timeout %s\n", D_usertty);
+ if (D_obufp - D_obuf > D_obufmax + D_blocked_fuzz)
+ {
+ debug("stopping output to display\n");
+ D_blocked = 1;
+ /* re-enable all windows */
+ for (p = windows; p; p = p->w_next)
+ if (p->w_readev.condneg == &D_obuflenmax)
+ {
+ debug1("freeing window #%d\n", p->w_number);
+ p->w_readev.condpos = p->w_readev.condneg = 0;
+ }
+ }
+}
+
+static void
cv_winid_fn(ev, data)
struct event *ev;
char *data;
@@ -3441,14 +3696,227 @@ struct event *ev;
char *data;
{
char *p;
- int l;
+ int l, i;
+ unsigned char *q;
display = (struct display *)data;
debug("Flushing map sequence\n");
if (!(l = D_seql))
return;
- p = D_seqp - l;
- D_seqp = D_kmaps[0].seq;
+ p = (char *)D_seqp - l;
+ D_seqp = D_kmaps + 3;
D_seql = 0;
- ProcessInput2(p, l);
+ if ((q = D_seqh) != 0)
+ {
+ D_seqh = 0;
+ i = q[0] << 8 | q[1];
+ i &= ~KMAP_NOTIMEOUT;
+ debug1("Mapping former hit #%d - ", i);
+ debug2("%d(%s) - ", q[2], q + 3);
+ if (StuffKey(i))
+ ProcessInput2((char *)q + 3, q[2]);
+ if (display == 0)
+ return;
+ l -= q[2];
+ p += q[2];
+ }
+ else
+ D_dontmap = 1;
+ ProcessInput(p, l);
+}
+#endif
+
+static void
+disp_idle_fn(ev, data)
+struct event *ev;
+char *data;
+{
+ struct display *olddisplay;
+ display = (struct display *)data;
+ debug("idle timeout\n");
+ if (idletimo <= 0 || idleaction.nr == RC_ILLEGAL)
+ return;
+ olddisplay = display;
+ flayer = D_forecv->c_layer;
+ fore = D_fore;
+ DoAction(&idleaction, -1);
+ if (idleaction.nr == RC_BLANKER)
+ return;
+ for (display = displays; display; display = display->d_next)
+ if (olddisplay == display)
+ break;
+ if (display)
+ ResetIdle();
+}
+
+void
+ResetIdle()
+{
+ if (idletimo > 0)
+ {
+ SetTimeout(&D_idleev, idletimo);
+ if (!D_idleev.queued)
+ evenq(&D_idleev);
+ }
+ else
+ evdeq(&D_idleev);
+}
+
+
+#ifdef BLANKER_PRG
+
+static void
+disp_blanker_fn(ev, data)
+struct event *ev;
+char *data;
+{
+ char buf[IOSIZE], *b;
+ int size;
+
+ display = (struct display *)data;
+ size = read(D_blankerev.fd, buf, IOSIZE);
+ if (size <= 0)
+ {
+ evdeq(&D_blankerev);
+ close(D_blankerev.fd);
+ D_blankerev.fd = -1;
+ return;
+ }
+ for (b = buf; size; size--)
+ AddChar(*b++);
+}
+
+void
+KillBlanker()
+{
+ int oldtop = D_top, oldbot = D_bot;
+ struct mchar oldrend;
+
+ if (D_blankerev.fd == -1)
+ return;
+ if (D_blocked == 4)
+ D_blocked = 0;
+ evdeq(&D_blankerev);
+ close(D_blankerev.fd);
+ D_blankerev.fd = -1;
+ Kill(D_blankerpid, SIGHUP);
+ D_top = D_bot = -1;
+ oldrend = D_rend;
+ if (D_ME)
+ {
+ AddCStr(D_ME);
+ AddCStr(D_ME);
+ }
+ else
+ {
+#ifdef COLOR
+ if (D_hascolor)
+ AddStr("\033[m\033[m"); /* why is D_ME not set? */
+#endif
+ AddCStr(D_SE);
+ AddCStr(D_UE);
+ }
+ AddCStr(D_VE);
+ AddCStr(D_CE0);
+ D_rend = mchar_null;
+ D_atyp = 0;
+ D_curvis = 0;
+ D_x = D_y = -1;
+ ChangeScrollRegion(oldtop, oldbot);
+ SetRendition(&oldrend);
+ ClearAll();
+}
+
+void
+RunBlanker(cmdv)
+char **cmdv;
+{
+ char *m;
+ int pid;
+ int slave = -1;
+ char termname[30];
+#ifndef TIOCSWINSZ
+ char libuf[20], cobuf[20];
+#endif
+ char **np;
+
+ strcpy(termname, "TERM=");
+ strncpy(termname + 5, D_termname, sizeof(termname) - 6);
+ termname[sizeof(termname) - 1] = 0;
+ KillBlanker();
+ D_blankerpid = -1;
+ if ((D_blankerev.fd = OpenPTY(&m)) == -1)
+ {
+ Msg(0, "OpenPty failed");
+ return;
+ }
+#ifdef O_NOCTTY
+ if (pty_preopen)
+ {
+ if ((slave = open(m, O_RDWR|O_NOCTTY)) == -1)
+ {
+ Msg(errno, "%s", m);
+ close(D_blankerev.fd);
+ D_blankerev.fd = -1;
+ return;
+ }
+ }
+#endif
+ switch (pid = (int)fork())
+ {
+ case -1:
+ Msg(errno, "fork");
+ close(D_blankerev.fd);
+ D_blankerev.fd = -1;
+ return;
+ case 0:
+ displays = 0;
+#ifdef DEBUG
+ if (dfp && dfp != stderr)
+ fclose(dfp);
+#endif
+ if (setgid(real_gid) || setuid(real_uid))
+ Panic(errno, "setuid/setgid");
+ brktty(D_userfd);
+ freetty();
+ close(0);
+ close(1);
+ close(2);
+ closeallfiles(slave);
+ if (open(m, O_RDWR))
+ Panic(errno, "Cannot open %s", m);
+ dup(0);
+ dup(0);
+ if (slave != -1)
+ close(slave);
+ InitPTY(0);
+ fgtty(0);
+ SetTTY(0, &D_OldMode);
+ np = NewEnv + 3;
+ *np++ = NewEnv[0];
+ *np++ = termname;
+#ifdef TIOCSWINSZ
+ glwz.ws_col = D_width;
+ glwz.ws_row = D_height;
+ (void)ioctl(0, TIOCSWINSZ, (char *)&glwz);
+#else
+ sprintf(libuf, "LINES=%d", D_height);
+ sprintf(libuf, "COLUMNS=%d", D_width);
+ *np++ = libuf;
+ *np++ = cobuf;
+#endif
+#ifdef SIGPIPE
+ signal(SIGPIPE, SIG_DFL);
+#endif
+ display = 0;
+ execvpe(*cmdv, cmdv, NewEnv + 3);
+ Panic(errno, *cmdv);
+ default:
+ break;
+ }
+ D_blankerpid = pid;
+ evenq(&D_blankerev);
+ D_blocked = 4;
+ ClearAll();
}
+
#endif
diff --git a/display.h b/display.h
index d1b7fb4..ef99954 100644
--- a/display.h
+++ b/display.h
@@ -23,15 +23,6 @@
*/
#ifdef MAPKEYS
-struct kmap
-{
- char seq[8];
- char off[8];
- int nr;
-};
-
-#define KMAP_SEQ ((int)((struct kmap *)0)->seq)
-#define KMAP_OFF ((int)((struct kmap *)0)->off)
#define KMAP_KEYS (T_OCAPS-T_CAPS)
#define KMAP_AKEYS (T_OCAPS-T_CURSOR)
@@ -39,6 +30,15 @@ struct kmap
#define KMAP_NOTIMEOUT 0x4000
+struct kmap_ext
+{
+ char *str;
+ int fl;
+ struct action um;
+ struct action dm;
+ struct action mm;
+};
+
#endif
struct win; /* forward declaration */
@@ -83,8 +83,8 @@ struct display
int d_vpxmin, d_vpxmax; /* min/max used position on display */
struct win *d_fore; /* pointer to fore window */
struct win *d_other; /* pointer to other window */
- char d_nonblock; /* 1: don't block if obufmax reached */
- /* 2: obufmax is reached, discard */
+ int d_nonblock; /* -1 don't block if obufmax reached */
+ /* >0: block after nonblock secs */
char d_termname[20 + 1]; /* $TERM */
char *d_tentry; /* buffer for tgetstr */
char d_tcinited; /* termcap inited flag */
@@ -116,7 +116,7 @@ struct display
int d_xtermosc[4]; /* osc used */
#endif
struct mchar d_lpchar; /* missing char */
- time_t d_status_time; /* time of status display */
+ struct timeval d_status_time; /* time of status display */
int d_status; /* is status displayed? */
char d_status_bell; /* is it only a vbell? */
int d_status_len; /* length of status line */
@@ -135,6 +135,7 @@ struct display
int d_userfd; /* fd of the tty */
struct event d_readev; /* userfd read event */
struct event d_writeev; /* userfd write event */
+ struct event d_blockedev; /* blocked timeout */
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*/
@@ -150,12 +151,14 @@ struct display
#endif
#ifdef MAPKEYS
int d_nseqs; /* number of valid mappings */
- char *d_seqp; /* pointer into keymap array */
+ int d_aseqs; /* number of allocated mappings */
+ unsigned char *d_kmaps; /* keymaps */
+ unsigned char *d_seqp; /* pointer into keymap array */
int d_seql; /* number of parsed chars */
+ unsigned char *d_seqh; /* last hit */
struct event d_mapev; /* timeout event */
int d_dontmap; /* do not map next */
int d_mapdefault; /* do map next to default */
- struct kmap d_kmaps[KMAP_KEYS+KMAP_EXT]; /* keymaps */
#endif
union tcu d_tcs[T_N]; /* terminal capabilities */
char *d_attrtab[NATTR]; /* attrib emulation table */
@@ -177,6 +180,13 @@ struct display
char d_loginhost[100+1];
# endif /* _SEQUENT_ */
#endif
+ int d_blocked;
+ int d_blocked_fuzz;
+ struct event d_idleev; /* screen blanker */
+#ifdef BLANKER_PRG
+ int d_blankerpid;
+ struct event d_blankerev;
+#endif
};
#ifdef MULTI
@@ -255,8 +265,10 @@ extern struct display TheDisplay;
#define D_obuffree DISPLAY(d_obuffree)
#define D_auto_nuke DISPLAY(d_auto_nuke)
#define D_nseqs DISPLAY(d_nseqs)
+#define D_aseqs DISPLAY(d_aseqs)
#define D_seqp DISPLAY(d_seqp)
#define D_seql DISPLAY(d_seql)
+#define D_seqh DISPLAY(d_seqh)
#define D_dontmap DISPLAY(d_dontmap)
#define D_mapdefault DISPLAY(d_mapdefault)
#define D_kmaps DISPLAY(d_kmaps)
@@ -282,7 +294,13 @@ extern struct display TheDisplay;
#define D_loginhost DISPLAY(d_loginhost)
#define D_readev DISPLAY(d_readev)
#define D_writeev DISPLAY(d_writeev)
+#define D_blockedev DISPLAY(d_blockedev)
#define D_mapev DISPLAY(d_mapev)
+#define D_blocked DISPLAY(d_blocked)
+#define D_blocked_fuzz DISPLAY(d_blocked_fuzz)
+#define D_idleev DISPLAY(d_idleev)
+#define D_blankerev DISPLAY(d_blankerev)
+#define D_blankerpid DISPLAY(d_blankerpid)
#define GRAIN 4096 /* Allocation grain size for output buffer */
diff --git a/doc/screen.1 b/doc/screen.1
index aad6aef..348d357 100644
--- a/doc/screen.1
+++ b/doc/screen.1
@@ -1,5 +1,5 @@
.\" vi:set wm=5
-.TH SCREEN 1 "Jan 2002"
+.TH SCREEN 1 "Aug 2003"
.if n .ds Q \&"
.if n .ds U \&"
.if t .ds Q ``
@@ -130,7 +130,7 @@ deals with the contents of your .screenrc.
.PP
If your terminal is a \*Qtrue\*U 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
+screen) consider using a version of your terminal's termcap that has
automatic margins turned \fIoff\fP. This will ensure an accurate and
optimal update of the screen in all circumstances. Most terminals
nowadays have \*Qmagic\*U margins (automatic margins plus usable last
@@ -253,9 +253,7 @@ Ask your system administrator if you are not sure. Remove sessions with the
.B \-L
tells
.I screen
-your auto-margin terminal has a writable last-position on
-the screen. This can also be set in your .screenrc by specifying `LP' in a
-\*Qtermcap\*U command.
+to turn on automatic output logging for the windows.
.TP 5
.B \-m
causes
@@ -284,6 +282,13 @@ emulation (only affects auto-margin terminals without `LP').
This can also be set in your .screenrc by specifying `OP' in a \*Qtermcap\*U
command.
.TP 5
+.BI "\-p " number_or_name
+Preselect a window. This is usefull when you want to reattach to a
+specific windor or you want to send a command via the \*Q-X\*U
+option to a specific window. As with screen's select commant, \*Q-\*U
+selects the blank window. As a special case for reattach, \*Q=\*U
+brings up the windowlist on the blank window.
+.TP 5
.B \-q
Suppress printing of error messages. In combination with \*Q-ls\*U the exit
value is as follows: 9 indicates a directory without sessions. 10
@@ -748,6 +753,12 @@ on all windows overriding the \*Qpartial\*U settings. It does not change the
default redraw behavior of newly created windows.
.sp
.ne 3
+.BR "altscreen on" | off
+.PP
+If set to on, "alternate screen" support is enabled in virtual terminals,
+just like in xterm. Initial setting is `off'.
+.sp
+.ne 3
.BR "at " "[\fIidentifier\fP][" "#\fP|\fP*\fP|\fP%\fP] "
.IR "command " [ args " ... ]"
.PP
@@ -777,7 +788,7 @@ once per window. Commands that change the internal arrangement of windows
(like \*Qother\*U) may be called again. In shared windows the command will
be repeated for each attached display. Beware, when issuing toggle commands
like \*Qlogin\*U!
-Some commands (e.g. \*Qstuff\*U, \*Qprocess\*U or \*Qpaste\*U) require that
+Some commands (e.g. \*Qprocess\*U) require that
a display is associated with the target windows. These commands may not work
correctly under \*Qat\*U looping over windows.
.sp
@@ -804,7 +815,7 @@ attrcolor u "-u b"
.PP
Use blue text instead of underline.
.IP
-attrcolor b "I"
+attrcolor b ".I"
.PP
Use bright colors for bold text. Most terminal emulators do this
already.
@@ -834,6 +845,35 @@ that has not been written to the terminal. See also
\*Qobuflimit\*U.
.sp
.ne 3
+.BI "backtick " id
+.I lifespan
+.I autorefresh
+.I cmd
+.I args...
+.br
+.BI "backtick " id
+.PP
+Program the backtick command with the numerical id \fIid\fP.
+The output of such a command is used for substitution of the
+\*Q%`\*U string escape. The specified \fIlifespan\fP is the number
+of seconds the output is considered valid. After this time, the
+command is run again if a corresponding string escape is encountered.
+The \fIautorefresh\fP parameter triggers an
+automatic refresh for caption and hardstatus strings after the
+specified number of seconds. Only the last line of output is used
+for substitution.
+.br
+If both the \fIlifespan\fP and the \fIautorefresh\fP parameters
+are zero, the backtick program is expected to stay in the
+background and generate output once in a while.
+In this case, the command is executed right away and screen stores
+the last line of output. If a new line gets printed screen will
+automatically refresh the hardstatus or the captions.
+.br
+The second form of the command deletes the backtick command
+with the numerical id \fIid\fP.
+.sp
+.ne 3
.BR "bce " [ on | off ]
.PP
Change background-color-erase setting. If \*Qbce\*U is set to on, all
@@ -1023,6 +1063,24 @@ a shell process (See also chapter \*QWINDOW TYPES\*U). The maximum duration of
a break signal is limited to 15 seconds.
.sp
.ne 3
+.B blanker
+.PP
+Activate the screen blanker. First the screen is cleared. If no blanker
+program is defined, the cursor is turned off, otherwise, the
+program is started and it's output is written to the screen.
+The screen blanker is killed with the first keypress, the read key
+is discarded.
+.br
+This command is normally used together with the \*Qidle\*U command.
+.sp
+.ne 3
+.B blankerprg
+.RI [ "program args" ]
+.PP
+Defines a blanker program. Disables the blanker program if no
+arguments are given.
+.sp
+.ne 3
.B breaktype
.RI [ tcsendbreak | TIOCSBRK
.RI | TCSBRK ]
@@ -1154,7 +1212,7 @@ class. See also \*Qbind\*U and \*Qbindkey\*U.
.ne 3
.BR "compacthist " [ on | off ]
.PP
-This tells screen weather to suppress trailing blank lines when
+This tells screen whether to suppress trailing blank lines when
scrolling up text into the history buffer.
.sp
.ne 3
@@ -1200,6 +1258,9 @@ of the top, center or bottom line of the window.
\fBw\fP, \fBb\fP, \fBe\fP move the cursor word by word.
.br
.ti -2n
+\fBB\fP, \fBE\fP move the cursor WORD by WORD (as in vi).
+.br
+.ti -2n
\fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of
lines while preserving the cursor position. (Default: half screen-full).
.br
@@ -1474,6 +1535,13 @@ Same as the \fBmonitor\fP command except that the default setting for new
windows is changed. Initial setting is `off'.
.sp
.ne 3
+.B defnonblock
+.BR on | off | \fInumsecs
+.PP
+Same as the \fBnonblock\fP command except that the default setting for
+displays is changed. Initial setting is `off'.
+.sp
+.ne 3
.BI "defobuflimit " limit
.PP
Same as the \fBobuflimit\fP command except that the default setting for new displays is changed. Initial setting is 256 bytes.
@@ -1607,6 +1675,27 @@ See also \*Qsleep\*U.
Echo is also useful for online checking of environment variables.
.sp
.ne 3
+.BI "encoding " enc
+.RI [ enc ]
+.PP
+Tell
+.I 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 \*QKJ\*U termcap entry.
+
+Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, GBK, 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
.BI "escape " xy
.PP
Set the command character to \fIx\fP and the character generating a literal
@@ -1624,7 +1713,7 @@ The default is \*Q^Aa\*U.
.RI [ command2
.IR ... ]
.PP
-Parses and executes each argument as seperate command.
+Parses and executes each argument as separate command.
.sp
.ne 3
.B exec
@@ -1820,7 +1909,7 @@ message mechanism and
\*Qignore\*U tells
.I screen
never to display the hardstatus.
-If you prepend the word \*Qalways\*U to the type,
+If you prepend the word \*Qalways\*U to the type (e.g., \*Qalwayslastline\*U),
.I screen
will use the type even if the terminal supports a hardstatus.
.P
@@ -1889,9 +1978,21 @@ scrollback buffer).
Change the window's hardstatus line to the string \fIstatus\fP.
.sp
.ne 3
+.B idle
+.RI [ timeout
+.RI [ "cmd args" ]]
+.PP
+Sets a command that is run after the specified number of seconds
+inactivity is reached. This command will normally be the \*Qblanker\*U
+command to create a screen blanker, but it can be any screen command.
+If no command is specified, only the timeout is set. A timeout of
+zero (ot the special timeout \fBoff\fP) disables the timer.
+If no arguments are given, the current settings are displayed.
+.sp
+.ne 3
.BR "ignorecase " [ on | off ]
.PP
-Tell screen to ignore the case of caracters in searches. Default is
+Tell screen to ignore the case of characters in searches. Default is
`off'.
.sp
.ne 3
@@ -1916,7 +2017,6 @@ The current line wrap setting (`+wrap' indicates enabled, `\-wrap' not) is
also shown. The flags `ins', `org', `app', `log', `mon' or `nored' are
displayed when the window is in insert mode, origin mode,
application-keypad mode, has output logging,
-insert mode, origin mode, application-keypad mode, output logging,
activity monitoring or partial redraw enabled.
The currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP,
@@ -1937,27 +2037,6 @@ For system information use the \*Qtime\*U command.
No longer exists, use \*Qpaste\*U instead.
.sp
.ne 3
-.BI "encoding " enc
-.RI [ enc ]
-.PP
-Tell
-.I 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 \*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
.B kill
.PP
Kill current window.
@@ -2120,6 +2199,12 @@ As shown in this example, multiple keys can be assigned to one function in a
single statement.
.sp
.ne 3
+.BI "maxwin " num
+.PP
+Set the maximum window number screen will create. Doesn't affect
+already existing windows. The number may only be decreased.
+.sp
+.ne 3
.B meta
.PP
Insert the command character (C-a) in the current window's input stream.
@@ -2185,12 +2270,18 @@ This command can be used repeatedly to cycle through the list of windows.
.sp
.ne 3
.B nonblock
-.RB [ on | off ]
+.RB [ on | off | \fInumsecs ]
.PP
-Enable or disable flow control for the current user interface (display).
-It is used to prevent a slow display from slowing down the processing of
-data output by a window. This command may be helpful when multiple displays
-show the same window. Nonblock is initially off for all displays.
+Tell screen how to deal with user interfaces (displays) that cease to
+accept output. This can happen if a user presses ^S or a TCP/modem
+connection gets cut but no hangup is received. If nonblock is
+\fBoff\fP (this is the default) screen waits until the display
+restarts to accept the output. If nonblock is \fBon\fP, screen
+waits until the timeout is reached (\fBon\fP is treated as 1s). If the
+display still doesn't receive characters, screen will consider
+it \*Qblocked\*U and stop sending characters to it. If at
+some time it restarts to accept characters, screen will unblock
+the display and redisplay the updated window contents.
.sp
.ne 3
.BR "number " [ \fIn ]
@@ -2487,14 +2578,17 @@ current setting.
.BR "select " [ \fIWindowID ]
.PP
Switch to the window identified by \fIWindowID\fP.
-This can be a prefix of a window title (alphanumeric window name) or a window
-number.
+This can be a prefix of a window title (alphanumeric window name) or a
+window number.
The parameter is optional and if omitted, you get prompted for an identifier.
When a new window is established, the first available number
is assigned to this window.
Thus, the first window can be activated by \*Qselect 0\*U.
The number of windows is limited at compile-time by the MAXWIN
configuration parameter.
+There are two special WindowIDs, \*Q-\*U selects the
+internal blank window and \*Q.\*U selects the current window. The
+latter is useful if used with screen's \*Q-X\*U option.
.sp
.ne
.BR "sessionname " [ \fIname ]
@@ -2583,7 +2677,7 @@ text.
.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
+absolute path and screen is already processing 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.
@@ -2606,7 +2700,8 @@ The default is currently \*Q=s dd\*U (standout, default colors).
.PP
Split the current region into two new ones. All regions on the
display are resized to make room for the new region. The blank
-window is displayed on the new region.
+window is displayed on the new region. Use the \*Qremove\*U or the
+\*Qonly\*U command to delete regions.
.sp
.ne 3
.B "startup_message on\fP|\fBoff"
@@ -2783,9 +2878,9 @@ described in the \*QSTRING ESCAPES\*U chapter. Screen uses a default of
"%c:%s %M %d %H%? %l%?".
.sp
.ne 3
-.BR "title " [ \fIwindowalias ]
+.BR "title " [ \fIwindowtitle ]
.PP
-Set the name of the current window to \fIwindowalias\fP. If no name is
+Set the name of the current window to \fIwindowtitle\fP. If no name is
specified,
.I screen
prompts for one. This command was known as `aka' in previous
@@ -2878,9 +2973,14 @@ vice versa.
.sp
.ne 3
.B windowlist
-.RB [ -b "] |"
+.RB [ -b ]
+.RB [ -m ]
+.br
+.B windowlist
.B string
-.RI [ string "] |"
+.RI [ string ]
+.br
+.B windowlist
.B title
.RI [ title ]
.PP
@@ -2891,6 +2991,10 @@ 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
+.B -m
+option changes the order of the windows, instead of sorting by
+window numbers screen uses its internal most-recently-used list.
The table format can be changed with the \fBstring\fP and
\fBtitle\fP option, the title is displayed as table heading, while
@@ -2963,6 +3067,30 @@ Insert a CTRL-s / CTRL-q character to the stdin queue of the
current window.
.sp
.ne 3
+.B zmodem
+.RB [ off\fR|\fPauto\fR|\fPcatch\fR|\fPpass ]
+.br
+.B "zmodem sendcmd"
+.RI [ string ]
+.br
+.B "zmodem recvcmd"
+.RI [ string ]
+.PP
+Define zmodem support for screen. Screen understands two different
+modes when it detects a zmodem request: \*Qpass\*U and \*Qcatch\*U.
+If the mode is set to \*Qpass\*U, screen will relay all data
+to the attacher until the end of the transmission is reached.
+In \*Qcatch\*U mode screen acts as a zmodem endpoint and starts
+the corresponding rz/sz commands. If the mode is set to \*Qauto\*U,
+screen will use \*Qcatch\*U if the window is a tty (e.g. a serial line),
+otherwise it will use \*Qpass\*U.
+.br
+You can define the templates screen uses in \*Qcatch\*U mode
+via the second and the third form.
+.br
+Note also that this is an experimental feature.
+.sp
+.ne 3
.BR "zombie " [\fIkeys\fP]
.br
.BR "defzombie " [\fIkeys\fP]
@@ -3175,8 +3303,8 @@ last two digits of the year number
.IP Y
full year number
.IP ?
-the part to the next '%?' is displayed only if an escape expands to an
-nonempty string
+the part to the next '%?' is displayed only if a '%' escape
+inside the part expands to a non-empty string
.IP :
else part of '%?'
.IP =
@@ -3200,6 +3328,9 @@ operator.) The 'L' qualifier tells screen to mark the truncated
parts with '...'.
.IP {
attribute/color modifier string terminated by the next \*Q}\*U
+.IP `
+Substitute with the output of a 'backtick' command. The length
+qualifier is misused to identify one of the commands.
.P
The 'c' and 'C' escape may be qualified with a '0' to make
.I screen
@@ -3226,9 +3357,11 @@ 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 d
+dim
+.PD 0
.IP u
underline
-.PD 0
.IP b
bold
.IP r
@@ -3632,6 +3765,9 @@ 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.
.PP
+The "alternate screen" capability is not enabled by default.
+Set the \fBaltscreen\fP .screenrc command to enable it.
+.PP
The following is a list of control sequences recognized by
.IR screen .
\*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI- or
@@ -3959,9 +4095,18 @@ X10 mouse tracking
\h'\w'ESC [ Ps = 'u'\fB?25\fP (V)
Visible Cursor
.TP 27
+\h'\w'ESC [ Ps = 'u'\fB?47\fP
+Alternate Screen (old xterm code)
+.TP 27
\h'\w'ESC [ Ps = 'u'\fB?1000\fP (V)
VT200 mouse tracking
.TP 27
+\h'\w'ESC [ Ps = 'u'\fB?1047\fP
+Alternate Screen (new xterm code)
+.TP 27
+\h'\w'ESC [ Ps = 'u'\fB?1049\fP
+Alternate Screen (new xterm code)
+.TP 27
.BR "ESC [ 5 i" " (A)"
Start relay to printer (ANSI Media Copy)
.TP 27
@@ -4265,8 +4410,8 @@ Window number of a window (at creation time).
.SH FILES
.PD 0
-.IP .../screen-3.?.??/etc/screenrc 34
-.IP .../screen-3.?.??/etc/etcscreenrc
+.IP .../screen-4.?.??/etc/screenrc 34
+.IP .../screen-4.?.??/etc/etcscreenrc
Examples in the
.I screen
distribution package for private and global initialization files.
@@ -4313,7 +4458,7 @@ produced by Wayne Davison, Juergen Weigert and Michael Schroeder.
.SH COPYLEFT
.nf
-Copyright (C) 1993-2002
+Copyright (C) 1993-2003
Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
Copyright (C) 1987 Oliver Laumann
@@ -4357,8 +4502,8 @@ Frank van der Linden (vdlinden@fwi.uva.nl),
Martin Schweikert (schweik@cpp.ob.open.de),
David Vrona (dave@sashimi.lcu.com),
E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
-Matthew Green (mrg@mame.mu.oz.au),
-Christopher Williams (cgw@unt.edu),
+Matthew Green (mrg@eterna.com.au),
+Christopher Williams (cgw@pobox.com),
Matt Mosley (mattm@access.digex.net),
Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
Johannes Zellner (johannes@zellner.org),
@@ -4367,7 +4512,7 @@ Pablo Averbuj (pablo@averbuj.com).
.SH VERSION
-This is version 3.9.9. Its roots are a merge of a custom version
+This is version 4.0.2. 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.
diff --git a/doc/screen.info b/doc/screen.info
index 25800d8..3a18ff3 100644
--- a/doc/screen.info
+++ b/doc/screen.info
@@ -1,4 +1,4 @@
-This is screen.info, produced by makeinfo version 4.0 from
+This is screen.info, produced by makeinfo version 4.5 from
./screen.texinfo.
INFO-DIR-SECTION General Commands
@@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-2002 Free Software Foundation, Inc.
+ Copyright (c) 1993-2003 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
@@ -27,168 +27,172 @@ translation approved by the Foundation.

Indirect:
screen.info-1: 995
-screen.info-2: 50933
-screen.info-3: 100453
-screen.info-4: 149266
-screen.info-5: 195279
+screen.info-2: 46865
+screen.info-3: 92444
+screen.info-4: 140698
+screen.info-5: 190096

Tag Table:
(Indirect)
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
+Node: Overview3003
+Node: Getting Started6633
+Node: Invoking Screen8387
+Node: Customization17073
+Node: Startup Files17619
+Node: Source19265
+Node: Colon19950
+Node: Commands20564
+Node: Default Key Bindings21521
+Node: Command Summary27200
+Node: New Window41325
+Node: Chdir42126
+Node: Screen Command43097
+Node: Setenv44798
+Node: Shell45318
+Node: Term46084
+Node: Window Types46865
+Node: Selecting51188
+Node: Next and Previous51818
+Node: Other Window52348
+Node: Select52756
+Node: Windowlist53571
+Node: Session Management54666
+Node: Detach55495
+Node: Power Detach56882
+Node: Lock57523
+Node: Multiuser Session58409
+Node: Multiuser59371
+Node: Acladd59758
+Node: Aclchg60323
+Node: Acldel61730
+Node: Aclgrp62065
+Node: Displays62716
+Node: Umask63010
+Node: Wall63959
+Node: Writelock64196
+Node: Su65092
+Node: Session Name65892
+Node: Suspend66439
+Node: Quit66771
+Node: Regions67195
+Node: Split67762
+Node: Focus68052
+Node: Only68630
+Node: Remove68794
+Node: Resize69002
+Node: Caption69650
+Node: Fit70407
+Node: Window Settings70709
+Node: Naming Windows71444
+Node: Title Command72945
+Node: Dynamic Titles73219
+Node: Title Prompts74755
+Node: Title Screenrc75836
+Node: Console77475
+Node: Kill77918
+Node: Login78807
+Node: Mode79624
+Node: Monitor80022
+Node: Windows81433
+Node: Hardstatus82493
+Node: Virtual Terminal83686
+Node: Control Sequences84744
+Node: Input Translation92444
+Node: Digraph96915
+Node: Bell97707
+Node: Clear99586
+Node: Info99789
+Node: Redisplay101818
+Node: Wrap103121
+Node: Reset103872
+Node: Window Size104190
+Node: Character Processing105043
+Node: Copy and Paste109368
+Node: Copy109973
+Node: Line Termination110820
+Node: Scrollback111229
+Node: Copy Mode Keys111966
+Node: Movement112780
+Node: Marking113985
+Node: Repeat count114360
+Node: Searching114674
+Node: Specials115066
+Node: Paste117020
+Node: Registers120075
+Node: Screen Exchange120868
+Node: History122273
+Node: Subprocess Execution123013
+Node: Exec123377
+Node: Using Exec125123
+Node: Key Binding126962
+Node: Bind127605
+Node: Bind Examples128849
+Node: Command Character129905
+Node: Help131540
+Node: Bindkey132148
+Node: Bindkey Examples133698
+Node: Bindkey Control134587
+Node: Flow Control135184
+Node: Flow Control Summary135760
+Node: Flow138694
+Node: XON/XOFF139468
+Node: Termcap139841
+Node: Window Termcap140698
+Node: Dump Termcap146059
+Node: Termcap Syntax146773
+Node: Termcap Examples148939
+Node: Special Capabilities150980
+Node: Autonuke153755
+Node: Obuflimit154405
+Node: Character Translation155234
+Node: Message Line157848
+Node: Privacy Message158759
+Node: Hardware Status Line159256
+Node: Last Message160959
+Node: Message Wait161386
+Node: Logging161812
+Node: Hardcopy162136
+Node: Log163071
+Node: Startup164848
+Node: echo165255
+Node: sleep165663
+Node: Startup Message166004
+Node: Miscellaneous166277
+Node: At167716
+Node: Break169686
+Node: Debug171332
+Node: License171809
+Node: Nethack172074
+Node: Nonblock172751
+Node: Number173730
+Node: Silence174100
+Node: Time175036
+Node: Verbose175628
+Node: Version175962
+Node: Zombie176171
+Node: Printcmd177225
+Node: Sorendition177931
+Node: Attrcolor178361
+Node: Setsid179411
+Node: Eval179928
+Node: Maxwin180137
+Node: Backtick180407
+Node: Screen Saver181654
+Node: Zmodem182779
+Node: String Escapes183664
+Node: Environment189000
+Node: Files190096
+Node: Credits191184
+Node: Bugs193195
+Node: Known Bugs193665
+Node: Reporting Bugs195759
+Node: Availability196525
+Node: Installation197069
+Node: Socket Directory197459
+Node: Compiling Screen197989
+Node: Concept Index199376
+Node: Command Index201468
+Node: Keystroke Index210715

End Tag Table
diff --git a/doc/screen.info-1 b/doc/screen.info-1
index 63a2c6a..ece1aba 100644
--- a/doc/screen.info-1
+++ b/doc/screen.info-1
@@ -1,4 +1,4 @@
-This is screen.info, produced by makeinfo version 4.0 from
+This is screen.info, produced by makeinfo version 4.5 from
./screen.texinfo.
INFO-DIR-SECTION General Commands
@@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-2002 Free Software Foundation, Inc.
+ Copyright (c) 1993-2003 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
@@ -31,7 +31,7 @@ Screen
******
This file documents the `Screen' virtual terminal manager, version
-3.9.11.
+4.0.2.
* Menu:
@@ -156,7 +156,7 @@ Another section (*note Customization::) deals with the contents of your
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
+screen) consider using a version of your terminal's termcap that has
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
@@ -235,7 +235,7 @@ Invoking `Screen'
literal command character (when typed after the command character)
to Y. The defaults are `C-a' and `a', which can be specified as
`-e^Aa'. When creating a `screen' session, this option sets the
- default command caracter. In a multiuser session all users added
+ default command character. In a multiuser session all users added
will start off with this command character. But when attaching to
an already running session, this option only changes the command
character of the attaching user. This option is equivalent to the
@@ -281,10 +281,7 @@ Invoking `Screen'
`-wipe' option.
`-L'
- 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::).
+ Tell `screen' to turn on automatic output logging for the windows.
`-m'
Tell `screen' to ignore the `$STY' environment variable. When
@@ -301,6 +298,13 @@ Invoking `Screen'
This also starts `screen' in _detached_ mode, but doesn't fork
a new process. The command exits if the session terminates.
+`-p NAME_OR_NUMBER'
+ Preselect a window. This is usefull when you want to reattach to a
+ specific windor or you want to send a command via the `-X' option
+ to a specific window. As with screen's select commant, `-' selects
+ the blank window. As a special case for reattach, `=' brings up
+ the windowlist on the blank window.
+
`-q'
Suppress printing of error messages. In combination with `-ls' the
exit value is set as follows: 9 indicates a directory without
@@ -373,6 +377,7 @@ Invoking `Screen'
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
@@ -430,9 +435,10 @@ Source
(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.
+ absolute path and screen is already processing 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
@@ -785,6 +791,10 @@ Command Summary
`allpartial STATE'
Set all windows to partial refresh. *Note Redisplay::.
+`altscreen STATE'
+ Enables support for the "alternate screen" terminal capability.
+ *Note Redisplay::.
+
`at [IDENT][#|*|%] COMMAND [ARGS]'
Execute a command at other displays or windows. *Note At::.
@@ -798,6 +808,9 @@ Command Summary
Enable a clear screen to discard unwritten output. *Note
Autonuke::.
+`backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]'
+ Define a command for the backtick string escape. *Note Backtick::.
+
`bce [STATE]'
Change background color erase. *Note Character Processing::.
@@ -810,6 +823,12 @@ Command Summary
`bindkey [OPTS] [STRING [CMD ARGS]]'
Bind a string to a series of keystrokes. *Note Bindkey::.
+`blanker'
+ Blank the screen. *Note Screen Saver::.
+
+`blankerprg'
+ Define a blanker program. *Note Screen Saver::.
+
`break [DURATION]'
Send a break signal to the current window. *Note Break::.
@@ -908,6 +927,9 @@ Command Summary
`defmonitor STATE'
Select default activity monitoring behavior. *Note Monitor::.
+`defnonblock STATE|NUMSECS'
+ Select default nonblock mode. *Note Nonblock::.
+
`defobuflimit LIMIT'
Select default output buffer limit. *Note Obuflimit::.
@@ -1002,6 +1024,9 @@ Command Summary
`hstatus STATUS'
Change the window's hardstatus line. *Note Hardstatus::.
+`idle [TIMEOUT [CMD ARGS]]'
+ Define a screen saver command. *Note Screen Saver::.
+
`ignorecase [STATE]'
Ignore character case in searches. *Note Searching::.
@@ -1050,6 +1075,9 @@ Command Summary
`markkeys STRING'
Rebind keys in copy mode. *Note Copy Mode Keys::.
+`maxwin N'
+ Set the maximum window number. *Note Maxwin::.
+
`meta'
Insert the command character. *Note Command Character::.
@@ -1071,8 +1099,9 @@ Command Summary
`next'
Switch to the next window. *Note Selecting::.
-`nonblock STATE'
- Disable flow control to the current display. *Note Nonblock::.
+`nonblock [STATE|NUMSECS]'
+ Disable flow control to the current display. *Note
+ Nonblock::.|NUMSECS]
`number [N]'
Change/display the current window's number. *Note Number::.
@@ -1271,6 +1300,9 @@ Command Summary
`xon'
Send an XON character. *Note XON/XOFF::.
+`zmodem [off|auto|catch|pass]'
+ Define how screen treats zmodem requests. *Note Zmodem::.
+
`zombie [KEYS]'
Keep dead windows. *Note Zombie::.
@@ -1413,123 +1445,3 @@ Term
command `screen -T vt100 rlogin othermachine' rather than setting
and resetting the default.
-
-File: screen.info, Node: Window Types, Prev: Term, Up: New Window
-
-Window Types
-============
-
- Screen provides three different window types. New windows are created
-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
-efficiently as a console with 100 or more windows.
- * The normal window contains a shell (default, if no parameter is
- given) or any other system command that could be executed from a
- shell. (e.g. `slogin', etc...).
-
- * If a tty (character special device) name (e.g. `/dev/ttya') is
- specified as the first parameter, then the window is directly
- connected to this device. This window type is similar to `screen
- cu -l /dev/ttya'. Read and write access is required on the device
- node, an exclusive open is attempted on the node to mark the
- connection line as busy. An optional parameter is allowed
- consisting of a comma separated list of flags in the notation used
- by `stty(1)':
- `<baud_rate>'
- Usually 300, 1200, 9600 or 19200. This affects transmission
- as well as receive speed.
-
- `cs8 or cs7'
- Specify the transmission of eight (or seven) bits per byte.
-
- `ixon or -ixon'
- Enables (or disables) software flow-control (CTRL-S/CTRL-Q)
- for sending data.
-
- `ixoff or -ixoff'
- Enables (or disables) software flow-control for receiving
- data.
-
- `istrip or -istrip'
- Clear (or keep) the eight bit in each received byte.
-
- You may want to specify as many of these options as applicable.
- Unspecified options cause the terminal driver to make up the
- parameter values of the connection. These values are system
- dependant and may be in defaults or values saved from a previous
- connection.
-
- For tty windows, the `info' command shows some of the modem
- control lines in the status line. These may include `RTS', `CTS',
- `DTR', `CD' and more. This depends rather on on the available
- `ioctl()''s and system header files than on the physical
- capabilities of the serial board. The name of a logical low
- (inactive) signal is preceded by an exclamation mark (`!'),
- otherwise the signal is logical high (active). Unsupported but
- shown signals are usually shown low. When the `CLOCAL' status bit
- is true, the whole set of modem signals is placed inside curly
- braces (`{' and `}'). When the `CRTSCTS' or `TIOCSOFTCAR' bit is
- true, the signals `CTS' or `CD' are shown in parenthesis,
- respectively.
-
- For tty windows, the command `break' causes the Data transmission
- line (TxD) to go low for a specified period of time. This is
- expected to be interpreted as break signal on the other side. No
- data is sent and no modem control line is changed when a `break'
- is issued.
-
- * If the first parameter is `//telnet', the second parameter is
- expected to be a host name, and an optional third parameter may
- specify a TCP port number (default decimal 23). Screen will
- connect to a server listening on the remote host and use the
- telnet protocol to communicate with that server.
-
- For telnet windows, the command `info' shows details about the
- connection in square brackets (`[' and `]') at the end of the
- status line.
- `b'
- BINARY. The connection is in binary mode.
-
- `e'
- ECHO. Local echo is disabled.
-
- `c'
- SGA. The connection is in `character mode' (default: `line
- mode').
-
- `t'
- TTYPE. The terminal type has been requested by the remote
- host. Screen sends the name `screen' unless instructed
- otherwise (see also the command `term').
-
- `w'
- NAWS. The remote site is notified about window size changes.
-
- `f'
- LFLOW. The remote host will send flow control information.
- (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
-
-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::).
-
-* 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').
-* Windowlist:: Present a list of all windows for selection.
-
diff --git a/doc/screen.info-2 b/doc/screen.info-2
index 21dfb8d..bc2cfdc 100644
--- a/doc/screen.info-2
+++ b/doc/screen.info-2
@@ -1,4 +1,4 @@
-This is screen.info, produced by makeinfo version 4.0 from
+This is screen.info, produced by makeinfo version 4.5 from
./screen.texinfo.
INFO-DIR-SECTION General Commands
@@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-2002 Free Software Foundation, Inc.
+ Copyright (c) 1993-2003 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
@@ -25,6 +25,127 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Window Types, Prev: Term, Up: New Window
+
+Window Types
+============
+
+ Screen provides three different window types. New windows are created
+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
+efficiently as a console with 100 or more windows.
+ * The normal window contains a shell (default, if no parameter is
+ given) or any other system command that could be executed from a
+ shell. (e.g. `slogin', etc...).
+
+ * If a tty (character special device) name (e.g. `/dev/ttya') is
+ specified as the first parameter, then the window is directly
+ connected to this device. This window type is similar to `screen
+ cu -l /dev/ttya'. Read and write access is required on the device
+ node, an exclusive open is attempted on the node to mark the
+ connection line as busy. An optional parameter is allowed
+ consisting of a comma separated list of flags in the notation used
+ by `stty(1)':
+ `<baud_rate>'
+ Usually 300, 1200, 9600 or 19200. This affects transmission
+ as well as receive speed.
+
+ `cs8 or cs7'
+ Specify the transmission of eight (or seven) bits per byte.
+
+ `ixon or -ixon'
+ Enables (or disables) software flow-control (CTRL-S/CTRL-Q)
+ for sending data.
+
+ `ixoff or -ixoff'
+ Enables (or disables) software flow-control for receiving
+ data.
+
+ `istrip or -istrip'
+ Clear (or keep) the eight bit in each received byte.
+
+ You may want to specify as many of these options as applicable.
+ Unspecified options cause the terminal driver to make up the
+ parameter values of the connection. These values are system
+ dependant and may be in defaults or values saved from a previous
+ connection.
+
+ For tty windows, the `info' command shows some of the modem
+ control lines in the status line. These may include `RTS', `CTS',
+ `DTR', `CD' and more. This depends rather on on the available
+ `ioctl()''s and system header files than on the physical
+ capabilities of the serial board. The name of a logical low
+ (inactive) signal is preceded by an exclamation mark (`!'),
+ otherwise the signal is logical high (active). Unsupported but
+ shown signals are usually shown low. When the `CLOCAL' status bit
+ is true, the whole set of modem signals is placed inside curly
+ braces (`{' and `}'). When the `CRTSCTS' or `TIOCSOFTCAR' bit is
+ true, the signals `CTS' or `CD' are shown in parenthesis,
+ respectively.
+
+ For tty windows, the command `break' causes the Data transmission
+ line (TxD) to go low for a specified period of time. This is
+ expected to be interpreted as break signal on the other side. No
+ data is sent and no modem control line is changed when a `break'
+ is issued.
+
+ * If the first parameter is `//telnet', the second parameter is
+ expected to be a host name, and an optional third parameter may
+ specify a TCP port number (default decimal 23). Screen will
+ connect to a server listening on the remote host and use the
+ telnet protocol to communicate with that server.
+
+ For telnet windows, the command `info' shows details about the
+ connection in square brackets (`[' and `]') at the end of the
+ status line.
+ `b'
+ BINARY. The connection is in binary mode.
+
+ `e'
+ ECHO. Local echo is disabled.
+
+ `c'
+ SGA. The connection is in `character mode' (default: `line
+ mode').
+
+ `t'
+ TTYPE. The terminal type has been requested by the remote
+ host. Screen sends the name `screen' unless instructed
+ otherwise (see also the command `term').
+
+ `w'
+ NAWS. The remote site is notified about window size changes.
+
+ `f'
+ LFLOW. The remote host will send flow control information.
+ (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
+
+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::).
+
+* 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').
+* Windowlist:: Present a list of all windows for selection.
+
+
File: screen.info, Node: Next and Previous, Next: Other Window, Up: Selecting
Moving Back and Forth
@@ -68,8 +189,11 @@ Select
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.
+ (unless screen is compiled with a higher MAXWIN setting). There
+ are two special arguments, `select -' switches to the internal
+ blank window and `select .' switches to the current window. The
+ latter is useful if used with screen's `-X' option.
+

File: screen.info, Node: Windowlist, Prev: Select, Up: Selecting
@@ -77,13 +201,18 @@ File: screen.info, Node: Windowlist, Prev: Select, Up: Selecting
Windowlist
==========
- - Command: windowlist [-b] | string [STRING] | title [TITLE]
+ - Command: windowlist [-b] [-m]
+ - Command: windowlist string [STRING]
+ - Command: windowlist 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 `-m' option changes the order of the windows, instead of
+ sorting by window numbers screen uses its internal
+ most-recently-used list.
The table format can be changed with the string and title option,
the title is displayed as table heading, while the lines are made
@@ -154,7 +283,7 @@ Power Detach
============
- Command: pow_detach
- (`C-a D')
+ (`C-a D 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
@@ -257,7 +386,7 @@ Aclchg
a comma separated list of commands or windows (specified either by
number or title). The special list `#' refers to all windows, `?'
to all commands. If USERNAMES consists of a single `*', all known
- users is affected. A command can be executed when the user has
+ users are affected. A command can be executed when the user has
the `x' bit for it. The user can type input to a window when he
has its `w' bit set and no other user obtains a writelock for this
window. Other bits are currently ignored. To withdraw the
@@ -608,7 +737,7 @@ Title Command
- Command: title [windowtitle]
(`C-a A')
- Set the name of the current window to WINDOWALIAS. If no name is
+ Set the name of the current window to WINDOWTITLE. If no name is
specified, screen prompts for one.

@@ -1027,7 +1156,10 @@ functions, respectively.
?7 (V) `Wrap' Mode
?9 X10 mouse tracking
?25 (V) Visible Cursor
+ ?47 Alternate Screen (old xterm code)
?1000 (V) VT200 mouse tracking
+ ?1047 Alternate Screen (new xterm code)
+ ?1049 Alternate Screen (new xterm code)
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
@@ -1037,213 +1169,3 @@ functions, respectively.
ESC [ > c Send Secondary Device Attributes String
ESC [ 6 n Send Cursor Position Report
-
-File: screen.info, Node: Input Translation, Next: Digraph, Prev: Control Sequences, Up: Virtual Terminal
-
-Input Translation
-=================
-
- In order to do a full VT100 emulation `screen' has to detect that a
-sequence of characters in the input stream was generated by a keypress
-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::).
-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. See *Note Bindkey:: for further
-details on the syntax and examples.
-
- Here is the table of the default key bindings. (A) means that the
-command is executed if the keyboard is switched into application mode.
-
- Key name Termcap name Command
- -----------------------------------------------------
- Cursor up ku stuff \033[A
- stuff \033OA (A)
- Cursor down kd stuff \033[B
- stuff \033OB (A)
- Cursor right kr stuff \033[C
- stuff \033OC (A)
- Cursor left kl stuff \033[D
- stuff \033OD (A)
- Function key 0 k0 stuff \033[10~
- Function key 1 k1 stuff \033OP
- Function key 2 k2 stuff \033OQ
- Function key 3 k3 stuff \033OR
- Function key 4 k4 stuff \033OS
- Function key 5 k5 stuff \033[15~
- Function key 6 k6 stuff \033[17~
- Function key 7 k7 stuff \033[18~
- 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[23~
- Function key 12 F2 stuff \033[24~
- Home kh stuff \033[1~
- End kH stuff \033[4~
- Insert kI stuff \033[2~
- Delete kD stuff \033[3~
- Page up kP stuff \033[5~
- Page down kN stuff \033[6~
- Keypad 0 f0 stuff 0
- stuff \033Op (A)
- Keypad 1 f1 stuff 1
- stuff \033Oq (A)
- Keypad 2 f2 stuff 2
- stuff \033Or (A)
- Keypad 3 f3 stuff 3
- stuff \033Os (A)
- Keypad 4 f4 stuff 4
- stuff \033Ot (A)
- Keypad 5 f5 stuff 5
- stuff \033Ou (A)
- Keypad 6 f6 stuff 6
- stuff \033Ov (A)
- Keypad 7 f7 stuff 7
- stuff \033Ow (A)
- Keypad 8 f8 stuff 8
- stuff \033Ox (A)
- Keypad 9 f9 stuff 9
- stuff \033Oy (A)
- Keypad + f+ stuff +
- stuff \033Ok (A)
- Keypad - f- stuff -
- stuff \033Om (A)
- Keypad * f* stuff *
- stuff \033Oj (A)
- Keypad / f/ stuff /
- stuff \033Oo (A)
- Keypad = fq stuff =
- stuff \033OX (A)
- Keypad . f. stuff .
- stuff \033On (A)
- Keypad , f, stuff ,
- stuff \033Ol (A)
- Keypad enter fe stuff \015
- stuff \033OM (A)
-
-
-File: screen.info, Node: Digraph, Next: Bell, Prev: Input Translation, Up: Virtual Terminal
-
-Digraph
-=======
-
- - 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
- resulting character is inserted in the input stream. For example,
- if the user enters `a"', an a-umlaut will be inserted. If the
- first character entered is a 0 (zero), `screen' will treat the
- following characters (up to three) as an octal number instead.
- The optional argument PRESET is treated as user input, thus one
- can create an "umlaut" key. For example the command `bindkey ^K
- digraph '"'' enables the user to generate an a-umlaut by typing
- `CTRL-K a'.
-
-
-File: screen.info, Node: Bell, Next: Clear, Prev: Digraph, Up: Virtual Terminal
-
-Bell
-====
-
- - 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
- message can be re-defined by this command. Each occurrence of `%'
- in MESSAGE is replaced by the number of the window to which a bell
- has been sent, and each occurrence of `^G' is replaced by the
- definition for bell in your termcap (usually an audible bell).
- The default message is
-
- 'Bell in window %n'
-
- An empty message can be supplied to the `bell_msg' command to
- suppress output of a message line (`bell_msg ""'). Without
- parameter, the current message is shown.
-
- - 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
- visual bell, the visual bell message is displayed in the status
- line when the bell character is received. Visual bell support of
- a terminal is defined by the termcap variable `vb'. *Note Visual
- Bell: (termcap)Bell, for more information on visual bells. The
- equivalent terminfo capability is `flash'.
-
- Per default, `vbell' is `off', thus the audible bell is used.
-
- - 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
- to `on' and the terminal does not support a visual bell. The
- default message is `Wuff, Wuff!!'. Without parameter, the current
- message is shown.
-
- - Command: vbellwait sec
- (none)
- Define a delay in seconds after each display of `screen' 's visual
- bell message. The default is 1 second.
-
-
-File: screen.info, Node: Clear, Next: Info, Prev: Bell, Up: Virtual Terminal
-
-Clear
-=====
-
- - Command: clear
- (`C-a C')
- Clears the screen and saves its contents to the scrollback buffer.
-
-
-File: screen.info, Node: Info, Next: Redisplay, Prev: Clear, Up: Virtual Terminal
-
-Info
-====
-
- - Command: info
- (`C-a i', `C-a C-i')
- Uses the message line to display some information about the current
- 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 (*note
- Flow Control::):
- +flow automatic flow control, currently on.
- -flow automatic flow control, currently off.
- +(+)flow flow control enabled. Agrees with automatic control.
- -(+)flow flow control disabled. Disagrees with automatic control.
- +(-)flow flow control enabled. Disagrees with automatic control.
- -(-)flow flow control disabled. Agrees with automatic control.
-
- The current line wrap setting (`+wrap' indicates enabled, `-wrap'
- not) is also shown. The flags `ins', `org', `app', `log', `mon'
- and `nored' are displayed when the window is in insert mode,
- origin mode, application-keypad mode, has output logging, insert
- mode, origin mode, application-keypad mode, output logging,
- activity monitoring or partial redraw enabled.
-
- 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'. 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::).
-
- If the state machine of the terminal emulator is in a non-default
- state, the info line is started with a string identifying the
- current state.
-
- For system information use `time'.
-
- - Command: dinfo
- (none)
- 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 298f9e3..6c78005 100644
--- a/doc/screen.info-3
+++ b/doc/screen.info-3
@@ -1,4 +1,4 @@
-This is screen.info, produced by makeinfo version 4.0 from
+This is screen.info, produced by makeinfo version 4.5 from
./screen.texinfo.
INFO-DIR-SECTION General Commands
@@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-2002 Free Software Foundation, Inc.
+ Copyright (c) 1993-2003 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
@@ -25,6 +25,215 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Input Translation, Next: Digraph, Prev: Control Sequences, Up: Virtual Terminal
+
+Input Translation
+=================
+
+ In order to do a full VT100 emulation `screen' has to detect that a
+sequence of characters in the input stream was generated by a keypress
+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::).
+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. See *Note Bindkey:: for further
+details on the syntax and examples.
+
+ Here is the table of the default key bindings. (A) means that the
+command is executed if the keyboard is switched into application mode.
+
+ Key name Termcap name Command
+ -----------------------------------------------------
+ Cursor up ku stuff \033[A
+ stuff \033OA (A)
+ Cursor down kd stuff \033[B
+ stuff \033OB (A)
+ Cursor right kr stuff \033[C
+ stuff \033OC (A)
+ Cursor left kl stuff \033[D
+ stuff \033OD (A)
+ Function key 0 k0 stuff \033[10~
+ Function key 1 k1 stuff \033OP
+ Function key 2 k2 stuff \033OQ
+ Function key 3 k3 stuff \033OR
+ Function key 4 k4 stuff \033OS
+ Function key 5 k5 stuff \033[15~
+ Function key 6 k6 stuff \033[17~
+ Function key 7 k7 stuff \033[18~
+ 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[23~
+ Function key 12 F2 stuff \033[24~
+ Home kh stuff \033[1~
+ End kH stuff \033[4~
+ Insert kI stuff \033[2~
+ Delete kD stuff \033[3~
+ Page up kP stuff \033[5~
+ Page down kN stuff \033[6~
+ Keypad 0 f0 stuff 0
+ stuff \033Op (A)
+ Keypad 1 f1 stuff 1
+ stuff \033Oq (A)
+ Keypad 2 f2 stuff 2
+ stuff \033Or (A)
+ Keypad 3 f3 stuff 3
+ stuff \033Os (A)
+ Keypad 4 f4 stuff 4
+ stuff \033Ot (A)
+ Keypad 5 f5 stuff 5
+ stuff \033Ou (A)
+ Keypad 6 f6 stuff 6
+ stuff \033Ov (A)
+ Keypad 7 f7 stuff 7
+ stuff \033Ow (A)
+ Keypad 8 f8 stuff 8
+ stuff \033Ox (A)
+ Keypad 9 f9 stuff 9
+ stuff \033Oy (A)
+ Keypad + f+ stuff +
+ stuff \033Ok (A)
+ Keypad - f- stuff -
+ stuff \033Om (A)
+ Keypad * f* stuff *
+ stuff \033Oj (A)
+ Keypad / f/ stuff /
+ stuff \033Oo (A)
+ Keypad = fq stuff =
+ stuff \033OX (A)
+ Keypad . f. stuff .
+ stuff \033On (A)
+ Keypad , f, stuff ,
+ stuff \033Ol (A)
+ Keypad enter fe stuff \015
+ stuff \033OM (A)
+
+
+File: screen.info, Node: Digraph, Next: Bell, Prev: Input Translation, Up: Virtual Terminal
+
+Digraph
+=======
+
+ - 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
+ resulting character is inserted in the input stream. For example,
+ if the user enters `a"', an a-umlaut will be inserted. If the
+ first character entered is a 0 (zero), `screen' will treat the
+ following characters (up to three) as an octal number instead.
+ The optional argument PRESET is treated as user input, thus one
+ can create an "umlaut" key. For example the command `bindkey ^K
+ digraph '"'' enables the user to generate an a-umlaut by typing
+ `CTRL-K a'.
+
+
+File: screen.info, Node: Bell, Next: Clear, Prev: Digraph, Up: Virtual Terminal
+
+Bell
+====
+
+ - 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
+ message can be re-defined by this command. Each occurrence of `%'
+ in MESSAGE is replaced by the number of the window to which a bell
+ has been sent, and each occurrence of `^G' is replaced by the
+ definition for bell in your termcap (usually an audible bell).
+ The default message is
+
+ 'Bell in window %n'
+
+ An empty message can be supplied to the `bell_msg' command to
+ suppress output of a message line (`bell_msg ""'). Without
+ parameter, the current message is shown.
+
+ - 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
+ visual bell, the visual bell message is displayed in the status
+ line when the bell character is received. Visual bell support of
+ a terminal is defined by the termcap variable `vb'. *Note Visual
+ Bell: (termcap)Bell, for more information on visual bells. The
+ equivalent terminfo capability is `flash'.
+
+ Per default, `vbell' is `off', thus the audible bell is used.
+
+ - 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
+ to `on' and the terminal does not support a visual bell. The
+ default message is `Wuff, Wuff!!'. Without parameter, the current
+ message is shown.
+
+ - Command: vbellwait sec
+ (none)
+ Define a delay in seconds after each display of `screen' 's visual
+ bell message. The default is 1 second.
+
+
+File: screen.info, Node: Clear, Next: Info, Prev: Bell, Up: Virtual Terminal
+
+Clear
+=====
+
+ - Command: clear
+ (`C-a C')
+ Clears the screen and saves its contents to the scrollback buffer.
+
+
+File: screen.info, Node: Info, Next: Redisplay, Prev: Clear, Up: Virtual Terminal
+
+Info
+====
+
+ - Command: info
+ (`C-a i', `C-a C-i')
+ Uses the message line to display some information about the current
+ 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 (*note
+ Flow Control::):
+ +flow automatic flow control, currently on.
+ -flow automatic flow control, currently off.
+ +(+)flow flow control enabled. Agrees with automatic control.
+ -(+)flow flow control disabled. Disagrees with automatic control.
+ +(-)flow flow control enabled. Disagrees with automatic control.
+ -(-)flow flow control disabled. Agrees with automatic control.
+
+ The current line wrap setting (`+wrap' indicates enabled, `-wrap'
+ not) is also shown. The flags `ins', `org', `app', `log', `mon'
+ and `nored' are displayed when the window is in insert mode,
+ origin mode, application-keypad mode, has output logging, activity
+ monitoring or partial redraw enabled.
+
+ 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'. 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::).
+
+ If the state machine of the terminal emulator is in a non-default
+ state, the info line is started with a string identifying the
+ current state.
+
+ For system information use `time'.
+
+ - Command: dinfo
+ (none)
+ Show what screen thinks about your terminal. Useful if you want to
+ know why features like color or the alternate charset don't work.
+
+
File: screen.info, Node: Redisplay, Next: Wrap, Prev: Info, Up: Virtual Terminal
Redisplay
@@ -40,6 +249,11 @@ Redisplay
`partial' settings. It does not change the default redraw behavior
of newly created windows.
+ - Command: altscreen state
+ (none)
+ If set to on, "alternate screen" support is enabled in virtual
+ terminals, just like in xterm. Initial setting is `off'.
+
- Command: partial state
(none)
Defines whether the display should be refreshed (as with
@@ -151,7 +365,7 @@ Character Processing
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',
+ `GBK', `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'.
@@ -286,7 +500,7 @@ Scrollback
- Command: compacthist [state]
(none)
- This tells screen weather to suppress trailing blank lines when
+ This tells screen whether to suppress trailing blank lines when
scrolling up text into the history buffer. Turn compacting `on' to
hold more useful lines in your scrollback buffer.
@@ -332,6 +546,8 @@ previous line.
`w', `b', `e' move the cursor word by word.
+`B', `E' move the cursor WORD by WORD (as in vi).
+
`C-u' and `C-d' scroll the display up/down by the specified amount of
lines while preserving the cursor position. (Default: half screenfull).
@@ -387,8 +603,8 @@ Searching
- Command: ignorecase [state]
(none)
- Tell screen to ignore the case of caracters in searches. Default is
- `off'.
+ Tell screen to ignore the case of characters in searches. Default
+ is `off'.

File: screen.info, Node: Specials, Prev: Searching, Up: Copy
@@ -469,9 +685,16 @@ Paste
attached), as the registers are a global resource. The paste
buffer exists once for every user.
+ - 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::.
+
- 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
+ default is not to do so. This command is especially useful for
multi character fonts like kanji.
- Command: slowpaste msec
@@ -527,14 +750,6 @@ Registers
Save the specified STRING to the register KEY. The encoding of
the string can be specified via the `-e' option.
- - 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::.
-
-

File: screen.info, Node: Screen Exchange, Next: History, Prev: Registers, Up: Copy and Paste
@@ -1038,208 +1253,3 @@ and the one simulated by `screen'.
* Obuflimit:: Allow pending output when reading more
* Character Translation:: Emulating fonts and charsets.
-
-File: screen.info, Node: Window Termcap, Next: Dump Termcap, Up: Termcap
-
-Choosing the termcap entry for a window
-=======================================
-
- Usually `screen' tries to emulate as much of the VT100/ANSI standard
-as possible. But if your terminal lacks certain capabilities the
-emulation may not be complete. In these cases `screen' has to tell the
-applications that some of the features are missing. This is no problem
-on machines using termcap, because `screen' can use the `$TERMCAP'
-variable to customize the standard screen termcap.
-
- But if you do a rlogin on another machine or your machine supports
-only terminfo this method fails. Because of this `screen' offers a way
-to deal with these cases. Here is how it works:
-
- When `screen' tries to figure out a terminal name for itself, it
-first looks for an entry named `screen.TERM', where TERM is the
-contents of your `$TERM' variable. If no such entry exists, `screen'
-tries `screen' (or `screen-w', if the terminal is wide (132 cols or
-more)). If even this entry cannot be found, `vt100' is used as a
-substitute.
-
- The idea is that if you have a terminal which doesn't support an
-important feature (e.g. delete char or clear to EOS) you can build a new
-termcap/terminfo entry for `screen' (named `screen.DUMBTERM') in which
-this capability has been disabled. If this entry is installed on your
-machines you are able to do a rlogin and still keep the correct
-termcap/terminfo entry. The terminal name is put in the `$TERM'
-variable of all new windows. `screen' also sets the `$TERMCAP'
-variable reflecting the capabilities of the virtual terminal emulated.
-Furthermore, the variable `$WINDOW' is set to the window number of each
-window.
-
- The actual set of capabilities supported by the virtual terminal
-depends on the capabilities supported by the physical terminal. If, for
-instance, the physical terminal does not support underscore mode,
-`screen' does not put the `us' and `ue' capabilities into the window's
-`$TERMCAP' variable, accordingly. However, a minimum number of
-capabilities must be supported by a terminal in order to run `screen';
-namely scrolling, clear screen, and direct cursor addressing (in
-addition, `screen' does not run on hardcopy terminals or on terminals
-that over-strike).
-
- Also, you can customize the `$TERMCAP' value used by `screen' by
-using the `termcap' command, or by defining the variable `$SCREENCAP'
-prior to startup. When the latter defined, its value will be copied
-verbatim into each window's `$TERMCAP' variable. This can either be
-the full terminal definition, or a filename where the terminal `screen'
-(and/or `screen-w') is defined.
-
- 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
-terminfo entries for `screen' windows.
-
- When the boolean `G0' capability is present in the termcap entry for
-the terminal on which `screen' has been called, the terminal emulation
-of `screen' supports multiple character sets. This allows an
-application to make use of, for instance, the VT100 graphics character
-set or national character sets. The following control functions from
-ISO 2022 are supported: `lock shift G0' (`SI'), `lock shift G1' (`SO'),
-`lock shift G2', `lock shift G3', `single shift G2', and `single shift
-G3'. When a virtual terminal is created or reset, the ASCII character
-set is designated as `G0' through `G3'. When the `G0' capability is
-present, screen evaluates the capabilities `S0', `E0', and `C0' if
-present. `S0' is the sequence the terminal uses to enable and start the
-graphics character set rather than `SI'. `E0' is the corresponding
-replacement for `SO'. `C0' gives a character by character translation
-string that is used during semi-graphics mode. This string is built
-like the `acsc' terminfo capability.
-
- When the `po' and `pf' capabilities are present in the terminal's
-termcap entry, applications running in a `screen' window can send
-output to the printer port of the terminal. This allows a user to have
-an application in one window sending output to a printer connected to
-the terminal, while all other windows are still active (the printer
-port is enabled and disabled again for each chunk of output). As a
-side-effect, programs running in different windows can send output to
-the printer simultaneously. Data sent to the printer is not displayed
-in the window. The `info' command displays a line starting with `PRIN'
-while the printer is active.
-
- Some capabilities are only put into the `$TERMCAP' variable of the
-virtual terminal if they can be efficiently implemented by the physical
-terminal. For instance, `dl' (delete line) is only put into the
-`$TERMCAP' variable if the terminal supports either delete line itself
-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::).
-
-
-File: screen.info, Node: Dump Termcap, Next: Termcap Syntax, Prev: Window Termcap, Up: Termcap
-
-Write out the window's termcap entry
-====================================
-
- - Command: dumptermcap
- (`C-a .')
- 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
- 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
- `tic'.
-
-
-File: screen.info, Node: Termcap Syntax, Next: Termcap Examples, Prev: Dump Termcap, Up: Termcap
-
-The `termcap' command
-=====================
-
- - 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
- termcap entry. Plus, you can optionally customize the termcap
- generated for the windows. You have to place these commands in
- one of the screenrc startup files, as they are meaningless once
- the terminal emulator is booted.
-
- If your system uses the terminfo database rather than termcap,
- `screen' will understand the `terminfo' command, which has the
- same effects as the `termcap' command. Two separate commands are
- provided, as there are subtle syntactic differences, e.g. when
- parameter interpolation (using `%') is required. Note that the
- termcap names of the capabilities should also be used with the
- `terminfo' command.
-
- In many cases, where the arguments are valid in both terminfo and
- termcap syntax, you can use the command `termcapinfo', which is
- just a shorthand for a pair of `termcap' and `terminfo' commands
- with identical arguments.
-
- The first argument specifies which terminal(s) should be affected by
-this definition. You can specify multiple terminal names by separating
-them with `|'s. Use `*' to match all terminals and `vt*' to match all
-terminals that begin with `vt'.
-
- Each TWEAK argument contains one or more termcap defines (separated
-by `:'s) to be inserted at the start of the appropriate termcap entry,
-enhancing it or overriding existing values. The first tweak modifies
-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::).
-
-
-File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap
-
-Termcap Examples
-================
-
- Some examples:
-
- termcap xterm* xn:hs@
-
-Informs `screen' that all terminals that begin with `xterm' have firm
-auto-margins that allow the last position on the screen to be updated
-(xn), but they don't really have a status line (no 'hs' - append `@' to
-turn entries off). Note that we assume `xn' for all terminal names
-that start with `vt', but only if you don't specify a termcap command
-for that terminal.
-
- termcap vt* xn
- termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l
-
-Specifies the firm-margined `xn' capability for all terminals that
-begin with `vt', and the second line will also add the escape-sequences
-to switch into (Z0) and back out of (Z1) 132-character-per-line mode if
-this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap
-to use the width-changing commands.)
-
- termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
-
-This leaves your vt100 termcap alone and adds the function key labels to
-each window's termcap entry.
-
- termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P
-
-Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables
-the insert mode (im) and end-insert (ei) capabilities (the `@' in the
-`im' string is after the `=', so it is part of the string). Having the
-`im' and `ei' definitions put into your terminal's termcap will cause
-screen to automatically advertise the character-insert capability in
-each window's termcap. Each window will also get the delete-character
-capability (dc) added to its termcap, which screen will translate into
-a line-update for the terminal (we're pretending it doesn't support
-character deletion).
-
- If you would like to fully specify each window's termcap entry, you
-should instead set the `$SCREENCAP' variable prior to running `screen'.
-*Note Virtual Terminal::, for the details of the `screen' terminal
-emulation. *Note Termcap: (termcap)Top, for more information on
-termcap definitions.
-
diff --git a/doc/screen.info-4 b/doc/screen.info-4
index 300a2ba..7a778f2 100644
--- a/doc/screen.info-4
+++ b/doc/screen.info-4
@@ -1,4 +1,4 @@
-This is screen.info, produced by makeinfo version 4.0 from
+This is screen.info, produced by makeinfo version 4.5 from
./screen.texinfo.
INFO-DIR-SECTION General Commands
@@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-2002 Free Software Foundation, Inc.
+ Copyright (c) 1993-2003 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
@@ -25,6 +25,214 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Window Termcap, Next: Dump Termcap, Up: Termcap
+
+Choosing the termcap entry for a window
+=======================================
+
+ Usually `screen' tries to emulate as much of the VT100/ANSI standard
+as possible. But if your terminal lacks certain capabilities the
+emulation may not be complete. In these cases `screen' has to tell the
+applications that some of the features are missing. This is no problem
+on machines using termcap, because `screen' can use the `$TERMCAP'
+variable to customize the standard screen termcap.
+
+ But if you do a rlogin on another machine or your machine supports
+only terminfo this method fails. Because of this `screen' offers a way
+to deal with these cases. Here is how it works:
+
+ When `screen' tries to figure out a terminal name for itself, it
+first looks for an entry named `screen.TERM', where TERM is the
+contents of your `$TERM' variable. If no such entry exists, `screen'
+tries `screen' (or `screen-w', if the terminal is wide (132 cols or
+more)). If even this entry cannot be found, `vt100' is used as a
+substitute.
+
+ The idea is that if you have a terminal which doesn't support an
+important feature (e.g. delete char or clear to EOS) you can build a new
+termcap/terminfo entry for `screen' (named `screen.DUMBTERM') in which
+this capability has been disabled. If this entry is installed on your
+machines you are able to do a rlogin and still keep the correct
+termcap/terminfo entry. The terminal name is put in the `$TERM'
+variable of all new windows. `screen' also sets the `$TERMCAP'
+variable reflecting the capabilities of the virtual terminal emulated.
+Furthermore, the variable `$WINDOW' is set to the window number of each
+window.
+
+ The actual set of capabilities supported by the virtual terminal
+depends on the capabilities supported by the physical terminal. If, for
+instance, the physical terminal does not support underscore mode,
+`screen' does not put the `us' and `ue' capabilities into the window's
+`$TERMCAP' variable, accordingly. However, a minimum number of
+capabilities must be supported by a terminal in order to run `screen';
+namely scrolling, clear screen, and direct cursor addressing (in
+addition, `screen' does not run on hardcopy terminals or on terminals
+that over-strike).
+
+ Also, you can customize the `$TERMCAP' value used by `screen' by
+using the `termcap' command, or by defining the variable `$SCREENCAP'
+prior to startup. When the latter defined, its value will be copied
+verbatim into each window's `$TERMCAP' variable. This can either be
+the full terminal definition, or a filename where the terminal `screen'
+(and/or `screen-w') is defined.
+
+ 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
+terminfo entries for `screen' windows.
+
+ When the boolean `G0' capability is present in the termcap entry for
+the terminal on which `screen' has been called, the terminal emulation
+of `screen' supports multiple character sets. This allows an
+application to make use of, for instance, the VT100 graphics character
+set or national character sets. The following control functions from
+ISO 2022 are supported: `lock shift G0' (`SI'), `lock shift G1' (`SO'),
+`lock shift G2', `lock shift G3', `single shift G2', and `single shift
+G3'. When a virtual terminal is created or reset, the ASCII character
+set is designated as `G0' through `G3'. When the `G0' capability is
+present, screen evaluates the capabilities `S0', `E0', and `C0' if
+present. `S0' is the sequence the terminal uses to enable and start the
+graphics character set rather than `SI'. `E0' is the corresponding
+replacement for `SO'. `C0' gives a character by character translation
+string that is used during semi-graphics mode. This string is built
+like the `acsc' terminfo capability.
+
+ When the `po' and `pf' capabilities are present in the terminal's
+termcap entry, applications running in a `screen' window can send
+output to the printer port of the terminal. This allows a user to have
+an application in one window sending output to a printer connected to
+the terminal, while all other windows are still active (the printer
+port is enabled and disabled again for each chunk of output). As a
+side-effect, programs running in different windows can send output to
+the printer simultaneously. Data sent to the printer is not displayed
+in the window. The `info' command displays a line starting with `PRIN'
+while the printer is active.
+
+ Some capabilities are only put into the `$TERMCAP' variable of the
+virtual terminal if they can be efficiently implemented by the physical
+terminal. For instance, `dl' (delete line) is only put into the
+`$TERMCAP' variable if the terminal supports either delete line itself
+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::).
+
+ The "alternate screen" capability is not enabled by default. Set
+the `altscreen' `.screenrc' command to enable it.
+
+
+File: screen.info, Node: Dump Termcap, Next: Termcap Syntax, Prev: Window Termcap, Up: Termcap
+
+Write out the window's termcap entry
+====================================
+
+ - Command: dumptermcap
+ (`C-a .')
+ 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
+ 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
+ `tic'.
+
+
+File: screen.info, Node: Termcap Syntax, Next: Termcap Examples, Prev: Dump Termcap, Up: Termcap
+
+The `termcap' command
+=====================
+
+ - 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
+ termcap entry. Plus, you can optionally customize the termcap
+ generated for the windows. You have to place these commands in
+ one of the screenrc startup files, as they are meaningless once
+ the terminal emulator is booted.
+
+ If your system uses the terminfo database rather than termcap,
+ `screen' will understand the `terminfo' command, which has the
+ same effects as the `termcap' command. Two separate commands are
+ provided, as there are subtle syntactic differences, e.g. when
+ parameter interpolation (using `%') is required. Note that the
+ termcap names of the capabilities should also be used with the
+ `terminfo' command.
+
+ In many cases, where the arguments are valid in both terminfo and
+ termcap syntax, you can use the command `termcapinfo', which is
+ just a shorthand for a pair of `termcap' and `terminfo' commands
+ with identical arguments.
+
+ The first argument specifies which terminal(s) should be affected by
+this definition. You can specify multiple terminal names by separating
+them with `|'s. Use `*' to match all terminals and `vt*' to match all
+terminals that begin with `vt'.
+
+ Each TWEAK argument contains one or more termcap defines (separated
+by `:'s) to be inserted at the start of the appropriate termcap entry,
+enhancing it or overriding existing values. The first tweak modifies
+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::).
+
+
+File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap
+
+Termcap Examples
+================
+
+ Some examples:
+
+ termcap xterm* xn:hs@
+
+Informs `screen' that all terminals that begin with `xterm' have firm
+auto-margins that allow the last position on the screen to be updated
+(xn), but they don't really have a status line (no 'hs' - append `@' to
+turn entries off). Note that we assume `xn' for all terminal names
+that start with `vt', but only if you don't specify a termcap command
+for that terminal.
+
+ termcap vt* xn
+ termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l
+
+Specifies the firm-margined `xn' capability for all terminals that
+begin with `vt', and the second line will also add the escape-sequences
+to switch into (Z0) and back out of (Z1) 132-character-per-line mode if
+this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap
+to use the width-changing commands.)
+
+ termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
+
+This leaves your vt100 termcap alone and adds the function key labels to
+each window's termcap entry.
+
+ termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P
+
+Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables
+the insert mode (im) and end-insert (ei) capabilities (the `@' in the
+`im' string is after the `=', so it is part of the string). Having the
+`im' and `ei' definitions put into your terminal's termcap will cause
+screen to automatically advertise the character-insert capability in
+each window's termcap. Each window will also get the delete-character
+capability (dc) added to its termcap, which screen will translate into
+a line-update for the terminal (we're pretending it doesn't support
+character deletion).
+
+ If you would like to fully specify each window's termcap entry, you
+should instead set the `$SCREENCAP' variable prior to running `screen'.
+*Note Virtual Terminal::, for the details of the `screen' terminal
+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
@@ -290,8 +498,9 @@ Hardware Status Line
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.
+ prepend the word `always' to the type (e.g., `alwayslastline'),
+ `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
@@ -493,8 +702,12 @@ categories.
* Printcmd:: Set command for VT100 printer port emulation.
* Sorendition:: Change the text highlighting method.
* Attrcolor:: Map attributes to colors.
-* Setsid:: Change process group management
-* Eval:: Parse and execute arguments
+* Setsid:: Change process group management.
+* Eval:: Parse and execute arguments.
+* Maxwin:: Set the maximum window number.
+* Backtick:: Program a command for a backtick string escape.
+* Screen Saver:: Define a screen safer.
+* Zmodem:: Define how screen treats zmodem requests.

File: screen.info, Node: At, Next: Break, Up: Miscellaneous
@@ -528,10 +741,9 @@ At
internal arrangement of windows (like `other') may be called
again. In shared windows the command will be repeated for each
attached display. Beware, when issuing toggle commands like
- `login'! Some commands (e.g. `stuff', `\*Qprocess' or `paste')
- require that a display is associated with the target windows.
- These commands may not work correctly under `at' looping over
- windows.
+ `login'! Some commands (e.g. `\*Qprocess') require that a display
+ is associated with the target windows. These commands may not
+ work correctly under `at' looping over windows.

File: screen.info, Node: Break, Next: Debug, Prev: At, Up: Miscellaneous
@@ -621,12 +833,21 @@ File: screen.info, Node: Nonblock, Next: Number, Prev: Nethack, Up: Miscella
Nonblock
========
- - Command: nonblock STATE
- Enable or disable flow control for the current user interface
- (display). It is used to prevent a slow display from slowing down
- the processing of data output by a window. This command may be
- helpful when multiple displays show the same window. `Nonblock'
- is initially off for all displays.
+ - Command: nonblock [STATE|NUMSECS]
+ Tell screen how to deal with user interfaces (displays) that cease
+ to accept output. This can happen if a user presses ^S or a
+ TCP/modem connection gets cut but no hangup is received. If
+ nonblock is `off' (this is the default) screen waits until the
+ display restarts to accept the output. If nonblock is `on', screen
+ waits until the timeout is reached (`on' is treated as 1s). If the
+ display still doesn't receive characters, screen will consider it
+ "blocked" and stop sending characters to it. If at some time it
+ restarts to accept characters, screen will unblock the display and
+ redisplay the updated window contents.
+
+ - Command: defnonblock STATE|NUMSECS
+ Same as the `nonblock' command except that the default setting for
+ displays is changed. Initial setting is `off'.

File: screen.info, Node: Number, Next: Silence, Prev: Nonblock, Up: Miscellaneous
@@ -785,7 +1006,7 @@ Attrcolor
`attrcolor u "-u b"'
Use blue text instead of underline.
- `attrcolor b "I"'
+ `attrcolor b ".I"'
Use bright colors for bold text. Most terminal emulators do
this already.
@@ -808,14 +1029,107 @@ Setsid
in rare circumstances.

-File: screen.info, Node: Eval, Prev: Setsid, Up: Miscellaneous
+File: screen.info, Node: Eval, Next: Maxwin, Prev: Setsid, Up: Miscellaneous
Eval
====
- Command: eval COMMAND1 [COMMAND2 ...]
(none)
- Parses and executes each argument as seperate command.
+ Parses and executes each argument as separate command.
+
+
+File: screen.info, Node: Maxwin, Next: Backtick, Prev: Eval, Up: Miscellaneous
+
+Maxwin
+======
+
+ - Command: maxwin N
+ (none)
+ Set the maximum window number screen will create. Doesn't affect
+ already existing windows. The number may only be decreased.
+
+
+File: screen.info, Node: Backtick, Next: Screen Saver, Prev: Maxwin, Up: Miscellaneous
+
+Backtick
+========
+
+ - Command: backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]
+ - Command: backtick ID
+ (none)
+ Program the backtick command with the numerical id ID. The output
+ of such a command is used for substitution of the `%`' string
+ escape (*note String Escapes::). The specified LIFESPAN is the
+ number of seconds the output is considered valid. After this time,
+ the command is run again if a corresponding string escape is
+ encountered. The AUTOREFRESH parameter triggers an automatic
+ refresh for caption and hardstatus strings after the specified
+ number of seconds. Only the last line of output is used for
+ substitution.
+
+ If both the LIFESPAN and the AUTOREFRESH parameters are zero, the
+ backtick program is expected to stay in the background and
+ generate output once in a while. In this case, the command is
+ executed right away and screen stores the last line of output. If
+ a new line gets printed screen will automatically refresh the
+ hardstatus or the captions.
+
+ The second form of the command deletes the backtick command with
+ the numerical id ID.
+
+
+File: screen.info, Node: Screen Saver, Next: Zmodem, Prev: Backtick, Up: Miscellaneous
+
+Screen Saver
+============
+
+ - Command: idle [TIMEOUT [CMD ARGS]]
+ (none)
+ Sets a command that is run after the specified number of seconds
+ inactivity is reached. This command will normally be the `blanker'
+ command to create a screen blanker, but it can be any screen
+ command. If no command is specified, only the timeout is set. A
+ timeout of zero (ot the special timeout `off') disables the timer.
+ If no arguments are given, the current settings are displayed.
+
+ - Command: blanker
+ (none)
+ Activate the screen blanker. First the screen is cleared. If no
+ blanker program is defined, the cursor is turned off, otherwise,
+ the program is started and it's output is written to the screen.
+ The screen blanker is killed with the first keypress, the read key
+ is discarded.
+
+ This command is normally used together with the `idle' command.
+
+ - Command: blankerprg [PROGRAM ARGS]
+ Defines a blanker program. Disables the blanker program if no
+ arguments are given.
+
+
+File: screen.info, Node: Zmodem, Prev: Screen Saver, Up: Miscellaneous
+
+Zmodem
+======
+
+ - Command: zmodem [off|auto|catch|pass]
+ - Command: zmodem sendcmd [string]
+ - Command: zmodem recvcmd [string]
+ (none)
+ Define zmodem support for screen. Screen understands two different
+ modes when it detects a zmodem request: `pass' and `catch'. If the
+ mode is set to `pass', screen will relay all data to the attacher
+ until the end of the transmission is reached. In `catch' mode
+ screen acts as a zmodem endpoint and starts the corresponding
+ rz/sz commands. If the mode is set to `auto', screen will use
+ `catch' if the window is a tty (e.g. a serial line), otherwise it
+ will use `pass'.
+
+ You can define the templates screen uses in `catch' mode via the
+ second and the third form.
+
+ Note also that this is an experimental feature.

File: screen.info, Node: String Escapes, Next: Environment, Prev: Miscellaneous, Up: Top
@@ -899,8 +1213,8 @@ instead.
full year number
`?'
- the part to the next `%?' is displayed only if an escape expands
- to an nonempty string
+ the part to the next `%?' is displayed only if a `%' escape inside
+ the part expands to a non-empty string
`:'
else part of `%?'
@@ -928,12 +1242,17 @@ instead.
`...'.
`{'
- attribute/color modifier string terminated by the next `}' The `c'
-and `C' escape may be qualified with a `0' to make screen use zero
-instead of space as fill character. 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.
+ attribute/color modifier string terminated by the next `}'
+
+``'
+ Substitute with the output of a `backtick' command. The length
+ qualifier is misused to identify one of the commands. *Note
+ Backtick::.
+ The `c' and `C' escape may be qualified with a `0' to make screen use
+zero instead of space as fill character. 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.
An attribute/color modifier is is used to change the attributes or
the color settings. Its format is `[attribute modifier] [color
@@ -950,9 +1269,12 @@ change types are known:
invert the set in the current attributes
`='
- change the current attributes to the specified set The attribute
-set can either be specified as a hexadecimal number or a combination of
-the following letters:
+ change the current attributes to the specified set
+ The attribute set can either be specified as a hexadecimal number or
+a combination of the following letters:
+`d'
+ dim
+
`u'
underline
@@ -966,9 +1288,10 @@ the following letters:
standout
`B'
- blinking 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:
+ blinking
+ 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:
`k'
black
@@ -997,9 +1320,10 @@ order). The following colors are known:
default color
`.'
- leave color unchanged 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.
+ leave color unchanged
+ 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.
A one digit/letter color description is treated as foreground or
background color dependant on the current attributes: if reverse mode is
@@ -1085,315 +1409,3 @@ Environment Variables
`WINDOW'
Window number of a window (at creation time).
-
-File: screen.info, Node: Files, Next: Credits, Prev: Environment, Up: Top
-
-Files Referenced
-****************
-
-`.../screen-3.?.??/etc/screenrc'
-`.../screen-3.?.??/etc/etcscreenrc'
- Examples in the `screen' distribution package for private and
- global initialization files.
-
-``$SYSSCREENRC''
-`/local/etc/screenrc'
- `screen' initialization commands
-
-``$SCREENRC''
-``$HOME'/.iscreenrc'
-``$HOME'/.screenrc'
- Read in after /local/etc/screenrc
-
-``$SCREENDIR'/S-LOGIN'
-
-`/local/screens/S-LOGIN'
- Socket directories (default)
-
-`/usr/tmp/screens/S-LOGIN'
- Alternate socket directories.
-
-`SOCKET DIRECTORY/.termcap'
- Written by the `dumptermcap' command
-
-`/usr/tmp/screens/screen-exchange or'
-`/tmp/screen-exchange'
- `screen' interprocess communication buffer
-
-`hardcopy.[0-9]'
- Screen images created by the hardcopy command
-
-`screenlog.[0-9]'
- Output log files created by the log command
-
-`/usr/lib/terminfo/?/* or'
-`/etc/termcap'
- Terminal capability databases
-
-`/etc/utmp'
- Login records
-
-``$LOCKPRG''
- Program for locking the terminal.
-
-
-File: screen.info, Node: Credits, Next: Bugs, Prev: Files, Up: Top
-
-Credits
-*******
-
-Authors
-=======
-
- Originally created by Oliver Laumann, this latest version was
-produced by Wayne Davison, Juergen Weigert and Michael Schroeder.
-
-Contributors
-============
-
- Ken Beal (kbeal@amber.ssd.csd.harris.com),
- Rudolf Koenig (rfkoenig@informatik.uni-erlangen.de),
- Toerless Eckert (eckert@informatik.uni-erlangen.de),
- Wayne Davison (davison@borland.com),
- Patrick Wolfe (pat@kai.com, kailand!pat),
- Bart Schaefer (schaefer@cse.ogi.edu),
- Nathan Glasser (nathan@brokaw.lcs.mit.edu),
- Larry W. Virden (lvirden@cas.org),
- Howard Chu (hyc@hanauma.jpl.nasa.gov),
- Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
- Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
- Marc Boucher (marc@CAM.ORG),
- Doug Siebert (dsiebert@isca.uiowa.edu),
- Ken Stillson (stillson@tsfsrv.mitre.org),
- Ian Frechett (frechett@spot.Colorado.EDU),
- Brian Koehmstedt (bpk@gnu.ai.mit.edu),
- Don Smith (djs6015@ultb.isc.rit.edu),
- Frank van der Linden (vdlinden@fwi.uva.nl),
- Martin Schweikert (schweik@cpp.ob.open.de),
- David Vrona (dave@sashimi.lcu.com),
- 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),
- Jason Merrill (jason@jarthur.Claremont.EDU),
- Johannes Zellner (johannes@zellner.org),
- Pablo Averbuj (pablo@averbuj.com).
-
-Version
-=======
-
- This manual describes version 3.9.11 of the `screen' program. 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.
-
- See also *Note Availability::.
-
-
-File: screen.info, Node: Bugs, Next: Installation, Prev: Credits, Up: Top
-
-Bugs
-****
-
- Just like any other significant piece of software, `screen' has a
-few bugs and missing features. Please send in a bug report if you have
-found a bug not mentioned here.
-
-* Menu:
-
-* Known Bugs:: Problems we know about.
-* Reporting Bugs:: How to contact the maintainers.
-* Availability:: Where to find the lastest screen version.
-
-
-File: screen.info, Node: Known Bugs, Next: Reporting Bugs, Up: Bugs
-
-Known Bugs
-==========
-
- * `dm' (delete mode) and `xs' are not handled correctly (they are
- ignored). `xn' is treated as a magic-margin indicator.
-
- * `screen' has no clue about double-high or double-wide characters.
- But this is the only area where `vttest' is allowed to fail.
-
- * It is not possible to change the environment variable `$TERMCAP'
- when reattaching under a different terminal type.
-
- * The support of terminfo based systems is very limited. Adding extra
- capabilities to `$TERMCAP' may not have any effects.
-
- * `screen' does not make use of hardware tabs.
-
- * `screen' must be installed setuid root on most systems in order to
- be able to correctly change the owner of the tty device file for
- each window. Special permission may also be required to write the
- file `/etc/utmp'.
-
- * Entries in `/etc/utmp' are not removed when `screen' is killed
- with SIGKILL. This will cause some programs (like "w" or "rwho")
- to advertise that a user is logged on who really isn't.
-
- * `screen' may give a strange warning when your tty has no utmp
- entry.
-
- * When the modem line was hung up, `screen' may not automatically
- detach (or quit) unless the device driver sends a HANGUP signal.
- To detach such a `screen' session use the -D or -d command line
- option.
-
- * If a password is set, the command line options -d and -D still
- detach a session without asking.
-
- * Both `breaktype' and `defbreaktype' change the break generating
- method used by all terminal devices. The first should change a
- window specific setting, where the latter should change only the
- default for new windows.
-
- * When attaching to a multiuser session, the user's `.screenrc' file
- is not sourced. Each users personal settings have to be included
- in the `.screenrc' file from which the session is booted, or have
- to be changed manually.
-
- * A weird imagination is most useful to gain full advantage of all
- the features.
-
-
-File: screen.info, Node: Reporting Bugs, Next: Availability, Prev: Known Bugs, Up: Bugs
-
-Reporting Bugs
-==============
-
- If you find a bug in `Screen', please send electronic mail to
-`screen@uni-erlangen.de', and also to `bug-gnu-utils@prep.ai.mit.edu'.
-Include the version number of `Screen' which you are using. Also
-include in your message the hardware and operating system, the compiler
-used to compile, a description of the bug behavior, and the conditions
-that triggered the bug. Please recompile `screen' with the `-DDEBUG'
-options enabled, reproduce the bug, and have a look at the debug output
-written to the directory `/tmp/debug'. If necessary quote suspect
-passages from the debug output and show the contents of your `config.h'
-if it matters.
-
-
-File: screen.info, Node: Availability, Prev: Reporting Bugs, Up: Bugs
-
-Availability
-============
-
- `Screen' is available under the `GNU' copyleft.
-
- The latest official release of `screen' available via anonymous ftp
-from `prep.ai.mit.edu', `nic.funet.fi' or any other `GNU' distribution
-site. The home site of `screen' is `ftp.uni-erlangen.de
-(131.188.3.71)', 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.
-
-
-File: screen.info, Node: Installation, Next: Concept Index, Prev: Bugs, Up: Top
-
-Installation
-************
-
- Since `screen' uses pseudo-ttys, the select system call, and
-UNIX-domain sockets/named pipes, it will not run under a system that
-does not include these features of 4.2 and 4.3 BSD UNIX.
-
-* Menu:
-
-* Socket Directory:: Where screen stores its handle.
-* Compiling Screen::
-
-
-File: screen.info, Node: Socket Directory, Next: Compiling Screen, Up: Installation
-
-Socket Directory
-================
-
- The socket directory defaults either to `$HOME/.screen' or simply to
-`/tmp/screens' or preferably to `/usr/local/screens' chosen at
-compile-time. If `screen' is installed setuid root, then the
-administrator should compile screen with an adequate (not NFS mounted)
-`SOCKDIR'. If `screen' is not running setuid-root, the user can specify
-any mode 700 directory in the environment variable `$SCREENDIR'.
-
-
-File: screen.info, Node: Compiling Screen, Prev: Socket Directory, Up: Installation
-
-Compiling Screen
-================
-
- To compile and install screen:
-
- The `screen' package comes with a `GNU Autoconf' configuration
-script. Before you compile the package run
-
- `sh ./configure'
-
- This will create a `config.h' and `Makefile' for your machine. If
-`configure' fails for some reason, then look at the examples and
-comments found in the `Makefile.in' and `config.h.in' templates.
-Rename `config.status' to `config.status.MACHINE' when you want to keep
-configuration data for multiple architectures. Running `sh
-./config.status.MACHINE' recreates your configuration significantly
-faster than rerunning `configure'.
-Read through the "User Configuration" section of `config.h', and verify
-that it suits your needs. A comment near the top of this section
-explains why it's best to install screen setuid to root. Check for the
-place for the global `screenrc'-file and for the socket directory.
-Check the compiler used in `Makefile', the prefix path where to install
-`screen'. Then run
-
- `make'
-
- If `make' fails to produce one of the files `term.h', `comm.h' or
-`tty.c', then use `FILENAME.X.dist' instead. For additional
-information about installation of `screen' refer to the file
-`INSTALLATION', coming with this package.
-
-
-File: screen.info, Node: Concept Index, Next: Command Index, Prev: Installation, Up: Top
-
-Concept Index
-*************
-
-* Menu:
-
-* .screenrc: Startup Files.
-* availability: Availability.
-* binding: Key Binding.
-* bug report: Reporting Bugs.
-* bugs: Bugs.
-* capabilities: Special Capabilities.
-* command character: Command Character.
-* command line options: Invoking Screen.
-* command summary: Command Summary.
-* compiling screen: Compiling Screen.
-* control sequences: Control Sequences.
-* copy and paste: Copy and Paste.
-* customization: Customization.
-* environment: Environment.
-* escape character: Command Character.
-* files: Files.
-* flow control: Flow Control.
-* input translation: Input Translation.
-* installation: Installation.
-* introduction: Getting Started.
-* invoking: Invoking Screen.
-* key binding: Key Binding.
-* marking: Copy.
-* message line: Message Line.
-* multiuser session: Multiuser Session.
-* options: Invoking Screen.
-* overview: Overview.
-* regions: Regions.
-* screenrc: Startup Files.
-* scrollback: Copy.
-* socket directory: Socket Directory.
-* string escapes: String Escapes.
-* terminal capabilities: Special Capabilities.
-* title: Naming Windows.
-* window types: Window Types.
-
diff --git a/doc/screen.info-5 b/doc/screen.info-5
index d33ae08..fff18bd 100644
--- a/doc/screen.info-5
+++ b/doc/screen.info-5
@@ -1,4 +1,4 @@
-This is screen.info, produced by makeinfo version 4.0 from
+This is screen.info, produced by makeinfo version 4.5 from
./screen.texinfo.
INFO-DIR-SECTION General Commands
@@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY
This file documents the `Screen' virtual terminal manager.
- Copyright (c) 1993-2002 Free Software Foundation, Inc.
+ Copyright (c) 1993-2003 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
@@ -25,6 +25,316 @@ versions, except that this permission notice may be stated in a
translation approved by the Foundation.

+File: screen.info, Node: Files, Next: Credits, Prev: Environment, Up: Top
+
+Files Referenced
+****************
+
+`.../screen-4.?.??/etc/screenrc'
+`.../screen-4.?.??/etc/etcscreenrc'
+ Examples in the `screen' distribution package for private and
+ global initialization files.
+
+``$SYSSCREENRC''
+`/local/etc/screenrc'
+ `screen' initialization commands
+
+``$SCREENRC''
+``$HOME'/.iscreenrc'
+``$HOME'/.screenrc'
+ Read in after /local/etc/screenrc
+
+``$SCREENDIR'/S-LOGIN'
+
+`/local/screens/S-LOGIN'
+ Socket directories (default)
+
+`/usr/tmp/screens/S-LOGIN'
+ Alternate socket directories.
+
+`SOCKET DIRECTORY/.termcap'
+ Written by the `dumptermcap' command
+
+`/usr/tmp/screens/screen-exchange or'
+`/tmp/screen-exchange'
+ `screen' interprocess communication buffer
+
+`hardcopy.[0-9]'
+ Screen images created by the hardcopy command
+
+`screenlog.[0-9]'
+ Output log files created by the log command
+
+`/usr/lib/terminfo/?/* or'
+`/etc/termcap'
+ Terminal capability databases
+
+`/etc/utmp'
+ Login records
+
+``$LOCKPRG''
+ Program for locking the terminal.
+
+
+File: screen.info, Node: Credits, Next: Bugs, Prev: Files, Up: Top
+
+Credits
+*******
+
+Authors
+=======
+
+ Originally created by Oliver Laumann, this latest version was
+produced by Wayne Davison, Juergen Weigert and Michael Schroeder.
+
+Contributors
+============
+
+ Ken Beal (kbeal@amber.ssd.csd.harris.com),
+ Rudolf Koenig (rfkoenig@informatik.uni-erlangen.de),
+ Toerless Eckert (eckert@informatik.uni-erlangen.de),
+ Wayne Davison (davison@borland.com),
+ Patrick Wolfe (pat@kai.com, kailand!pat),
+ Bart Schaefer (schaefer@cse.ogi.edu),
+ Nathan Glasser (nathan@brokaw.lcs.mit.edu),
+ Larry W. Virden (lvirden@cas.org),
+ Howard Chu (hyc@hanauma.jpl.nasa.gov),
+ Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
+ Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
+ Marc Boucher (marc@CAM.ORG),
+ Doug Siebert (dsiebert@isca.uiowa.edu),
+ Ken Stillson (stillson@tsfsrv.mitre.org),
+ Ian Frechett (frechett@spot.Colorado.EDU),
+ Brian Koehmstedt (bpk@gnu.ai.mit.edu),
+ Don Smith (djs6015@ultb.isc.rit.edu),
+ Frank van der Linden (vdlinden@fwi.uva.nl),
+ Martin Schweikert (schweik@cpp.ob.open.de),
+ David Vrona (dave@sashimi.lcu.com),
+ E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
+ Matthew Green (mrg@eterna.com.au),
+ Christopher Williams (cgw@pobox.com),
+ Matt Mosley (mattm@access.digex.net),
+ Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
+ Jason Merrill (jason@jarthur.Claremont.EDU),
+ Johannes Zellner (johannes@zellner.org),
+ Pablo Averbuj (pablo@averbuj.com).
+
+Version
+=======
+
+ This manual describes version 4.0.2 of the `screen' program. 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.
+
+ See also *Note Availability::.
+
+
+File: screen.info, Node: Bugs, Next: Installation, Prev: Credits, Up: Top
+
+Bugs
+****
+
+ Just like any other significant piece of software, `screen' has a
+few bugs and missing features. Please send in a bug report if you have
+found a bug not mentioned here.
+
+* Menu:
+
+* Known Bugs:: Problems we know about.
+* Reporting Bugs:: How to contact the maintainers.
+* Availability:: Where to find the lastest screen version.
+
+
+File: screen.info, Node: Known Bugs, Next: Reporting Bugs, Up: Bugs
+
+Known Bugs
+==========
+
+ * `dm' (delete mode) and `xs' are not handled correctly (they are
+ ignored). `xn' is treated as a magic-margin indicator.
+
+ * `screen' has no clue about double-high or double-wide characters.
+ But this is the only area where `vttest' is allowed to fail.
+
+ * It is not possible to change the environment variable `$TERMCAP'
+ when reattaching under a different terminal type.
+
+ * The support of terminfo based systems is very limited. Adding extra
+ capabilities to `$TERMCAP' may not have any effects.
+
+ * `screen' does not make use of hardware tabs.
+
+ * `screen' must be installed setuid root on most systems in order to
+ be able to correctly change the owner of the tty device file for
+ each window. Special permission may also be required to write the
+ file `/etc/utmp'.
+
+ * Entries in `/etc/utmp' are not removed when `screen' is killed
+ with SIGKILL. This will cause some programs (like "w" or "rwho")
+ to advertise that a user is logged on who really isn't.
+
+ * `screen' may give a strange warning when your tty has no utmp
+ entry.
+
+ * When the modem line was hung up, `screen' may not automatically
+ detach (or quit) unless the device driver sends a HANGUP signal.
+ To detach such a `screen' session use the -D or -d command line
+ option.
+
+ * If a password is set, the command line options -d and -D still
+ detach a session without asking.
+
+ * Both `breaktype' and `defbreaktype' change the break generating
+ method used by all terminal devices. The first should change a
+ window specific setting, where the latter should change only the
+ default for new windows.
+
+ * When attaching to a multiuser session, the user's `.screenrc' file
+ is not sourced. Each users personal settings have to be included
+ in the `.screenrc' file from which the session is booted, or have
+ to be changed manually.
+
+ * A weird imagination is most useful to gain full advantage of all
+ the features.
+
+
+File: screen.info, Node: Reporting Bugs, Next: Availability, Prev: Known Bugs, Up: Bugs
+
+Reporting Bugs
+==============
+
+ If you find a bug in `Screen', please send electronic mail to
+`screen@uni-erlangen.de', and also to `bug-gnu-utils@prep.ai.mit.edu'.
+Include the version number of `Screen' which you are using. Also
+include in your message the hardware and operating system, the compiler
+used to compile, a description of the bug behavior, and the conditions
+that triggered the bug. Please recompile `screen' with the `-DDEBUG'
+options enabled, reproduce the bug, and have a look at the debug output
+written to the directory `/tmp/debug'. If necessary quote suspect
+passages from the debug output and show the contents of your `config.h'
+if it matters.
+
+
+File: screen.info, Node: Availability, Prev: Reporting Bugs, Up: Bugs
+
+Availability
+============
+
+ `Screen' is available under the `GNU' copyleft.
+
+ The latest official release of `screen' available via anonymous ftp
+from `prep.ai.mit.edu', `nic.funet.fi' or any other `GNU' distribution
+site. The home site of `screen' is `ftp.uni-erlangen.de
+(131.188.3.71)', 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.
+
+
+File: screen.info, Node: Installation, Next: Concept Index, Prev: Bugs, Up: Top
+
+Installation
+************
+
+ Since `screen' uses pseudo-ttys, the select system call, and
+UNIX-domain sockets/named pipes, it will not run under a system that
+does not include these features of 4.2 and 4.3 BSD UNIX.
+
+* Menu:
+
+* Socket Directory:: Where screen stores its handle.
+* Compiling Screen::
+
+
+File: screen.info, Node: Socket Directory, Next: Compiling Screen, Up: Installation
+
+Socket Directory
+================
+
+ The socket directory defaults either to `$HOME/.screen' or simply to
+`/tmp/screens' or preferably to `/usr/local/screens' chosen at
+compile-time. If `screen' is installed setuid root, then the
+administrator should compile screen with an adequate (not NFS mounted)
+`SOCKDIR'. If `screen' is not running setuid-root, the user can specify
+any mode 700 directory in the environment variable `$SCREENDIR'.
+
+
+File: screen.info, Node: Compiling Screen, Prev: Socket Directory, Up: Installation
+
+Compiling Screen
+================
+
+ To compile and install screen:
+
+ The `screen' package comes with a `GNU Autoconf' configuration
+script. Before you compile the package run
+
+ `sh ./configure'
+ This will create a `config.h' and `Makefile' for your
+machine. If `configure' fails for some reason, then look at the
+examples and comments found in the `Makefile.in' and `config.h.in'
+templates. Rename `config.status' to `config.status.MACHINE' when you
+want to keep configuration data for multiple architectures. Running `sh
+./config.status.MACHINE' recreates your configuration significantly
+faster than rerunning `configure'.
+Read through the "User Configuration" section of `config.h', and verify
+that it suits your needs. A comment near the top of this section
+explains why it's best to install screen setuid to root. Check for the
+place for the global `screenrc'-file and for the socket directory.
+Check the compiler used in `Makefile', the prefix path where to install
+`screen'. Then run
+
+ `make'
+ If `make' fails to produce one of the files `term.h', `comm.h'
+or `tty.c', then use `FILENAME.X.dist' instead. For additional
+information about installation of `screen' refer to the file
+`INSTALLATION', coming with this package.
+
+
+File: screen.info, Node: Concept Index, Next: Command Index, Prev: Installation, Up: Top
+
+Concept Index
+*************
+
+* Menu:
+
+* .screenrc: Startup Files.
+* availability: Availability.
+* binding: Key Binding.
+* bug report: Reporting Bugs.
+* bugs: Bugs.
+* capabilities: Special Capabilities.
+* command character: Command Character.
+* command line options: Invoking Screen.
+* command summary: Command Summary.
+* compiling screen: Compiling Screen.
+* control sequences: Control Sequences.
+* copy and paste: Copy and Paste.
+* customization: Customization.
+* environment: Environment.
+* escape character: Command Character.
+* files: Files.
+* flow control: Flow Control.
+* input translation: Input Translation.
+* installation: Installation.
+* introduction: Getting Started.
+* invoking: Invoking Screen.
+* key binding: Key Binding.
+* marking: Copy.
+* message line: Message Line.
+* multiuser session: Multiuser Session.
+* options: Invoking Screen.
+* overview: Overview.
+* regions: Regions.
+* screenrc: Startup Files.
+* scrollback: Copy.
+* socket directory: Socket Directory.
+* string escapes: String Escapes.
+* terminal capabilities: Special Capabilities.
+* title: Naming Windows.
+* window types: Window Types.
+
+
File: screen.info, Node: Command Index, Next: Keystroke Index, Prev: Concept Index, Up: Top
Command Index
@@ -42,14 +352,18 @@ Command Index
* activity: Monitor.
* addacl: Acladd.
* allpartial: Redisplay.
+* altscreen: Redisplay.
* at: At.
* attrcolor: Attrcolor.
* autodetach: Detach.
* autonuke: Autonuke.
+* backtick: Backtick.
* bce: Character Processing.
* bell_msg: Bell.
* bind: Bind.
* bindkey: Bindkey.
+* blanker: Screen Saver.
+* blankerprg: Screen Saver.
* break: Break.
* breaktype: Break.
* bufferfile: Screen Exchange.
@@ -81,6 +395,7 @@ Command Index
* deflogin: Login.
* defmode: Mode.
* defmonitor: Monitor.
+* defnonblock: Nonblock.
* defobuflimit: Obuflimit.
* defscrollback: Scrollback.
* defshell: Shell.
@@ -112,6 +427,7 @@ Command Index
* help: Help.
* history: History.
* hstatus: Hardstatus.
+* idle: Screen Saver.
* ignorecase: Searching.
* info: Info.
* ins_reg: Registers.
@@ -127,6 +443,7 @@ Command Index
* mapnotnext: Bindkey Control.
* maptimeout: Bindkey Control.
* markkeys: Copy Mode Keys.
+* maxwin: Maxwin.
* meta: Command Character.
* monitor: Monitor.
* msgminwait: Message Wait.
@@ -174,7 +491,7 @@ Command Index
* source: Source.
* split: Split.
* startup_message: Startup Message.
-* stuff: Registers.
+* stuff: Paste.
* su: Su.
* suspend: Suspend.
* term: Term.
@@ -200,6 +517,7 @@ Command Index
* writelock: Writelock.
* xoff: XON/XOFF.
* xon: XON/XOFF.
+* zmodem: Zmodem.
* zombie: Zombie.

diff --git a/doc/screen.texinfo b/doc/screen.texinfo
index eeb0cab..408305a 100644
--- a/doc/screen.texinfo
+++ b/doc/screen.texinfo
@@ -7,7 +7,7 @@
@finalout
@setchapternewpage odd
@c %**end of header
-@set version 3.9.11
+@set version 4.0.2
@direntry
* Screen: (screen). Full-screen window manager.
@@ -24,7 +24,7 @@
@ifinfo
This file documents the @code{Screen} virtual terminal manager.
-Copyright (c) 1993-2002 Free Software Foundation, Inc.
+Copyright (c) 1993-2003 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -52,11 +52,11 @@ by the Foundation.
@title Screen
@subtitle The virtual terminal manager
@subtitle for Version @value{version}
-@subtitle Jan 2002
+@subtitle Aug 2003
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1993-2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1993-2003 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -203,7 +203,7 @@ Another section (@pxref{Customization}) deals with the contents of your
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
+screen) consider using a version of your terminal's termcap that has
automatic margins turned @emph{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
@@ -279,7 +279,7 @@ Set the command character to @var{x}, and the character generating a
literal command character (when typed after the command character) to
@var{y}. The defaults are @kbd{C-a} and @kbd{a}, which can be specified
as @samp{-e^Aa}. When creating a @code{screen} session, this option
-sets the default command caracter. In a multiuser session all users
+sets the default command character. In a multiuser session all users
added will start off with this command character. But when attaching
to an already running session, this option only changes the command
character of the attaching user.
@@ -325,10 +325,8 @@ Ask your system administrator if you are not sure.
Remove sessions with the @samp{-wipe} option.
@item -L
-Tell @code{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 @file{.screenrc} by specifying
-@samp{xn} in a @code{termcap} command (@pxref{Termcap}).
+Tell @code{screen} to turn on automatic output logging for the
+windows.
@item -m
Tell @code{screen} to ignore the @code{$STY} environment variable. When
@@ -346,6 +344,13 @@ This also starts @code{screen} in @emph{detached} mode, but doesn't fork
a new process. The command exits if the session terminates.
@end table
+@item -p @var{name_or_number}
+Preselect a window. This is usefull when you want to reattach to a
+specific windor or you want to send a command via the @samp{-X}
+option to a specific window. As with screen's select commant, @samp{-}
+selects the blank window. As a special case for reattach, @samp{=}
+brings up the windowlist on the blank window.
+
@item -q
Suppress printing of error messages. In combination with @samp{-ls} the exit
value is set as follows: 9 indicates a directory without sessions. 10
@@ -473,7 +478,7 @@ contain a number of useful examples for various commands.
(none)@*
Read and execute commands from file @var{file}. Source commands
may be nested to a maximum recursion level of ten. If @var{file}
-is not an absolute path and screen already processes a
+is not an absolute path and screen is already processing 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.
@@ -821,6 +826,8 @@ Set the activity notification message. @xref{Monitor}.
Synonym to @code{acladd}. @xref{Multiuser Session}.
@item allpartial @var{state}
Set all windows to partial refresh. @xref{Redisplay}.
+@item altscreen @var{state}
+Enables support for the "alternate screen" terminal capability. @xref{Redisplay}.
@item at [@var{ident}][@kbd{#}@var{|}@kbd{*}@var{|}@kbd{%}] @var{command} [@var{args}]
Execute a command at other displays or windows. @xref{At}.
@item attrcolor @var{attrib} [@var{attribute/color-modifier}]
@@ -829,6 +836,8 @@ Map attributes to colors. @xref{Attrcolor}.
Automatically detach the session on SIGHUP. @xref{Detach}.
@item autonuke @var{state}
Enable a clear screen to discard unwritten output. @xref{Autonuke}.
+@item backtick @var{id} @var{lifespan} @var{autorefresh} @var{command} [@var{args}]
+Define a command for the backtick string escape. @xref{Backtick}.
@item bce [@var{state}]
Change background color erase. @xref{Character Processing}.
@item bell_msg [@var{message}]
@@ -837,6 +846,10 @@ Set the bell notification message. @xref{Bell}.
Bind a command to a key. @xref{Bind}.
@item bindkey [@var{opts}] [@var{string} [@var{cmd args}]]
Bind a string to a series of keystrokes. @xref{Bindkey}.
+@item blanker
+Blank the screen. @xref{Screen Saver}.
+@item blankerprg
+Define a blanker program. @xref{Screen Saver}.
@item break [@var{duration}]
Send a break signal to the current window. @xref{Break}.
@item breaktype [@var{tcsendbreak} | @var{TCSBRK} | @var{TIOCSBRK}]
@@ -899,6 +912,8 @@ Select default utmp logging behavior. @xref{Login}.
Select default file mode for ptys. @xref{Mode}.
@item defmonitor @var{state}
Select default activity monitoring behavior. @xref{Monitor}.
+@item defnonblock @var{state}|@var{numsecs}
+Select default nonblock mode. @xref{Nonblock}.
@item defobuflimit @var{limit}
Select default output buffer limit. @xref{Obuflimit}.
@item defscrollback @var{num}
@@ -961,6 +976,8 @@ Display current key bindings. @xref{Help}.
Find previous command beginning @dots{}. @xref{History}.
@item hstatus @var{status}
Change the window's hardstatus line. @xref{Hardstatus}.
+@item idle [@var{timeout} [@var{cmd} @var{args}]]
+Define a screen saver command. @xref{Screen Saver}.
@item ignorecase [@var{state}]
Ignore character case in searches. @xref{Searching}.
@item info
@@ -991,6 +1008,8 @@ Don't try to do keymapping on the next keystroke. @xref{Bindkey Control}.
Set the inter-character timeout used for keymapping. @xref{Bindkey Control}.
@item markkeys @var{string}
Rebind keys in copy mode. @xref{Copy Mode Keys}.
+@item maxwin @var{n}
+Set the maximum window number. @xref{Maxwin}.
@item meta
Insert the command character. @xref{Command Character}.
@item monitor [@var{state}]
@@ -1005,8 +1024,8 @@ Go into single or multi user mode. @xref{Multiuser Session}.
Use @code{nethack}-like error messages. @xref{Nethack}.
@item next
Switch to the next window. @xref{Selecting}.
-@item nonblock @var{state}
-Disable flow control to the current display. @xref{Nonblock}.
+@item nonblock [@var{state}|@var{numsecs}]
+Disable flow control to the current display. @xref{Nonblock}.|@var{numsecs}]
@item number [@var{n}]
Change/display the current window's number. @xref{Number}.
@item obuflimit [@var{limit}]
@@ -1135,6 +1154,8 @@ Grant exclusive write permission. @xref{Multiuser Session}.
Send an XOFF character. @xref{XON/XOFF}.
@item xon
Send an XON character. @xref{XON/XOFF}.
+@item zmodem [off|auto|catch|pass]
+Define how screen treats zmodem requests. @xref{Zmodem}.
@item zombie [@var{keys}]
Keep dead windows. @xref{Zombie}.
@end table
@@ -1427,13 +1448,19 @@ is assigned to this window.
Thus, the first window can be activated by @code{select 0}; there
can be no more than 10 windows present simultaneously (unless screen is
compiled with a higher MAXWIN setting).
-The special command @code{select -} switches to a blank window.
+There are two special arguments, @code{select -} switches to the
+internal blank window and @code{select .} switches to the
+current window. The latter is useful if used with screen's
+@code{-X} option.
+
@end deffn
@node Windowlist, , Select, Selecting
@section Windowlist
@kindex "
-@deffn Command windowlist [-b] | string [@var{string}] | title [@var{title}]
+@deffn Command windowlist [-b] [-m]
+@deffnx Command windowlist string [@var{string}]
+@deffnx Command windowlist title [@var{title}]
(@kbd{C-a "})@*
Display all windows in a table for visual window selection.
The desired window can be selected via the standard
@@ -1441,6 +1468,9 @@ movement keys (@pxref{Movement}) and activated via
the return key. If the @code{-b} option is given, screen will
switch to the blank window before presenting the list, so
that the current window is also selectable.
+The @code{-m} option changes the order of the windows, instead of
+sorting by window numbers screen uses its internal most-recently-used
+list.
The table format can be changed with the string and title
option, the title is displayed as table heading, while the
@@ -1510,7 +1540,7 @@ password checking.
@kindex D
@deffn Command pow_detach
-(@kbd{C-a D})@*
+(@kbd{C-a D D})@*
Mainly the same as @code{detach}, but also sends a HANGUP signal
to the parent process of @code{screen}.@*
@emph{Caution}: This will result in a
@@ -1603,7 +1633,7 @@ Prefixing @samp{+} grants the permission, @samp{-} removes it. The third
parameter is a comma separated list of commands or windows (specified either
by number or title). The special list @samp{#} refers to all windows, @samp{?}
to all commands. If @var{usernames} consists of a single @samp{*}, all
-known users is affected.
+known users are affected.
A command can be executed when the user has the @samp{x} bit for it. The user
can type input to a window when he has its @samp{w} bit set and no other
user obtains a writelock for this window. Other bits are currently ignored.
@@ -1911,7 +1941,7 @@ name when typed. You can also bind predefined names to keys with the
@kindex A
@deffn Command title [windowtitle]
(@kbd{C-a A})@*
-Set the name of the current window to @var{windowalias}. If no name is
+Set the name of the current window to @var{windowtitle}. If no name is
specified, screen prompts for one.
@end deffn
@@ -2334,7 +2364,10 @@ ESC [ Ps ;...; Ps l Reset Mode
?7 (V) @samp{Wrap} Mode
?9 X10 mouse tracking
?25 (V) Visible Cursor
+ ?47 Alternate Screen (old xterm code)
?1000 (V) VT200 mouse tracking
+ ?1047 Alternate Screen (new xterm code)
+ ?1049 Alternate Screen (new xterm code)
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 @samp{Ph} lines and
@@ -2539,7 +2572,6 @@ The current line wrap setting (@samp{+wrap} indicates enabled, @samp{-wrap}
not) is also shown. The flags @samp{ins}, @samp{org}, @samp{app}, @samp{log},
@samp{mon} and @samp{nored} are displayed when the window is in insert mode,
origin mode, application-keypad mode, has output logging,
-insert mode, origin mode, application-keypad mode, output logging,
activity monitoring or partial redraw enabled.
The currently active
@@ -2575,6 +2607,12 @@ on all windows overriding the @code{partial} settings. It does not change the
default redraw behavior of newly created windows.
@end deffn
+@deffn Command altscreen state
+(none)@*
+If set to on, "alternate screen" support is enabled in virtual terminals,
+just like in xterm. Initial setting is @samp{off}.
+@end deffn
+
@deffn Command partial state
(none)@*
Defines whether the display should be refreshed (as with
@@ -2688,7 +2726,7 @@ the terminal type by using the @samp{KJ} termcap entry. @xref{Special Capabiliti
Supported encodings are
@code{eucJP}, @code{SJIS}, @code{eucKR},
-@code{eucCN}, @code{Big5}, @code{KOI8-R}, @code{CP1251},
+@code{eucCN}, @code{Big5}, @code{GBK}, @code{KOI8-R}, @code{CP1251},
@code{UTF-8}, @code{ISO8859-2}, @code{ISO8859-3},
@code{ISO8859-4}, @code{ISO8859-5}, @code{ISO8859-6},
@code{ISO8859-7}, @code{ISO8859-8}, @code{ISO8859-9},
@@ -2834,7 +2872,7 @@ to view the current setting.
@deffn Command compacthist [state]
(none)@*
-This tells screen weather to suppress trailing blank lines when
+This tells screen whether to suppress trailing blank lines when
scrolling up text into the history buffer. Turn compacting @samp{on}
to hold more useful lines in your scrollback buffer.
@end deffn
@@ -2885,6 +2923,9 @@ or previous line.
@kbd{w}, @kbd{b}, @kbd{e} move the cursor word by word.
@noindent
+@kbd{B}, @kbd{E} move the cursor WORD by WORD (as in vi).
+
+@noindent
@kbd{C-u} and @kbd{C-d} scroll the display up/down by the specified
amount of lines while preserving the cursor position. (Default: half
screenfull).
@@ -2940,7 +2981,7 @@ digits @kbd{0@dots{}9}) which is taken as a repeat count. Example:
@deffn Command ignorecase [state]
(none)@*
-Tell screen to ignore the case of caracters in searches. Default is
+Tell screen to ignore the case of characters in searches. Default is
@code{off}.
@end deffn
@@ -3032,9 +3073,17 @@ display (terminal attached), as the registers are a global resource. The
paste buffer exists once for every user.
@end deffn
+@deffn Command stuff string
+(none)@*
+Stuff the string @var{string} in the input buffer of the current window.
+This is like the @code{paste} command, but with much less overhead.
+You cannot paste large buffers with the @code{stuff} command. It is most
+useful for key bindings. @xref{Bindkey}.
+@end deffn
+
@deffn 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
+default is not to do so. This command is especially useful for
multi character fonts like kanji.
@end deffn
@@ -3095,15 +3144,6 @@ Save the specified @var{string} to the register @var{key}.
The encoding of the string can be specified via the @code{-e} option.
@end deffn
-@deffn Command stuff string
-(none)@*
-Stuff the string @var{string} in the input buffer of the current window.
-This is like the @code{paste} command, but with much less overhead.
-You cannot paste large buffers with the @code{stuff} command. It is most
-useful for key bindings. @xref{Bindkey}.
-
-@end deffn
-
@node Screen Exchange, History, Registers, Copy and Paste
@section Screen Exchange
@@ -3718,6 +3758,9 @@ cannot be modified by parent processes. You can force @code{screen} to
include all capabilities in @code{$TERMCAP} with the @samp{-a}
command-line option (@pxref{Invoking Screen}).
+The "alternate screen" capability is not enabled by default.
+Set the @code{altscreen} @file{.screenrc} command to enable it.
+
@node Dump Termcap, Termcap Syntax, Window Termcap, Termcap
@section Write out the window's termcap entry
@kindex .
@@ -4098,7 +4141,7 @@ have a hardstatus line (i.e. the termcap/terminfo capabilities
display for the hardstatus. @code{message} uses
@code{screen}'s message mechanism and
@code{ignore} tells @code{screen} never to display the hardstatus.
-If you prepend the word @code{always} to the type, @code{screen} will use
+If you prepend the word @code{always} to the type (e.g., @code{alwayslastline}), @code{screen} will use
the type even if the terminal supports a hardstatus line.
The third form specifies the contents of the hardstatus line.
@@ -4287,8 +4330,12 @@ categories.
* Printcmd:: Set command for VT100 printer port emulation.
* Sorendition:: Change the text highlighting method.
* Attrcolor:: Map attributes to colors.
-* Setsid:: Change process group management
-* Eval:: Parse and execute arguments
+* Setsid:: Change process group management.
+* Eval:: Parse and execute arguments.
+* Maxwin:: Set the maximum window number.
+* Backtick:: Program a command for a backtick string escape.
+* Screen Saver:: Define a screen safer.
+* Zmodem:: Define how screen treats zmodem requests.
@end menu
@node At, Break, , Miscellaneous
@@ -4320,7 +4367,7 @@ once per window. Commands that change the internal arrangement of windows
(like @code{other}) may be called again. In shared windows the command will
be repeated for each attached display. Beware, when issuing toggle commands
like @code{login}!
-Some commands (e.g. @code{stuff}, @code{\*Qprocess} or @code{paste}) require
+Some commands (e.g. @code{\*Qprocess}) require
that a display is associated with the target windows. These commands may not
work correctly under @code{at} looping over windows.
@end deffn
@@ -4400,12 +4447,22 @@ determined by the presence of the environment variable
@node Nonblock, Number, Nethack, Miscellaneous
@section Nonblock
-@deffn Command nonblock @var{state}
-Enable or disable flow control for the current user interface
-(display). It is used to prevent a slow display from slowing
-down the processing of data output by a window. This command
-may be helpful when multiple displays show the same window.
-@code{Nonblock} is initially off for all displays.
+@deffn Command nonblock [@var{state}|@var{numsecs}]
+Tell screen how to deal with user interfaces (displays) that cease to
+accept output. This can happen if a user presses ^S or a TCP/modem
+connection gets cut but no hangup is received. If nonblock is
+@code{off} (this is the default) screen waits until the display
+restarts to accept the output. If nonblock is @code{on}, screen
+waits until the timeout is reached (@code{on} is treated as 1s). If the
+display still doesn't receive characters, screen will consider
+it ``blocked'' and stop sending characters to it. If at
+some time it restarts to accept characters, screen will unblock
+the display and redisplay the updated window contents.
+@end deffn
+
+@deffn Command defnonblock @var{state}|@var{numsecs}
+Same as the @code{nonblock} command except that the default setting for
+displays is changed. Initial setting is @code{off}.
@end deffn
@node Number, Silence, Nonblock, Miscellaneous
@@ -4540,7 +4597,7 @@ Examples:
Change the color to bright red if bold text is to be printed.
@item attrcolor u "-u b"
Use blue text instead of underline.
-@item attrcolor b "I"
+@item attrcolor b ".I"
Use bright colors for bold text. Most terminal emulators do this
already.
@item attrcolor i "+b"
@@ -4560,11 +4617,98 @@ The default is @code{on}, of course. This command is probably useful
only in rare circumstances.
@end deffn
-@node Eval, , Setsid, Miscellaneous
+@node Eval, Maxwin, Setsid, Miscellaneous
@section Eval
@deffn Command eval @var{command1} [@var{command2} ...]
(none)@*
-Parses and executes each argument as seperate command.
+Parses and executes each argument as separate command.
+@end deffn
+
+@node Maxwin, Backtick, Eval, Miscellaneous
+@section Maxwin
+@deffn Command maxwin @var{n}
+(none)@*
+Set the maximum window number screen will create. Doesn't affect
+already existing windows. The number may only be decreased.
+@end deffn
+
+@node Backtick, Screen Saver, Maxwin, Miscellaneous
+@section Backtick
+@deffn Command backtick @var{id} @var{lifespan} @var{autorefresh} @var{command} [@var{args}]
+@deffnx Command backtick @var{id}
+(none)@*
+Program the backtick command with the numerical id @var{id}.
+The output of such a command is used for substitution of the
+@code{%`} string escape (@pxref{String Escapes}).
+The specified @var{lifespan} is the number
+of seconds the output is considered valid. After this time, the
+command is run again if a corresponding string escape is encountered.
+The @var{autorefresh} parameter triggers an
+automatic refresh for caption and hardstatus strings after the
+specified number of seconds. Only the last line of output is used
+for substitution.
+
+If both the @var{lifespan} and the @var{autorefresh} parameters
+are zero, the backtick program is expected to stay in the
+background and generate output once in a while.
+In this case, the command is executed right away and screen stores
+the last line of output. If a new line gets printed screen will
+automatically refresh the hardstatus or the captions.
+
+The second form of the command deletes the backtick command
+with the numerical id @var{id}.
+@end deffn
+
+@node Screen Saver, Zmodem, Backtick, Miscellaneous
+@section Screen Saver
+@deffn Command idle [@var{timeout} [@var{cmd} @var{args}]]
+(none)@*
+Sets a command that is run after the specified number of
+seconds inactivity is reached. This command will normally
+be the @code{blanker} command to create a screen blanker, but
+it can be any screen command. If no command is specified,
+only the timeout is set. A timeout of zero (ot the special
+timeout @code{off}) disables the timer. If no arguments are
+given, the current settings are displayed.
+@end deffn
+
+@deffn Command blanker
+(none)@*
+Activate the screen blanker. First the screen is cleared.
+If no blanker program is defined, the cursor is turned
+off, otherwise, the program is started and it's output is
+written to the screen. The screen blanker is killed with
+the first keypress, the read key is discarded.
+
+This command is normally used together with the @code{idle}
+command.
+@end deffn
+
+@deffn Command blankerprg [@var{program args}]
+Defines a blanker program. Disables the blanker program if
+no arguments are given.
+@end deffn
+
+@node Zmodem, , Screen Saver, Miscellaneous
+@section Zmodem
+@deffn Command zmodem [off|auto|catch|pass]
+@deffnx Command zmodem sendcmd [string]
+@deffnx Command zmodem recvcmd [string]
+(none)@*
+Define zmodem support for screen. Screen understands two
+different modes when it detects a zmodem request: @code{pass}
+and @code{catch}. If the mode is set to @code{pass}, screen will
+relay all data to the attacher until the end of the
+transmission is reached. In @code{catch} mode screen acts as a
+zmodem endpoint and starts the corresponding rz/sz commands.
+If the mode is set to @code{auto}, screen will use @code{catch} if
+the window is a tty (e.g. a serial line), otherwise it
+will use @code{pass}.
+
+You can define the templates screen uses in @code{catch} mode
+via the second and the third form.
+
+Note also that this is an experimental feature.
@end deffn
@node String Escapes, Environment, Miscellaneous, Top
@@ -4625,8 +4769,8 @@ last two digits of the year number
@item Y
full year number
@item ?
-the part to the next @code{%?} is displayed only if an escape expands
-to an nonempty string
+the part to the next @code{%?} is displayed only if a @code{%} escape
+inside the part expands to a non-empty string
@item :
else part of @code{%?}
@item =
@@ -4650,6 +4794,9 @@ operator.) The @code{L} qualifier tells screen to mark the truncated
parts with @samp{...}.
@item @{
attribute/color modifier string terminated by the next @code{@}}
+@item `
+Substitute with the output of a `backtick' command. The length
+qualifier is misused to identify one of the commands. @xref{Backtick}.
@end table
The @code{c} and @code{C} escape may be qualified with a @code{0} to
make screen use
@@ -4678,6 +4825,8 @@ change the current attributes to the specified set
The attribute set can either be specified as a hexadecimal number or
a combination of the following letters:
@table @code
+@item d
+dim
@item u
underline
@item b
@@ -4807,8 +4956,8 @@ Window number of a window (at creation time).
@cindex files
@table @file
-@item .../screen-3.?.??/etc/screenrc
-@itemx .../screen-3.?.??/etc/etcscreenrc
+@item .../screen-4.?.??/etc/screenrc
+@itemx .../screen-4.?.??/etc/etcscreenrc
Examples in the @code{screen} distribution package for private and
global initialization files.
@@ -4889,8 +5038,8 @@ Contributors @*
Martin Schweikert (schweik@@cpp.ob.open.de),
David Vrona (dave@@sashimi.lcu.com),
E. Tye McQueen (tye%spillman.UUCP@@uunet.uu.net),
- Matthew Green (mrg@@mame.mu.oz.au),
- Christopher Williams (cgw@@unt.edu),
+ Matthew Green (mrg@@eterna.com.au),
+ Christopher Williams (cgw@@pobox.com),
Matt Mosley (mattm@@access.digex.net),
Gregory Neil Shapiro (gshapiro@@wpi.WPI.EDU),
Jason Merrill (jason@@jarthur.Claremont.EDU),
diff --git a/encoding.c b/encoding.c
index be9423a..c7616c4 100644
--- a/encoding.c
+++ b/encoding.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1993-2002
+/* Copyright (c) 1993-2003
* Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
* Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
* Copyright (c) 1987 Oliver Laumann
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: utf8.c,v 1.5 2001/04/25 12:32:47 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
@@ -39,6 +36,15 @@ extern struct layer *flayer;
extern char *screenencodings;
static int encmatch __P((char *, char *));
+# ifdef UTF8
+static int recode_char __P((int, int, int));
+static int recode_char_to_encoding __P((int, int));
+static void comb_tofront __P((int, int));
+# ifdef DW_CHARS
+static int recode_char_dw __P((int, int *, int, int));
+static int recode_char_dw_to_encoding __P((int, int *, int));
+# endif
+# endif
struct encoding {
char *name;
@@ -74,6 +80,7 @@ struct encoding encodings[] = {
{ "ISO8859-10", 0, 0x80|'V', 0, 0, 0 },
{ "ISO8859-15", 0, 0x80|'b', 0, 0, 0 },
{ "jis", 0, 0, 0, 0, "\002\004I" },
+ { "GBK", "B\031BB01", 0x80|'b', 1, 1, "\031" }
};
#ifdef UTF8
@@ -243,7 +250,7 @@ static unsigned short builtin_tabs[][2] = {
{ 0x007d, 0x00e7 },
{ 0, 0},
- { 0xe2, 0}, /* 96-b: ISO-8859-15*/
+ { 0xe2, 0}, /* 96-b: ISO-8859-15 */
{ 0x00a4, 0x20ac },
{ 0x00a6, 0x0160 },
{ 0x00a8, 0x0161 },
@@ -293,21 +300,21 @@ InitBuiltinTabs()
}
}
-int
+static int
recode_char(c, to_utf, font)
int c, to_utf, font;
{
int f;
unsigned short (*p)[2];
- if (c < 256)
- return c;
if (to_utf)
{
+ if (c < 256)
+ return c;
f = (c >> 8) & 0xff;
c &= 0xff;
/* map aliases to keep the table small */
- switch (c >> 8)
+ switch (f)
{
case 'C':
f ^= ('C' ^ '5');
@@ -339,20 +346,24 @@ int c, to_utf, font;
}
if (font == -1)
{
- for (font = 32; font < 256; font++)
+ if (c < 256)
+ return c; /* latin1 */
+ for (font = 32; font < 128; font++)
{
p = recodetabs[font].tab;
if (p)
for (; (*p)[1]; p++)
{
if ((p[0][0] & 0x8000) && c <= p[0][1] && c >= p[-1][1])
- return c - p[-1][1] + p[-1][0];
+ return (c - p[-1][1] + p[-1][0]) | (font << 8);
if ((*p)[1] == c)
- return (*p)[0];
+ return (*p)[0] | (font << 8);
}
}
return '?';
}
+ if (c < 128 && (font & 128) != 0)
+ return c;
if (font >= 32)
{
p = recodetabs[font].tab;
@@ -363,15 +374,19 @@ int c, to_utf, font;
}
if (p)
for (; (*p)[1]; p++)
- if ((*p)[1] == c)
- return (*p)[0];
+ {
+ if ((p[0][0] & 0x8000) && c <= p[0][1] && c >= p[-1][1])
+ return (c - p[-1][1] + p[-1][0]) | (font & 128 ? 0 : font << 8);
+ if ((*p)[1] == c)
+ return (*p)[0] | (font & 128 ? 0 : font << 8);
+ }
}
return -1;
}
#ifdef DW_CHARS
-int
+static int
recode_char_dw(c, c2p, to_utf, font)
int c, *c2p, to_utf, font;
{
@@ -403,7 +418,7 @@ int c, *c2p, to_utf, font;
}
if (font == -1)
{
- for (font = 0; font < 32; font++)
+ for (font = 0; font < 030; font++)
{
p = recodetabs[font].tab;
if (p)
@@ -437,7 +452,7 @@ int c, *c2p, to_utf, font;
}
#endif
-int
+static int
recode_char_to_encoding(c, encoding)
int c, encoding;
{
@@ -457,7 +472,7 @@ int c, encoding;
}
#ifdef DW_CHARS
-int
+static int
recode_char_dw_to_encoding(c, c2p, encoding)
int c, *c2p, encoding;
{
@@ -612,11 +627,24 @@ int from, to;
return rl;
}
+struct combchar {
+ unsigned short c1;
+ unsigned short c2;
+ unsigned short next;
+ unsigned short prev;
+};
+struct combchar **combchars;
+
void
AddUtf8(c)
int c;
{
ASSERT(D_encoding == UTF8);
+ if (c >= 0xd800 && c < 0xe000 && combchars && combchars[c - 0xd800])
+ {
+ AddUtf8(combchars[c - 0xd800]->c1);
+ c = combchars[c - 0xd800]->c2;
+ }
if (c >= 0x800)
{
AddChar((c & 0xf000) >> 12 | 0xe0);
@@ -631,6 +659,21 @@ int c;
}
int
+ToUtf8_comb(p, c)
+char *p;
+int c;
+{
+ int l;
+
+ if (c >= 0xd800 && c < 0xe000 && combchars && combchars[c - 0xd800])
+ {
+ l = ToUtf8_comb(p, combchars[c - 0xd800]->c1);
+ return l + ToUtf8(p ? p + l : 0, combchars[c - 0xd800]->c2);
+ }
+ return ToUtf8(p, c);
+}
+
+int
ToUtf8(p, c)
char *p;
int c;
@@ -812,6 +855,7 @@ int c;
(c >= 0x2e80 && c <= 0xa4cf && (c & ~0x0011) != 0x300a &&
c != 0x303f) || /* CJK ... Yi */
(c >= 0xac00 && c <= 0xd7a3) || /* Hangul Syllables */
+ (c >= 0xdf00 && c <= 0xdfff) || /* dw combining sequence */
(c >= 0xf900 && c <= 0xfaff) || /* CJK Compatibility Ideographs */
(c >= 0xfe30 && c <= 0xfe6f) || /* CJK Compatibility Forms */
(c >= 0xff00 && c <= 0xff5f) || /* Fullwidth Forms */
@@ -820,6 +864,157 @@ int c;
}
#endif
+int
+utf8_iscomb(c)
+int c;
+{
+ /* taken from Markus Kuhn's wcwidth */
+ static struct {
+ unsigned short first;
+ unsigned short last;
+ } combining[] = {
+ { 0x0300, 0x034F }, { 0x0360, 0x036F }, { 0x0483, 0x0486 },
+ { 0x0488, 0x0489 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 },
+ { 0x05BB, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
+ { 0x05C4, 0x05C4 }, { 0x064B, 0x0655 }, { 0x0670, 0x0670 },
+ { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
+ { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
+ { 0x07A6, 0x07B0 }, { 0x0901, 0x0902 }, { 0x093C, 0x093C },
+ { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0954 },
+ { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC },
+ { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 },
+ { 0x0A02, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 },
+ { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 },
+ { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 },
+ { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0B01, 0x0B01 },
+ { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 },
+ { 0x0B4D, 0x0B4D }, { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 },
+ { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 },
+ { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 },
+ { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
+ { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, { 0x0DCA, 0x0DCA },
+ { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, { 0x0E31, 0x0E31 },
+ { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB1, 0x0EB1 },
+ { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, { 0x0EC8, 0x0ECD },
+ { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 },
+ { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 },
+ { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, { 0x0F99, 0x0FBC },
+ { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1032 },
+ { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, { 0x1058, 0x1059 },
+ { 0x1160, 0x11FF }, { 0x1712, 0x1714 }, { 0x1732, 0x1734 },
+ { 0x1752, 0x1753 }, { 0x1772, 0x1773 }, { 0x17B7, 0x17BD },
+ { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x180B, 0x180E },
+ { 0x18A9, 0x18A9 }, { 0x200B, 0x200F }, { 0x202A, 0x202E },
+ { 0x2060, 0x2063 }, { 0x206A, 0x206F }, { 0x20D0, 0x20EA },
+ { 0x302A, 0x302F }, { 0x3099, 0x309A }, { 0xFB1E, 0xFB1E },
+ { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF },
+ { 0xFFF9, 0xFFFB }
+ };
+ int mid, min = 0, max = sizeof(combining)/sizeof(*combining) - 1;
+
+ if (c < 0x0300 || c > 0xfffb)
+ return 0;
+ while (max >= min)
+ {
+ mid = (min + max) / 2;
+ if (c > combining[mid].last)
+ min = mid + 1;
+ else if (c < combining[mid].first)
+ max = mid - 1;
+ else
+ return 1;
+ }
+ return 0;
+}
+
+static void
+comb_tofront(root, i)
+int root, i;
+{
+ for (;;)
+ {
+ debug1("bring to front: %x\n", i);
+ combchars[combchars[i]->prev]->next = combchars[i]->next;
+ combchars[combchars[i]->next]->prev = combchars[i]->prev;
+ combchars[i]->next = combchars[root]->next;
+ combchars[i]->prev = root;
+ combchars[combchars[root]->next]->prev = i;
+ combchars[root]->next = i;
+ i = combchars[i]->c1;
+ if (i < 0xd800 || i >= 0xe000)
+ return;
+ i -= 0xd800;
+ }
+}
+
+void
+utf8_handle_comb(c, mc)
+int c;
+struct mchar *mc;
+{
+ int root, i, c1;
+ int isdouble;
+
+ c1 = mc->image | (mc->font << 8);
+ isdouble = c1 >= 0x1100 && utf8_isdouble(c1);
+ if (!combchars)
+ {
+ combchars = (struct combchar **)malloc(sizeof(struct combchar *) * 0x802);
+ if (!combchars)
+ return;
+ bzero((char *)combchars, sizeof(struct combchar *) * 0x802);
+ combchars[0x800] = (struct combchar *)malloc(sizeof(struct combchar));
+ combchars[0x801] = (struct combchar *)malloc(sizeof(struct combchar));
+ if (!combchars[0x800] || !combchars[0x801])
+ {
+ if (combchars[0x800])
+ free(combchars[0x800]);
+ if (combchars[0x801])
+ free(combchars[0x801]);
+ free(combchars);
+ return;
+ }
+ combchars[0x800]->c1 = 0x000;
+ combchars[0x800]->c2 = 0x700;
+ combchars[0x800]->next = 0x800;
+ combchars[0x800]->prev = 0x800;
+ combchars[0x801]->c1 = 0x700;
+ combchars[0x801]->c2 = 0x800;
+ combchars[0x801]->next = 0x801;
+ combchars[0x801]->prev = 0x801;
+ }
+ root = isdouble ? 0x801 : 0x800;
+ for (i = combchars[root]->c1; i < combchars[root]->c2; i++)
+ {
+ if (!combchars[i])
+ break;
+ if (combchars[i]->c1 == c1 && combchars[i]->c2 == c)
+ break;
+ }
+ if (i == combchars[root]->c2)
+ {
+ /* full, recycle old entry */
+ if (c1 >= 0xd800 && c1 < 0xe000)
+ comb_tofront(root, c1);
+ i = combchars[root]->prev;
+ /* FIXME: delete old char from all buffers */
+ }
+ else if (!combchars[i])
+ {
+ combchars[i] = (struct combchar *)malloc(sizeof(struct combchar));
+ if (!combchars[i])
+ return;
+ combchars[i]->prev = i;
+ combchars[i]->next = i;
+ }
+ combchars[i]->c1 = c1;
+ combchars[i]->c2 = c;
+ mc->image = i & 0xff;
+ mc->font = (i >> 8) + 0xd8;
+ debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800);
+ comb_tofront(root, i);
+}
+
#else /* !UTF8 */
void
@@ -872,6 +1067,7 @@ char *name;
{
int encoding;
+ debug1("FindEncoding %s\n", name);
if (name == 0 || *name == 0)
return 0;
if (encmatch(name, "euc"))
@@ -882,7 +1078,7 @@ char *name;
if (encmatch(name, "UTF-8"))
return -1;
#endif
- for (encoding = 0; encoding < sizeof(encodings)/sizeof(*encodings); encoding++)
+ for (encoding = 0; encoding < (int)(sizeof(encodings)/sizeof(*encodings)); encoding++)
if (encmatch(name, encodings[encoding].name))
{
#ifdef UTF8
@@ -897,7 +1093,7 @@ char *
EncodingName(encoding)
int encoding;
{
- if (encoding >= sizeof(encodings)/sizeof(*encodings))
+ if (encoding >= (int)(sizeof(encodings)/sizeof(*encodings)))
return 0;
return encodings[encoding].name;
}
@@ -923,7 +1119,12 @@ struct win *p;
LoadFontTranslationsForEncoding(encoding);
#endif
if (encodings[encoding].usegr)
- p->w_gr = 1;
+ {
+ p->w_gr = 2;
+ p->w_FontE = encodings[encoding].charsets[1];
+ }
+ else
+ p->w_FontE = 0;
if (encodings[encoding].noc1)
p->w_c1 = 0;
}
@@ -1002,12 +1203,14 @@ int *statep;
else
return c | (KANJI << 16);
}
- if (encoding == BIG5)
+ if (encoding == BIG5 || encoding == GBK)
{
if (!*statep)
{
if (c & 0x80)
{
+ if (encoding == GBK && c == 0x80)
+ return 0xa4 | (('b'|0x80) << 16);
*statep = c;
return -1;
}
@@ -1017,7 +1220,7 @@ int *statep;
c = *statep;
*statep = 0;
c &= 0x7f;
- return c << 8 | t | (030 << 16);
+ return c << 8 | t | (encoding == BIG5 ? 030 << 16 : 031 << 16);
}
return c | (encodings[encoding].deffont << 16);
}
@@ -1032,7 +1235,7 @@ int *fontp;
int t, f, l;
debug2("Encoding char %02x for encoding %d\n", c, encoding);
- if (c == 0 && fontp)
+ if (c == -1 && fontp)
{
if (*fontp == 0)
return 0;
@@ -1054,8 +1257,8 @@ int *fontp;
# ifdef DW_CHARS
if (is_dw_font(f))
{
- int c2 = c >> 8 & 0xff;
- c = (c & 0xff) | (f << 8);
+ int c2 = c & 0xff;
+ c = (c >> 8 & 0xff) | (f << 8);
c = recode_char_dw_to_encoding(c, &c2, encoding);
}
else
@@ -1067,7 +1270,7 @@ int *fontp;
}
return ToUtf8(bp, c);
}
- if ((c & 0xff00) && f == 0)
+ if ((c & 0xff00) && f == 0) /* is_utf8? */
{
# ifdef DW_CHARS
if (utf8_isdouble(c))
@@ -1086,7 +1289,6 @@ int *fontp;
f = c >> 16;
}
#endif
-
if (f & 0x80) /* map special 96-fonts to latin1 */
f = 0;
@@ -1147,7 +1349,7 @@ int *fontp;
}
return 2;
}
- if (encoding == BIG5 && f == 030)
+ if ((encoding == BIG5 && f == 030) || (encoding == GBK && f == 031))
{
if (bp)
{
@@ -1156,6 +1358,8 @@ int *fontp;
}
return 2;
}
+ if (encoding == GBK && f == 0 && c == 0xa4)
+ c = 0x80;
l = 0;
if (fontp && f != *fontp)
@@ -1217,6 +1421,8 @@ int encoding, f;
return f == 1;
case BIG5:
return f == 030;
+ case GBK:
+ return f == 031;
default:
break;
}
@@ -1271,7 +1477,7 @@ int c;
D_mbcs = t | 0x80;
return c | 0x80;
}
- if (encoding == BIG5 && f == 030)
+ if ((encoding == BIG5 && f == 030) || (encoding == GBK && f == 031))
return c | 0x80;
return c;
}
@@ -1297,7 +1503,7 @@ unsigned char *tbuf;
continue;
j += EncodeChar(tbuf ? (char *)tbuf + j : 0, c, tenc, &font);
}
- j += EncodeChar(tbuf ? (char *)tbuf + j : 0, 0, tenc, &font);
+ j += EncodeChar(tbuf ? (char *)tbuf + j : 0, -1, tenc, &font);
return j;
}
@@ -1456,7 +1662,7 @@ int encoding;
int *fontp;
{
int f, l;
- f = c >> 16;
+ f = (c == -1) ? 0 : c >> 16;
l = 0;
if (fontp && f != *fontp)
{
@@ -1486,7 +1692,7 @@ int *fontp;
l += 3;
}
}
- if (c == 0)
+ if (c == -1)
return l;
if (c & 0xff00)
{
diff --git a/etc/completer.zsh b/etc/completer.zsh
index f8f0c96..bbbd01c 100644
--- a/etc/completer.zsh
+++ b/etc/completer.zsh
@@ -45,9 +45,9 @@ case $state in
# Complete folder names.
local screendir
- screendir=(`screen -ls | grep Socket | tail -1 | sed -e 's/\.$//' | awk '{print $NF;}'`)
+ screendir=(`screen -ls | grep Socket | sed -n -e 's/\.$//' -e '$p' | awk '{print $NF;}'`)
_wanted files expl 'screen process' _path_files -W screendir
;;
esac
- \ No newline at end of file
+
diff --git a/etc/countmail b/etc/countmail
new file mode 100755
index 0000000..974f143
--- /dev/null
+++ b/etc/countmail
@@ -0,0 +1,67 @@
+#!/usr/bin/perl
+
+sub countmsgs {
+ return -1 unless open(M, "<$mbox");
+ my $inhdr = 0;
+ my $cl = undef;
+ my $msgread = 0;
+ my $count = 0;
+ while(<M>) {
+ if (!$inhdr && /^From\s+\S+\s+(?i:sun|mon|tue|wed|thu|fri|sat)\s+(?i:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\s+\d+\s/) {
+ $inhdr = 1;
+ $msgread = 0;
+ undef $cl;
+ next;
+ }
+ if ($inhdr) {
+ if (/^content-length:\s+(\d+)/i) {
+ $cl = 0+$1;
+ next;
+ }
+ if (/^status:\s+(\S)/i) {
+ $msgread = 1 unless $1 eq 'N' || $1 eq 'U';
+ next;
+ }
+ if ($_ eq "\n") {
+ $count++ if !$msgread;
+ seek(M, $cl, 1) if defined $cl;
+ $inhdr = 0;
+ }
+ }
+ }
+ close M;
+ return $count;
+}
+
+$| = 1;
+$mbox = $ARGV[0] || $ENV{'MAIL'};
+$oldfmt = $ARGV[1] || "%4d ";
+$newfmt = $ARGV[2] || "\005{Rk}%4d \005{-}";
+
+@oldstat = stat($mbox);
+if (!@oldstat) {
+ print "\005{Rk} ??? \005{-}\n";
+ exit 1;
+}
+$oldcount = 0;
+while(1) {
+ $count = countmsgs($mbox);
+ if ($count == -1) {
+ print "\005{Rk} ??? \005{-}\n";
+ } elsif ($count < $oldcount || $count == 0) {
+ printf "$oldfmt\n", $count;
+ } else {
+ printf "$newfmt\n", $count;
+ }
+ $oldcount = $count;
+ while (1) {
+ @newstat = stat($mbox);
+ if (!@newstat) {
+ print "\005{Rk} ??? \005{-}\n";
+ exit 1;
+ }
+ last if $newstat[7] != $oldstat[7] || $newstat[9] != $oldstat[9];
+ sleep 1;
+ }
+ @oldstat = @newstat;
+}
diff --git a/etc/etcscreenrc b/etc/etcscreenrc
index 83a4a41..3fc9c37 100644
--- a/etc/etcscreenrc
+++ b/etc/etcscreenrc
@@ -82,13 +82,13 @@ termcap wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
terminfo wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
#remove some stupid / dangerous key bindings
-bind '^k'
-#bind 'L'
-bind '^\'
+bind ^k
+#bind L
+bind ^\
#make them better
-bind '\\' quit
-bind 'K' kill
-bind 'I' login on
-bind 'O' login off
-bind '}' history
+bind \\ quit
+bind K kill
+bind I login on
+bind O login off
+bind } history
diff --git a/etc/screenrc b/etc/screenrc
index 716d86f..ca6561d 100644
--- a/etc/screenrc
+++ b/etc/screenrc
@@ -35,6 +35,9 @@ defscrollback 1000
# don't kill window after the process died
# zombie "^["
+# enable support for the "alternate screen" capability in all windows
+# altscreen on
+
################
#
# xterm tweaks
@@ -133,8 +136,8 @@ bind ^] paste [.]
#
# screen -t local 0
-# screen -t mail 1 elm
-# screen -t 40 2 rlogin faui40
+# screen -t mail 1 mutt
+# screen -t 40 2 rlogin server
# caption always "%3n %t%? @%u%?%? [%h]%?%=%c"
# hardstatus alwaysignore
@@ -145,5 +148,6 @@ bind ^] paste [.]
# bind - resize -1
# bind _ resize max
#
-# attrcolor u "-u b"
-# attrcolor b "R"
+# defnonblock 1
+# blankerprg rain -d 100
+# idle 30 blanker
diff --git a/etc/toolcheck b/etc/toolcheck
index 747e9a0..1b8ee39 100755
--- a/etc/toolcheck
+++ b/etc/toolcheck
@@ -5,7 +5,7 @@
# 24.7.95 jw.
retval=0
-reply="`sh -version 2>&1 < /dev/null | head -1`"
+reply="`sh -version 2>&1 < /dev/null | sed q`"
case "$reply" in
GNU*1.14.3*)
echo "- sh is '$reply'";
@@ -21,7 +21,7 @@ case "$reply" in
*) ;;
esac
-reply="`sed --version 2>&1 < /dev/null | head -1`"
+reply="`sed --version 2>&1 < /dev/null | sed q`"
case "$reply" in
GNU\ sed\ version\ 2.0[34])
echo "- sed is '$reply'";
diff --git a/extern.h b/extern.h
index 11663aa..06b8e96 100644
--- a/extern.h
+++ b/extern.h
@@ -41,13 +41,13 @@ extern void Panic __P((int, char *, ...)) __attribute__((format(printf, 2, 3)))
extern void Msg __P(());
extern void Panic __P(());
#endif
-extern void DisplaySleep __P((int, int));
extern void Finit __P((int));
extern void MakeNewEnv __P((void));
extern char *MakeWinMsg __P((char *, struct win *, int));
-extern char *MakeWinMsgEv __P((char *, struct win *, int, int, struct event *));
+extern char *MakeWinMsgEv __P((char *, struct win *, int, int, struct event *, int));
extern int PutWinMsg __P((char *, int, int));
extern void WindowDied __P((struct win *));
+extern void setbacktick __P((int, int, int, char **));
/* ansi.c */
extern void ResetAnsiState __P((struct win *));
@@ -67,13 +67,15 @@ extern int MFindUsedLine __P((struct win *, int, int));
/* fileio.c */
extern void StartRc __P((char *));
extern void FinishRc __P((char *));
-extern void RcLine __P((char *));
+extern void RcLine __P((char *, int));
extern FILE *secfopen __P((char *, char *));
extern int secopen __P((char *, int, int));
extern void WriteFile __P((struct acluser *, char *, int));
extern char *ReadFile __P((char *, int *));
extern void KillBuffers __P((void));
extern int printpipe __P((struct win *, char *));
+extern int readpipe __P((char **));
+extern void RunBlanker __P((char **));
extern void do_source __P((char *));
/* tty.c */
@@ -120,9 +122,13 @@ extern void display_help __P((char *, struct action *));
extern void display_copyright __P((void));
extern void display_displays __P((void));
extern void display_bindkey __P((char *, struct action *));
-extern void display_wlist __P((int));
+extern void display_wlist __P((int, int));
extern int InWList __P((void));
extern void WListUpdatecv __P((struct canvas *, struct win *));
+extern void WListLinkChanged __P((void));
+#ifdef ZMODEM
+extern void ZmodemPage __P((void));
+#endif
/* window.c */
extern int MakeWindow __P((struct NewWindow *));
@@ -137,7 +143,10 @@ extern int DoStartLog __P((struct win *, char *, int));
extern int ReleaseAutoWritelock __P((struct display *, struct win *));
extern int ObtainAutoWritelock __P((struct display *, struct win *));
extern void CloseDevice __P((struct win *));
-
+#ifdef ZMODEM
+extern void zmodem_abort __P((struct win *, struct display *));
+#endif
+extern void execvpe __P((char *, char **, char **));
/* utmp.c */
#ifdef UTMPOK
@@ -177,12 +186,12 @@ extern void ProcessInput2 __P((char *, int));
extern void DoProcess __P((struct win *, char **, int *, struct paster *));
extern void DoAction __P((struct action *, int));
extern int FindCommnr __P((char *));
-extern void DoCommand __P((char **));
+extern void DoCommand __P((char **, int *));
extern void Activate __P((int));
extern void KillWindow __P((struct win *));
extern void SetForeWindow __P((struct win *));
-extern int Parse __P((char *, char **));
-extern int ParseEscape __P((struct acluser *, char *));
+extern int Parse __P((char *, int, char **, int *));
+extern void SetEscape __P((struct acluser *, int, int));
extern void DoScreen __P((char *, char **));
extern int IsNumColon __P((char *, int, char *, int));
extern void ShowWindows __P((int));
@@ -192,7 +201,7 @@ extern char *AddOtherUsers __P((char *, int, struct win *));
extern int WindowByNoN __P((char *));
extern struct win *FindNiceWindow __P((struct win *, char *));
#ifdef COPY_PASTE
-extern int CompileKeys __P((char *, unsigned char *));
+extern int CompileKeys __P((char *, int, unsigned char *));
#endif
#ifdef RXVT_OSC
extern void RefreshXtermOSC __P((void));
@@ -203,6 +212,7 @@ extern int ParseSwitch __P((struct action *, int *));
extern int ParseAttrColor __P((char *, char *, int));
extern void ApplyAttrColor __P((int, struct mchar *));
extern void SwitchWindow __P((int));
+extern int StuffKey __P((int));
/* termcap.c */
extern int InitTermcap __P((int, int));
@@ -294,6 +304,9 @@ extern int color256to16 __P((int));
extern int color256to88 __P((int));
# endif
#endif
+extern void ResetIdle __P((void));
+extern void KillBlanker __P((void));
+extern void DisplaySleep1000 __P((int, int));
/* resize.c */
extern int ChangeWindowSize __P((struct win *, int, int, int));
@@ -303,6 +316,9 @@ extern char *xrealloc __P((char *, int));
extern void ResizeLayersToCanvases __P((void));
extern void ResizeLayer __P((struct layer *, int, int, struct display *));
extern int MayResizeLayer __P((struct layer *));
+extern void FreeAltScreen __P((struct win *));
+extern void EnterAltScreen __P((struct win *));
+extern void LeaveAltScreen __P((struct win *));
/* sched.c */
extern void evenq __P((struct event *));
@@ -322,6 +338,7 @@ extern int SendErrorMsg __P((char *, char *));
/* misc.c */
extern char *SaveStr __P((const char *));
+extern char *SaveStrn __P((const char *, int));
extern char *InStr __P((char *, const char *));
#ifndef HAVE_STRERROR
extern char *strerror __P((int));
@@ -351,7 +368,6 @@ extern void xsetegid __P((int));
extern int AddXChar __P((char *, int));
extern int AddXChars __P((char *, int, char *));
extern void xsetenv __P((char *, char *));
-extern char *expand_vars __P((char *, struct display *));
extern void sleep1000 __P((int));
#ifdef DEBUG
extern void opendebug __P((int, int));
@@ -448,18 +464,15 @@ extern char *DoNLS __P((char *));
#ifdef ENCODINGS
# ifdef UTF8
extern void InitBuiltinTabs __P((void));
-extern int recode_char __P((int, int, int));
-extern int recode_char_to_encoding __P((int, int));
-# ifdef DW_CHARS
-extern int recode_char_dw __P((int, int *, int, int));
-extern int recode_char_dw_to_encoding __P((int, int *, int));
-# endif
extern struct mchar *recode_mchar __P((struct mchar *, int, int));
extern struct mline *recode_mline __P((struct mline *, int, int, int));
extern int FromUtf8 __P((int, int *));
extern void AddUtf8 __P((int));
extern int ToUtf8 __P((char *, int));
+extern int ToUtf8_comb __P((char *, int));
extern int utf8_isdouble __P((int));
+extern int utf8_iscomb __P((int));
+extern void utf8_handle_comb __P((int, struct mchar *));
extern int ContainsSpecialDeffont __P((struct mline *, int, int, int));
extern int LoadFontTranslation __P((int, char *));
extern void LoadFontTranslationsForEncoding __P((int));
diff --git a/fileio.c b/fileio.c
index 193e3ff..ab5e9c7 100644
--- a/fileio.c
+++ b/fileio.c
@@ -21,10 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: fileio.c,v 1.10 1994/05/31 12:32:01 mlschroe Exp $ FAU")
-
-
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -140,6 +136,7 @@ char *rcfilename;
register char *p, *cp;
char buf[2048];
char *args[MAXARGS];
+ int argl[MAXARGS];
FILE *fp;
char *oldrc_name = rc_name;
@@ -174,7 +171,7 @@ char *rcfilename;
{
if ((p = rindex(buf, '\n')) != NULL)
*p = '\0';
- if ((argc = Parse(expand_vars(buf, display), args)) == 0)
+ if ((argc = Parse(buf, sizeof buf, args, argl)) == 0)
continue;
if (strcmp(args[0], "echo") == 0)
{
@@ -202,7 +199,7 @@ char *rcfilename;
Msg(0, "%s: sleep: one numeric argument expected.", rc_name);
continue;
}
- DisplaySleep(atoi(args[1]), 1);
+ DisplaySleep1000(1000 * atoi(args[1]), 1);
}
#ifdef TERMINFO
else if (!strcmp(args[0], "termcapinfo") || !strcmp(args[0], "terminfo"))
@@ -284,7 +281,7 @@ char *rcfilename;
debug("finishrc is going...\n");
while (fgets(buf, sizeof buf, fp) != NULL)
- RcLine(buf);
+ RcLine(buf, sizeof buf);
(void) fclose(fp);
Free(rc_name);
rc_name = oldrc_name;
@@ -311,10 +308,12 @@ char *rcfilename;
* This is bad when we run detached.
*/
void
-RcLine(ubuf)
+RcLine(ubuf, ubufl)
char *ubuf;
+int ubufl;
{
- char *args[MAXARGS], *buf;
+ char *args[MAXARGS];
+ int argl[MAXARGS];
#ifdef MULTIUSER
extern struct acluser *EffectiveAclUser; /* acl.c */
extern struct acluser *users; /* acl.c */
@@ -327,19 +326,17 @@ char *ubuf;
}
else
flayer = fore ? fore->w_savelayer : 0;
- buf = expand_vars(ubuf, display);
- if (Parse(buf, args) <= 0)
+ if (Parse(ubuf, ubufl, args, argl) <= 0)
return;
#ifdef MULTIUSER
if (!display)
{
/* the session owner does it, when there is no display here */
EffectiveAclUser = users;
- debug1("RcLine: WARNING, no display no user! Session owner does: %s",
- ubuf);
+ debug("RcLine: WARNING, no display no user! Session owner executes command\n");
}
#endif
- DoCommand(args);
+ DoCommand(args, argl);
#ifdef MULTIUSER
EffectiveAclUser = 0;
#endif
@@ -385,7 +382,7 @@ int dump;
if (fn == 0)
{
i = SockName - SockPath;
- if (i > sizeof(fnbuf) - 9)
+ if (i > (int)sizeof(fnbuf) - 9)
i = 0;
strncpy(fnbuf, SockPath, i);
strcpy(fnbuf + i, ".termcap");
@@ -770,6 +767,10 @@ char *cmd;
case 0:
display = p->w_pdisplay;
displays = 0;
+#ifdef DEBUG
+ if (dfp && dfp != stderr)
+ fclose(dfp);
+#endif
close(0);
dup(pi[0]);
closeallfiles(0);
@@ -786,3 +787,50 @@ char *cmd;
close(pi[0]);
return pi[1];
}
+
+int
+readpipe(cmdv)
+char **cmdv;
+{
+ int pi[2];
+
+ if (pipe(pi))
+ {
+ Msg(errno, "pipe");
+ return -1;
+ }
+ switch (fork())
+ {
+ case -1:
+ Msg(errno, "fork");
+ return -1;
+ case 0:
+ displays = 0;
+#ifdef DEBUG
+ if (dfp && dfp != stderr)
+ fclose(dfp);
+#endif
+ close(1);
+ if (dup(pi[1]) != 1)
+ {
+ close(pi[1]);
+ Panic(0, "dup");
+ }
+ closeallfiles(1);
+ if (setgid(real_gid) || setuid(real_uid))
+ {
+ close(1);
+ Panic(errno, "setuid/setgid");
+ }
+#ifdef SIGPIPE
+ signal(SIGPIPE, SIG_DFL);
+#endif
+ execvp(*cmdv, cmdv);
+ close(1);
+ Panic(errno, *cmdv);
+ default:
+ break;
+ }
+ close(pi[1]);
+ return pi[0];
+}
diff --git a/help.c b/help.c
index 2e5ed81..6df0c4e 100644
--- a/help.c
+++ b/help.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: help.c,v 1.7 1994/05/31 12:32:04 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
@@ -35,9 +32,10 @@ char version[40]; /* initialised by main() */
extern struct layer *flayer;
extern struct display *display, *displays;
+extern struct win *windows;
extern char *noargs[];
extern struct mchar mchar_blank, mchar_so;
-extern char *blank;
+extern unsigned char *blank;
extern struct win *wtab[];
static void PadStr __P((char *, int, int, int));
@@ -68,7 +66,7 @@ char *myname, *message, *arg;
printf("-l Login mode on (update %s), -ln = off.\n", UTMPFILE);
#endif
printf("-list or -ls. Do nothing, just list our SockDir.\n");
- printf("-L Terminal's last character can be safely updated.\n");
+ printf("-L Turn on output logging.\n");
printf("-m ignore $STY variable, do create a new screen session.\n");
printf("-O Choose optimal output rather than exact vt100 emulation.\n");
printf("-p window Preselect the named window if it exists.\n");
@@ -362,6 +360,7 @@ int x, y;
char buf[256];
int del, l;
char *bp, *cp, **pp;
+ int *lp, ll;
int fr;
struct mchar mchar_dol;
@@ -381,18 +380,20 @@ int x, y;
LPutChar(flayer, fr ? &mchar_blank : &mchar_dol, x++, y);
pp = act->args;
+ lp = act->argl;
while (pp && (cp = *pp) != NULL)
{
del = 0;
bp = buf;
- if (!*cp || (index(cp, ' ') != NULL))
+ ll = *lp++;
+ if (!ll || (index(cp, ' ') != NULL))
{
if (index(cp, '\'') != NULL)
*bp++ = del = '"';
else
*bp++ = del = '\'';
}
- while (*cp && bp < buf + 250)
+ while (ll-- && bp < buf + 250)
bp += AddXChar(bp, *(unsigned char *)cp++);
if (del)
*bp++ = del;
@@ -482,7 +483,7 @@ static const char cpmsg[] = "\
\n\
Screen version %v\n\
\n\
-Copyright (c) 1993-2000 Juergen Weigert, Michael Schroeder\n\
+Copyright (c) 1993-2002 Juergen Weigert, Michael Schroeder\n\
Copyright (c) 1987 Oliver Laumann\n\
\n\
This program is free software; you can redistribute it and/or \
@@ -759,6 +760,7 @@ displayspage()
char tbuf[80];
struct display *d;
struct win *w;
+ static char *blockstates[5] = {"nb", "NB", "Z<", "Z>", "BL"};
LClearAll(flayer, 0);
@@ -775,8 +777,7 @@ displayspage()
sprintf(tbuf, "%-10.10s%4dx%-4d%10.10s@%-16.16s%s",
d->d_termname, d->d_width, d->d_height, d->d_user->u_name,
d->d_usertty,
- d->d_nonblock ? ((( d->d_obufp - d->d_obuf) > d->d_obufmax) ?
- "NB" : "nb") : " ");
+ (d->d_blocked || d->d_nonblock >= 0) && d->d_blocked <= 4 ? blockstates[d->d_blocked] : " ");
if (w)
{
@@ -842,6 +843,8 @@ int y, xs, xe, isblank;
**
*/
+struct wlistdata;
+
static void WListProcess __P((char **, int *));
static void WListRedisplayLine __P((int, int, int, int));
static void wlistpage __P((void));
@@ -851,6 +854,7 @@ static void WListMove __P((int, int));
static void WListUpdate __P((struct win *));
static int WListNormalize __P((void));
static int WListResize __P((int, int));
+static int WListNext __P((struct wlistdata *, int, int));
struct wlistdata {
int pos;
@@ -860,6 +864,7 @@ struct wlistdata {
int first;
int last;
int start;
+ int order;
};
static struct LayFuncs WListLf =
@@ -897,6 +902,7 @@ int *plen;
{
int done = 0;
struct wlistdata *wlistdata;
+ struct display *olddisplay = display;
int h;
ASSERT(flayer);
@@ -904,13 +910,28 @@ int *plen;
h = wlistdata->numwin;
while (!done && *plen > 0)
{
+ if ((unsigned char)**ppbuf >= '0' && (unsigned char)**ppbuf <= '9')
+ {
+ int n = (unsigned char)**ppbuf - '0';
+ int d = 0;
+ if (n < MAXWIN && wtab[n])
+ {
+ int i;
+ for (d = -wlistdata->npos, i = WListNext(wlistdata, -1, 0); i != n; i = WListNext(wlistdata, i, 1), d++)
+ ;
+ }
+ if (d)
+ WListMove(d, -1);
+ }
switch ((unsigned char)**ppbuf)
{
- case 0220:
+ case 0220: /* up */
+ case 16: /* ^P like emacs */
case 'k':
WListMove(-1, -1);
break;
- case 0216:
+ case 0216: /* down */
+ case 14: /* ^N like emacs */
case 'j':
WListMove(1, -1);
break;
@@ -928,10 +949,10 @@ int *plen;
case 'f':
WListMove(h, -1);
break;
- case 0201:
+ case 0201: /* home */
WListMove(-wlistdata->pos, -1);
break;
- case 0205:
+ case 0205: /* end */
WListMove(MAXWIN, -1);
break;
case '\r':
@@ -947,12 +968,15 @@ int *plen;
#endif
else
ExitOverlayPage(); /* no need to redisplay */
+ /* restore display, don't switch wrong user */
+ display = olddisplay;
SwitchWindow(h);
break;
case 0033:
case 0007:
h = wlistdata->start;
HelpAbort();
+ display = olddisplay;
if (h >= 0 && wtab[h])
SwitchWindow(h);
else if (h == -2)
@@ -981,7 +1005,7 @@ int isblank;
int n;
display = 0;
- str = MakeWinMsgEv(wliststr, wtab[i], '%', flayer->l_width, (struct event *)0);
+ str = MakeWinMsgEv(wliststr, wtab[i], '%', flayer->l_width, (struct event *)0, 0);
n = strlen(str);
if (i != pos && isblank)
while (n && str[n - 1] == ' ')
@@ -996,28 +1020,82 @@ int isblank;
return;
}
+static int
+WListNext(wlistdata, old, delta)
+struct wlistdata *wlistdata;
+int old, delta;
+{
+ int i, j;
+
+ if (old == MAXWIN)
+ return MAXWIN;
+ if (wlistdata->order == WLIST_NUM)
+ {
+ if (old == -1)
+ {
+ for (old = 0; old < MAXWIN; old++)
+ if (wtab[old])
+ break;
+ if (old == MAXWIN)
+ return old;
+ }
+ if (!wtab[old])
+ return MAXWIN;
+ i = old;
+ while (delta > 0 && i < MAXWIN - 1)
+ if (wtab[++i])
+ {
+ old = i;
+ delta--;
+ }
+ while (delta < 0 && i > 0)
+ if (wtab[--i])
+ {
+ old = i;
+ delta++;
+ }
+ }
+ else
+ {
+ if (old == -1)
+ old = windows->w_number;
+ if (!wtab[old])
+ return MAXWIN;
+ for (; delta > 0; delta--)
+ if (wtab[old]->w_next)
+ old = wtab[old]->w_next->w_number;
+ if (delta < 0)
+ {
+ for (j = i = windows->w_number; j != old; )
+ {
+ if (delta++ >= 0 && wtab[i]->w_next)
+ i = wtab[i]->w_next->w_number;
+ if (wtab[j]->w_next)
+ j = wtab[j]->w_next->w_number;
+ }
+ old = i;
+ }
+ }
+ return old;
+}
+
static void
WListLines(up, oldpos)
int up, oldpos;
{
struct wlistdata *wlistdata;
int ypos, pos;
- int y, i, first;
+ int y, i, oldi;
wlistdata = (struct wlistdata *)flayer->l_data;
ypos = wlistdata->ypos;
pos = wlistdata->pos;
- first = ypos;
- for (i = pos; i >= 0; i--)
- if (wtab[i] && first-- == 0)
- break;
+ i = WListNext(wlistdata, pos, -ypos);
for (y = 0; y < wlistdata->numwin; y++)
{
- while (i < MAXWIN && wtab[i] == 0)
- i++;
- if (i == MAXWIN)
- continue;
+ if (i == MAXWIN || !wtab[i])
+ return;
if (y == 0)
wlistdata->first = i;
wlistdata->last = i;
@@ -1025,7 +1103,10 @@ int up, oldpos;
WListLine(y, i, pos, i != oldpos);
if (i == pos)
wlistdata->ypos = y;
- i++;
+ oldi = i;
+ i = WListNext(wlistdata, i, 1);
+ if (i == MAXWIN || i == oldi)
+ break;
}
}
@@ -1033,7 +1114,7 @@ static int
WListNormalize()
{
struct wlistdata *wlistdata;
- int i, n;
+ int i, oldi, n;
int ypos, pos;
wlistdata = (struct wlistdata *)flayer->l_data;
@@ -1043,14 +1124,12 @@ WListNormalize()
ypos = 0;
if (ypos >= wlistdata->numwin)
ypos = wlistdata->numwin - 1;
- for (n = 0, i = pos; i < MAXWIN && n < wlistdata->numwin; i++)
- if (wtab[i])
- n++;
+ for (n = 0, oldi = MAXWIN, i = pos; i != MAXWIN && i != oldi && n < wlistdata->numwin; oldi = i, i = WListNext(wlistdata, i, 1))
+ n++;
if (ypos < wlistdata->numwin - n)
ypos = wlistdata->numwin - n;
- for (n = i = 0; i < pos; i++)
- if (wtab[i])
- n++;
+ for (n = 0, oldi = MAXWIN, i = WListNext(wlistdata, -1, 0); i != MAXWIN && i != oldi && i != pos; oldi = i, i = WListNext(wlistdata, i, 1))
+ n++;
if (ypos > n)
ypos = n;
wlistdata->ypos = ypos;
@@ -1065,27 +1144,14 @@ int ypos;
{
struct wlistdata *wlistdata;
int oldpos, oldypos, oldnpos;
- int pos, up, i;
+ int pos, up;
wlistdata = (struct wlistdata *)flayer->l_data;
oldpos = wlistdata->pos;
oldypos = wlistdata->ypos;
oldnpos = wlistdata->npos;
wlistdata->ypos = ypos == -1 ? oldypos + num : ypos;
- pos = oldpos;
- i = pos;
- while (num > 0 && i < MAXWIN - 1)
- if (wtab[++i])
- {
- pos = i;
- num--;
- }
- while (num < 0 && i > 0)
- if (wtab[--i])
- {
- pos = i;
- num++;
- }
+ pos = WListNext(wlistdata, oldpos, num);
wlistdata->pos = pos;
ypos = WListNormalize();
up = wlistdata->npos - ypos - (oldnpos - oldypos);
@@ -1120,8 +1186,9 @@ int y, xs, xe, isblank;
}
void
-display_wlist(onblank)
+display_wlist(onblank, order)
int onblank;
+int order;
{
struct win *p;
struct wlistdata *wlistdata;
@@ -1157,8 +1224,9 @@ int onblank;
flayer->l_x = 0;
flayer->l_y = flayer->l_height - 1;
wlistdata->start = onblank && p ? p->w_number : -1;
- wlistdata->pos = p ? p->w_number : 0;
- wlistdata->ypos = 0;
+ wlistdata->order = order;
+ wlistdata->pos = p ? p->w_number : WListNext(wlistdata, -1, 0);
+ wlistdata->ypos = wlistdata->npos = 0;
wlistdata->numwin= flayer->l_height - 3;
wlistpage();
}
@@ -1179,19 +1247,24 @@ wlistpage()
pos = wlistdata->pos;
if (wtab[pos] == 0)
{
- /* find new position */
- while(++pos < MAXWIN)
- if (wtab[pos])
- break;
- if (pos == MAXWIN)
- while (--pos > 0)
- if (wtab[pos])
- break;
+ if (wlistdata->order == WLIST_MRU)
+ pos = WListNext(wlistdata, -1, wlistdata->npos);
+ else
+ {
+ /* find new position */
+ while(++pos < MAXWIN)
+ if (wtab[pos])
+ break;
+ if (pos == MAXWIN)
+ while (--pos > 0)
+ if (wtab[pos])
+ break;
+ }
}
wlistdata->pos = pos;
display = 0;
- str = MakeWinMsgEv(wlisttit, (struct win *)0, '%', flayer->l_width, (struct event *)0);
+ str = MakeWinMsgEv(wlisttit, (struct win *)0, '%', flayer->l_width, (struct event *)0, 0);
LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 0);
WListNormalize();
WListLines(wlistdata->numwin, -1);
@@ -1212,18 +1285,14 @@ struct win *p;
}
wlistdata = (struct wlistdata *)flayer->l_data;
n = p->w_number;
- if (n < wlistdata->first || n > wlistdata->last)
+ if (wlistdata->order == WLIST_NUM && (n < wlistdata->first || n > wlistdata->last))
return;
i = wlistdata->first;
for (y = 0; y < wlistdata->numwin; y++)
{
- while (i < MAXWIN && wtab[i] == 0)
- i++;
- if (i == MAXWIN)
- return;
if (i == n)
break;
- i++;
+ i = WListNext(wlistdata, i, 1);
}
if (y == wlistdata->numwin)
return;
@@ -1241,6 +1310,26 @@ struct win *p;
CV_CALL(cv, WListUpdate(p));
}
+void
+WListLinkChanged()
+{
+ struct display *olddisplay = display;
+ struct canvas *cv;
+ struct wlistdata *wlistdata;
+
+ for (display = displays; display; display = display->d_next)
+ for (cv = D_cvlist; cv; cv = cv->c_next)
+ {
+ if (cv->c_layer->l_layfn != &WListLf)
+ continue;
+ wlistdata = (struct wlistdata *)cv->c_layer->l_data;
+ if (wlistdata->order != WLIST_MRU)
+ continue;
+ CV_CALL(cv, WListUpdate(0));
+ }
+ display = olddisplay;
+}
+
int
InWList()
{
@@ -1259,9 +1348,12 @@ InWList()
#ifdef MAPKEYS
-extern char *kmap_extras[];
-extern int kmap_extras_fl[];
extern struct term term[];
+extern struct kmap_ext *kmap_exts;
+extern int kmap_extn;
+extern struct action dmtab[];
+extern struct action mmtab[];
+
static void BindkeyProcess __P((char **, int *));
static void BindkeyAbort __P((void));
@@ -1311,7 +1403,7 @@ struct action *tab;
bindkeydata->tab = tab;
n = 0;
- for (i = 0; i < KMAP_KEYS+KMAP_AKEYS+KMAP_EXT; i++)
+ for (i = 0; i < KMAP_KEYS+KMAP_AKEYS+kmap_extn; i++)
{
if (tab[i].nr != RC_ILLEGAL)
n++;
@@ -1337,8 +1429,9 @@ static void
bindkeypage()
{
struct bindkeydata *bindkeydata;
+ struct kmap_ext *kme;
char tbuf[256];
- int del, i, ch, y;
+ int del, i, y, sl;
struct action *act;
char *xch, *s, *p;
@@ -1349,33 +1442,43 @@ bindkeypage()
sprintf(tbuf, "%s key bindings, page %d of %d.", bindkeydata->title, bindkeydata->page, bindkeydata->pages);
centerline(tbuf, 0);
y = 2;
- for (i = bindkeydata->pos; i < KMAP_KEYS+KMAP_AKEYS+KMAP_EXT && y < flayer->l_height - 3; i++)
+ for (i = bindkeydata->pos; i < KMAP_KEYS+KMAP_AKEYS+kmap_extn && y < flayer->l_height - 3; i++)
{
p = tbuf;
- act = &bindkeydata->tab[i];
- if (act->nr == RC_ILLEGAL)
- continue;
xch = " ";
if (i < KMAP_KEYS)
{
+ act = &bindkeydata->tab[i];
+ if (act->nr == RC_ILLEGAL)
+ continue;
del = *p++ = ':';
s = term[i + T_CAPS].tcname;
+ sl = s ? strlen(s) : 0;
}
else if (i < KMAP_KEYS+KMAP_AKEYS)
{
+ act = &bindkeydata->tab[i];
+ if (act->nr == RC_ILLEGAL)
+ continue;
del = *p++ = ':';
s = term[i + (T_CAPS - T_OCAPS + T_CURSOR)].tcname;
+ sl = s ? strlen(s) : 0;
xch = "[A]";
}
else
{
+ kme = kmap_exts + (i - (KMAP_KEYS+KMAP_AKEYS));
del = 0;
- s = kmap_extras[i - (KMAP_KEYS+KMAP_AKEYS)];
- if (kmap_extras_fl[i - (KMAP_KEYS+KMAP_AKEYS)])
+ s = kme->str;
+ sl = kme->fl & ~KMAP_NOTIMEOUT;
+ if ((kme->fl & KMAP_NOTIMEOUT) != 0)
xch = "[T]";
+ act = bindkeydata->tab == dmtab ? &kme->dm : bindkeydata->tab == mmtab ? &kme->mm : &kme->um;
+ if (act->nr == RC_ILLEGAL)
+ continue;
}
- while ((ch = *(unsigned char *)s++))
- p += AddXChar(p, ch);
+ while (sl-- > 0)
+ p += AddXChar(p, *(unsigned char *)s++);
if (del)
*p++ = del;
*p++ = ' ';
@@ -1453,6 +1556,60 @@ int y, xs, xe, isblank;
#endif /* MAPKEYS */
+/*
+**
+** The zmodem active page
+**
+*/
+
+#ifdef ZMODEM
+
+static void ZmodemRedisplayLine __P((int, int, int, int));
+static int ZmodemResize __P((int, int));
+
+static struct LayFuncs ZmodemLf =
+{
+ DefProcess,
+ 0,
+ ZmodemRedisplayLine,
+ DefClearLine,
+ DefRewrite,
+ ZmodemResize,
+ DefRestore
+};
+
+/*ARGSUSED*/
+static int
+ZmodemResize(wi, he)
+int wi, he;
+{
+ flayer->l_width = wi;
+ flayer->l_height = he;
+ flayer->l_x = flayer->l_width > 32 ? 32 : 0;
+ return 0;
+}
+
+static void
+ZmodemRedisplayLine(y, xs, xe, isblank)
+int y, xs, xe, isblank;
+{
+ DefRedisplayLine(y, xs, xe, isblank);
+ if (y == 0 && xs == 0)
+ LPutStr(flayer, "Zmodem active on another display", flayer->l_width > 32 ? 32 : flayer->l_width, &mchar_blank, 0, 0);
+}
+
+void
+ZmodemPage()
+{
+ if (InitOverlayPage(1, &ZmodemLf, 1))
+ return;
+ LRefreshAll(flayer, 0);
+ flayer->l_x = flayer->l_width > 32 ? 32 : 0;
+ flayer->l_y = 0;
+}
+
+#endif
+
static void
@@ -1467,6 +1624,5 @@ int n, x, y;
l = n;
LPutStr(flayer, str, l, &mchar_blank, x, y);
if (l < n)
- LPutStr(flayer, blank, n - l, &mchar_blank, x + l, y);
+ LPutStr(flayer, (char *)blank, n - l, &mchar_blank, x + l, y);
}
-
diff --git a/image.h b/image.h
index 55d795f..bcf7a4a 100644
--- a/image.h
+++ b/image.h
@@ -53,18 +53,18 @@
struct mchar {
unsigned char image;
unsigned char attr;
-IFFONT( unsigned char font;)
-IFCOLOR( unsigned char color;)
-IFCOLORX(unsigned char colorx;)
-IFDWCHAR(unsigned char mbcs;)
+IFFONT( unsigned char font; )
+IFCOLOR( unsigned char color; )
+IFCOLORX(unsigned char colorx; )
+IFDWCHAR(unsigned char mbcs; )
};
struct mline {
unsigned char *image;
unsigned char *attr;
-IFFONT( unsigned char *font;)
-IFCOLOR( unsigned char *color;)
-IFCOLORX(unsigned char *colorx;)
+IFFONT( unsigned char *font; )
+IFCOLOR( unsigned char *color; )
+IFCOLORX(unsigned char *colorx; )
};
@@ -72,66 +72,66 @@ IFCOLORX(unsigned char *colorx;)
#define save_mline(ml, n) do { \
bcopy((char *)(ml)->image, (char *)mline_old.image, (n)); \
bcopy((char *)(ml)->attr, (char *)mline_old.attr, (n)); \
-IFFONT( bcopy((char *)(ml)->font, (char *)mline_old.font, (n)); )\
-IFCOLOR( bcopy((char *)(ml)->color, (char *)mline_old.color, (n)); )\
-IFCOLORX(bcopy((char *)(ml)->colorx, (char *)mline_old.colorx, (n)); )\
+IFFONT( bcopy((char *)(ml)->font, (char *)mline_old.font, (n)); ) \
+IFCOLOR( bcopy((char *)(ml)->color, (char *)mline_old.color, (n)); ) \
+IFCOLORX(bcopy((char *)(ml)->colorx, (char *)mline_old.colorx, (n)); ) \
} while (0)
#define bcopy_mline(ml, xf, xt, n) do { \
bcopy((char *)(ml)->image + (xf), (char *)(ml)->image + (xt), (n)); \
bcopy((char *)(ml)->attr + (xf), (char *)(ml)->attr + (xt), (n)); \
-IFFONT( bcopy((char *)(ml)->font + (xf), (char *)(ml)->font + (xt), (n)); )\
-IFCOLOR( bcopy((char *)(ml)->color + (xf), (char *)(ml)->color + (xt), (n)); )\
-IFCOLORX(bcopy((char *)(ml)->colorx + (xf), (char *)(ml)->colorx + (xt), (n));)\
+IFFONT( bcopy((char *)(ml)->font + (xf), (char *)(ml)->font + (xt), (n)); ) \
+IFCOLOR( bcopy((char *)(ml)->color + (xf), (char *)(ml)->color + (xt), (n)); ) \
+IFCOLORX(bcopy((char *)(ml)->colorx + (xf), (char *)(ml)->colorx + (xt), (n));) \
} while (0)
#define clear_mline(ml, x, n) do { \
bclear((char *)(ml)->image + (x), (n)); \
if ((ml)->attr != null) bzero((char *)(ml)->attr + (x), (n)); \
-IFFONT( if ((ml)->font != null) bzero((char *)(ml)->font + (x), (n)); )\
-IFCOLOR (if ((ml)->color!= null) bzero((char *)(ml)->color + (x), (n)); )\
-IFCOLORX(if ((ml)->colorx!= null) bzero((char *)(ml)->colorx + (x), (n)); )\
+IFFONT( if ((ml)->font != null) bzero((char *)(ml)->font + (x), (n)); ) \
+IFCOLOR( if ((ml)->color!= null) bzero((char *)(ml)->color + (x), (n)); ) \
+IFCOLORX(if ((ml)->colorx!= null) bzero((char *)(ml)->colorx + (x), (n)); ) \
} while (0)
#define cmp_mline(ml1, ml2, x) ( \
(ml1)->image[x] == (ml2)->image[x] \
&& (ml1)->attr[x] == (ml2)->attr[x] \
-IFFONT( && (ml1)->font[x] == (ml2)->font[x] )\
-IFCOLOR( && (ml1)->color[x] == (ml2)->color[x] )\
-IFCOLORX(&& (ml1)->colorx[x] == (ml2)->colorx[x] )\
+IFFONT( && (ml1)->font[x] == (ml2)->font[x] ) \
+IFCOLOR( && (ml1)->color[x] == (ml2)->color[x] ) \
+IFCOLORX(&& (ml1)->colorx[x] == (ml2)->colorx[x] ) \
)
#define cmp_mchar(mc1, mc2) ( \
(mc1)->image == (mc2)->image \
&& (mc1)->attr == (mc2)->attr \
-IFFONT( && (mc1)->font == (mc2)->font )\
-IFCOLOR( && (mc1)->color == (mc2)->color )\
-IFCOLORX(&& (mc1)->colorx == (mc2)->colorx )\
+IFFONT( && (mc1)->font == (mc2)->font ) \
+IFCOLOR( && (mc1)->color == (mc2)->color ) \
+IFCOLORX(&& (mc1)->colorx == (mc2)->colorx ) \
)
#define cmp_mchar_mline(mc, ml, x) ( \
(mc)->image == (ml)->image[x] \
&& (mc)->attr == (ml)->attr[x] \
-IFFONT( && (mc)->font == (ml)->font[x] )\
-IFCOLOR( && (mc)->color == (ml)->color[x] )\
-IFCOLORX(&& (mc)->colorx == (ml)->colorx[x] )\
+IFFONT( && (mc)->font == (ml)->font[x] ) \
+IFCOLOR( && (mc)->color == (ml)->color[x] ) \
+IFCOLORX(&& (mc)->colorx == (ml)->colorx[x] ) \
)
#define copy_mchar2mline(mc, ml, x) do { \
(ml)->image[x] = (mc)->image; \
(ml)->attr[x] = (mc)->attr; \
-IFFONT( (ml)->font[x] = (mc)->font; )\
-IFCOLOR( (ml)->color[x] = (mc)->color; )\
-IFCOLORX((ml)->colorx[x] = (mc)->colorx; )\
+IFFONT( (ml)->font[x] = (mc)->font; ) \
+IFCOLOR( (ml)->color[x] = (mc)->color; ) \
+IFCOLORX((ml)->colorx[x] = (mc)->colorx; ) \
} while (0)
#define copy_mline2mchar(mc, ml, x) do { \
(mc)->image = (ml)->image[x]; \
(mc)->attr = (ml)->attr[x]; \
-IFFONT( (mc)->font = (ml)->font[x]; )\
-IFCOLOR( (mc)->color = (ml)->color[x]; )\
-IFCOLORX((mc)->colorx = (ml)->colorx[x]; )\
-IFDWCHAR((mc)->mbcs = 0; )\
+IFFONT( (mc)->font = (ml)->font[x]; ) \
+IFCOLOR( (mc)->color = (ml)->color[x]; ) \
+IFCOLORX((mc)->colorx = (ml)->colorx[x]; ) \
+IFDWCHAR((mc)->mbcs = 0; ) \
} while (0)
#ifdef COLOR
@@ -139,8 +139,8 @@ IFDWCHAR((mc)->mbcs = 0; )\
# ifdef COLORS256
# define rend_getbg(mc) (((mc)->color & 0xf0) >> 4 | ((mc)->attr & A_BBG ? 0x100 : 0) | ((mc)->colorx & 0xf0))
# define rend_setbg(mc, c) ((mc)->color = ((mc)->color & 0x0f) | (c << 4 & 0xf0), (mc)->colorx = ((mc)->colorx & 0x0f) | (c & 0xf0), (mc)->attr = ((mc)->attr | A_BBG) ^ (c & 0x100 ? 0 : A_BBG))
-# define rend_getfg(mc) (((mc)->color & 0x0f) | ((mc)->attr & A_BFG ? 0x100 : 0) | ((mc)->colorx & 0x0f << 4))
-# define rend_setfg(mc, c) ((mc)->color = ((mc)->color & 0xf0) | (c & 0x0f), (mc)->colorx = ((mc)->colorx & 0xf0) | (c & 0xf0 >> 4), (mc)->attr = ((mc)->attr | A_BFG) ^ (c & 0x100 ? 0 : A_BFG))
+# define rend_getfg(mc) (((mc)->color & 0x0f) | ((mc)->attr & A_BFG ? 0x100 : 0) | (((mc)->colorx & 0x0f) << 4))
+# define rend_setfg(mc, c) ((mc)->color = ((mc)->color & 0xf0) | (c & 0x0f), (mc)->colorx = ((mc)->colorx & 0xf0) | ((c & 0xf0) >> 4), (mc)->attr = ((mc)->attr | A_BFG) ^ (c & 0x100 ? 0 : A_BFG))
# define rend_setdefault(mc) ((mc)->color = (mc)->colorx = 0, (mc)->attr &= ~(A_BBG|A_BFG))
# else
# define rend_getbg(mc) (((mc)->color & 0xf0) >> 4 | ((mc)->attr & A_BBG ? 0x100 : 0))
diff --git a/input.c b/input.c
index 39a8e83..7dadc0c 100644
--- a/input.c
+++ b/input.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: input.c,v 1.2 1994/05/31 12:32:08 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
#include "screen.h"
diff --git a/kmapdef.c.dist b/kmapdef.c.dist
index fd7bfbb..71a5b53 100644
--- a/kmapdef.c.dist
+++ b/kmapdef.c.dist
@@ -46,6 +46,14 @@ char *kmapdef[] = {
0,
0,
0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
"\033[1~",
0,
"\033[4~",
@@ -111,6 +119,14 @@ char *kmapmdef[] = {
0,
0,
0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
"\201",
0,
"\205",
diff --git a/layer.c b/layer.c
index 5bd37aa..cc98f78 100644
--- a/layer.c
+++ b/layer.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: search.c,v 1.2 1994/05/31 12:32:57 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
@@ -101,6 +98,8 @@ int x, y;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
if (cv != D_forecv)
continue;
x2 = x + cv->c_xoff;
@@ -154,6 +153,8 @@ struct mline *ol;
if (xs2 > xe2)
continue;
display = cv->c_display;
+ if (D_blocked)
+ continue;
ScrollH(y2, xs2, xe2, n, bce, ol ? mloff(ol, -vp->v_xoff) : 0);
if (xe2 - xs2 == xe - xs)
continue;
@@ -206,6 +207,8 @@ int bce;
if (ys2 > ye2 || xs2 > xe2)
continue;
display = cv->c_display;
+ if (D_blocked)
+ continue;
#if 0
ScrollV(xs2, ys2, xe2, ye2, n, bce);
#else
@@ -281,6 +284,8 @@ struct mline *ol;
if (xs2 > xe2)
continue;
display = cv->c_display;
+ if (D_blocked)
+ continue;
rol = RECODE_MLINE(ol);
InsChar(RECODE_MCHAR(c2), xs2, xe2, y2, mloff(rol, -vp->v_xoff));
if (f)
@@ -307,6 +312,8 @@ int x, y;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
for (vp = cv->c_vplist; vp; vp = vp->v_next)
{
y2 = y + vp->v_yoff;
@@ -358,6 +365,8 @@ int x, y;
if (xs2 > xe2)
continue;
display = cv->c_display;
+ if (D_blocked)
+ continue;
GotoPos(xs2, y2);
SetRendition(r);
s2 = s + xs2 - x - vp->v_xoff;
@@ -420,6 +429,8 @@ int x, y;
if (xs2 > xe2)
continue;
display = cv->c_display;
+ if (D_blocked)
+ continue;
GotoPos(xs2, y2);
SetRendition(r);
len2 = xe2 - (x + vp->v_xoff) + 1;
@@ -476,6 +487,8 @@ struct mline *ol;
if (xs2 > xe2)
continue;
display = cv->c_display;
+ if (D_blocked)
+ continue;
ClearLine(ol ? mloff(RECODE_MLINE(ol), -vp->v_xoff) : (struct mline *)0, y2, xs2, xe2, bce);
}
}
@@ -500,50 +513,55 @@ int uself;
if (xe >= l->l_width)
xe = l->l_width - 1;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
- for (vp = cv->c_vplist; vp; vp = vp->v_next)
- {
- xs2 = xs + vp->v_xoff;
- xe2 = xe + vp->v_xoff;
- ys2 = ys + vp->v_yoff;
- ye2 = ye + vp->v_yoff;
- if (xs2 < vp->v_xs)
- xs2 = vp->v_xs;
- if (xe2 > vp->v_xe)
- xe2 = vp->v_xe;
- if (xs2 > vp->v_xe)
- ys2++;
- if (xe2 < vp->v_xs)
- ye2--;
- if (ys2 < vp->v_ys)
- ys2 = vp->v_ys;
- if (ye2 > vp->v_ye)
- ye2 = vp->v_ye;
- if (ys2 > ye2)
- continue;
+ {
+ display = cv->c_display;
+ if (D_blocked)
+ continue;
+ for (vp = cv->c_vplist; vp; vp = vp->v_next)
+ {
+ xs2 = xs + vp->v_xoff;
+ xe2 = xe + vp->v_xoff;
+ ys2 = ys + vp->v_yoff;
+ ye2 = ye + vp->v_yoff;
+ if (xs2 < vp->v_xs)
+ xs2 = vp->v_xs;
+ if (xe2 > vp->v_xe)
+ xe2 = vp->v_xe;
+ if (xs2 > vp->v_xe)
+ ys2++;
+ if (xe2 < vp->v_xs)
+ ye2--;
+ if (ys2 < vp->v_ys)
+ ys2 = vp->v_ys;
+ if (ye2 > vp->v_ye)
+ ye2 = vp->v_ye;
+ if (ys2 > ye2)
+ continue;
#if 0
- xcs = vp->v_xoff;
- xce = l->l_width - 1 + vp->v_xoff;
- if (xcs < vp->v_xs)
- xcs = vp->v_xs;
- if (xce > vp->v_xe)
- xce = vp->v_xe;
- if (xcs > xce)
- continue;
- if (ys2 != ys + vp->v_yoff)
- xs2 = xcs;
- if (ye2 != ye + vp->v_yoff)
- xe2 = xce;
- display = cv->c_display;
- ClearArea(xs2, ys2, xcs, xce, xe2, ye2, bce, uself);
+ xcs = vp->v_xoff;
+ xce = l->l_width - 1 + vp->v_xoff;
+ if (xcs < vp->v_xs)
+ xcs = vp->v_xs;
+ if (xce > vp->v_xe)
+ xce = vp->v_xe;
+ if (xcs > xce)
+ continue;
+ if (ys2 != ys + vp->v_yoff)
+ xs2 = xcs;
+ if (ye2 != ye + vp->v_yoff)
+ xe2 = xce;
+ display = cv->c_display;
+ ClearArea(xs2, ys2, xcs, xce, xe2, ye2, bce, uself);
#else
- if (xs == 0 || ys2 != ys + vp->v_yoff)
- xs2 = vp->v_xs;
- if (xe == l->l_width - 1 || ye2 != ye + vp->v_yoff)
- xe2 = vp->v_xe;
- display = cv->c_display;
- ClearArea(xs2, ys2, vp->v_xs, vp->v_xe, xe2, ye2, bce, uself);
+ if (xs == 0 || ys2 != ys + vp->v_yoff)
+ xs2 = vp->v_xs;
+ if (xe == l->l_width - 1 || ye2 != ye + vp->v_yoff)
+ xe2 = vp->v_xe;
+ display = cv->c_display;
+ ClearArea(xs2, ys2, vp->v_xs, vp->v_xe, xe2, ye2, bce, uself);
#endif
- }
+ }
+ }
}
void
@@ -564,24 +582,29 @@ int isblank;
}
#endif
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
- for (vp = cv->c_vplist; vp; vp = vp->v_next)
- {
- xs2 = xs + vp->v_xoff;
- xe2 = xe + vp->v_xoff;
- y2 = y + vp->v_yoff;
- if (y2 < vp->v_ys || y2 > vp->v_ye)
- continue;
- if (xs2 < vp->v_xs)
- xs2 = vp->v_xs;
- if (xe2 > vp->v_xe)
- xe2 = vp->v_xe;
- if (xs2 > xe2)
- continue;
- display = cv->c_display;
- debug3("LCDisplayLine: DisplayLine %d, %d-%d", y2, xs2, xe2);
- debug1(" mloff = %d\n", -vp->v_xoff);
- DisplayLine(isblank ? &mline_blank : &mline_null, mloff(RECODE_MLINE(ml), -vp->v_xoff), y2, xs2, xe2);
- }
+ {
+ display = cv->c_display;
+ if (D_blocked)
+ continue;
+ for (vp = cv->c_vplist; vp; vp = vp->v_next)
+ {
+ xs2 = xs + vp->v_xoff;
+ xe2 = xe + vp->v_xoff;
+ y2 = y + vp->v_yoff;
+ if (y2 < vp->v_ys || y2 > vp->v_ye)
+ continue;
+ if (xs2 < vp->v_xs)
+ xs2 = vp->v_xs;
+ if (xe2 > vp->v_xe)
+ xe2 = vp->v_xe;
+ if (xs2 > xe2)
+ continue;
+ display = cv->c_display;
+ debug3("LCDisplayLine: DisplayLine %d, %d-%d", y2, xs2, xe2);
+ debug1(" mloff = %d\n", -vp->v_xoff);
+ DisplayLine(isblank ? &mline_blank : &mline_null, mloff(RECODE_MLINE(ml), -vp->v_xoff), y2, xs2, xe2);
+ }
+ }
}
void
@@ -612,14 +635,14 @@ struct layer *l;
struct mchar *r;
{
struct canvas *cv;
- struct viewport *vp;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
- for (vp = cv->c_vplist; vp; vp = vp->v_next)
- {
- display = cv->c_display;
- SetRendition(r);
- }
+ {
+ display = cv->c_display;
+ if (D_blocked)
+ continue;
+ SetRendition(r);
+ }
}
void
@@ -650,6 +673,8 @@ int ins;
{
y2 = 0; /* gcc -Wall */
display = cv->c_display;
+ if (D_blocked)
+ continue;
/* find the viewport of the wrapped character */
for (vp = cv->c_vplist; vp; vp = vp->v_next)
{
@@ -692,6 +717,8 @@ int ins;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
/* search for wrap viewport */
for (vpp = &cv->c_vplist; (vp = *vpp); vpp = &vp->v_next)
{
@@ -748,6 +775,8 @@ int vis;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
if (cv != D_forecv)
continue;
CursorVisibility(vis);
@@ -778,6 +807,8 @@ int on;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
if (cv != D_forecv)
continue;
KeypadMode(on);
@@ -793,6 +824,8 @@ int on;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
if (cv != D_forecv)
continue;
CursorkeysMode(on);
@@ -808,6 +841,8 @@ int on;
for (cv = l->l_cvlist; cv; cv = cv->c_lnext)
{
display = cv->c_display;
+ if (D_blocked)
+ continue;
if (cv != D_forecv)
continue;
MouseMode(on);
diff --git a/loadav.c b/loadav.c
index 0417a7c..8b7c44d 100644
--- a/loadav.c
+++ b/loadav.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: loadav.c,v 1.5 1994/09/06 17:00:00 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <fcntl.h>
#ifdef ultrix
@@ -310,9 +307,11 @@ InitLoadav()
close(kmemf);
return;
}
-# ifdef sgi
+# if 0 /* no longer needed (Al.Smith@aeschi.ch.eu.org) */
+# ifdef sgi
nl[0].n_value &= (unsigned long)-1 >> 1; /* clear upper bit */
-# endif /* sgi */
+# endif /* sgi */
+# endif
debug1("AvenrunSym found (0x%lx)!!\n", nl[0].n_value);
loadok = 1;
}
diff --git a/logfile.c b/logfile.c
index f1d23ff..d2eacce 100644
--- a/logfile.c
+++ b/logfile.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: logfile.c,v 1.4 1994/05/31 12:32:12 jnweiger Exp $ FAU")
-
#include <sys/types.h> /* dev_t, ino_t, off_t, ... */
#include <sys/stat.h> /* struct stat */
#include <fcntl.h> /* O_WRONLY for logfile_reopen */
diff --git a/mark.c b/mark.c
index 3e1656a..c69c6ff 100644
--- a/mark.c
+++ b/mark.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: mark.c,v 1.6 1994/05/31 12:32:15 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
@@ -144,11 +141,13 @@ int y;
* NW_BACK: search backward
* NW_ENDOFWORD: find the end of the word
* NW_MUSTMOVE: move at least one char
+ * NW_BIG: match WORDs not words
*/
#define NW_BACK (1<<0)
#define NW_ENDOFWORD (1<<1)
#define NW_MUSTMOVE (1<<2)
+#define NW_BIG (1<<3)
static void
nextword(xp, yp, flags, num)
@@ -168,6 +167,8 @@ int *xp, *yp, flags, num;
{
if (x >= xx || x < 0)
q = 0;
+ else if (flags & NW_BIG)
+ q = ml->image[x] == ' ';
else
q = is_letter(ml->image[x]);
if (oq >= 0 && oq != q)
@@ -282,7 +283,7 @@ char *pt;
c |= cf << 8;
if (c == UCS_HIDDEN)
continue;
- c = ToUtf8(pt, c);
+ c = ToUtf8_comb(pt, c);
l += c;
if (pt)
pt += c;
@@ -293,6 +294,7 @@ char *pt;
if (is_dw_font(cf))
{
c = c << 8 | (unsigned char)*im++;
+ fo++;
j++;
}
# endif
@@ -702,15 +704,17 @@ int *inlenp;
revto(cx, cy);
break;
case 'e':
+ case 'E':
if (rep_cnt == 0)
rep_cnt = 1;
- nextword(&cx, &cy, NW_ENDOFWORD|NW_MUSTMOVE, rep_cnt);
+ nextword(&cx, &cy, NW_ENDOFWORD|NW_MUSTMOVE | (od == 'E' ? NW_BIG : 0), rep_cnt);
revto(cx, cy);
break;
case 'b':
+ case 'B':
if (rep_cnt == 0)
rep_cnt = 1;
- nextword(&cx, &cy, NW_BACK|NW_ENDOFWORD|NW_MUSTMOVE, rep_cnt);
+ nextword(&cx, &cy, NW_BACK|NW_ENDOFWORD|NW_MUSTMOVE | (od == 'B' ? NW_BIG : 0), rep_cnt);
revto(cx, cy);
break;
case 'a':
@@ -1156,6 +1160,10 @@ int isblank;
if (markdata->second == 0)
{
+ if (dw_right(ml, xs, fore->w_encoding) && xs > 0)
+ xs--;
+ if (dw_left(ml, xe, fore->w_encoding) && xe < fore->w_width - 1)
+ xe++;
if (xs == 0 && y > 0 && wy > 0 && WIN(wy - 1)->image[flayer->l_width] == 0)
LCDisplayLineWrap(flayer, ml, y, xs, xe, isblank);
else
@@ -1362,6 +1370,7 @@ struct paster *pa;
free(pa->pa_pastebuf);
pa->pa_pastebuf = 0;
pa->pa_pasteptr = 0;
+ pa->pa_pastelen = 0;
pa->pa_pastelayer = 0;
evdeq(&pa->pa_slowev);
}
diff --git a/misc.c b/misc.c
index 1484aee..0ff7df8 100644
--- a/misc.c
+++ b/misc.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: misc.c,v 1.5 1994/05/31 12:32:19 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <sys/stat.h> /* mkdir() declaration */
#include <signal.h>
@@ -42,7 +39,11 @@ extern int eff_uid, real_uid;
extern int eff_gid, real_gid;
extern struct mline mline_old;
extern struct mchar mchar_blank;
-extern char *null, *blank;
+extern unsigned char *null, *blank;
+
+#ifdef HAVE_FDWALK
+static int close_func __P((void *, int));
+#endif
char *
SaveStr(str)
@@ -57,6 +58,23 @@ register const char *str;
return cp;
}
+char *
+SaveStrn(str, n)
+register const char *str;
+int n;
+{
+ register char *cp;
+
+ if ((cp = malloc(n + 1)) == NULL)
+ Panic(0, strnomem);
+ else
+ {
+ bcopy((char *)str, cp, n);
+ cp[n] = 0;
+ }
+ return cp;
+}
+
/* cheap strstr replacement */
char *
InStr(str, pat)
@@ -182,7 +200,11 @@ sigret_t (*func) __P(SIGPROTOARG);
struct sigaction osa, sa;
sa.sa_handler = func;
(void)sigemptyset(&sa.sa_mask);
+#ifdef SA_RESTART
+ sa.sa_flags = (sig == SIGCHLD ? SA_RESTART : 0);
+#else
sa.sa_flags = 0;
+#endif
if (sigaction(sig, &sa, &osa))
return (sigret_t (*)__P(SIGPROTOARG))-1;
return osa.sa_handler;
@@ -248,7 +270,7 @@ int euid;
oeuid = geteuid();
if (oeuid == euid)
return;
- if (getuid() != euid)
+ if ((int)getuid() != euid)
oeuid = getuid();
if (setreuid(oeuid, euid))
Panic(errno, "setreuid");
@@ -263,7 +285,7 @@ int egid;
oegid = getegid();
if (oegid == egid)
return;
- if (getgid() != egid)
+ if ((int)getgid() != egid)
oegid = getgid();
if (setregid(oegid, egid))
Panic(errno, "setregid");
@@ -298,7 +320,7 @@ bclear(p, n)
char *p;
int n;
{
- bcopy(blank, p, n);
+ bcopy((char *)blank, p, n);
}
@@ -311,6 +333,32 @@ int pid, sig;
(void) kill(pid, sig);
}
+#ifdef HAVE_FDWALK
+/*
+ * Modern versions of Solaris include fdwalk(3c) which allows efficient
+ * implementation of closing open descriptors; this is helpful because
+ * the default file descriptor limit has risen to 65k.
+ */
+static int
+close_func(cb_data, fd)
+void *cb_data;
+int fd;
+{
+ int except = *(int *)cb_data;
+ if (fd > 2 && fd != except)
+ (void)close(fd);
+ return (0);
+}
+
+void
+closeallfiles(except)
+int except;
+{
+ (void)fdwalk(close_func, &except);
+}
+
+#else /* HAVE_FDWALK */
+
void
closeallfiles(except)
int except;
@@ -333,6 +381,7 @@ int except;
close(f);
}
+#endif /* HAVE_FDWALK */
/*
@@ -525,80 +574,6 @@ int msec;
}
-#if 0
-struct win **
-GlobWindows(pattern)
-char *pattern;
-{
- static struct win *wv[MAXWIN + 1];
- extern struct win *windows;
- struct win *w;
- struct win **av;
- char *p;
- int t, l, ll, i;
-
- av = wv;
-
- if (!pattern)
- return NULL;
- debug1("GlobWindows pattern '%s'\n", pattern);
- t = 0;
- p = pattern;
- if (*p == '*')
- {
- t++;
- p++;
- }
- l = strlen(p);
- if (l && p[l - 1] == '*')
- {
- l--;
- p[l] = '\0';
- t += 2;
- }
-
- for (w = windows; w; w = w->w_next)
- {
- switch (t)
- {
- case 0: /* exact match */
- if (!strcmp(p, w->w_title))
- *av++ = w;
- break;
- case 1: /* suffix match */
- ll = strlen(w->w_title);
- if (l < ll && !strncmp(p, w->w_title + ll - l, l))
- *av++ = w;
- break;
- case 2: /* prefix match */
- if (!strncmp(p, w->w_title, l))
- *av++ = w;
- break;
- default: /* 3: infix match */
- ll = strlen(w->w_title);
- for (i = ll - l; i >= 0; i--)
- {
- if (!strncmp(p, w->w_title + i, l))
- {
- *av++ = w;
- break;
- }
- }
- }
- }
- *av = NULL;
-#ifdef DEBUG
- {
- struct win **pp = wv;
-
- while (--pp >= wv)
- debug1("GlobWindows: '%s'\n", (*pp)->w_title);
- }
-#endif
- return (av != wv) ? wv : NULL;
-}
-#endif
-
/*
* This uses either setenv() or putenv(). If it is putenv() we cannot dare
* to free the buffer after putenv(), unless it it the one found in putenv.c
@@ -639,163 +614,13 @@ char *value;
# endif /* NEEDSETENV */
#else /* USESETENV */
# if defined(linux) || defined(__convex__) || (BSD >= 199103)
- setenv(var, value, 0);
+ setenv(var, value, 1);
# else
setenv(var, value);
# endif /* linux || convex || BSD >= 199103 */
#endif /* USESETENV */
}
-/*
- * "$HOST blafoo" -> "localhost blafoo"
- * "${HOST}blafoo" -> "localhostblafoo"
- * "\$HOST blafoo" -> "$HOST blafoo"
- * "\\$HOST blafoo" -> "\localhost blafoo"
- * "'$HOST ${HOST}'" -> "'$HOST ${HOST}'"
- * "'\$HOST'" -> "'\$HOST'"
- * "\'$HOST' $HOST" -> "'localhost' $HOST"
- *
- * "$:termcapname:" -> "termcapvalue"
- * "$:terminfoname:" -> "termcapvalue"
- *
- * "\101" -> "A"
- * "^a" -> "\001"
- *
- * display == NULL is valid here!
- */
-char *
-expand_vars(ss, d)
-char *ss;
-struct display *d;
-{
- static char ebuf[2048];
- int esize = sizeof(ebuf) - 1, vtype, quofl = 0;
- register char *e = ebuf;
- register char *s = ss;
- register char *v;
- char xbuf[11];
- int i;
-
- while (*s && *s != '\0' && *s != '\n' && esize > 0)
- {
- if (*s == '\'')
- quofl ^= 1;
- if (*s == '$' && !quofl)
- {
- char *p, c;
-
- p = ++s;
- switch (*s)
- {
- case '{':
- p = ++s;
- while (*p != '}')
- if (*p++ == '\0')
- return ss;
- vtype = 0; /* env var */
- break;
- case ':':
- p = ++s;
- while (*p != ':')
- if (*p++ == '\0')
- return ss;
- vtype = 1; /* termcap string */
- break;
- default:
- while ((*p >='a' && *p <= 'z') || (*p >='A' && *p <= 'Z') || (*p >='0' && *p <= '9') || *p == '_')
- p++;
- vtype = 0; /* env var */
- }
- c = *p;
- debug1("exp: c='%c'\n", c);
- *p = '\0';
- if (vtype == 0)
- {
- v = xbuf;
- if (strcmp(s, "TERM") == 0)
- v = d ? d->d_termname : "unknown";
- else if (strcmp(s, "COLUMNS") == 0)
- sprintf(xbuf, "%d", d ? d->d_width : -1);
- else if (strcmp(s, "LINES") == 0)
- sprintf(xbuf, "%d", d ? d->d_height : -1);
- else
- v = getenv(s);
- }
- else
- v = gettermcapstring(s);
- if (v)
- {
- debug2("exp: $'%s'='%s'\n", s, v);
- while (*v && esize-- > 0)
- *e++ = *v++;
- }
- else
- debug1("exp: '%s' not env\n", s); /* '{'-: */
- if ((*p = c) == '}' || c == ':')
- p++;
- s = p;
- }
- else if (*s == '^' && !quofl)
- {
- s++;
- i = *s++;
- if (i == '?')
- i = '\177';
- else
- i &= 0x1f;
- *e++ = i;
- esize--;
- }
- else
- {
- /*
- * \$, \\$, \\, \\\, \012 are reduced here,
- * other sequences starting whith \ are passed through.
- */
- if (s[0] == '\\' && !quofl)
- {
- if (s[1] >= '0' && s[1] <= '7')
- {
- s++;
- i = *s - '0';
- s++;
- if (*s >= '0' && *s <= '7')
- {
- i = i * 8 + *s - '0';
- s++;
- if (*s >= '0' && *s <= '7')
- {
- i = i * 8 + *s - '0';
- s++;
- }
- }
- debug2("expandvars: octal coded character %o (%d)\n", i, i);
- *e++ = i;
- esize--;
- continue;
- }
- else
- {
- if (s[1] == '$' ||
- (s[1] == '\\' && s[2] == '$') ||
- s[1] == '\'' ||
- (s[1] == '\\' && s[2] == '\'') ||
- s[1] == '^' ||
- (s[1] == '\\' && s[2] == '^'))
- s++;
- }
- }
- *e++ = *s++;
- esize--;
- }
- }
- if (esize <= 0)
- Msg(0, "expand_vars: buffer overflow\n");
- *e = '\0';
- debug1("expand_var returns '%s'\n", ebuf);
- return ebuf;
-}
-
#ifdef TERMINFO
/*
* This is a replacement for the buggy _delay function from the termcap
@@ -812,7 +637,7 @@ int (*outc) __P((int));
0,2000,1333,909,743,666,500,333,166,83,55,41,20,10,5,2,1,1
};
- if (ospeed <= 0 || ospeed >= sizeof(osp2pad)/sizeof(*osp2pad))
+ if (ospeed <= 0 || ospeed >= (int)(sizeof(osp2pad)/sizeof(*osp2pad)))
return 0;
pad =osp2pad[ospeed];
delay = (delay + pad / 2) / pad;
diff --git a/nethack.c b/nethack.c
index bbefc15..585dc43 100644
--- a/nethack.c
+++ b/nethack.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: nethack.c,v 1.01 1999/07/26 19:35:25 mlschroe Exp $ FAU")
-
#include "config.h"
#include "screen.h"
diff --git a/patchlevel.h b/patchlevel.h
index 0e81d20..452683e 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -488,11 +488,42 @@
* use getpt() on linux systems. doc patches from
* Adam Lazur. tty flow/intr cleanup.
* -- DISTRIBUTED
+ * 29.08.2002 3.09.12 Port to POSIX 1003.1-2001 hosts (Paul Eggert).
+ * Fixed encoding for reattach password test.
+ * Fixed NUL characters when encodings are active.
+ * Fixed silly encodings bugs. Fixed bogus
+ * oldflayer when a window gets freed.
+ * Altscreen support by Gurusamy Sarathy.
+ * Reuse old password in builtin_screenlock.
+ * -- DISTRIBUTED
+ * 05.09.2002 3.09.13 added missing break statement that broke
+ * the eval command.
+ * -- DISTRIBUTED
+ * 13.03.2003 3.09.15 Console workaround for linux. Scrolling-region
+ * reset fix. GBK encoding added.
+ * support for unicode combining characters added.
+ * openpty() support added (thomas@xs4all.nl).
+ * preselect of blank window ('-') or window
+ * list ('=') added. Added %` string escape
+ * and backtick command.
+ * -- DISTRIBUTED
+ * 08.09.2003 4.00.00 rewrote nonblock command, added defnonblock.
+ * added zmodem support (catch & passthrough).
+ * added screenblanker.
+ * fixed a couple of GBK bugs.
+ * rewrote command parsing.
+ * added -m option to windowlist (Felix Rosencrantz)
+ * -- DISTRIBUTED
+ * 18.09.2003 4.00.01 fixed two small bugs in the new parser.
+ * -- DISTRIBUTED
+ * 05.12.2003 4.00.02 fixed a bug in the ansi parser. fixed execs
+ * on ttys. fixed hardstatus line on blanked screen.
+ * -- DISTRIBUTED
*/
#define ORIGIN "FAU"
-#define REV 3
-#define VERS 9
-#define PATCHLEVEL 11
-#define DATE "14-Feb-02"
-#define STATE ""
+#define REV 4
+#define VERS 0
+#define PATCHLEVEL 2
+#define DATE "5-Dec-03"
+#define STATE ""
diff --git a/process.c b/process.c
index df21478..7f1a6e1 100644
--- a/process.c
+++ b/process.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: process.c,v 1.28 1994/09/06 17:00:12 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
@@ -60,17 +57,18 @@ extern int log_flush, logtstamp_on, logtstamp_after;
extern char *VisualBellString;
extern int VBellWait, MsgWait, MsgMinWait, SilenceWait;
extern char SockPath[], *SockName;
-extern int TtyMode, auto_detach;
-extern int iflag;
+extern int TtyMode, auto_detach, use_altscreen;
+extern int iflag, maxwin;
extern int use_hardstatus, visual_bell;
#ifdef COLOR
-extern int attr2color[];
+extern int attr2color[][4];
extern int nattr2color;
#endif
extern int hardstatusemu;
extern char *printcmd;
extern int default_startup;
extern int defobuflimit;
+extern int defnonblock;
extern int ZombieKey_destroy;
extern int ZombieKey_resurrect;
#ifdef AUTO_NUKE
@@ -96,7 +94,6 @@ extern struct acluser *EffectiveAclUser; /* acl.c */
#endif
extern struct term term[]; /* terminal capabilities */
#ifdef MAPKEYS
-extern int maptimeout;
extern char *kmapdef[];
extern char *kmapadef[];
extern char *kmapmdef[];
@@ -109,19 +106,20 @@ extern char *screenencodings;
static int CheckArgNum __P((int, char **));
static void ClearAction __P((struct action *));
+static void SaveAction __P((struct action *, int, char **, int *));
static int NextWindow __P((void));
static int PreviousWindow __P((void));
static int MoreWindows __P((void));
static void LogToggle __P((int));
static void ShowInfo __P((void));
static void ShowDInfo __P((void));
-static char **SaveArgs __P((char **));
static struct win *WindowByName __P((char *));
static int WindowByNumber __P((char *));
static int ParseOnOff __P((struct action *, int *));
-static int ParseWinNum __P((struct action *act, int *));
-static int ParseBase __P((struct action *act, char *, int *, int, char *));
-static char *ParseChar __P((char *, char *));
+static int ParseWinNum __P((struct action *, int *));
+static int ParseBase __P((struct action *, char *, int *, int, char *));
+static int ParseNum1000 __P((struct action *, int *));
+static char **SaveArgs __P((char **));
static int IsNum __P((char *, int));
static void Colonfin __P((char *, int, char *));
static void InputSelect __P((void));
@@ -146,12 +144,10 @@ static void pow_detach_fn __P((char *, int, char *));
#endif
static void digraph_fn __P((char *, int, char *));
static void confirm_fn __P((char *, int, char *));
-#ifdef MAPKEYS
-static int StuffKey __P((int));
-#endif
-static int IsOnDisplay __P((struct win *));
+static int IsOnDisplay __P((struct win *));
static void ResizeRegions __P((char*));
static void ResizeFin __P((char *, int, char *));
+static struct action *FindKtab __P((char *, int));
extern struct layer *flayer;
@@ -188,6 +184,18 @@ struct plop plop_tab[MAX_PLOP_DEFS];
int TtyMode = PTYMODE;
int hardcopy_append = 0;
int all_norefresh = 0;
+#ifdef ZMODEM
+int zmodem_mode = 0;
+char *zmodem_sendcmd;
+char *zmodem_recvcmd;
+static char *zmodes[4] = {"off", "auto", "catch", "pass"};
+#endif
+
+int idletimo;
+struct action idleaction;
+#ifdef BLANKER_PRG
+char **blankerprg;
+#endif
struct action ktab[256]; /* command key translation table */
struct kclass {
@@ -198,13 +206,12 @@ struct kclass {
struct kclass *kclasses;
#ifdef MAPKEYS
-struct action umtab[KMAP_KEYS+KMAP_AKEYS+KMAP_EXT];
-struct action dmtab[KMAP_KEYS+KMAP_AKEYS+KMAP_EXT];
-struct action mmtab[KMAP_KEYS+KMAP_AKEYS+KMAP_EXT];
-
-char *kmap_extras[KMAP_EXT];
-int kmap_extras_fl[KMAP_EXT];
-
+struct action umtab[KMAP_KEYS+KMAP_AKEYS];
+struct action dmtab[KMAP_KEYS+KMAP_AKEYS];
+struct action mmtab[KMAP_KEYS+KMAP_AKEYS];
+struct kmap_ext *kmap_exts;
+int kmap_extn;
+static int maptimeout = 300;
#endif
@@ -398,16 +405,20 @@ InitKeytab()
{
ktab[i].nr = RC_ILLEGAL;
ktab[i].args = noargs;
+ ktab[i].argl = 0;
}
#ifdef MAPKEYS
- for (i = 0; i < KMAP_KEYS+KMAP_AKEYS+KMAP_EXT; i++)
+ for (i = 0; i < KMAP_KEYS+KMAP_AKEYS; i++)
{
umtab[i].nr = RC_ILLEGAL;
umtab[i].args = noargs;
+ umtab[i].argl = 0;
dmtab[i].nr = RC_ILLEGAL;
dmtab[i].args = noargs;
+ dmtab[i].argl = 0;
mmtab[i].nr = RC_ILLEGAL;
mmtab[i].args = noargs;
+ mmtab[i].argl = 0;
}
argarr[1] = 0;
for (i = 0; i < NKMAPDEF; i++)
@@ -419,8 +430,7 @@ InitKeytab()
if (kmapdef[i] == 0)
continue;
argarr[0] = kmapdef[i];
- dmtab[i + (KMAPDEFSTART - T_CAPS)].nr = RC_STUFF;
- dmtab[i + (KMAPDEFSTART - T_CAPS)].args = SaveArgs(argarr);
+ SaveAction(dmtab + i + (KMAPDEFSTART - T_CAPS), RC_STUFF, argarr, 0);
}
for (i = 0; i < NKMAPADEF; i++)
{
@@ -431,8 +441,7 @@ InitKeytab()
if (kmapadef[i] == 0)
continue;
argarr[0] = kmapadef[i];
- dmtab[i + (KMAPADEFSTART - T_CURSOR + KMAP_KEYS)].nr = RC_STUFF;
- dmtab[i + (KMAPADEFSTART - T_CURSOR + KMAP_KEYS)].args = SaveArgs(argarr);
+ SaveAction(dmtab + i + (KMAPADEFSTART - T_CURSOR + KMAP_KEYS), RC_STUFF, argarr, 0);
}
for (i = 0; i < NKMAPMDEF; i++)
{
@@ -444,8 +453,7 @@ InitKeytab()
continue;
argarr[0] = kmapmdef[i];
argarr[1] = 0;
- mmtab[i + (KMAPMDEFSTART - T_CAPS)].nr = RC_STUFF;
- mmtab[i + (KMAPMDEFSTART - T_CAPS)].args = SaveArgs(argarr);
+ SaveAction(mmtab + i + (KMAPMDEFSTART - T_CAPS), RC_STUFF, argarr, 0);
}
#endif
@@ -496,8 +504,7 @@ InitKeytab()
char *args[2];
args[0] = "-";
args[1] = NULL;
- ktab['-'].nr = RC_SELECT;
- ktab['-'].args = SaveArgs(args);
+ SaveAction(ktab + '-', RC_SELECT, args, 0);
}
for (i = 0; i < ((MAXWIN < 10) ? MAXWIN : 10); i++)
{
@@ -505,16 +512,14 @@ InitKeytab()
args[0] = arg1;
args[1] = 0;
sprintf(arg1, "%d", i);
- ktab['0' + i].nr = RC_SELECT;
- ktab['0' + i].args = SaveArgs(args);
+ SaveAction(ktab + '0' + i, RC_SELECT, args, 0);
}
ktab['\''].nr = RC_SELECT; /* calling a window by name */
{
char *args[2];
args[0] = "-b";
args[1] = 0;
- ktab['"'].nr = RC_WINDOWLIST;
- ktab['"'].args = SaveArgs(args);
+ SaveAction(ktab + '"', RC_WINDOWLIST, args, 0);
}
ktab[Ctrl('G')].nr = RC_VBELL;
ktab[':'].nr = RC_COLON;
@@ -524,9 +529,8 @@ InitKeytab()
char *args[2];
args[0] = ".";
args[1] = 0;
- ktab[']'].args = SaveArgs(args);
- ktab[Ctrl(']')].args = SaveArgs(args);
- ktab[']'].nr = ktab[Ctrl(']')].nr = RC_PASTE;
+ SaveAction(ktab + ']', RC_PASTE, args, 0);
+ SaveAction(ktab + Ctrl(']'), RC_PASTE, args, 0);
}
ktab['{'].nr = RC_HISTORY;
ktab['}'].nr = RC_HISTORY;
@@ -559,9 +563,13 @@ InitKeytab()
ClearAction(&ktab[DefaultMetaEsc]);
ktab[DefaultMetaEsc].nr = RC_META;
}
+
+ idleaction.nr = RC_BLANKER;
+ idleaction.args = noargs;
+ idleaction.argl = 0;
}
-struct action *
+static struct action *
FindKtab(class, create)
char *class;
int create;
@@ -590,7 +598,7 @@ int create;
return 0;
}
kp->name = SaveStr(class);
- for (i = 0; i < sizeof(kp->ktab)/sizeof(*kp->ktab); i++)
+ for (i = 0; i < (int)(sizeof(kp->ktab)/sizeof(*kp->ktab)); i++)
{
kp->ktab[i].nr = RC_ILLEGAL;
kp->ktab[i].args = noargs;
@@ -616,6 +624,7 @@ struct action *act;
free(*p);
free((char *)act->args);
act->args = noargs;
+ act->argl = 0;
}
/*
@@ -636,7 +645,7 @@ char *ibuf;
int ilen;
{
int ch, slen;
- unsigned char *s;
+ unsigned char *s, *q;
int i, l;
char *p;
@@ -647,7 +656,7 @@ int ilen;
evdeq(&D_mapev);
slen = ilen;
s = (unsigned char *)ibuf;
- while(ilen-- > 0)
+ while (ilen-- > 0)
{
ch = *s++;
if (D_dontmap || !D_nseqs)
@@ -657,47 +666,84 @@ int ilen;
}
for (;;)
{
- if (*(unsigned char *)D_seqp != ch)
+ debug3("cmp %c %c[%d]\n", ch, *D_seqp, D_seqp - D_kmaps);
+ if (*D_seqp != ch)
{
- l = *((unsigned char *)D_seqp + (KMAP_OFF - KMAP_SEQ));
+ l = D_seqp[D_seqp[-D_seql-1] + 1];
if (l)
{
- D_seqp += sizeof(struct kmap) * l;
+ D_seqp += l * 2 + 4;
+ debug1("miss %d\n", D_seqp - D_kmaps);
continue;
}
+ debug("complete miss\n");
D_mapdefault = 0;
l = D_seql;
- p = D_seqp - l;
+ p = (char *)D_seqp - l;
D_seql = 0;
- D_seqp = D_kmaps[0].seq;
- if (l)
+ D_seqp = D_kmaps + 3;
+ if (l == 0)
+ break;
+ if ((q = D_seqh) != 0)
{
- ProcessInput2(p, l);
+ D_seqh = 0;
+ i = q[0] << 8 | q[1];
+ i &= ~KMAP_NOTIMEOUT;
+ debug1("Mapping former hit #%d - ", i);
+ debug2("%d(%s) - ", q[2], q + 3);
+ if (StuffKey(i))
+ ProcessInput2((char *)q + 3, q[2]);
if (display == 0)
return;
+ l -= q[2];
+ p += q[2];
}
- break;
+ else
+ D_dontmap = 1;
+ debug1("flush old %d\n", l);
+ ProcessInput(p, l);
+ if (display == 0)
+ return;
+ evdeq(&D_mapev);
+ continue;
}
if (D_seql++ == 0)
{
/* Finish old stuff */
slen -= ilen + 1;
- ProcessInput2(ibuf, slen);
+ debug1("finish old %d\n", slen);
+ if (slen)
+ ProcessInput2(ibuf, slen);
if (display == 0)
return;
+ D_seqh = 0;
}
ibuf = (char *)s;
slen = ilen;
- ch = -1;
- if (*++D_seqp == 0)
- {
- i = (struct kmap *)(D_seqp - D_seql - KMAP_SEQ) - D_kmaps;
+ D_seqp++;
+ l = D_seql;
+ debug2("length am %d, want %d\n", l, D_seqp[-l - 1]);
+ if (l == D_seqp[-l - 1])
+ {
+ if (D_seqp[l] != l)
+ {
+ q = D_seqp + 1 + l;
+ if (D_kmaps + D_nseqs > q && q[2] > l && !bcmp(D_seqp - l, q + 3, l))
+ {
+ debug1("have another mapping (%s), delay execution\n", q + 3);
+ D_seqh = D_seqp - 3 - l;
+ D_seqp = q + 3 + l;
+ break;
+ }
+ }
+ i = D_seqp[-l - 3] << 8 | D_seqp[-l - 2];
+ i &= ~KMAP_NOTIMEOUT;
debug1("Mapping #%d - ", i);
- i = D_kmaps[i].nr & ~KMAP_NOTIMEOUT;
- l = D_seql;
- p = D_seqp - l;
+ p = (char *)D_seqp - l;
+ debug2("%d(%s) - ", l, p);
D_seql = 0;
- D_seqp = D_kmaps[0].seq;
+ D_seqp = D_kmaps + 3;
+ D_seqh = 0;
if (StuffKey(i))
ProcessInput2(p, l);
if (display == 0)
@@ -708,19 +754,18 @@ int ilen;
}
if (D_seql)
{
- struct kmap *km;
debug("am in sequence -> check for timeout\n");
- km = (struct kmap *)(D_seqp - D_seql - KMAP_SEQ);
- i = *(D_seqp - 1 + (KMAP_OFF - KMAP_SEQ));
- if (i == 0)
- i = D_nseqs - (km - D_kmaps);
- for (; i; km++, i--)
- if (km->nr & KMAP_NOTIMEOUT)
- break;
- if (i == 0)
+ l = D_seql;
+ for (s = D_seqp; ; s += i * 2 + 4)
{
- SetTimeout(&D_mapev, maptimeout/1000);
- evenq(&D_mapev);
+ if (s[-l-3] & KMAP_NOTIMEOUT >> 8)
+ break;
+ if ((i = s[s[-l-1] + 1]) == 0)
+ {
+ SetTimeout(&D_mapev, maptimeout);
+ evenq(&D_mapev);
+ break;
+ }
}
}
ProcessInput2(ibuf, slen);
@@ -801,15 +846,6 @@ struct paster *pa;
struct display *d = display;
#ifdef COPY_PASTE
- if (!pa && p && p->w_paster.pa_pastelen)
- {
- debug("layer is busy - beep!\n");
- WBell(p, visual_bell);
- *bufp += *lenp;
- *lenp = 0;
- display = d;
- return;
- }
/* XXX -> PasteStart */
if (pa && *lenp > 1 && p && p->w_slowpaste)
{
@@ -821,6 +857,17 @@ struct paster *pa;
#endif
while (flayer && *lenp)
{
+#ifdef COPY_PASTE
+ if (!pa && p && p->w_paster.pa_pastelen && flayer == p->w_paster.pa_pastelayer)
+ {
+ debug("layer is busy - beep!\n");
+ WBell(p, visual_bell);
+ *bufp += *lenp;
+ *lenp = 0;
+ display = d;
+ return;
+ }
+#endif
oldlen = *lenp;
LayProcess(bufp, lenp);
#ifdef COPY_PASTE
@@ -979,6 +1026,7 @@ int key;
{
int nr = act->nr;
char **args = act->args;
+ int *argl = act->argl;
struct win *p;
int argc, i, n, msgok;
char *s;
@@ -1033,6 +1081,16 @@ int key;
SetForeWindow((struct win *)0);
Activate(0);
}
+ else if (args[0][0] == '.' && !args[0][1])
+ {
+ if (!fore)
+ Msg(0, "select . needs a window");
+ else
+ {
+ SetForeWindow(fore);
+ Activate(0);
+ }
+ }
else if (ParseWinNum(act, &n) == 0)
SwitchWindow(n);
break;
@@ -1195,25 +1253,62 @@ int key;
Msg(0, "Sorry, screen was compiled without -DDEBUG option.");
#endif
break;
+#ifdef ZMODEM
+ case RC_ZMODEM:
+ if (*args && !strcmp(*args, "sendcmd"))
+ {
+ if (args[1])
+ {
+ free(zmodem_sendcmd);
+ zmodem_sendcmd = SaveStr(args[1]);
+ }
+ if (msgok)
+ Msg(0, "zmodem sendcmd: %s", zmodem_sendcmd);
+ break;
+ }
+ if (*args && !strcmp(*args, "recvcmd"))
+ {
+ if (args[1])
+ {
+ free(zmodem_recvcmd);
+ zmodem_recvcmd = SaveStr(args[1]);
+ }
+ if (msgok)
+ Msg(0, "zmodem recvcmd: %s", zmodem_recvcmd);
+ break;
+ }
+ if (*args)
+ {
+ for (i = 0; i < 4; i++)
+ if (!strcmp(zmodes[i], *args))
+ break;
+ if (i == 4 && !strcmp(*args, "on"))
+ i = 1;
+ if (i == 4)
+ {
+ Msg(0, "usage: zmodem off|auto|catch|pass");
+ break;
+ }
+ zmodem_mode = i;
+ }
+ if (msgok)
+ Msg(0, "zmodem mode is %s", zmodes[zmodem_mode]);
+ break;
+#endif
case RC_ZOMBIE:
{
- char ch2 = 0;
-
if (!(s = *args))
{
ZombieKey_destroy = 0;
break;
}
- if (!(s = ParseChar(s, &ch)) || *s)
- {
- if (!s || !(s = ParseChar(s, &ch2)) || *s)
- {
- Msg(0, "%s:zombie: one or two characters expected.", rc_name);
- break;
- }
- }
- ZombieKey_destroy = ch;
- ZombieKey_resurrect = ch2;
+ if (*argl == 0 || *argl > 2)
+ {
+ Msg(0, "%s:zombie: one or two characters expected.", rc_name);
+ break;
+ }
+ ZombieKey_destroy = args[0][0];
+ ZombieKey_resurrect = *argl == 2 ? args[0][1] : 0;
}
break;
case RC_WALL:
@@ -1272,7 +1367,7 @@ int key;
if (D_user != u)
continue;
debug1("AT display %s\n", D_usertty);
- DoCommand(args + 1);
+ DoCommand(args + 1, argl + 1);
if (display)
Msg(0, "command from %s: %s %s",
s, args[1], args[2] ? args[2] : "");
@@ -1301,7 +1396,7 @@ int key;
strncmp(args[0], D_usertty + 8, n)))
continue;
debug1("AT display %s\n", D_usertty);
- DoCommand(args + 1);
+ DoCommand(args + 1, argl + 1);
if (display)
Msg(0, "command from %s: %s %s",
s, args[1], args[2] ? args[2] : "");
@@ -1344,7 +1439,7 @@ int key;
if (fore->w_layer.l_cvlist)
display = fore->w_layer.l_cvlist->c_display;
flayer = fore->w_savelayer ? fore->w_savelayer : &fore->w_layer;
- DoCommand(args + 1); /* may destroy our display */
+ DoCommand(args + 1, argl + 1); /* may destroy our display */
if (fore && fore->w_layer.l_cvlist)
{
display = fore->w_layer.l_cvlist->c_display;
@@ -1364,7 +1459,8 @@ int key;
debug2("AT window %d (%s)\n", fore->w_number, fore->w_title);
if (fore->w_layer.l_cvlist)
display = fore->w_layer.l_cvlist->c_display;
- DoCommand(args + 1);
+ flayer = fore->w_savelayer ? fore->w_savelayer : &fore->w_layer;
+ DoCommand(args + 1, argl + 1);
if (fore && fore->w_layer.l_cvlist)
{
display = fore->w_layer.l_cvlist->c_display;
@@ -1411,11 +1507,12 @@ int key;
Input("Copy to register:", 1, INP_RAW, copy_reg_fn, NULL);
break;
}
- if (((s = ParseChar(s, &ch)) == NULL) || *s)
+ if (*argl != 1)
{
Msg(0, "%s: copyreg: character, ^x, or (octal) \\032 expected.", rc_name);
break;
}
+ ch = args[0][0];
/*
* With two arguments we *really* read register contents from file
*/
@@ -1468,17 +1565,21 @@ int key;
Msg(0, "%s: register: illegal number of arguments.", rc_name);
break;
}
- if ((s = ParseChar(*args, &ch)) == 0 || *s)
- Msg(0, "%s: register: character, ^x, or (octal) \\032 expected.", rc_name);
+ if (*argl != 1)
+ {
+ Msg(0, "%s: register: character, ^x, or (octal) \\032 expected.", rc_name);
+ break;
+ }
+ ch = args[0][0];
#ifdef COPY_PASTE
- else if (ch == '.')
+ if (ch == '.')
{
if (user->u_plop.buf != NULL)
UserFreeCopyBuffer(user);
if (args[1] && args[1][0])
{
- user->u_plop.buf = SaveStr(args[1]);
- user->u_plop.len = strlen(user->u_plop.buf);
+ user->u_plop.buf = SaveStrn(args[1], argl[1]);
+ user->u_plop.len = argl[1];
#ifdef ENCODINGS
user->u_plop.enc = i;
#endif
@@ -1491,8 +1592,8 @@ int key;
if (plp->buf)
free(plp->buf);
- plp->buf = SaveStr(args[1]);
- plp->len = strlen(plp->buf);
+ plp->buf = SaveStrn(args[1], argl[1]);
+ plp->len = argl[1];
#ifdef ENCODINGS
plp->enc = i;
#endif
@@ -1504,15 +1605,17 @@ int key;
Input("Process register:", 1, INP_RAW, process_fn, NULL);
break;
}
- if ((s = ParseChar(s, &ch)) == NULL || *s)
+ if (*argl != 1)
{
Msg(0, "%s: process: character, ^x, or (octal) \\032 expected.", rc_name);
break;
}
+ ch = args[0][0];
process_fn(&ch, 0, NULL);
break;
case RC_STUFF:
s = *args;
+ n = *argl;
if (args[1])
{
if (strcmp(s, "-k"))
@@ -1536,8 +1639,8 @@ int key;
s = display ? D_tcs[i].str : 0;
if (s == 0)
break;
+ n = strlen(s);
}
- n = strlen(s);
while(n)
LayProcess(&s, &n);
break;
@@ -1616,7 +1719,7 @@ int key;
if (*args)
{
if (ParseNum(act, &n))
- for (n = 0; n < sizeof(types)/sizeof(*types); n++)
+ for (n = 0; n < (int)(sizeof(types)/sizeof(*types)); n++)
{
for (i = 0; i < 4; i++)
{
@@ -1629,7 +1732,7 @@ int key;
if (i == 4)
break;
}
- if (n < 0 || n >= sizeof(types)/sizeof(*types))
+ if (n < 0 || n >= (int)(sizeof(types)/sizeof(*types)))
Msg(0, "%s invalid, chose one of %s, %s or %s", *args, types[0], types[1], types[2]);
else
{
@@ -1785,7 +1888,7 @@ int key;
if (*args == 0)
InputAKA();
else
- ChangeAKA(fore, *args, 20);
+ ChangeAKA(fore, *args, strlen(*args));
break;
case RC_COLON:
Input(":", 100, INP_COOKED, Colonfin, NULL);
@@ -1876,6 +1979,10 @@ int key;
break;
case RC_RESET:
ResetAnsiState(fore);
+#ifdef ZMODEM
+ if (fore->w_zdisplay)
+ zmodem_abort(fore, fore->w_zdisplay);
+#endif
WriteString(fore, "\033c", 2);
break;
case RC_MONITOR:
@@ -1920,9 +2027,15 @@ int key;
#endif
case RC_WINDOWLIST:
if (!*args)
- display_wlist(0);
+ display_wlist(0, WLIST_NUM);
+ else if (!strcmp(*args, "-m") && !args[1])
+ display_wlist(0, WLIST_MRU);
else if (!strcmp(*args, "-b") && !args[1])
- display_wlist(1);
+ display_wlist(1, WLIST_NUM);
+ else if (!strcmp(*args, "-b") && !strcmp(args[1], "-m") && !args[2])
+ display_wlist(1, WLIST_MRU);
+ else if (!strcmp(*args, "-m") && !strcmp(args[1], "-b") && !args[2])
+ display_wlist(1, WLIST_MRU);
else if (!strcmp(*args, "string"))
{
if (args[1])
@@ -1977,6 +2090,7 @@ int key;
case RC_HISTORY:
{
static char *pasteargs[] = {".", 0};
+ static int pasteargl[] = {1};
if (flayer->l_layfn != &WinLf)
{
@@ -1988,6 +2102,7 @@ int key;
if (user->u_plop.buf == NULL)
break;
args = pasteargs;
+ argl = pasteargl;
}
/*FALLTHROUGH*/
case RC_PASTE:
@@ -2012,7 +2127,7 @@ int key;
* with two arguments we paste into a destination register
* (no window needed here).
*/
- if (args[1] && ((s = ParseChar(args[1], &dch)) == NULL || *s))
+ if (args[1] && argl[1] != 1)
{
Msg(0, "%s: paste destination: character, ^x, or (octal) \\032 expected.",
rc_name);
@@ -2108,6 +2223,7 @@ int key;
* we have two arguments, the second is already in dch.
* use this as destination rather than the window.
*/
+ dch = args[1][0];
if (dch == '.')
{
if (user->u_plop.buf != NULL)
@@ -2221,7 +2337,11 @@ int key;
break;
#endif /* COPY_PASTE */
case RC_ESCAPE:
- if (ParseEscape(user, *args))
+ if (*argl == 0)
+ SetEscape(user, -1, -1);
+ else if (*argl == 2)
+ SetEscape(user, (int)(unsigned char)args[0][0], (int)(unsigned char)args[0][1]);
+ else
{
Msg(0, "%s: two characters required after escape.", rc_name);
break;
@@ -2233,7 +2353,11 @@ int key;
break;
/* FALLTHROUGH */
case RC_DEFESCAPE:
- if (ParseEscape(NULL, *args))
+ if (*argl == 0)
+ SetEscape(NULL, -1, -1);
+ else if (*argl == 2)
+ SetEscape(NULL, (int)(unsigned char)args[0][0], (int)(unsigned char)args[0][1]);
+ else
{
Msg(0, "%s: two characters required after defescape.", rc_name);
break;
@@ -2331,16 +2455,30 @@ int key;
debug("new termcap made\n");
break;
case RC_ECHO:
- if (!msgok)
+ if (!msgok && (!rc_name || strcmp(rc_name, "-X")))
break;
/*
* user typed ^A:echo... well, echo isn't FinishRc's job,
* but as he wanted to test us, we show good will
*/
- if (*args && (args[1] == 0 || (strcmp(args[1], "-n") == 0 && args[2] == 0)))
- Msg(0, "%s", args[1] ? args[1] : *args);
+ if (argc > 1 && !strcmp(*args, "-n"))
+ {
+ args++;
+ argc--;
+ }
+ s = *args;
+ if (argc > 1 && !strcmp(*args, "-p"))
+ {
+ args++;
+ argc--;
+ s = *args;
+ if (s)
+ s = MakeWinMsg(s, fore, '%');
+ }
+ if (s)
+ Msg(0, "%s", s);
else
- Msg(0, "%s: 'echo [-n] \"string\"' expected.", rc_name);
+ Msg(0, "%s: 'echo [-n] [-p] \"string\"' expected.", rc_name);
break;
case RC_BELL:
case RC_BELL_MSG:
@@ -2594,26 +2732,26 @@ int key;
Msg(0, "switched to visual bell.");
break;
case RC_VBELLWAIT:
- if (ParseNum(act, &VBellWait) == 0 && msgok)
- Msg(0, "vbellwait set to %d seconds", VBellWait);
+ if (ParseNum1000(act, &VBellWait) == 0 && msgok)
+ Msg(0, "vbellwait set to %.10g seconds", VBellWait/1000.);
break;
case RC_MSGWAIT:
- if (ParseNum(act, &MsgWait) == 0 && msgok)
- Msg(0, "msgwait set to %d seconds", MsgWait);
+ if (ParseNum1000(act, &MsgWait) == 0 && msgok)
+ Msg(0, "msgwait set to %.10g seconds", MsgWait/1000.);
break;
case RC_MSGMINWAIT:
- if (ParseNum(act, &MsgMinWait) == 0 && msgok)
- Msg(0, "msgminwait set to %d seconds", MsgMinWait);
+ if (ParseNum1000(act, &MsgMinWait) == 0 && msgok)
+ Msg(0, "msgminwait set to %.10g seconds", MsgMinWait/1000.);
break;
case RC_SILENCEWAIT:
- if ((ParseNum(act, &SilenceWait) == 0) && msgok)
- {
- if (SilenceWait < 1)
- SilenceWait = 1;
- for (p = windows; p; p = p->w_next)
- p->w_silencewait = SilenceWait;
- Msg(0, "silencewait set to %d seconds", SilenceWait);
- }
+ if (ParseNum(act, &SilenceWait))
+ break;
+ if (SilenceWait < 1)
+ SilenceWait = 1;
+ for (p = windows; p; p = p->w_next)
+ p->w_silencewait = SilenceWait;
+ if (msgok)
+ Msg(0, "silencewait set to %d seconds", SilenceWait);
break;
case RC_NUMBER:
if (*args == 0)
@@ -2622,7 +2760,7 @@ int key;
{
int old = fore->w_number;
- if (ParseNum(act, &n) || n >= MAXWIN)
+ if (ParseNum(act, &n) || n >= maxwin)
break;
p = wtab[n];
wtab[n] = fore;
@@ -2729,7 +2867,7 @@ int key;
s = 0;
if (ParseSaveStr(act, &s))
break;
- if (!*s || strlen(s) + (SockName - SockPath) > MAXPATHLEN - 13)
+ if (!*s || strlen(s) + (SockName - SockPath) > MAXPATHLEN - 13 || index(s, '/'))
{
Msg(0, "%s: bad session name '%s'\n", rc_name, s);
free(s);
@@ -2786,17 +2924,12 @@ int key;
fore->w_number, fore->w_slowpaste);
break;
case RC_MARKKEYS:
- s = 0;
- if (ParseSaveStr(act, &s))
- break;
- if (CompileKeys(s, mark_key_tab))
+ if (CompileKeys(*args, *argl, mark_key_tab))
{
Msg(0, "%s: markkeys: syntax error.", rc_name);
- free(s);
break;
}
debug1("markkeys %s\n", *args);
- free(s);
break;
# ifdef FONT
case RC_PASTEFONT:
@@ -2885,14 +3018,14 @@ int key;
if (ktabp == 0)
break;
args += 2;
+ argl += 2;
}
- if ((s = ParseChar(*args, &ch)) == 0 || *s)
+ if (*argl != 1)
{
- Msg(0, "%s: bind: character, ^x, or (octal) \\032 expected.",
- rc_name);
+ Msg(0, "%s: bind: character, ^x, or (octal) \\032 expected.", rc_name);
break;
}
- n = (unsigned char)ch;
+ n = (unsigned char)args[0][0];
if (args[1])
{
if ((i = FindCommnr(args[1])) == RC_ILLEGAL)
@@ -2903,9 +3036,7 @@ int key;
if (CheckArgNum(i, args + 2) < 0)
break;
ClearAction(&ktabp[n]);
- ktabp[n].nr = i;
- if (args[2])
- ktabp[n].args = SaveArgs(args + 2);
+ SaveAction(ktabp + n, i, args + 2, argl + 2);
}
else
ClearAction(&ktabp[n]);
@@ -2918,8 +3049,9 @@ int key;
int newnr, fl = 0, kf = 0, af = 0, df = 0, mf = 0;
struct display *odisp = display;
int used = 0;
+ struct kmap_ext *kme;
- for (; *args && **args == '-'; args++)
+ for (; *args && **args == '-'; args++, argl++)
{
if (strcmp(*args, "-t") == 0)
fl = KMAP_NOTIMEOUT;
@@ -2934,6 +3066,7 @@ int key;
else if (strcmp(*args, "--") == 0)
{
args++;
+ argl++;
break;
}
else
@@ -2964,27 +3097,48 @@ int key;
Msg(0, "%s: bindkey: -a only works with -k", rc_name);
break;
}
- for (i = 0; i < KMAP_EXT; i++)
- if (kmap_extras[i] == 0)
+ if (*argl == 0)
+ {
+ Msg(0, "%s: bindkey: empty string makes no sense", rc_name);
+ break;
+ }
+ for (i = 0, kme = kmap_exts; i < kmap_extn; i++, kme++)
+ if (kme->str == 0)
{
if (args[1])
break;
}
else
- if (strcmp(kmap_extras[i], *args) == 0)
+ if (*argl == (kme->fl & ~KMAP_NOTIMEOUT) && bcmp(kme->str, *args, *argl) == 0)
break;
- if (i == KMAP_EXT)
+ if (i == kmap_extn)
{
- Msg(0, args[1] ? "%s: bindkey: no more room for keybinding" : "%s: bindkey: keybinding not found", rc_name);
- break;
+ if (!args[1])
+ {
+ Msg(0, "%s: bindkey: keybinding not found", rc_name);
+ break;
+ }
+ kmap_extn += 8;
+ kmap_exts = (struct kmap_ext *)xrealloc((char *)kmap_exts, kmap_extn * sizeof(*kmap_exts));
+ kme = kmap_exts + i;
+ bzero((char *)kme, 8 * sizeof(*kmap_exts));
+ for (; i < kmap_extn; i++, kme++)
+ {
+ kme->str = 0;
+ kme->dm.nr = kme->mm.nr = kme->um.nr = RC_ILLEGAL;
+ kme->dm.args = kme->mm.args = kme->um.args = noargs;
+ }
+ i -= 8;
+ kme -= 8;
}
- if (df == 0 && dmtab[i + KMAP_KEYS + KMAP_AKEYS].nr != RC_ILLEGAL)
+ if (df == 0 && kme->dm.nr != RC_ILLEGAL)
used = 1;
- if (mf == 0 && mmtab[i + KMAP_KEYS + KMAP_AKEYS].nr != RC_ILLEGAL)
+ if (mf == 0 && kme->mm.nr != RC_ILLEGAL)
used = 1;
- if ((df || mf) && umtab[i + KMAP_KEYS + KMAP_AKEYS].nr != RC_ILLEGAL)
+ if ((df || mf) && kme->um.nr != RC_ILLEGAL)
used = 1;
i += KMAP_KEYS + KMAP_AKEYS;
+ newact = df ? &kme->dm : mf ? &kme->mm : &kme->um;
}
else
{
@@ -3000,8 +3154,8 @@ int key;
i -= T_CURSOR - KMAP_KEYS;
else
i -= T_CAPS;
+ newact = df ? &dmtab[i] : mf ? &mmtab[i] : &umtab[i];
}
- newact = df ? &dmtab[i] : mf ? &mmtab[i] : &umtab[i];
if (args[1])
{
if ((newnr = FindCommnr(args[1])) == RC_ILLEGAL)
@@ -3012,15 +3166,13 @@ int key;
if (CheckArgNum(newnr, args + 2) < 0)
break;
ClearAction(newact);
- newact->nr = newnr;
- if (args[2])
- newact->args = SaveArgs(args + 2);
+ SaveAction(newact, newnr, args + 2, argl + 2);
if (kf == 0 && args[1])
{
- if (kmap_extras[i - (KMAP_KEYS+KMAP_AKEYS)])
- free(kmap_extras[i - (KMAP_KEYS+KMAP_AKEYS)]);
- kmap_extras[i - (KMAP_KEYS+KMAP_AKEYS)] = SaveStr(*args);
- kmap_extras_fl[i - (KMAP_KEYS+KMAP_AKEYS)] = fl;
+ if (kme->str)
+ free(kme->str);
+ kme->str = SaveStrn(*args, *argl);
+ kme->fl = fl | *argl;
}
}
else
@@ -3029,12 +3181,11 @@ int key;
remap(i, args[1] ? 1 : 0);
if (kf == 0 && !args[1])
{
- i -= KMAP_KEYS + KMAP_AKEYS;
- if (!used && kmap_extras[i])
+ if (!used && kme->str)
{
- free(kmap_extras[i]);
- kmap_extras[i] = 0;
- kmap_extras_fl[i] = 0;
+ free(kme->str);
+ kme->str = 0;
+ kme->fl = 0;
}
}
display = odisp;
@@ -3045,15 +3196,15 @@ int key;
{
if (ParseNum(act, &n))
break;
- if (n < 0 || n >= 1000)
+ if (n < 0)
{
Msg(0, "%s: maptimeout: illegal time %d", rc_name, n);
break;
}
- maptimeout = n * 1000;
+ maptimeout = n;
}
if (*args == 0 || msgok)
- Msg(0, "maptimeout is %dms", maptimeout/1000);
+ Msg(0, "maptimeout is %dms", maptimeout);
break;
case RC_MAPNOTNEXT:
D_dontmap = 1;
@@ -3159,14 +3310,55 @@ int key;
#endif
#ifdef MULTI
case RC_NONBLOCK:
- if (!ParseSwitch(act, &i) && msgok)
- Msg(0, "display set to %sblocking mode.", D_nonblock ? "non" : "");
+ i = D_nonblock >= 0;
+ if (*args && ((args[0][0] >= '0' && args[0][0] <= '9') || args[0][0] == '.'))
+ {
+ if (ParseNum1000(act, &i))
+ break;
+ }
+ else if (!ParseSwitch(act, &i))
+ i = i == 0 ? -1 : 1000;
+ else
+ break;
+ if (msgok && i == -1)
+ Msg(0, "display set to blocking mode");
+ else if (msgok && i == 0)
+ Msg(0, "display set to nonblocking mode, no timeout");
+ else if (msgok)
+ Msg(0, "display set to nonblocking mode, %.10gs timeout", i/1000.);
D_nonblock = i;
+ if (D_nonblock <= 0)
+ evdeq(&D_blockedev);
+ break;
+ case RC_DEFNONBLOCK:
+ if (*args && ((args[0][0] >= '0' && args[0][0] <= '9') || args[0][0] == '.'))
+ {
+ if (ParseNum1000(act, &defnonblock))
+ break;
+ }
+ else if (!ParseOnOff(act, &defnonblock))
+ defnonblock = defnonblock == 0 ? -1 : 1000;
+ else
+ break;
+ if (display && *rc_name)
+ {
+ D_nonblock = defnonblock;
+ if (D_nonblock <= 0)
+ evdeq(&D_blockedev);
+ }
break;
#endif
case RC_GR:
+#ifdef ENCODINGS
+ if (fore->w_gr == 2)
+ fore->w_gr = 0;
+#endif
if (ParseSwitch(act, &fore->w_gr) == 0 && msgok)
Msg(0, "Will %suse GR", fore->w_gr ? "" : "not ");
+#ifdef ENCODINGS
+ if (fore->w_gr == 0 && fore->w_FontE)
+ fore->w_gr = 2;
+#endif
break;
case RC_C1:
if (ParseSwitch(act, &fore->w_c1) == 0 && msgok)
@@ -3377,13 +3569,28 @@ int key;
#endif
#ifdef COLOR
case RC_ATTRCOLOR:
- if (args[0][0] >= '0' && args[0][0] <= '9')
- i = args[0][0] - '0';
+ s = args[0];
+ if (*s >= '0' && *s <= '9')
+ i = *s - '0';
else
for (i = 0; i < 8; i++)
- if (args[0][0] == "dubrsBiI"[i])
+ if (*s == "dubrsBiI"[i])
break;
- if (args[0][1] || i < 0 || i >= 8)
+ s++;
+ nr = 0;
+ if (*s && s[1] && !s[2])
+ {
+ if (*s == 'd' && s[1] == 'd')
+ nr = 3;
+ else if (*s == '.' && s[1] == 'd')
+ nr = 2;
+ else if (*s == 'd' && s[1] == '.')
+ nr = 1;
+ else if (*s != '.' || s[1] != '.')
+ s--;
+ s += 2;
+ }
+ if (*s || i < 0 || i >= 8)
{
Msg(0, "%s: attrcolor: unknown attribute '%s'.", rc_name, args[0]);
break;
@@ -3393,10 +3600,10 @@ int key;
n = ParseAttrColor(args[1], args[2], 1);
if (n == -1)
break;
- attr2color[i] = n;
+ attr2color[i][nr] = n;
n = 0;
for (i = 0; i < 8; i++)
- if (attr2color[i])
+ if (attr2color[i][0] || attr2color[i][1] || attr2color[i][2] || attr2color[i][3])
n |= 1 << i;
nattr2color = n;
break;
@@ -3409,6 +3616,7 @@ int key;
if (i == -1)
break;
ApplyAttrColor(i, &mchar_so);
+ debug2("--> %x %x\n", mchar_so.attr, mchar_so.color);
}
if (msgok)
#ifdef COLOR
@@ -3514,9 +3722,105 @@ int key;
for (; *args; args++)
{
char *ss = SaveStr(*args);
- RcLine(ss);
+ if (*ss)
+ Colonfin(ss, strlen(ss), (char *)0);
free(ss);
}
+ break;
+ case RC_ALTSCREEN:
+ (void)ParseSwitch(act, &use_altscreen);
+ if (msgok)
+ Msg(0, "Will %sdo alternate screen switching", use_altscreen ? "" : "not ");
+ break;
+ case RC_MAXWIN:
+ if (ParseNum(act, &n))
+ break;
+ if (n < 1)
+ Msg(0, "illegal maxwin number specified");
+ else if (n > maxwin)
+ Msg(0, "may only decrease maxwin number");
+ else
+ maxwin = n;
+ break;
+ case RC_BACKTICK:
+ if (ParseBase(act, *args, &n, 10, "decimal"))
+ break;
+ if (!args[1])
+ setbacktick(n, 0, 0, (char **)0);
+ else
+ {
+ int lifespan, tick;
+ if (argc < 4)
+ {
+ Msg(0, "%s: usage: backtick num [lifespan tick cmd args...]", rc_name);
+ break;
+ }
+ if (ParseBase(act, args[1], &lifespan, 10, "decimal"))
+ break;
+ if (ParseBase(act, args[2], &tick, 10, "decimal"))
+ break;
+ setbacktick(n, lifespan, tick, SaveArgs(args + 3));
+ }
+ WindowChanged(0, '`');
+ break;
+ case RC_BLANKER:
+#ifdef BLANKER_PRG
+ if (blankerprg)
+ {
+ RunBlanker(blankerprg);
+ break;
+ }
+#endif
+ ClearAll();
+ CursorVisibility(-1);
+ D_blocked = 4;
+ break;
+#ifdef BLANKER_PRG
+ case RC_BLANKERPRG:
+ if (blankerprg)
+ {
+ char **pp;
+ for (pp = blankerprg; *pp; pp++)
+ free(*pp);
+ free(blankerprg);
+ blankerprg = 0;
+ }
+ if (args[0][0])
+ blankerprg = SaveArgs(args);
+ break;
+#endif
+ case RC_IDLE:
+ if (*args)
+ {
+ struct display *olddisplay = display;
+ if (!strcmp(*args, "off"))
+ idletimo = 0;
+ else if (args[0][0])
+ idletimo = atoi(*args) * 1000;
+ if (argc > 1)
+ {
+ if ((i = FindCommnr(args[1])) == RC_ILLEGAL)
+ {
+ Msg(0, "%s: idle: unknown command '%s'", rc_name, args[1]);
+ break;
+ }
+ if (CheckArgNum(i, args + 2) < 0)
+ break;
+ ClearAction(&idleaction);
+ SaveAction(&idleaction, i, args + 2, argl + 2);
+ }
+ for (display = displays; display; display = display->d_next)
+ ResetIdle();
+ display = olddisplay;
+ }
+ if (msgok)
+ {
+ if (idletimo)
+ Msg(0, "idle timeout %ds, %s", idletimo / 1000, comms[idleaction.nr].name);
+ else
+ Msg(0, "idle off");
+ }
+ break;
default:
#ifdef HAVE_BRAILLE
/* key == -2: input from braille keybord, msgok always 0 */
@@ -3533,8 +3837,9 @@ int key;
}
void
-DoCommand(argv)
+DoCommand(argv, argl)
char **argv;
+int *argl;
{
struct action act;
@@ -3544,9 +3849,46 @@ char **argv;
return;
}
act.args = argv + 1;
+ act.argl = argl + 1;
DoAction(&act, -1);
}
+static void
+SaveAction(act, nr, args, argl)
+struct action *act;
+int nr;
+char **args;
+int *argl;
+{
+ register int argc = 0;
+ char **pp;
+ int *lp;
+
+ if (args)
+ while (args[argc])
+ argc++;
+ if (argc == 0)
+ {
+ act->nr = nr;
+ act->args = noargs;
+ act->argl = 0;
+ return;
+ }
+ if ((pp = (char **)malloc((unsigned)(argc + 1) * sizeof(char **))) == 0)
+ Panic(0, strnomem);
+ if ((lp = (int *)malloc((unsigned)(argc) * sizeof(int *))) == 0)
+ Panic(0, strnomem);
+ act->nr = nr;
+ act->args = pp;
+ act->argl = lp;
+ while (argc--)
+ {
+ *lp = argl ? *argl++ : (int)strlen(*args);
+ *pp++ = SaveStrn(*args++, *lp++);
+ }
+ *pp = 0;
+}
+
static char **
SaveArgs(args)
char **args;
@@ -3556,7 +3898,7 @@ char **args;
while (args[argc])
argc++;
- if ((pp = ap = (char **) malloc((unsigned) (argc + 1) * sizeof(char **))) == 0)
+ if ((pp = ap = (char **)malloc((unsigned)(argc + 1) * sizeof(char **))) == 0)
Panic(0, strnomem);
while (argc--)
*pp++ = SaveStr(*args++);
@@ -3564,6 +3906,7 @@ char **args;
return ap;
}
+
/*
* buf is split into argument vector args.
* leading whitespace is removed.
@@ -3574,111 +3917,177 @@ char **args;
* argc is returned.
*/
int
-Parse(buf, args)
+Parse(buf, bufl, args, argl)
char *buf, **args;
+int bufl, *argl;
{
register char *p = buf, **ap = args, *pp;
register int delim, argc;
+ int *lp = argl;
+ debug2("Parse %d %s\n", bufl, buf);
argc = 0;
+ pp = buf;
+ delim = 0;
for (;;)
{
while (*p && (*p == ' ' || *p == '\t'))
++p;
- if (argc == 0)
- {
- /*
- * Expand hardcoded shortcuts.
- * This should not be done here, cause multiple commands per
- * line or prefixed commands won't be recognized.
- * But as spaces between shortcut character and arguments
- * can be ommited this expansion affects tokenisation and
- * should be done here. Hmmm. jw.
- */
- switch (*p)
- {
- case '@':
- *ap++ = "at";
- /*
- * If comments were removed before this shortcut expanded,
- * we wouldn't need this hack.
- */
- if (p[1] == '#')
- *p = '\\';
- while (*(++p) == ' ' || *p == '\t')
- ;
- argc++;
- break;
#ifdef PSEUDOS
- case '!':
- case '|':
- *ap++ = "exec";
- if (*p == '!')
- p++;
- while (*p == ' ' || *p == '\t')
- p++;
- argc++;
- break;
-#endif
- }
+ if (argc == 0 && *p == '!')
+ {
+ *ap++ = "exec";
+ *lp++ = 4;
+ p++;
+ argc++;
+ continue;
}
- if (*p == '\0' || *p == '#')
+#endif
+ if (*p == '\0' || *p == '#' || *p == '\n')
{
*p = '\0';
+ for (delim = 0; delim < argc; delim++)
+ debug1("-- %s\n", args[delim]);
args[argc] = 0;
return argc;
}
- if (*p == '\\' && p[1] == '#')
- p++;
if (++argc >= MAXARGS)
{
Msg(0, "%s: too many tokens.", rc_name);
return 0;
}
- delim = 0;
- *ap++ = pp = p;
- while (*p && (delim || (*p != ' ' && *p != '\t')))
- {
+ *ap++ = pp;
+
+ debug1("- new arg %s\n", p);
+ while (*p)
+ {
if (*p == delim)
delim = 0;
- else if (!delim && (*p == '"' || *p == '\''))
+ else if (delim != '\'' && *p == '\\' && (p[1] == '\'' || p[1] == '"' || p[1] == '\\' || p[1] == '$' || p[1] == '#' || p[1] == '^' || (p[1] >= '0' && p[1] <= '7')))
+ {
+ p++;
+ if (*p >= '0' && *p <= '7')
+ {
+ *pp = *p - '0';
+ if (p[1] >= '0' && p[1] <= '7')
+ {
+ p++;
+ *pp = (*pp << 3) | (*p - '0');
+ if (p[1] >= '0' && p[1] <= '7')
+ {
+ p++;
+ *pp = (*pp << 3) | (*p - '0');
+ }
+ }
+ pp++;
+ }
+ else
+ *pp++ = *p;
+ }
+ else if (delim != '\'' && *p == '$' && (p[1] == '{' || p[1] == ':' || (p[1] >= 'a' && p[1] <= 'z') || (p[1] >= 'A' && p[1] <= 'Z') || (p[1] >= '0' && p[1] <= '9') || p[1] == '_'))
+
+ {
+ char *ps, *pe, op, *v, xbuf[11];
+ int vl;
+
+ ps = ++p;
+ debug1("- var %s\n", ps);
+ p++;
+ while (*p)
+ {
+ if (*ps == '{' && *p == '}')
+ break;
+ if (*ps == ':' && *p == ':')
+ break;
+ if (*ps != '{' && *ps != ':' && (*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z') && (*p < '0' || *p > '9') && *p != '_')
+ break;
+ p++;
+ }
+ pe = p;
+ if (*ps == '{' || *ps == ':')
+ {
+ if (!*p)
+ {
+ Msg(0, "%s: bad variable name.", rc_name);
+ return 0;
+ }
+ p++;
+ }
+ op = *pe;
+ *pe = 0;
+ debug1("- var is '%s'\n", ps);
+ if (*ps == ':')
+ v = gettermcapstring(ps + 1);
+ else
+ {
+ if (*ps == '{')
+ ps++;
+ v = xbuf;
+ if (!strcmp(ps, "TERM"))
+ v = display ? D_termname : "unknown";
+ else if (!strcmp(ps, "COLUMNS"))
+ sprintf(xbuf, "%d", display ? D_width : -1);
+ else if (!strcmp(ps, "LINES"))
+ sprintf(xbuf, "%d", display ? D_height : -1);
+ else
+ v = getenv(ps);
+ }
+ *pe = op;
+ vl = v ? strlen(v) : 0;
+ if (vl)
+ {
+ debug1("- sub is '%s'\n", v);
+ if (p - pp < vl)
+ {
+ int right = buf + bufl - (p + strlen(p) + 1);
+ if (right > 0)
+ {
+ bcopy(p, p + right, strlen(p) + 1);
+ p += right;
+ }
+ }
+ if (p - pp < vl)
+ {
+ Msg(0, "%s: no space left for variable expansion.", rc_name);
+ return 0;
+ }
+ bcopy(v, pp, vl);
+ pp += vl;
+ }
+ continue;
+ }
+ else if (delim != '\'' && *p == '^' && p[1])
+ {
+ p++;
+ *pp++ = *p == '?' ? '\177' : *p & 0x1f;
+ }
+ else if (delim == 0 && (*p == '\'' || *p == '"'))
delim = *p;
+ else if (delim == 0 && (*p == ' ' || *p == '\t' || *p == '\n'))
+ break;
else
*pp++ = *p;
p++;
- }
- if (*p == 0)
+ }
+ if (delim)
{
- if (delim)
- {
- Msg(0, "%s: Missing quote.", rc_name);
- return 0;
- }
+ Msg(0, "%s: Missing %c quote.", rc_name, delim);
+ return 0;
}
- else
+ if (*p)
p++;
*pp = 0;
+ debug2("- arg done, '%s' rest %s\n", ap[-1], p);
+ *lp++ = pp - ap[-1];
+ pp++;
}
}
-int
-ParseEscape(u, p)
+void
+SetEscape(u, e, me)
struct acluser *u;
-char *p;
+int e, me;
{
- unsigned char buf[2];
- int e, me;
-
- if (*p == 0)
- e = me = -1;
- else
- {
- if ((p = ParseChar(p, (char *)buf)) == NULL ||
- (p = ParseChar(p, (char *)buf+1)) == NULL || *p)
- return -1;
- e = buf[0];
- me = buf[1];
- }
if (u)
{
u->u_Esc = e;
@@ -3709,7 +4118,6 @@ char *p;
}
}
}
- return 0;
}
int
@@ -3799,6 +4207,56 @@ int *var;
return 0;
}
+static int
+ParseNum1000(act, var)
+struct action *act;
+int *var;
+{
+ int i;
+ char *p, **args = act->args;
+ int dig = 0;
+
+ p = *args;
+ if (p == 0 || *p == 0 || args[1])
+ {
+ Msg(0, "%s: %s: invalid argument. Give one argument.",
+ rc_name, comms[act->nr].name);
+ return -1;
+ }
+ i = 0;
+ while (*p)
+ {
+ if (*p >= '0' && *p <= '9')
+ {
+ if (dig < 4)
+ i = 10 * i + (*p - '0');
+ else if (dig == 4 && *p >= '5')
+ i++;
+ if (dig)
+ dig++;
+ }
+ else if (*p == '.' && !dig)
+ dig++;
+ else
+ {
+ Msg(0, "%s: %s: invalid argument. Give floating point argument.",
+ rc_name, comms[act->nr].name);
+ return -1;
+ }
+ p++;
+ }
+ if (dig == 0)
+ i *= 1000;
+ else
+ while (dig++ < 4)
+ i *= 10;
+ if (i < 0)
+ i = (int)((unsigned int)~0 >> 1);
+ debug1("ParseNum1000 got %d\n", i);
+ *var = i;
+ return 0;
+}
+
static struct win *
WindowByName(s)
char *s;
@@ -3912,42 +4370,6 @@ char *bname;
return 0;
}
-/*
- * Interprets ^?, ^@ and other ^-control-char notation.
- * Interprets \ddd octal notation
- *
- * The result is placed in *cp, p is advanced behind the parsed expression and
- * returned.
- */
-static char *
-ParseChar(p, cp)
-char *p, *cp;
-{
- if (*p == 0)
- return 0;
- if (*p == '^' && p[1])
- {
- if (*++p == '?')
- *cp = '\177';
- else if (*p >= '@')
- *cp = Ctrl(*p);
- else
- return 0;
- ++p;
- }
- else if (*p == '\\' && *++p <= '7' && *p >= '0')
- {
- *cp = 0;
- do
- *cp = *cp * 8 + *p - '0';
- while (*++p <= '7' && *p >= '0');
- }
- else
- *cp = *p++;
- return p;
-}
-
-
static int
IsNum(s, base)
register char *s;
@@ -4092,13 +4514,17 @@ struct win *wi;
/*
* Place the window at the head of the most-recently-used list
*/
- for (pp = &windows; (p = *pp); pp = &p->w_next)
- if (p == wi)
- break;
- ASSERT(p);
- *pp = p->w_next;
- p->w_next = windows;
- windows = p;
+ if (windows != wi)
+ {
+ for (pp = &windows; (p = *pp); pp = &p->w_next)
+ if (p == wi)
+ break;
+ ASSERT(p);
+ *pp = p->w_next;
+ p->w_next = windows;
+ windows = p;
+ WListLinkChanged();
+ }
}
}
}
@@ -4208,6 +4634,7 @@ PreviousWindow()
static int
MoreWindows()
{
+ char *m = "No other window.";
if (windows && (fore == 0 || windows->w_next))
return 1;
if (fore == 0)
@@ -4215,7 +4642,7 @@ MoreWindows()
Msg(0, "No window available");
return 0;
}
- Msg(0, "No other window."+1-1, fore->w_number); /* other arg for nethack */
+ Msg(0, m, fore->w_number); /* other arg for nethack */
return 0;
}
@@ -4259,7 +4686,16 @@ struct win *wi;
gotone = 1;
}
if (gotone)
- Activate(-1);
+ {
+#ifdef ZMODEM
+ if (wi->w_zdisplay == display)
+ {
+ D_blocked = 0;
+ D_readev.condpos = D_readev.condneg = 0;
+ }
+#endif
+ Activate(-1);
+ }
}
FreeWindow(wi);
WindowChanged((struct win *)0, 'w');
@@ -4309,6 +4745,7 @@ int where;
register char *s, *ss;
register struct win **pp, *p;
register char *cmd;
+ int l;
s = ss = buf;
for (pp = ((flags & 4) && where >= 0) ? wtab + where + 1: wtab; pp < wtab + MAXWIN; pp++)
@@ -4321,7 +4758,10 @@ int where;
continue;
cmd = p->w_title;
- if (s - buf + strlen(cmd) > len - 24)
+ l = strlen(cmd);
+ if (l > 20)
+ l = 20;
+ if (s - buf + l > len - 24)
break;
if (s > buf || (flags & 4))
{
@@ -4341,8 +4781,8 @@ int where;
s = AddWindowFlags(s, len, p);
}
*s++ = ' ';
- strcpy(s, cmd);
- s += strlen(s);
+ strncpy(s, cmd, l);
+ s += l;
}
*s = 0;
return ss;
@@ -4510,7 +4950,21 @@ ShowInfo()
# endif
if (D_CC0 || (D_CS0 && *D_CS0))
{
- if (wp->w_gr)
+ if (wp->w_gr == 2)
+ {
+ sprintf(p, " G%c", wp->w_Charset + '0');
+ if (wp->w_FontE >= ' ')
+ p[3] = wp->w_FontE;
+ else
+ {
+ p[3] = '^';
+ p[4] = wp->w_FontE ^ 0x40;
+ p++;
+ }
+ p[4] = '[';
+ p++;
+ }
+ else if (wp->w_gr)
sprintf(p++, " G%c%c[", wp->w_Charset + '0', wp->w_CharsetR + '0');
else
sprintf(p, " G%c[", wp->w_Charset + '0');
@@ -4600,7 +5054,7 @@ char *data; /* dummy */
{
ASSERT(display);
if (len && fore)
- ChangeAKA(fore, buf, 20);
+ ChangeAKA(fore, buf, strlen(buf));
}
static void
@@ -4608,7 +5062,7 @@ InputAKA()
{
char *s, *ss;
int n;
- Input("Set window's title to: ", 20, INP_COOKED, AKAfin, NULL);
+ Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL);
s = fore->w_title;
if (!s)
return;
@@ -4628,8 +5082,18 @@ char *buf;
int len;
char *data; /* dummy */
{
+ char mbuf[256];
if (len)
- RcLine(buf);
+ {
+ len = strlen(buf) + 1;
+ if (len > (int)sizeof(mbuf))
+ RcLine(buf, len);
+ else
+ {
+ bcopy(buf, mbuf, len);
+ RcLine(mbuf, sizeof mbuf);
+ }
+ }
}
static void
@@ -4840,37 +5304,40 @@ char *fn, **av;
* l (left), r (right). placing a mark will now be done with ".".
*/
int
-CompileKeys(s, array)
+CompileKeys(s, sl, array)
char *s;
+int sl;
unsigned char *array;
{
int i;
unsigned char key, value;
- if (!s || !*s)
+ if (sl == 0)
{
for (i = 0; i < 256; i++)
array[i] = i;
return 0;
}
debug1("CompileKeys: '%s'\n", s);
- while (*s)
+ while (sl)
{
- s = ParseChar(s, (char *) &key);
- if (!s || *s != '=')
+ key = *(unsigned char *)s++;
+ if (*s != '=' || sl < 3)
return -1;
+ sl--;
do
{
- s = ParseChar(++s, (char *) &value);
- if (!s)
- return -1;
+ s++;
+ sl -= 2;
+ value = *(unsigned char *)s++;
array[value] = key;
}
- while (*s == '=');
- if (!*s)
+ while (*s == '=' && sl >= 2);
+ if (sl == 0)
break;
if (*s++ != ':')
return -1;
+ sl--;
}
return 0;
}
@@ -4932,7 +5399,7 @@ char *data; /* dummy */
bcopy(D_user->u_plop.buf, pp->buf, D_user->u_plop.len);
}
pp->len = D_user->u_plop.len;
-#ifdef ENCODING
+#ifdef ENCODINGS
pp->enc = D_user->u_plop.enc;
#endif
Msg(0, "Copied %d characters into register %c", D_user->u_plop.len, *buf);
@@ -5001,6 +5468,7 @@ char *data; /* dummy */
}
act.nr = (int)data;
act.args = noargs;
+ act.argl = 0;
DoAction(&act, -1);
}
@@ -5092,7 +5560,7 @@ int len;
char *data;
{
int st;
- char salt[2];
+ char salt[3];
struct acluser *u = (struct acluser *)data;
ASSERT(u);
@@ -5117,6 +5585,7 @@ char *data;
{
for (st = 0; st < 2; st++)
salt[st] = 'A' + (int)((time(0) >> 6 * st) % 26);
+ salt[2] = 0;
buf = crypt(u->u_password, salt);
bzero(u->u_password, strlen(u->u_password));
free((char *)u->u_password);
@@ -5215,11 +5684,11 @@ char *data; /* dummy */
}
else
{
- for (i = 0; i < sizeof(digraphs)/sizeof(*digraphs); i++)
+ for (i = 0; i < (int)(sizeof(digraphs)/sizeof(*digraphs)); i++)
if ((digraphs[i][0] == (unsigned char)buf[0] && digraphs[i][1] == (unsigned char)buf[1]) ||
(digraphs[i][0] == (unsigned char)buf[1] && digraphs[i][1] == (unsigned char)buf[0]))
break;
- if (i == sizeof(digraphs)/sizeof(*digraphs))
+ if (i == (int)(sizeof(digraphs)/sizeof(*digraphs)))
{
Msg(0, "Unknown digraph");
return;
@@ -5237,7 +5706,7 @@ char *data; /* dummy */
}
#ifdef MAPKEYS
-static int
+int
StuffKey(i)
int i;
{
@@ -5258,13 +5727,13 @@ int i;
act = 0;
#ifdef COPY_PASTE
if (InMark() || InInput() || InWList())
- act = &mmtab[i];
+ act = i < KMAP_KEYS+KMAP_AKEYS ? &mmtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].mm;
#endif
if ((!act || act->nr == RC_ILLEGAL) && !D_mapdefault)
- act = &umtab[i];
+ act = i < KMAP_KEYS+KMAP_AKEYS ? &umtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].um;
D_mapdefault = 0;
if (!act || act->nr == RC_ILLEGAL)
- act = &dmtab[i];
+ act = i < KMAP_KEYS+KMAP_AKEYS ? &dmtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].dm;
if (act == 0 || act->nr == RC_ILLEGAL)
return -1;
DoAction(act, 0);
diff --git a/pty.c b/pty.c
index e9f19a0..f89d44c 100644
--- a/pty.c
+++ b/pty.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: pty.c,v 1.6 1994/05/31 12:32:44 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -94,6 +91,14 @@ static char TtyProto[] = "/dev/ttyXY";
static void initmaster __P((int));
+#if defined(sun)
+/* sun's utmp_update program opens the salve side, thus corrupting
+ */
+int pty_preopen = 1;
+#else
+int pty_preopen = 0;
+#endif
+
/*
* Open all ptys with O_NOCTTY, just to be on the safe side
* (RISCos mips breaks otherwise)
@@ -281,10 +286,6 @@ char **ttyn;
#if defined(_AIX) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE)
#define PTY_DONE
-#ifdef _IBMR2
-int aixhack = -1;
-#endif
-
int
OpenPTY(ttyn)
char **ttyn;
@@ -303,13 +304,7 @@ char **ttyn;
}
initmaster(f);
# ifdef _IBMR2
- if (aixhack >= 0)
- close(aixhack);
- if ((aixhack = open(TtyName, O_RDWR | O_NOCTTY)) < 0)
- {
- close(f);
- return -1;
- }
+ pty_preopen = 1;
# endif
*ttyn = TtyName;
return f;
@@ -318,6 +313,25 @@ char **ttyn;
/***************************************************************/
+#if defined(HAVE_OPENPTY) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ int f, s;
+ if (openpty(&f, &s, TtyName, NULL, NULL) != 0)
+ return -1;
+ close(s);
+ initmaster(f);
+ pty_preopen = 1;
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
#ifndef PTY_DONE
int
OpenPTY(ttyn)
diff --git a/putenv.c b/putenv.c
index 63a4458..8c9fc03 100644
--- a/putenv.c
+++ b/putenv.c
@@ -54,8 +54,6 @@
* copying the entire environment onto the heap the first time you
* call putenv(), then doing realloc() uniformly later on.
*/
-#include "rcs.h"
-RCS_ID("$Id: putenv.c,v 1.1.1.1 1993/06/16 23:51:15 jnweiger Exp $ FAU")
#include "config.h"
diff --git a/rcs.h b/rcs.h
deleted file mode 100644
index 3ee9dc4..0000000
--- a/rcs.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program (see the file COPYING); if not, write to the
- * Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- ****************************************************************
- * $Id: rcs.h,v 1.1.1.1 1993/06/16 23:51:16 jnweiger Exp $ FAU
- */
-
-/*
- * rcs.h
- *
- * jw 9.2.92
- **************************************************
- * RCS_ID("$Id: rcs.h,v 1.1.1.1 1993/06/16 23:51:16 jnweiger Exp $ FAU");
- */
-
-#ifndef __RCS_H__
-# define __RCS_H__
-
-# if !defined(lint)
-# ifdef __GNUC__
-# define RCS_ID(id) static char *rcs_id() { return rcs_id(id); }
-# else
-# define RCS_ID(id) static char *rcs_id = id;
-# endif /* !__GNUC__ */
-# else
-# define RCS_ID(id) /* Nothing */
-# endif /* !lint */
-
-#endif /* __RCS_H__ */
diff --git a/resize.c b/resize.c
index b28544c..6b5cef4 100644
--- a/resize.c
+++ b/resize.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: resize.c,v 1.5 1994/05/31 12:32:47 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <signal.h>
#ifndef sun
@@ -46,6 +43,7 @@ static int AllocMline __P((struct mline *ml, int));
static void MakeBlankLine __P((unsigned char *, int));
static void kaablamm __P((void));
static int BcopyMline __P((struct mline *, int, struct mline *, int, int, int));
+static void SwapAltScreen __P((struct win *));
extern struct layer *flayer;
extern struct display *display, *displays;
@@ -56,7 +54,7 @@ extern int Z0width, Z1width;
extern int captionalways;
#if defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
- struct winsize glwz;
+struct winsize glwz;
#endif
static struct mline mline_zero = {
@@ -130,6 +128,10 @@ int change_flag;
debug("CheckScreenSize: No change -> return.\n");
return;
}
+#ifdef BLANKER_PRG
+ KillBlanker();
+#endif
+ ResetIdle();
ChangeScreenSize(wi, he, change_flag);
/* XXX Redisplay logic */
#if 0
@@ -370,7 +372,7 @@ struct display *norefdisp;
p = Layer2Window(l);
if (oldflayer && (l == oldflayer || Layer2Window(oldflayer) == p))
- while(oldflayer->l_next)
+ while (oldflayer->l_next)
oldflayer = oldflayer->l_next;
if (p)
@@ -383,7 +385,7 @@ struct display *norefdisp;
flayer = cv->c_layer;
if (flayer->l_next)
d->d_kaablamm = 1;
- while(flayer->l_next)
+ while (flayer->l_next)
ExitOverlayPage();
}
}
@@ -398,9 +400,10 @@ struct display *norefdisp;
}
else
{
- if (flayer->l_next && display)
- D_kaablamm = 1;
- while(flayer->l_next)
+ if (flayer->l_next)
+ for (cv = flayer->l_cvlist; cv; cv = cv->c_lnext)
+ cv->c_display->d_kaablamm = 1;
+ while (flayer->l_next)
ExitOverlayPage();
}
if (p)
@@ -1019,10 +1022,83 @@ int wi, he, hi;
{
ml = OLDWIN(fy);
ASSERT(ml->image);
- for (l = 0; l < p->w_width; l++)
- ASSERT((unsigned char)ml->image[l] >= ' ');
+# ifdef UTF8
+ if (p->w_encoding == UTF8)
+ {
+ for (l = 0; l < p->w_width; l++)
+ ASSERT(ml->image[l] >= ' ' || ml->font[l]);
+ }
+ else
+#endif
+ for (l = 0; l < p->w_width; l++)
+ ASSERT(ml->image[l] >= ' ');
}
#endif
return 0;
}
+void
+FreeAltScreen(p)
+struct win *p;
+{
+ int i;
+
+ if (p->w_alt_mlines)
+ for (i = 0; i < p->w_alt_height; i++)
+ FreeMline(p->w_alt_mlines + i);
+ p->w_alt_mlines = 0;
+ p->w_alt_width = 0;
+ p->w_alt_height = 0;
+ p->w_alt_x = 0;
+ p->w_alt_y = 0;
+#ifdef COPY_PASTE
+ if (p->w_alt_hlines)
+ for (i = 0; i < p->w_alt_histheight; i++)
+ FreeMline(p->w_alt_hlines + i);
+ p->w_alt_hlines = 0;
+ p->w_alt_histidx = 0;
+#endif
+ p->w_alt_histheight = 0;
+}
+
+static void
+SwapAltScreen(p)
+struct win *p;
+{
+ struct mline *ml;
+ int t;
+
+ ml = p->w_alt_mlines; p->w_alt_mlines = p->w_mlines; p->w_mlines = ml;
+ t = p->w_alt_width; p->w_alt_width = p->w_width; p->w_width = t;
+ t = p->w_alt_height; p->w_alt_height = p->w_height; p->w_height = t;
+ t = p->w_alt_histheight; p->w_alt_histheight = p->w_histheight; p->w_histheight = t;
+ t = p->w_alt_x; p->w_alt_x = p->w_x; p->w_x = t;
+ t = p->w_alt_y; p->w_alt_y = p->w_y; p->w_y = t;
+#ifdef COPY_PASTE
+ ml = p->w_alt_hlines; p->w_alt_hlines = p->w_hlines; p->w_hlines = ml;
+ t = p->w_alt_histidx; p->w_alt_histidx = p->w_histidx; p->w_histidx = t;
+#endif
+}
+
+void
+EnterAltScreen(p)
+struct win *p;
+{
+ int ox = p->w_x, oy = p->w_y;
+ FreeAltScreen(p);
+ SwapAltScreen(p);
+ ChangeWindowSize(p, p->w_alt_width, p->w_alt_height, p->w_alt_histheight);
+ p->w_x = ox;
+ p->w_y = oy;
+}
+
+void
+LeaveAltScreen(p)
+struct win *p;
+{
+ if (!p->w_alt_mlines)
+ return;
+ SwapAltScreen(p);
+ ChangeWindowSize(p, p->w_alt_width, p->w_alt_height, p->w_alt_histheight);
+ FreeAltScreen(p);
+}
diff --git a/sched.c b/sched.c
index 9e4b608..7a181d8 100644
--- a/sched.c
+++ b/sched.c
@@ -21,10 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: sched.c,v 1.24 1994/09/06 17:00:20 mlschroe Exp $ FAU")
-
-
#include <sys/types.h>
#if !defined(sun) && !defined(B43) && !defined(ISC) && !defined(pyr) && !defined(_CX_UX)
# include <time.h>
@@ -41,7 +37,7 @@ static struct event *nextev;
static int calctimeout;
static struct event *calctimo __P((void));
-#if (defined(sgi) && defined(SVR4)) || defined(__osf__)
+#if (defined(sgi) && defined(SVR4)) || defined(__osf__) || defined(M_UNIX)
static int sgihack __P((void));
#endif
@@ -194,8 +190,8 @@ sched()
if (errno == EIO && sgihack())
continue;
#endif
-#ifdef __osf__
- /* OSF/1 3.x bug: EBADF */
+#if defined(__osf__) || defined(M_UNIX)
+ /* OSF/1 3.x, SCO bug: EBADF */
/* OSF/1 4.x bug: EIO */
if ((errno == EIO || errno == EBADF) && sgihack())
continue;
@@ -258,7 +254,7 @@ int timo;
}
-#if (defined(sgi) && defined(SVR4)) || defined(__osf__)
+#if (defined(sgi) && defined(SVR4)) || defined(__osf__) || defined(M_UNIX)
extern struct display *display, *displays;
static int sgihack()
diff --git a/screen.c b/screen.c
index a0d0f0c..70741df 100644
--- a/screen.c
+++ b/screen.c
@@ -30,10 +30,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: screen.c,v 1.24 1994/09/06 17:00:20 mlschroe Exp $ FAU")
-
-
#include <sys/types.h>
#include <ctype.h>
@@ -124,12 +120,17 @@ extern unsigned char mark_key_tab[];
#endif
extern char version[];
extern char DefaultShell[];
+#ifdef ZMODEM
+extern char *zmodem_sendcmd;
+extern char *zmodem_recvcmd;
+#endif
char *ShellProg;
char *ShellArgs[2];
extern struct NewWindow nwin_undef, nwin_default, nwin_options;
+struct backtick;
static struct passwd *getpwbyname __P((char *, struct passwd *));
static void SigChldHandler __P((void));
@@ -141,7 +142,13 @@ static void DoWait __P((void));
static void serv_read_fn __P((struct event *, char *));
static void serv_select_fn __P((struct event *, char *));
static void logflush_fn __P((struct event *, char *));
+static void backtick_filter __P((struct backtick *));
+static void backtick_fn __P((struct event *, char *));
+static char *runbacktick __P((struct backtick *, int *, time_t));
static int IsSymbol __P((char *, char *));
+static char *ParseChar __P((char *, char *));
+static int ParseEscape __P((char *));
+static char *pad_expand __P((char *, char *, int, int));
#ifdef DEBUG
static void fds __P((void));
#endif
@@ -217,9 +224,7 @@ char *screenencodings;
#ifdef NETHACK
int nethackflag = 0;
#endif
-#ifdef MAPKEYS
-int maptimeout = 300000;
-#endif
+int maxwin = MAXWIN;
struct layer *flayer;
@@ -444,16 +449,20 @@ char **av;
#endif
default_startup = (ac > 1) ? 0 : 1;
adaptflag = 0;
- VBellWait = VBELLWAIT;
- MsgWait = MSGWAIT;
- MsgMinWait = MSGMINWAIT;
+ VBellWait = VBELLWAIT * 1000;
+ MsgWait = MSGWAIT * 1000;
+ MsgMinWait = MSGMINWAIT * 1000;
SilenceWait = SILENCEWAIT;
#ifdef HAVE_BRAILLE
InitBraille();
#endif
+#ifdef ZMODEM
+ zmodem_sendcmd = SaveStr("!!! sz -vv -b ");
+ zmodem_recvcmd = SaveStr("!!! rz -vv -b -E");
+#endif
#ifdef COPY_PASTE
- CompileKeys((char *)NULL, mark_key_tab);
+ CompileKeys((char *)0, 0, mark_key_tab);
#endif
#ifdef UTF8
InitBuiltinTabs();
@@ -536,7 +545,7 @@ char **av;
exit_with_usage(myname, "Specify command characters with -e", NULL);
ap = *++av;
}
- if (ParseEscape(NULL, ap))
+ if (ParseEscape(ap))
Panic(0, "Two characters are required with -e option, not '%s'.", ap);
ap = NULL;
break;
@@ -713,6 +722,23 @@ char **av;
else
break;
}
+
+ real_uid = getuid();
+ real_gid = getgid();
+ eff_uid = geteuid();
+ eff_gid = getegid();
+ if (eff_uid != real_uid)
+ {
+ /* if running with s-bit, we must install a special signal
+ * handler routine that resets the s-bit, so that we get a
+ * core file anyway.
+ */
+#ifdef SIGBUS /* OOPS, linux has no bus errors! */
+ signal(SIGBUS, CoreDump);
+#endif /* SIGBUS */
+ signal(SIGSEGV, CoreDump);
+ }
+
#ifdef USE_LOCALE
setlocale(LC_ALL, "");
#endif
@@ -749,21 +775,6 @@ char **av;
#endif
if (ac)
nwin.args = av;
- real_uid = getuid();
- real_gid = getgid();
- eff_uid = geteuid();
- eff_gid = getegid();
- if (eff_uid != real_uid)
- {
- /* if running with s-bit, we must install a special signal
- * handler routine that resets the s-bit, so that we get a
- * core file anyway.
- */
-#ifdef SIGBUS /* OOPS, linux has no bus errors! */
- signal(SIGBUS, CoreDump);
-#endif /* SIGBUS */
- signal(SIGSEGV, CoreDump);
- }
/* make the write() calls return -1 on all errors */
#ifdef SIGXFSZ
@@ -840,7 +851,7 @@ char **av;
if ((LoginName = getlogin()) && LoginName[0] != '\0')
{
if ((ppp = getpwnam(LoginName)) != (struct passwd *) 0)
- if (ppp->pw_uid != real_uid)
+ if ((int)ppp->pw_uid != real_uid)
ppp = (struct passwd *) 0;
}
if (ppp == 0)
@@ -888,7 +899,7 @@ char **av;
#ifdef MULTIUSER
tty_mode = (int)st.st_mode & 0777;
#endif
- if ((n = secopen(attach_tty, O_RDWR, 0)) < 0)
+ if ((n = secopen(attach_tty, O_RDWR | O_NONBLOCK, 0)) < 0)
Panic(0, "Cannot open your terminal '%s' - please check.", attach_tty);
close(n);
debug1("attach_tty is %s\n", attach_tty);
@@ -905,7 +916,7 @@ char **av;
#ifdef _MODE_T
oumask = umask(0); /* well, unsigned never fails? jw. */
#else
- if ((oumask = umask(0)) == -1)
+ if ((oumask = (int)umask(0)) == -1)
Panic(errno, "Cannot change umask to zero");
#endif
SockDir = getenv("SCREENDIR");
@@ -976,12 +987,12 @@ char **av;
{
if (!S_ISDIR(st.st_mode))
Panic(0, "'%s' must be a directory.", SockDir);
- if (eff_uid == 0 && real_uid && st.st_uid != eff_uid)
+ if (eff_uid == 0 && real_uid && (int)st.st_uid != eff_uid)
Panic(0, "Directory '%s' must be owned by root.", SockDir);
n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :
- (eff_gid == st.st_gid && eff_gid != real_gid) ? 0775 :
+ (eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 :
0777;
- if ((st.st_mode & 0777) != n)
+ if (((int)st.st_mode & 0777) != n)
Panic(0, "Directory '%s' must have mode %03o.", SockDir, n);
}
sprintf(SockPath, "%s/S-%s", SockDir, LoginName);
@@ -1003,17 +1014,19 @@ char **av;
#ifdef MULTIUSER
if (multi)
{
- if (st.st_uid != multi_uid)
+ if ((int)st.st_uid != multi_uid)
Panic(0, "%s is not the owner of %s.", multi, SockPath);
}
else
#endif
{
- if (st.st_uid != real_uid)
+ if ((int)st.st_uid != real_uid)
Panic(0, "You are not the owner of %s.", SockPath);
}
if ((st.st_mode & 0777) != 0700)
Panic(0, "Directory %s must have mode 700.", SockPath);
+ if (SockMatch && index(SockMatch, '/'))
+ Panic(0, "Bad session name '%s'", SockMatch);
SockName = SockPath + strlen(SockPath) + 1;
*SockName = 0;
(void) umask(oumask);
@@ -1296,6 +1309,7 @@ char **av;
}
else
brktty(-1); /* just try */
+ signal(SIGCHLD, SigChld);
#ifdef ETCSCREENRC
# ifdef ALLOW_SYSSCREENRC
if ((ap = getenv("SYSSCREENRC")))
@@ -1325,7 +1339,6 @@ char **av;
if (display && default_startup)
display_copyright();
- signal(SIGCHLD, SigChld);
signal(SIGINT, SigInt);
if (rflag && (rflag & 1) == 0)
{
@@ -1609,7 +1622,7 @@ int i;
{
struct win *p, *next;
- signal(SIGCHLD, SIG_IGN);
+ signal(SIGCHLD, SIG_DFL);
signal(SIGHUP, SIG_IGN);
debug1("Finit(%d);\n", i);
for (p = windows; p; p = next)
@@ -1740,7 +1753,7 @@ int mode;
AddStr("[power detached]\r\n");
if (PowDetachString)
{
- AddStr(expand_vars(PowDetachString, display));
+ AddStr(PowDetachString);
AddStr("\r\n");
}
sign = SIG_POWER_BYE;
@@ -1750,7 +1763,7 @@ int mode;
AddStr("[remote power detached]\r\n");
if (PowDetachString)
{
- AddStr(expand_vars(PowDetachString, display));
+ AddStr(PowDetachString);
AddStr("\r\n");
}
sign = SIG_POWER_BYE;
@@ -2054,13 +2067,220 @@ int padlen;
return pn2;
}
+struct backtick {
+ struct backtick *next;
+ int num;
+ int tick;
+ int lifespan;
+ time_t bestbefore;
+ char result[MAXSTR];
+ char **cmdv;
+ struct event ev;
+ char *buf;
+ int bufi;
+};
+
+struct backtick *backticks;
+
+static void
+backtick_filter(bt)
+struct backtick *bt;
+{
+ char *p, *q;
+ int c;
+
+ for (p = q = bt->result; (c = (unsigned char)*p++) != 0;)
+ {
+ if (c == '\t')
+ c = ' ';
+ if (c >= ' ' || c == '\005')
+ *q++ = c;
+ }
+ *q = 0;
+}
+
+static void
+backtick_fn(ev, data)
+struct event *ev;
+char *data;
+{
+ struct backtick *bt;
+ int i, j, k, l;
+
+ bt = (struct backtick *)data;
+ debug1("backtick_fn for #%d\n", bt->num);
+ i = bt->bufi;
+ l = read(ev->fd, bt->buf + i, MAXSTR - i);
+ if (l <= 0)
+ {
+ debug1("EOF on backtick #%d\n", bt->num);
+ evdeq(ev);
+ close(ev->fd);
+ ev->fd = -1;
+ return;
+ }
+ debug1("read %d bytes\n", l);
+ i += l;
+ for (j = 0; j < l; j++)
+ if (bt->buf[i - j - 1] == '\n')
+ break;
+ if (j < l)
+ {
+ for (k = i - j - 2; k >= 0; k--)
+ if (bt->buf[k] == '\n')
+ break;
+ k++;
+ bcopy(bt->buf + k, bt->result, i - j - k);
+ bt->result[i - j - k - 1] = 0;
+ backtick_filter(bt);
+ WindowChanged(0, '`');
+ }
+ if (j == l && i == MAXSTR)
+ {
+ j = MAXSTR/2;
+ l = j + 1;
+ }
+ if (j < l)
+ {
+ if (j)
+ bcopy(bt->buf + i - j, bt->buf, j);
+ i = j;
+ }
+ bt->bufi = i;
+}
+
+void
+setbacktick(num, lifespan, tick, cmdv)
+int num;
+int lifespan;
+int tick;
+char **cmdv;
+{
+ struct backtick **btp, *bt;
+ char **v;
+
+ debug1("setbacktick called for backtick #%d\n", num);
+ for (btp = &backticks; (bt = *btp) != 0; btp = &bt->next)
+ if (bt->num == num)
+ break;
+ if (!bt && !cmdv)
+ return;
+ if (bt)
+ {
+ for (v = bt->cmdv; *v; v++)
+ free(*v);
+ free(bt->cmdv);
+ if (bt->buf)
+ free(bt->buf);
+ if (bt->ev.fd >= 0)
+ close(bt->ev.fd);
+ evdeq(&bt->ev);
+ }
+ if (bt && !cmdv)
+ {
+ *btp = bt->next;
+ free(bt);
+ return;
+ }
+ if (!bt)
+ {
+ bt = (struct backtick *)malloc(sizeof *bt);
+ if (!bt)
+ {
+ Msg(0, strnomem);
+ return;
+ }
+ bzero(bt, sizeof(*bt));
+ bt->next = 0;
+ *btp = bt;
+ }
+ bt->num = num;
+ bt->tick = tick;
+ bt->lifespan = lifespan;
+ bt->bestbefore = 0;
+ bt->result[0] = 0;
+ bt->buf = 0;
+ bt->bufi = 0;
+ bt->cmdv = cmdv;
+ bt->ev.fd = -1;
+ if (bt->tick == 0 && bt->lifespan == 0)
+ {
+ debug("setbacktick: continuous mode\n");
+ bt->buf = (char *)malloc(MAXSTR);
+ if (bt->buf == 0)
+ {
+ Msg(0, strnomem);
+ setbacktick(num, 0, 0, (char **)0);
+ return;
+ }
+ bt->ev.type = EV_READ;
+ bt->ev.fd = readpipe(bt->cmdv);
+ bt->ev.handler = backtick_fn;
+ bt->ev.data = (char *)bt;
+ if (bt->ev.fd >= 0)
+ evenq(&bt->ev);
+ }
+}
+
+static char *
+runbacktick(bt, tickp, now)
+struct backtick *bt;
+int *tickp;
+time_t now;
+{
+ int f, i, l, j;
+ time_t now2;
+
+ debug1("runbacktick called for backtick #%d\n", bt->num);
+ if (bt->tick && (!*tickp || bt->tick < *tickp))
+ *tickp = bt->tick;
+ if ((bt->lifespan == 0 && bt->tick == 0) || now < bt->bestbefore)
+ {
+ debug1("returning old result (%d)\n", bt->lifespan);
+ return bt->result;
+ }
+ f = readpipe(bt->cmdv);
+ if (f == -1)
+ return bt->result;
+ i = 0;
+ while ((l = read(f, bt->result + i, sizeof(bt->result) - i)) > 0)
+ {
+ debug1("runbacktick: read %d bytes\n", l);
+ i += l;
+ for (j = 1; j < l; j++)
+ if (bt->result[i - j - 1] == '\n')
+ break;
+ if (j == l && i == sizeof(bt->result))
+ {
+ j = sizeof(bt->result) / 2;
+ l = j + 1;
+ }
+ if (j < l)
+ {
+ bcopy(bt->result + i - j, bt->result, j);
+ i = j;
+ }
+ }
+ close(f);
+ bt->result[sizeof(bt->result) - 1] = '\n';
+ if (i && bt->result[i - 1] == '\n')
+ i--;
+ debug1("runbacktick: finished, %d bytes\n", i);
+ bt->result[i] = 0;
+ backtick_filter(bt);
+ (void)time(&now2);
+ bt->bestbefore = now2 + bt->lifespan;
+ return bt->result;
+}
+
char *
-MakeWinMsgEv(str, win, esc, padlen, ev)
+MakeWinMsgEv(str, win, esc, padlen, ev, rec)
char *str;
struct win *win;
int esc;
int padlen;
struct event *ev;
+int rec;
{
static int tick;
char *s = str;
@@ -2081,6 +2301,7 @@ struct event *ev;
int truncpos = -1;
int truncper = 0;
int trunclong = 0;
+ struct backtick *bt;
if (winmsg_numrend >= 0)
winmsg_numrend = 0;
@@ -2182,11 +2403,12 @@ struct event *ev;
tm = localtime(&nowsec);
}
qmflag = 1;
+ if (!tick || tick > 3600)
+ tick = 3600;
switch (*s)
{
case 'd':
sprintf(p, "%02d", tm->tm_mday % 100);
- tick |= 4;
break;
case 'D':
#ifdef USE_LOCALE
@@ -2194,11 +2416,9 @@ struct event *ev;
#else
sprintf(p, "%3.3s", days + 3 * tm->tm_wday);
#endif
- tick |= 4;
break;
case 'm':
sprintf(p, "%02d", tm->tm_mon + 1);
- tick |= 4;
break;
case 'M':
#ifdef USE_LOCALE
@@ -2206,35 +2426,32 @@ struct event *ev;
#else
sprintf(p, "%3.3s", months + 3 * tm->tm_mon);
#endif
- tick |= 4;
break;
case 'y':
sprintf(p, "%02d", tm->tm_year % 100);
- tick |= 4;
break;
case 'Y':
sprintf(p, "%04d", tm->tm_year + 1900);
- tick |= 4;
break;
case 'a':
sprintf(p, tm->tm_hour >= 12 ? "pm" : "am");
- tick |= 4;
break;
case 'A':
sprintf(p, tm->tm_hour >= 12 ? "PM" : "AM");
- tick |= 4;
break;
case 's':
sprintf(p, "%02d", tm->tm_sec);
- tick |= 1;
+ tick = 1;
break;
case 'c':
sprintf(p, zeroflg ? "%02d:%02d" : "%2d:%02d", tm->tm_hour, tm->tm_min);
- tick |= 2;
+ if (!tick || tick > 60)
+ tick = 60;
break;
case 'C':
sprintf(p, zeroflg ? "%02d:%02d" : "%2d:%02d", (tm->tm_hour + 11) % 12 + 1, tm->tm_min);
- tick |= 2;
+ if (!tick || tick > 60)
+ tick = 60;
break;
default:
break;
@@ -2253,16 +2470,31 @@ struct event *ev;
}
else
*p = '?';
- tick |= 2;
+ if (!tick || tick > 60)
+ tick = 60;
#else
*p = '?';
#endif
p += strlen(p) - 1;
break;
+ case '`':
case 'h':
- if (win == 0 || win->w_hstatus == 0 || *win->w_hstatus == 0 || str == win->w_hstatus)
- p--;
- else
+ if (rec >= 10 || (*s == 'h' && (win == 0 || win->w_hstatus == 0 || *win->w_hstatus == 0)))
+ {
+ p--;
+ break;
+ }
+ if (*s == '`')
+ {
+ for (bt = backticks; bt; bt = bt->next)
+ if (bt->num == num)
+ break;
+ if (bt == 0)
+ {
+ p--;
+ break;
+ }
+ }
{
char savebuf[sizeof(winmsg_buf)];
int oldtick = tick;
@@ -2271,9 +2503,11 @@ struct event *ev;
*p = 0;
strcpy(savebuf, winmsg_buf);
winmsg_numrend = -winmsg_numrend;
- MakeWinMsg(win->w_hstatus, win, '\005');
- tick |= oldtick; /* small hack... */
- if (strlen(winmsg_buf) < l)
+ MakeWinMsgEv(*s == 'h' ? win->w_hstatus : runbacktick(bt, &oldtick, now.tv_sec), win, '\005', 0, (struct event *)0, rec + 1);
+ debug2("oldtick=%d tick=%d\n", oldtick, tick);
+ if (!tick || oldtick < tick)
+ tick = oldtick;
+ if ((int)strlen(winmsg_buf) < l)
strcat(savebuf, winmsg_buf);
strcpy(winmsg_buf, savebuf);
while (oldnumrend < winmsg_numrend)
@@ -2322,7 +2556,7 @@ struct event *ev;
break;
case 't':
*p = 0;
- if (win && strlen(win->w_title) < l)
+ if (win && (int)strlen(win->w_title) < l)
{
strcpy(p, win->w_title);
if (*p)
@@ -2359,7 +2593,7 @@ struct event *ev;
break;
case 'H':
*p = 0;
- if (strlen(HostName) < l)
+ if ((int)strlen(HostName) < l)
{
strcpy(p, HostName);
if (*p)
@@ -2370,7 +2604,7 @@ struct event *ev;
case 'F':
p--;
/* small hack */
- if ((ev && ev == &D_forecv->c_captev) || (!ev && win && win == D_fore))
+ if (display && ((ev && ev == &D_forecv->c_captev) || (!ev && win && win == D_fore)))
qmflag = 1;
break;
case '>':
@@ -2429,6 +2663,7 @@ struct event *ev;
left = truncpos - trunc;
if (left > p - winmsg_buf - num)
left = p - winmsg_buf - num;
+ debug1("lastpad = %d, ", lastpad);
debug3("truncpos = %d, trunc = %d, left = %d\n", truncpos, trunc, left);
if (left > 0)
{
@@ -2475,6 +2710,7 @@ struct event *ev;
trunclong = 0;
if (lastpad > p - winmsg_buf)
lastpad = p - winmsg_buf;
+ debug1("lastpad now %d\n", lastpad);
}
if (*s == '=')
{
@@ -2483,6 +2719,7 @@ struct event *ev;
lastpad = p - winmsg_buf;
truncpos = -1;
trunclong = 0;
+ debug1("lastpad2 now %d\n", lastpad);
}
p--;
}
@@ -2528,14 +2765,13 @@ struct event *ev;
}
if (ev && tick)
{
- now.tv_usec = 0;
- if (tick & 1)
+ now.tv_usec = 100000;
+ if (tick == 1)
now.tv_sec++;
- else if (tick & 2)
- now.tv_sec += 60 - (now.tv_sec % 60);
- else if (tick & 4)
- now.tv_sec += 3600 - (now.tv_sec % 3600);
+ else
+ now.tv_sec += tick - (now.tv_sec % tick);
ev->timeout = now;
+ debug2("NEW timeout %d %d\n", ev->timeout.tv_sec, tick);
}
return winmsg_buf;
}
@@ -2546,7 +2782,7 @@ char *s;
struct win *win;
int esc;
{
- return MakeWinMsgEv(s, win, esc, 0, (struct event *)0);
+ return MakeWinMsgEv(s, win, esc, 0, (struct event *)0, 0);
}
int
@@ -2613,34 +2849,6 @@ int start, max;
return 1;
}
-void
-DisplaySleep(n, eat)
-int n;
-int eat;
-{
- char buf;
- fd_set r;
- struct timeval t;
-
- if (!display)
- {
- debug("DisplaySleep has no display sigh\n");
- sleep(n);
- return;
- }
- t.tv_usec = 0;
- t.tv_sec = n;
- FD_ZERO(&r);
- FD_SET(D_userfd, &r);
- if (select(FD_SETSIZE, &r, (fd_set *)0, (fd_set *)0, &t) > 0)
- {
- debug("display activity stopped sleep\n");
- if (eat)
- read(D_userfd, &buf, 1);
- }
- debug2("DisplaySleep(%d) ending, eat was %d\n", n, eat);
-}
-
#ifdef DEBUG
static void
@@ -2744,7 +2952,7 @@ char *data;
{
D_status_bell = 1;
debug1("using vbell timeout %d\n", VBellWait);
- SetTimeout(&D_statusev, VBellWait * 1000);
+ SetTimeout(&D_statusev, VBellWait );
}
}
}
@@ -2913,3 +3121,56 @@ char *data;
}
}
+/*
+ * Interprets ^?, ^@ and other ^-control-char notation.
+ * Interprets \ddd octal notation
+ *
+ * The result is placed in *cp, p is advanced behind the parsed expression and
+ * returned.
+ */
+static char *
+ParseChar(p, cp)
+char *p, *cp;
+{
+ if (*p == 0)
+ return 0;
+ if (*p == '^' && p[1])
+ {
+ if (*++p == '?')
+ *cp = '\177';
+ else if (*p >= '@')
+ *cp = Ctrl(*p);
+ else
+ return 0;
+ ++p;
+ }
+ else if (*p == '\\' && *++p <= '7' && *p >= '0')
+ {
+ *cp = 0;
+ do
+ *cp = *cp * 8 + *p - '0';
+ while (*++p <= '7' && *p >= '0');
+ }
+ else
+ *cp = *p++;
+ return p;
+}
+
+static int
+ParseEscape(p)
+char *p;
+{
+ unsigned char buf[2];
+
+ if (*p == 0)
+ SetEscape((struct acluser *)0, -1, -1);
+ else
+ {
+ if ((p = ParseChar(p, (char *)buf)) == NULL ||
+ (p = ParseChar(p, (char *)buf+1)) == NULL || *p)
+ return -1;
+ SetEscape((struct acluser *)0, buf[0], buf[1]);
+ }
+ return 0;
+}
+
diff --git a/screen.h b/screen.h
index 6065b06..4f9f354 100644
--- a/screen.h
+++ b/screen.h
@@ -98,7 +98,7 @@
*/
#define MAXHISTHEIGHT 3000
#define DEFAULTHISTHEIGHT 100
-#ifdef NAME_MAX
+#if defined(NAME_MAX) && NAME_MAX < 16
# define DEFAULT_BUFFERFILE "/tmp/screen-xchg"
#else
# define DEFAULT_BUFFERFILE "/tmp/screen-exchange"
@@ -287,3 +287,9 @@ struct baud_values
int bps; /* bits per seconds */
int sym; /* symbol defined in ttydev.h */
};
+
+/*
+ * windowlist orders
+ */
+#define WLIST_NUM 0
+#define WLIST_MRU 1
diff --git a/search.c b/search.c
index c4c552d..f83c2c2 100644
--- a/search.c
+++ b/search.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: search.c,v 1.2 1994/05/31 12:32:57 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
@@ -274,7 +271,7 @@ char *data; /* dummy */
break;
case '\023': /* CTRL-S */
case '\022': /* CTRL-R */
- if (markdata->isistrl >= sizeof(markdata->isistr))
+ if (markdata->isistrl >= (int)sizeof(markdata->isistr))
return;
dir = (*p == '\023') ? 1 : -1;
pos += dir;
@@ -288,8 +285,8 @@ char *data; /* dummy */
markdata->isistr[markdata->isistrl++] = *p;
break;
default:
- if (*p < ' ' || markdata->isistrl >= sizeof(markdata->isistr)
- || markdata->isstrl >= sizeof(markdata->isstr) - 1)
+ if (*p < ' ' || markdata->isistrl >= (int)sizeof(markdata->isistr)
+ || markdata->isstrl >= (int)sizeof(markdata->isstr) - 1)
return;
markdata->isstr[markdata->isstrl++] = *p;
markdata->isistr[markdata->isistrl++] = *p;
diff --git a/socket.c b/socket.c
index dff0cd9..62a73af 100644
--- a/socket.c
+++ b/socket.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: socket.c,v 1.23 1994/05/31 12:33:00 mlschroe Exp $ FAU")
-
#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -76,6 +73,7 @@ extern char *getenv();
extern char SockPath[];
extern struct event serv_read;
extern char *rc_name;
+extern struct comm comms[];
#ifdef MULTIUSER
# define SOCKMODE (S_IWRITE | S_IREAD | (displays ? S_IEXEC : 0) | (multi ? 1 : 0))
@@ -206,7 +204,7 @@ char *match;
#endif
debug2("st.st_uid = %d, real_uid = %d\n", st.st_uid, real_uid);
- if (st.st_uid != real_uid)
+ if ((int)st.st_uid != real_uid)
continue;
mode = (int)st.st_mode & 0777;
debug1(" has mode 0%03o\n", mode);
@@ -360,10 +358,11 @@ char *match;
}
if (ndead && !quietflag)
{
+ char *m = "Remove dead screens with 'screen -wipe'.";
if (wipeflag)
Msg(0, "%d socket%s wiped out.", nwipe, nwipe > 1 ? "s" : "");
else
- Msg(0, "Remove dead screens with 'screen -wipe'."+1-1, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */
+ Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */
}
if (firsts != -1)
{
@@ -419,7 +418,7 @@ MakeServerSocket()
Msg(0, "There is already a screen running on %s.", Filename(SockPath));
if (stat(SockPath, &st) == -1)
Panic(errno, "stat");
- if (st.st_uid != real_uid)
+ if ((int)st.st_uid != real_uid)
Panic(0, "Unfortunatelly you are not its owner.");
if ((st.st_mode & 0700) == 0600)
Panic(0, "To resume it, use \"screen -r\"");
@@ -1088,7 +1087,7 @@ int
RecoverSocket()
{
close(ServerSocket);
- if (geteuid() != real_uid)
+ if ((int)geteuid() != real_uid)
{
if (UserContext() > 0)
UserReturn(unlink(SockPath));
@@ -1112,6 +1111,7 @@ struct msg *m;
{
char *p;
int pid;
+ int noshowwin;
struct win *wi;
ASSERT(display);
@@ -1193,11 +1193,37 @@ struct msg *m;
if (D_user->u_detachotherwin >= 0)
D_other = wtab[D_user->u_detachotherwin];
- fore = FindNiceWindow(fore, *m->m.attach.preselect ? m->m.attach.preselect : 0);
+ noshowwin = 0;
+ if (*m->m.attach.preselect)
+ {
+ if (!strcmp(m->m.attach.preselect, "="))
+ fore = 0;
+ else if (!strcmp(m->m.attach.preselect, "-"))
+ {
+ fore = 0;
+ noshowwin = 1;
+ }
+ else
+ fore = FindNiceWindow(fore, m->m.attach.preselect);
+ }
+ else
+ fore = FindNiceWindow(fore, 0);
if (fore)
SetForeWindow(fore);
+ else if (!noshowwin)
+ {
+#ifdef MULTIUSER
+ if (!AclCheckPermCmd(D_user, ACL_EXEC, &comms[RC_WINDOWLIST]))
+#endif
+ {
+ flayer = D_forecv->c_layer;
+ display_wlist(1, WLIST_NUM);
+ noshowwin = 1;
+ }
+ }
Activate(0);
- if (!D_fore)
+ ResetIdle();
+ if (!D_fore && !noshowwin)
ShowWindows(-1);
if (displays->d_next == 0 && console_window)
{
@@ -1300,7 +1326,7 @@ int ilen;
l = 0;
continue;
}
- if (l < sizeof(pwdata->buf) - 1)
+ if (l < (int)sizeof(pwdata->buf) - 1)
pwdata->buf[l++] = c;
}
pwdata->l = l;
@@ -1312,7 +1338,8 @@ DoCommandMsg(mp)
struct msg *mp;
{
char *args[MAXARGS];
- int n;
+ int argl[MAXARGS];
+ int n, *lp;
register char **pp = args, *p = mp->m.command.cmd;
struct acluser *user;
#ifdef MULTIUSER
@@ -1321,13 +1348,15 @@ struct msg *mp;
extern struct acluser *users; /* acls.c */
#endif
+ lp = argl;
n = mp->m.command.nargs;
if (n > MAXARGS - 1)
n = MAXARGS - 1;
for (; n > 0; n--)
{
*pp++ = p;
- p += strlen(p) + 1;
+ *lp = strlen(p);
+ p += *lp++ + 1;
}
*pp = 0;
#ifdef MULTIUSER
@@ -1362,8 +1391,9 @@ struct msg *mp;
display = displays; /* sigh */
if (*mp->m.command.preselect)
{
- int i;
- i = WindowByNoN(mp->m.command.preselect);
+ int i = -1;
+ if (strcmp(mp->m.command.preselect, "-"))
+ i = WindowByNoN(mp->m.command.preselect);
fore = i >= 0 ? wtab[i] : 0;
}
else if (!fore)
@@ -1387,7 +1417,7 @@ struct msg *mp;
flayer = fore ? &fore->w_layer : 0;
if (fore && fore->w_savelayer && (fore->w_blocked || fore->w_savelayer->l_cvlist == 0))
flayer = fore->w_savelayer;
- DoCommand(args);
+ DoCommand(args, argl);
rc_name = oldrcname;
}
#ifdef MULTIUSER
diff --git a/teln.c b/teln.c
index f434a1c..6fa910b 100644
--- a/teln.c
+++ b/teln.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: teln.c,v 1.6 1994/05/31 12:32:15 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
@@ -233,7 +230,7 @@ int *lenp;
}
fore->w_telbufl--;
}
- if ((c >= 0x20 && c <= 0x7e) || (c >= 0xa0 && c <= 0xff))
+ if ((c >= 0x20 && c <= 0x7e) || c >= 0xa0)
{
if (echo)
WriteString(fore, (char *)&c, 1);
diff --git a/term.c b/term.c
index 1c3c3f3..d78d463 100644
--- a/term.c
+++ b/term.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: term.c,v 1.5 1994/09/06 17:00:23 mlschroe Exp $ FAU")
-
#include "term.h"
#define KMAPDEF(s)
@@ -209,6 +206,7 @@ struct term term[T_N] =
/* more keys for Andrew A. Chernov (ache@astral.msk.su) */
{ "kA", T_STR },
{ "ka", T_STR },
+/* define T_BACKTAB */
{ "kB", T_STR },
{ "kC", T_STR },
{ "kE", T_STR },
@@ -219,6 +217,14 @@ struct term term[T_N] =
{ "kS", T_STR },
{ "kT", T_STR },
{ "kt", T_STR },
+ { "*4", T_STR }, /* kDC */
+ { "*7", T_STR }, /* kEND */
+ { "#2", T_STR }, /* kHOM */
+ { "#3", T_STR }, /* kIC */
+ { "#4", T_STR }, /* kLFT */
+ { "%c", T_STR }, /* kNXT */
+ { "%e", T_STR }, /* kPRV */
+ { "%i", T_STR }, /* kRIT */
/* keys above the cursor */
/* define T_NAVIGATE */
diff --git a/term.h.dist b/term.h.dist
index bf47f92..bbe9894 100644
--- a/term.h.dist
+++ b/term.h.dist
@@ -233,19 +233,20 @@ union tcu
#define d_CXC d_tcs[105].str
#define D_CXC (D_tcs[105].str)
#define T_CAPS 106
-#define T_NAVIGATE 145
-#define T_NAVIGATE_DELETE 152
-#define T_CURSOR 153
-#define T_KEYPAD 157
-#define T_OCAPS 175
-#define T_ECAPS 188
-#define T_N 188
+#define T_BACKTAB 135
+#define T_NAVIGATE 153
+#define T_NAVIGATE_DELETE 160
+#define T_CURSOR 161
+#define T_KEYPAD 165
+#define T_OCAPS 183
+#define T_ECAPS 196
+#define T_N 196
#ifdef MAPKEYS
# define KMAPDEFSTART 106
-# define NKMAPDEF 69
-# define KMAPADEFSTART 153
+# define NKMAPDEF 77
+# define KMAPADEFSTART 161
# define NKMAPADEF 22
# define KMAPMDEFSTART 138
-# define NKMAPMDEF 19
+# define NKMAPMDEF 27
#endif
diff --git a/term.sh b/term.sh
index 6815a20..f5dfc4a 100644
--- a/term.sh
+++ b/term.sh
@@ -7,6 +7,9 @@ if test -z "$srcdir"; then
srcdir=.
fi
+LC_ALL=C
+export LC_ALL
+
rm -f term.h
cat << EOF > term.h
/*
diff --git a/termcap.c b/termcap.c
index f09e6ac..0e7186e 100644
--- a/termcap.c
+++ b/termcap.c
@@ -21,14 +21,13 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: termcap.c,v 1.9 1994/09/06 17:00:31 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include "config.h"
#include "screen.h"
#include "extern.h"
+#undef DEBUGG
+
extern struct display *display, *displays;
extern int real_uid, real_gid, eff_uid, eff_gid;
extern struct term term[]; /* terminal capabilities */
@@ -40,8 +39,8 @@ extern int hardstatusemu;
extern struct action umtab[];
extern struct action mmtab[];
extern struct action dmtab[];
-extern char *kmap_extras[];
-extern int kmap_extras_fl[];
+extern struct kmap_ext *kmap_exts;
+extern int kmap_extn;
extern int DefaultEsc;
#endif
@@ -55,8 +54,10 @@ static char *e_tgetstr __P((char *, char **));
static int e_tgetflag __P((char *));
static int e_tgetnum __P((char *));
#ifdef MAPKEYS
-static int addmapseq __P((char *, int));
-static int remmapseq __P((char *));
+static int findseq_ge __P((char *, int, unsigned char **));
+static void setseqoff __P((unsigned char *, int, int));
+static int addmapseq __P((char *, int, int));
+static int remmapseq __P((char *, int));
#ifdef DEBUGG
static void dumpmap __P((void));
#endif
@@ -471,9 +472,11 @@ int he;
D_nseqs = 0;
for (i = 0; i < T_OCAPS - T_CAPS; i++)
remap(i, 1);
- for (i = 0; i < KMAP_EXT; i++)
+ for (i = 0; i < kmap_extn; i++)
remap(i + (KMAP_KEYS+KMAP_AKEYS), 1);
- D_seqp = D_kmaps[0].seq;
+ D_seqp = D_kmaps + 3;
+ D_seql = 0;
+ D_seqh = 0;
#endif
D_tcinited = 1;
@@ -491,29 +494,36 @@ remap(n, map)
int n;
int map;
{
- char *s;
+ char *s = 0;
int fl = 0, domap = 0;
struct action *a1, *a2, *tab;
+ int l = 0;
+ struct kmap_ext *kme = 0;
+ a1 = 0;
+ if (n >= KMAP_KEYS+KMAP_AKEYS)
+ {
+ kme = kmap_exts + (n - (KMAP_KEYS+KMAP_AKEYS));
+ s = kme->str;
+ l = kme->fl & ~KMAP_NOTIMEOUT;
+ fl = kme->fl & KMAP_NOTIMEOUT;
+ a1 = &kme->um;
+ }
tab = umtab;
for (;;)
{
- a1 = &tab[n];
a2 = 0;
if (n < KMAP_KEYS+KMAP_AKEYS)
{
+ a1 = &tab[n];
if (n >= KMAP_KEYS)
n -= T_OCAPS-T_CURSOR;
s = D_tcs[n + T_CAPS].str;
+ l = s ? strlen(s) : 0;
if (n >= T_CURSOR-T_CAPS)
a2 = &tab[n + (T_OCAPS-T_CURSOR)];
}
- else
- {
- s = kmap_extras[n - (KMAP_KEYS+KMAP_AKEYS)];
- fl |= kmap_extras_fl[n - (KMAP_KEYS+KMAP_AKEYS)];
- }
- if (s == 0)
+ if (s == 0 || l == 0)
return 0;
if (a1 && a1->nr == RC_ILLEGAL)
a1 = 0;
@@ -525,9 +535,15 @@ int map;
a2 = 0;
domap |= (a1 || a2);
if (tab == umtab)
- tab = dmtab;
+ {
+ tab = dmtab;
+ a1 = kme ? &kme->dm : 0;
+ }
else if (tab == dmtab)
- tab = mmtab;
+ {
+ tab = mmtab;
+ a1 = kme ? &kme->mm : 0;
+ }
else
break;
}
@@ -538,9 +554,9 @@ int map;
return 0;
debug3("%smapping %s %#x\n", map? "" :"un",s,n);
if (map)
- return addmapseq(s, n | fl);
+ return addmapseq(s, l, n | fl);
else
- return remmapseq(s);
+ return remmapseq(s, l);
}
void
@@ -555,23 +571,32 @@ CheckEscape()
odisplay = display;
for (display = displays; display; display = display->d_next)
{
- for (i = 0; i < D_nseqs; i++)
+ for (i = 0; i < D_nseqs; i += D_kmaps[i + 2] * 2 + 4)
{
- nr = D_kmaps[i].nr & ~KMAP_NOTIMEOUT;
- if (umtab[nr].nr == RC_COMMAND)
- break;
- if (umtab[nr].nr == RC_ILLEGAL && dmtab[nr].nr == RC_COMMAND)
- break;
+ nr = (D_kmaps[i] << 8 | D_kmaps[i + 1]) & ~KMAP_NOTIMEOUT;
+ if (nr < KMAP_KEYS+KMAP_AKEYS)
+ {
+ if (umtab[nr].nr == RC_COMMAND)
+ break;
+ if (umtab[nr].nr == RC_ILLEGAL && dmtab[nr].nr == RC_COMMAND)
+ break;
+ }
+ else
+ {
+ struct kmap_ext *kme = kmap_exts + nr - (KMAP_KEYS+KMAP_AKEYS);
+ if (kme->um.nr == RC_COMMAND)
+ break;
+ if (kme->um.nr == RC_ILLEGAL && kme->dm.nr == RC_COMMAND)
+ break;
+ }
}
- if (i >= D_nseqs)
- break;
}
if (display == 0)
{
display = odisplay;
return;
}
- ParseEscape((struct acluser *)0, "^aa");
+ SetEscape((struct acluser *)0, Ctrl('a'), 'a');
if (odisplay->d_user->u_Esc == -1)
odisplay->d_user->u_Esc = DefaultEsc;
if (odisplay->d_user->u_MetaEsc == -1)
@@ -582,59 +607,135 @@ CheckEscape()
}
static int
-addmapseq(seq, nr)
+findseq_ge(seq, k, sp)
char *seq;
+int k;
+unsigned char **sp;
+{
+ unsigned char *p;
+ int j, l;
+
+ p = D_kmaps;
+ while (p - D_kmaps < D_nseqs)
+ {
+ l = p[2];
+ p += 3;
+ for (j = 0; ; j++)
+ {
+ if (j == k || j == l)
+ j = l - k;
+ else if (p[j] != ((unsigned char *)seq)[j])
+ j = p[j] - ((unsigned char *)seq)[j];
+ else
+ continue;
+ break;
+ }
+ if (j >= 0)
+ {
+ *sp = p - 3;
+ return j;
+ }
+ p += 2 * l + 1;
+ }
+ *sp = p;
+ return -1;
+}
+
+static void
+setseqoff(p, i, o)
+unsigned char *p;
+int i;
+int o;
+{
+ unsigned char *q;
+ int l, k;
+
+ k = p[2];
+ if (o < 256)
+ {
+ p[k + 4 + i] = o;
+ return;
+ }
+ /* go for the biggest offset */
+ for (q = p + k * 2 + 4; ; q += l * 2 + 4)
+ {
+ l = q[2];
+ if ((q + l * 2 - p) / 2 >= 256)
+ {
+ p[k + 4 + i] = (q - p - 4) / 2;
+ return;
+ }
+ }
+}
+
+static int
+addmapseq(seq, k, nr)
+char *seq;
+int k;
int nr;
{
- int i, j = 0, k, mo, m;
- char *p, *o;
+ int i, j, l, mo, m;
+ unsigned char *p, *q;
- k = strlen(seq);
- if (k > sizeof(D_kmaps[0].seq) - 1)
+ if (k >= 254)
return -1;
- for (i = 0; i < D_nseqs; i++)
- if ((j = strcmp(D_kmaps[i].seq, seq)) >= 0)
- break;
- if (i < D_nseqs && j == 0)
+ j = findseq_ge(seq, k, &p);
+ if (j == 0)
{
- D_kmaps[i].nr = nr;
+ p[0] = nr >> 8;
+ p[1] = nr;
return 0;
}
- if (D_nseqs >= sizeof(D_kmaps)/sizeof(*D_kmaps)) /* just in case... */
- return -1;
- for (j = D_nseqs - 1; j >= i; j--)
- D_kmaps[j + 1] = D_kmaps[j];
- p = D_kmaps[i].seq;
- o = D_kmaps[i].off;
- strcpy(p, seq);
- bzero(o, k + 1);
- D_kmaps[i].nr = nr;
- D_nseqs++;
-
- if (i + 1 < D_nseqs)
- for (j = 0; *p; p++, o++, j++)
- {
- if (D_kmaps[i + 1].seq[j] != *p)
- {
- if (D_kmaps[i + 1].seq[j])
- *o = 1;
- break;
- }
- *o = D_kmaps[i + 1].off[j] ? D_kmaps[i + 1].off[j] + 1 : 0;
- }
-
- for (k = 0; k < i; k++)
- for (m = j = 0, p = D_kmaps[k].seq, o = D_kmaps[k].off; *p; p++, o++, j++)
- {
- mo = m;
- if (!m && *p != D_kmaps[i].seq[j])
- m = 1;
- if (*o == 0 && mo == 0 && m)
- *o = i - k;
- if (*o < i - k || (*o == i - k && m))
- continue;
- (*o)++;
- }
+ i = p - D_kmaps;
+ if (D_nseqs + 2 * k + 4 >= D_aseqs)
+ {
+ D_kmaps = (unsigned char *)xrealloc((char *)D_kmaps, D_aseqs + 256);
+ D_aseqs += 256;
+ p = D_kmaps + i;
+ }
+ D_seqp = D_kmaps + 3;
+ D_seql = 0;
+ D_seqh = 0;
+ evdeq(&D_mapev);
+ if (j > 0)
+ bcopy((char *)p, (char *)p + 2 * k + 4, D_nseqs - i);
+ p[0] = nr >> 8;
+ p[1] = nr;
+ p[2] = k;
+ bcopy(seq, (char *)p + 3, k);
+ bzero(p + k + 3, k + 1);
+ D_nseqs += 2 * k + 4;
+ if (j > 0)
+ {
+ q = p + 2 * k + 4;
+ l = q[2];
+ for (i = 0; i < k; i++)
+ {
+ if (p[3 + i] != q[3 + i])
+ {
+ p[k + 4 + i] = k;
+ break;
+ }
+ setseqoff(p, i, q[l + 4 + i] ? q[l + 4 + i] + k + 2: 0);
+ }
+ }
+ for (q = D_kmaps; q < p; q += 2 * l + 4)
+ {
+ l = q[2];
+ for (m = j = 0; j < l; j++)
+ {
+ mo = m;
+ if (!m && q[3 + j] != seq[j])
+ m = 1;
+ if (q[l + 4 + j] == 0)
+ {
+ if (!mo && m)
+ setseqoff(q, j, (p - q - 4) / 2);
+ }
+ else if (q + q[l + 4 + j] * 2 + 4 > p || (q + q[l + 4 + j] * 2 + 4 == p && !m))
+ setseqoff(q, j, q[l + 4 + j] + k + 2);
+ }
+ }
#ifdef DEBUGG
dumpmap();
#endif
@@ -642,28 +743,33 @@ int nr;
}
static int
-remmapseq(seq)
+remmapseq(seq, k)
char *seq;
+int k;
{
- int i, j = 0, k;
- char *p, *o;
+ int j, l;
+ unsigned char *p, *q;
- for (i = 0; i < D_nseqs; i++)
- if ((j = strcmp(D_kmaps[i].seq, seq)) >= 0)
- break;
- if (i == D_nseqs || j)
+ if (k >= 254 || (j = findseq_ge(seq, k, &p)) != 0)
return -1;
- for (k = 0; k < i; k++)
- for (j = 0, p = D_kmaps[k].seq, o = D_kmaps[k].off; *p; p++, o++, j++)
- {
- if (k + *o == i)
- *o = D_kmaps[i].off[j] ? D_kmaps[i].off[j] + *o - 1 : 0;
- else if (k + *o > i)
- (*o)--;
- }
- for (j = i + 1; j < D_nseqs; j++)
- D_kmaps[j - 1] = D_kmaps[j];
- D_nseqs--;
+ for (q = D_kmaps; q < p; q += 2 * l + 4)
+ {
+ l = q[2];
+ for (j = 0; j < l; j++)
+ {
+ if (q + q[l + 4 + j] * 2 + 4 == p)
+ setseqoff(q, j, p[k + 4 + j] ? q[l + 4 + j] + p[k + 4 + j] - k : 0);
+ else if (q + q[l + 4 + j] * 2 + 4 > p)
+ q[l + 4 + j] -= k + 2;
+ }
+ }
+ if (D_kmaps + D_nseqs > p + 2 * k + 4)
+ bcopy((char *)p + 2 * k + 4, (char *)p, (D_kmaps + D_nseqs) - (p + 2 * k + 4));
+ D_nseqs -= 2 * k + 4;
+ D_seqp = D_kmaps + 3;
+ D_seql = 0;
+ D_seqh = 0;
+ evdeq(&D_mapev);
#ifdef DEBUGG
dumpmap();
#endif
@@ -674,22 +780,31 @@ char *seq;
static void
dumpmap()
{
- char *p, *o;
- int i,j,n;
+ unsigned char *p;
+ int j, n, l, o, oo;
debug("Mappings:\n");
- for (i = 0; i < D_nseqs; i++)
+ p = D_kmaps;
+ if (!p)
+ return;
+ while (p < D_kmaps + D_nseqs)
{
- for (j = 0, p = D_kmaps[i].seq, o = D_kmaps[i].off; *p; p++, o++, j++)
+ l = p[2];
+ debug1("%d: ", p - D_kmaps + 3);
+ for (j = 0; j < l; j++)
{
- if (*p > ' ' && (unsigned char)*p < 0177)
+ o = oo = p[l + 4 + j];
+ if (o)
+ o = 2 * o + 4 + (p + 3 + j - D_kmaps);
+ if (p[j + 3] > ' ' && p[j + 3] < 0177)
{
- debug2("%c[%d] ", *p, *o);
+ debug3("%c[%d:%d] ", p[j + 3], oo, o);
}
else
- debug2("\\%03o[%d] ", (unsigned char)*p, *o);
+ debug3("\\%03o[%d:%d] ", p[j + 3], oo, o);
}
- n = D_kmaps[i].nr;
+ n = p[0] << 8 | p[1];
debug2(" ==> %d%s\n", n & ~KMAP_NOTIMEOUT, (n & KMAP_NOTIMEOUT) ? " (no timeout)" : "");
+ p += 2 * l + 4;
}
}
#endif /* DEBUGG */
@@ -705,13 +820,13 @@ char *s;
{
register int n;
- if (tcLineLen + (n = strlen(s)) > 55 && Termcaplen < TERMCAP_BUFSIZE + 8 - 4)
+ if (tcLineLen + (n = strlen(s)) > 55 && Termcaplen < TERMCAP_BUFSIZE - 4 - 1)
{
strcpy(Termcap + Termcaplen, "\\\n\t:");
Termcaplen += 4;
tcLineLen = 0;
}
- if (Termcaplen + n < TERMCAP_BUFSIZE + 8)
+ if (Termcaplen + n < TERMCAP_BUFSIZE - 1)
{
strcpy(Termcap + Termcaplen, s);
Termcaplen += n;
@@ -731,7 +846,10 @@ int aflag;
{
char buf[TERMCAP_BUFSIZE];
register char *p, *cp, *s, ch, *tname;
- int i, wi, he, found;
+ int i, wi, he;
+#if 0
+ int found;
+#endif
if (display)
{
@@ -761,7 +879,9 @@ int aflag;
debug("MakeTermcap sets screenterm=screen\n");
strcpy(screenterm, "screen");
}
+#if 0
found = 1;
+#endif
do
{
strcpy(Term, "TERM=");
@@ -772,17 +892,29 @@ int aflag;
if (e_tgetent(buf, p) == 1)
break;
}
+#ifdef COLOR
+ if (nwin_default.bce)
+ {
+ sprintf(p, "%s-bce", screenterm);
+ if (e_tgetent(buf, p) == 1)
+ break;
+ }
+#endif
+#ifdef CHECK_SCREEN_W
if (wi >= 132)
{
sprintf(p, "%s-w", screenterm);
if (e_tgetent(buf, p) == 1)
break;
}
+#endif
strcpy(p, screenterm);
if (e_tgetent(buf, p) == 1)
break;
strcpy(p, "vt100");
+#if 0
found = 0;
+#endif
}
while (0); /* Goto free programming... */
@@ -866,6 +998,8 @@ int aflag;
AddCap("vi=\\E[?25l:");
AddCap("ve=\\E[34h\\E[?25h:");
AddCap("vs=\\E[34l:");
+ AddCap("ti=\\E[?1049h:");
+ AddCap("te=\\E[?1049l:");
if (display)
{
if (D_US)
diff --git a/terminfo/screencap b/terminfo/screencap
index d2becd4..4820d92 100644
--- a/terminfo/screencap
+++ b/terminfo/screencap
@@ -9,13 +9,15 @@ SC|screen|VT 100/ANSI X3.64 virtual terminal:\
:AL=\E[%dL:dl=\E[M:DL=\E[%dM:cs=\E[%i%d;%dr:dc=\E[P:\
:DC=\E[%dP:im=\E[4h:ei=\E[4l:IC=\E[%d@:\
:ks=\E[?1h\E=:ke=\E[?1l\E>:vb=\Eg:\
- :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
+ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
:kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\
- :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:\
+ :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\
:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
:Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:
-SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
- :co#132:tc=screen:
+SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\
+ :ut:tc=screen:
+SH|screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line:\
+ :ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
diff --git a/terminfo/screeninfo.src b/terminfo/screeninfo.src
index aee40a8..c6ca4d9 100644
--- a/terminfo/screeninfo.src
+++ b/terminfo/screeninfo.src
@@ -9,22 +9,46 @@ screen|VT 100/ANSI X3.64 virtual terminal,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
enacs=\E(B\E)0, home=\E[H,
ht=\t, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
- ind=\n, is2=\E)0, kbs=\b, kcub1=\EOD, kcud1=\EOB,
+ ind=\n, is2=\E)0, kcub1=\EOD, kcud1=\EOB,
kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP,
kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ,
kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~,
kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kend=\E[4~,
kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE,
- rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>,
- rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, sgr0=\E[m,
- smir=\E[4h, smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m,
- tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg,
+ rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l,
+ rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+ sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=,
+ smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg,
civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l,
op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\054\054hhII00,
-screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols,
- am, km, mir, msgr, xenl,
- cols#132, it#8, lines#24, colors#8, pairs#64,
+screen-bce|VT 100/ANSI X3.64 virtual terminal with bce,
+ am, bce, km, mir, msgr, xenl,
+ cols#80, it#8, lines#24, colors#8, pairs#64,
+ bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
+ clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr,
+ cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\n,
+ cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+ cuu=\E[%p1%dA, cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P,
+ dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
+ enacs=\E(B\E)0, home=\E[H,
+ ht=\t, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
+ ind=\n, is2=\E)0, kcub1=\EOD, kcud1=\EOB,
+ kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP,
+ kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ,
+ kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~,
+ kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kend=\E[4~,
+ kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE,
+ rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l,
+ rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+ sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=,
+ smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg,
+ civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l,
+ op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\054\054hhII00,
+screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line,
+ am, bce, km, mir, msgr, xenl,
+ cols#80, it#8, lines#24, colors#8, pairs#64,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr,
cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\n,
@@ -33,16 +57,17 @@ screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
enacs=\E(B\E)0, home=\E[H,
ht=\t, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
- ind=\n, is2=\E)0, kbs=\b, kcub1=\EOD, kcud1=\EOB,
+ ind=\n, is2=\E)0, kcub1=\EOD, kcud1=\EOB,
kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP,
kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ,
kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~,
kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kend=\E[4~,
kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE,
- rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>,
- rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, sgr0=\E[m,
- smir=\E[4h, smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m,
- tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg,
+ rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l,
+ rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+ sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=,
+ smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg,
+ tsl=\E_, fsl=\E\\, dsl=\E_\E\\,
civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l,
op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\054\054hhII00,
diff --git a/tty.c.dist b/tty.c.dist
index c1c0e7b..688cf62 100644
--- a/tty.c.dist
+++ b/tty.c.dist
@@ -26,9 +26,6 @@
* Do not change anything here. If you then change tty.sh.
*/
-#include "rcs.h"
-RCS_ID("$Id: tty.sh,v 1.13 1994/05/31 12:33:17 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
@@ -66,7 +63,7 @@ RCS_ID("$Id: tty.sh,v 1.13 1994/05/31 12:33:17 mlschroe Exp $ FAU")
extern struct display *display, *displays;
extern int iflag;
-#if !defined(TIOCCONS) && defined(SRIOCSREDIR)
+#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux)
extern struct win *console_window;
static void consredir_readev_fn __P((struct event *, char *));
#endif
@@ -1123,6 +1120,8 @@ int fd, n, type;
{
int i;
+ if (!n)
+ n++;
for (i = 0; i < n; i++)
if (tcsendbreak(fd, 0) < 0)
{
@@ -1248,7 +1247,7 @@ int n, closeopen;
* Console grabbing
*/
-#if !defined(TIOCCONS) && defined(SRIOCSREDIR)
+#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux)
static struct event consredir_ev;
static int consredirfd[2] = {-1, -1};
@@ -1289,7 +1288,7 @@ TtyGrabConsole(fd, on, rc_name)
int fd, on;
char *rc_name;
{
-#ifdef TIOCCONS
+#if defined(TIOCCONS) && !defined(linux)
struct display *d;
int ret = 0;
int sfd = -1;
@@ -1321,7 +1320,7 @@ char *rc_name;
Msg(errno, "%s: could not open detach pty master", rc_name);
return -1;
}
- if ((sfd = open(slave, O_RDWR)) < 0)
+ if ((sfd = open(slave, O_RDWR | O_NOCTTY)) < 0)
{
Msg(errno, "%s: could not open detach pty slave", rc_name);
close(fd);
@@ -1341,9 +1340,14 @@ char *rc_name;
return ret;
#else
-# ifdef SRIOCSREDIR
+# if defined(SRIOCSREDIR) || defined(linux)
struct display *d;
+# ifdef SRIOCSREDIR
int cfd;
+# else
+ struct mode new1, new2;
+ char *slave;
+# endif
if (on > 0)
{
@@ -1370,6 +1374,7 @@ char *rc_name;
}
if (on <= 0)
return 0;
+# ifdef SRIOCSREDIR
if ((cfd = secopen("/dev/console", O_RDWR|O_NOCTTY, 0)) == -1)
{
Msg(errno, "/dev/console");
@@ -1391,12 +1396,37 @@ char *rc_name;
consredirfd[0] = consredirfd[1] = -1;
return -1;
}
-
+ close(cfd);
+# else
+ /* special linux workaround for a too restrictive kernel */
+ if ((consredirfd[0] = OpenPTY(&slave)) < 0)
+ {
+ Msg(errno, "%s: could not open detach pty master", rc_name);
+ return -1;
+ }
+ if ((consredirfd[1] = open(slave, O_RDWR | O_NOCTTY)) < 0)
+ {
+ Msg(errno, "%s: could not open detach pty slave", rc_name);
+ close(consredirfd[0]);
+ return -1;
+ }
+ InitTTY(&new1, 0);
+ SetMode(&new1, &new2, 0, 0);
+ SetTTY(consredirfd[1], &new2);
+ if (UserContext() == 1)
+ UserReturn(ioctl(consredirfd[1], TIOCCONS, (char *)&on));
+ if (UserStatus())
+ {
+ Msg(errno, "%s: ioctl TIOCCONS failed", rc_name);
+ close(consredirfd[0]);
+ close(consredirfd[1]);
+ return -1;
+ }
+# endif
consredir_ev.fd = consredirfd[0];
consredir_ev.type = EV_READ;
consredir_ev.handler = consredir_readev_fn;
evenq(&consredir_ev);
- close(cfd);
return 0;
# else
if (on > 0)
diff --git a/tty.sh b/tty.sh
index bceae53..b612f6c 100644
--- a/tty.sh
+++ b/tty.sh
@@ -52,9 +52,6 @@ exit 0
* Do not change anything here. If you then change tty.sh.
*/
-#include "rcs.h"
-RCS_ID("$Id: tty.sh,v 1.13 1994/05/31 12:33:17 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
@@ -92,7 +89,7 @@ RCS_ID("$Id: tty.sh,v 1.13 1994/05/31 12:33:17 mlschroe Exp $ FAU")
extern struct display *display, *displays;
extern int iflag;
-#if !defined(TIOCCONS) && defined(SRIOCSREDIR)
+#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux)
extern struct win *console_window;
static void consredir_readev_fn __P((struct event *, char *));
#endif
@@ -893,6 +890,8 @@ int fd, n, type;
{
int i;
+ if (!n)
+ n++;
for (i = 0; i < n; i++)
if (tcsendbreak(fd, 0) < 0)
{
@@ -1018,7 +1017,7 @@ int n, closeopen;
* Console grabbing
*/
-#if !defined(TIOCCONS) && defined(SRIOCSREDIR)
+#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux)
static struct event consredir_ev;
static int consredirfd[2] = {-1, -1};
@@ -1059,7 +1058,7 @@ TtyGrabConsole(fd, on, rc_name)
int fd, on;
char *rc_name;
{
-#ifdef TIOCCONS
+#if defined(TIOCCONS) && !defined(linux)
struct display *d;
int ret = 0;
int sfd = -1;
@@ -1091,7 +1090,7 @@ char *rc_name;
Msg(errno, "%s: could not open detach pty master", rc_name);
return -1;
}
- if ((sfd = open(slave, O_RDWR)) < 0)
+ if ((sfd = open(slave, O_RDWR | O_NOCTTY)) < 0)
{
Msg(errno, "%s: could not open detach pty slave", rc_name);
close(fd);
@@ -1111,9 +1110,14 @@ char *rc_name;
return ret;
#else
-# ifdef SRIOCSREDIR
+# if defined(SRIOCSREDIR) || defined(linux)
struct display *d;
+# ifdef SRIOCSREDIR
int cfd;
+# else
+ struct mode new1, new2;
+ char *slave;
+# endif
if (on > 0)
{
@@ -1140,6 +1144,7 @@ char *rc_name;
}
if (on <= 0)
return 0;
+# ifdef SRIOCSREDIR
if ((cfd = secopen("/dev/console", O_RDWR|O_NOCTTY, 0)) == -1)
{
Msg(errno, "/dev/console");
@@ -1161,12 +1166,37 @@ char *rc_name;
consredirfd[0] = consredirfd[1] = -1;
return -1;
}
-
+ close(cfd);
+# else
+ /* special linux workaround for a too restrictive kernel */
+ if ((consredirfd[0] = OpenPTY(&slave)) < 0)
+ {
+ Msg(errno, "%s: could not open detach pty master", rc_name);
+ return -1;
+ }
+ if ((consredirfd[1] = open(slave, O_RDWR | O_NOCTTY)) < 0)
+ {
+ Msg(errno, "%s: could not open detach pty slave", rc_name);
+ close(consredirfd[0]);
+ return -1;
+ }
+ InitTTY(&new1, 0);
+ SetMode(&new1, &new2, 0, 0);
+ SetTTY(consredirfd[1], &new2);
+ if (UserContext() == 1)
+ UserReturn(ioctl(consredirfd[1], TIOCCONS, (char *)&on));
+ if (UserStatus())
+ {
+ Msg(errno, "%s: ioctl TIOCCONS failed", rc_name);
+ close(consredirfd[0]);
+ close(consredirfd[1]);
+ return -1;
+ }
+# endif
consredir_ev.fd = consredirfd[0];
consredir_ev.type = EV_READ;
consredir_ev.handler = consredir_readev_fn;
evenq(&consredir_ev);
- close(cfd);
return 0;
# else
if (on > 0)
diff --git a/utf8encodings/19 b/utf8encodings/19
new file mode 100644
index 0000000..65167a6
--- /dev/null
+++ b/utf8encodings/19
Binary files differ
diff --git a/utmp.c b/utmp.c
index 440741b..d47112c 100644
--- a/utmp.c
+++ b/utmp.c
@@ -21,10 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: utmp.c,v 1.7 1994/05/31 12:33:21 mlschroe Exp $ FAU")
-
-
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -360,7 +356,7 @@ RemoveLoginSlot()
char *tty;
debug("couln't zap slot -> do mesg n\n");
D_loginttymode = 0;
- if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && stb.st_uid == real_uid && ((int)stb.st_mode & 0777) != 0666)
+ if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && (int)stb.st_uid == real_uid && ((int)stb.st_mode & 0777) != 0666)
{
D_loginttymode = (int)stb.st_mode & 0777;
chmod(D_usertty, stb.st_mode & 0600);
@@ -405,14 +401,14 @@ int
SetUtmp(wi)
struct win *wi;
{
- register char *p;
register slot_t slot;
struct utmp u;
int saved_ut;
#ifdef UTHOST
+ char *p;
char host[sizeof(D_loginhost) + 15];
#else
- int host = 0;
+ char *host = 0;
#endif /* UTHOST */
wi->w_slot = (slot_t)0;
@@ -832,7 +828,7 @@ getttyent()
char *
getlogin()
{
- char *tty;
+ char *tty = NULL;
#ifdef utmp
# undef utmp
#endif
diff --git a/window.c b/window.c
index 789debe..3b60ae0 100644
--- a/window.c
+++ b/window.c
@@ -21,9 +21,6 @@
****************************************************************
*/
-#include "rcs.h"
-RCS_ID("$Id: window.c,v 1.20 1994/05/31 12:33:24 mlschroe Exp $ FAU")
-
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
@@ -50,21 +47,24 @@ extern int SilenceWait;
extern int real_uid, real_gid, eff_uid, eff_gid;
extern char Termcap[];
extern char **NewEnv;
-extern int visual_bell;
+extern int visual_bell, maxwin;
extern struct event logflushev;
extern int log_flush, logtstamp_after;
extern int ZombieKey_destroy, ZombieKey_resurrect;
extern struct layer *flayer;
extern int maxusercount;
+extern int pty_preopen;
+#ifdef ZMODEM
+extern int zmodem_mode;
+extern struct mchar mchar_blank;
+extern char *zmodem_sendcmd;
+extern char *zmodem_recvcmd;
+#endif
#if defined(TIOCSWINSZ) || defined(TIOCGWINSZ)
extern struct winsize glwz;
#endif
-#ifdef _IBMR2
-extern int aixhack;
-#endif
-
#ifdef O_NOCTTY
extern int separate_sids;
#endif
@@ -91,7 +91,12 @@ static void win_silenceev_fn __P((struct event *, char *));
static int OpenDevice __P((char **, int, int *, char **));
static int ForkWindow __P((struct win *, char **, char *));
-static void execvpe __P((char *, char **, char **));
+#ifdef ZMODEM
+static void zmodem_found __P((struct win *, int, char *, int));
+static void zmodem_fin __P((char *, int, char *));
+static int zmodem_parse __P((struct win *, char *, int));
+#endif
+
int VerboseCreate = 0; /* XXX move this to user.h */
@@ -133,7 +138,7 @@ struct NewWindow nwin_default =
0, /* dir */
screenterm, /* term */
0, /* aflag */
- 1*FLOW_NOW, /* flowflag */
+ 1*FLOW_NOW, /* flowflag */
LOGINDEFAULT, /* lflag */
DEFAULTHISTHEIGHT, /* histheight */
MON_OFF, /* monitor */
@@ -183,7 +188,7 @@ struct NewWindow *def, *new, *res;
COMPOSE(charset);
#undef COMPOSE
}
-
+
/*****************************************************************
*
* The window layer functions
@@ -235,7 +240,7 @@ int *lenp;
{
int l2 = 0, f, *ilen, l = *lenp, trunc;
char *ibuf;
-
+
debug1("WinProcess: %d bytes\n", *lenp);
fore = (struct win *)flayer->l_data;
@@ -482,12 +487,12 @@ WinRestore()
/*
- * DoStartLog constructs a path for the "want to be logfile" in buf and
+ * DoStartLog constructs a path for the "want to be logfile" in buf and
* attempts logfopen.
*
* returns 0 on success.
*/
-int
+int
DoStartLog(w, buf, bufsize)
struct win *w;
char *buf;
@@ -519,8 +524,8 @@ int bufsize;
return 0;
}
-/*
- * Umask & wlock are set for the user of the display,
+/*
+ * Umask & wlock are set for the user of the display,
* The display d (if specified) switches to that window.
*/
int
@@ -531,7 +536,7 @@ struct NewWindow *newwin;
register int n, i;
int f = -1;
struct NewWindow nwin;
- int type;
+ int type, startat;
char *TtyName;
#ifdef MULTIUSER
extern struct acluser *users;
@@ -547,16 +552,17 @@ struct NewWindow *newwin;
debug1("NWin: wlock %d\n", nwin.wlock);
debug1("NWin: Lflag %d\n", nwin.Lflag);
- pp = wtab + nwin.StartAt;
+ startat = nwin.StartAt < maxwin ? nwin.StartAt : 0;
+ pp = wtab + startat;
do
{
if (*pp == 0)
break;
- if (++pp == wtab + MAXWIN)
+ if (++pp == wtab + maxwin)
pp = wtab;
}
- while (pp != wtab + nwin.StartAt);
+ while (pp != wtab + startat);
if (*pp)
{
Msg(0, "No more windows.");
@@ -605,8 +611,8 @@ struct NewWindow *newwin;
p->w_number = n;
#ifdef MULTIUSER
- /*
- * This is dangerous: without a display we use creators umask
+ /*
+ * This is dangerous: without a display we use creators umask
* This is intended to be usefull for detached startup.
* But is still better than default bits with a NULL user.
*/
@@ -624,6 +630,7 @@ struct NewWindow *newwin;
p->w_layer.l_data = (char *)p;
p->w_savelayer = &p->w_layer;
p->w_pdisplay = 0;
+ p->w_lastdisp = 0;
#ifdef MULTIUSER
if (display && !AclCheckPermWin(D_user, ACL_WRITE, p))
@@ -635,7 +642,7 @@ struct NewWindow *newwin;
p->w_flow = nwin.flowflag | ((nwin.flowflag & FLOW_AUTOFLAG) ? (FLOW_AUTO|FLOW_NOW) : FLOW_AUTO);
if (!nwin.aka)
nwin.aka = Filename(nwin.args[0]);
- strncpy(p->w_akabuf, nwin.aka, MAXSTR - 1);
+ strncpy(p->w_akabuf, nwin.aka, sizeof(p->w_akabuf) - 1);
if ((nwin.aka = rindex(p->w_akabuf, '|')) != NULL)
{
p->w_autoaka = 0;
@@ -814,9 +821,9 @@ struct NewWindow *newwin;
}
/*
- * Resurrect a window from Zombie state.
+ * Resurrect a window from Zombie state.
* The command vector is therefore stored in the window structure.
- * Note: The terminaltype defaults to screenterm again, the current
+ * Note: The terminaltype defaults to screenterm again, the current
* working directory is lost.
*/
int
@@ -972,6 +979,8 @@ struct win *wp;
RethinkViewportOffsets(cv);
}
wp->w_layer.l_cvlist = 0;
+ if (flayer == &wp->w_layer)
+ flayer = 0;
#ifdef MULTIUSER
FreeWindowAcl(wp);
@@ -1012,7 +1021,7 @@ char **namep;
{
if (access(arg, R_OK | W_OK) == -1)
{
- Msg(errno, "Cannot access line '%s' for R/W", arg);
+ Msg(errno, "Cannot access line '%s' for R/W", arg);
return -1;
}
debug("OpenDevice: OpenTTY\n");
@@ -1069,6 +1078,7 @@ char **namep;
if (*typep != W_TYPE_PTY)
return f;
+#ifndef PTYROFS
#ifdef PTYGROUP
if (chown(*namep, real_uid, PTYGROUP) && !eff_uid)
#else
@@ -1089,17 +1099,18 @@ char **namep;
close(f);
return -1;
}
+#endif
return f;
}
/*
* Fields w_width, w_height, aflag, number (and w_tty)
* are read from struct win *win. No fields written.
- * If pwin is nonzero, filedescriptors are distributed
+ * If pwin is nonzero, filedescriptors are distributed
* between win->w_tty and open(ttyn)
*
*/
-static int
+static int
ForkWindow(win, args, ttyn)
struct win *win;
char **args, *ttyn;
@@ -1119,24 +1130,19 @@ char **args, *ttyn;
int i, pat, wfdused;
struct pseudowin *pwin = win->w_pwin;
#endif
-#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY)
- int slave;
-#endif
+ int slave = -1;
-#if defined(sun) && defined(O_NOCTTY)
- /* sun's utmp_update program opens the salve side, thus corrupting
- * pty semantics */
- debug("pre-opening slave...\n");
- if ((slave = open(ttyn, O_RDWR|O_NOCTTY)) == -1)
+#ifdef O_NOCTTY
+ if (pty_preopen)
{
- Msg(errno, "ttyn");
- return -1;
+ debug("pre-opening slave...\n");
+ if ((slave = open(ttyn, O_RDWR|O_NOCTTY)) == -1)
+ {
+ Msg(errno, "ttyn");
+ return -1;
+ }
}
#endif
-#if defined(_IBMR2) && defined(O_NOCTTY)
- slave = aixhack;
- aixhack = -1;
-#endif
debug("forking...\n");
proc = *args;
if (proc == 0)
@@ -1189,20 +1195,21 @@ char **args, *ttyn;
if (dfp && dfp != stderr)
fclose(dfp);
#endif
-#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY)
- close(0);
- dup(slave);
- close(slave);
- closeallfiles(win->w_ptyfd);
- slave = dup(0);
-#else
- closeallfiles(win->w_ptyfd);
-#endif
+ if (slave != -1)
+ {
+ close(0);
+ dup(slave);
+ close(slave);
+ closeallfiles(win->w_ptyfd);
+ slave = dup(0);
+ }
+ else
+ closeallfiles(win->w_ptyfd);
#ifdef DEBUG
if (dfp) /* do not produce child debug, when debug is "off" */
{
char buf[256];
-
+
sprintf(buf, "%s/screen.child", DEBUGDIR);
if ((dfp = fopen(buf, "a")) == 0)
dfp = stderr;
@@ -1216,12 +1223,13 @@ char **args, *ttyn;
close(1);
close(2);
newfd = -1;
- /*
+ /*
* distribute filedescriptors between the ttys
*/
#ifdef PSEUDOS
pat = pwin ? pwin->p_fdpat :
((F_PFRONT<<(F_PSHIFT*2)) | (F_PFRONT<<F_PSHIFT) | F_PFRONT);
+ debug1("Using window pattern 0x%x\n", pat);
wfdused = 0;
for(i = 0; i < 3; i++)
{
@@ -1251,8 +1259,8 @@ char **args, *ttyn;
}
if (wfdused)
{
- /*
- * the pseudo window process should not be surprised with a
+ /*
+ * the pseudo window process should not be surprised with a
* nonblocking filedescriptor. Poor Backend!
*/
debug1("Clearing NBLOCK on window-fd(%d)\n", win->w_ptyfd);
@@ -1274,9 +1282,8 @@ char **args, *ttyn;
dup(0);
#endif /* PSEUDOS */
close(win->w_ptyfd);
-#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY)
- close(slave);
-#endif
+ if (slave != -1)
+ close(slave);
if (newfd >= 0)
{
struct mode fakemode, *modep;
@@ -1375,13 +1382,12 @@ char **args, *ttyn;
default:
break;
}
-#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY)
- close(slave);
-#endif
+ if (slave != -1)
+ close(slave);
return pid;
}
-static void
+void
execvpe(prog, args, env)
char *prog, **args, **env;
{
@@ -1397,7 +1403,7 @@ char *prog, **args, **env;
do
{
for (p = buf; *path && *path != ':'; path++)
- if (p - buf < sizeof(buf) - 2)
+ if (p - buf < (int)sizeof(buf) - 2)
*p++ = *path;
if (p > buf)
*p++ = '/';
@@ -1441,7 +1447,7 @@ char **av;
extern struct win *windows;
struct pseudowin *pwin;
int type;
-
+
if ((w = display ? fore : windows) == NULL)
return -1;
if (!*av || w->w_pwin)
@@ -1474,7 +1480,7 @@ char **av;
l = F_UWP;
p++;
}
- if (*p)
+ if (*p)
av[0] = p;
else
av++;
@@ -1497,7 +1503,7 @@ char **av;
break;
}
}
-
+
if (l & F_UWP)
{
*t++ = '|';
@@ -1512,7 +1518,7 @@ char **av;
*t++ = ' ';
pwin->p_fdpat = l;
debug1("winexec: '%#x'\n", pwin->p_fdpat);
-
+
l = MAXSTR - 4;
for (pp = av; *pp; pp++)
{
@@ -1525,7 +1531,7 @@ char **av;
}
*--t = '\0';
debug1("%s\n", pwin->p_cmd);
-
+
if ((pwin->p_ptyfd = OpenDevice(av, 0, &type, &t)) < 0)
{
free((char *)pwin);
@@ -1539,19 +1545,30 @@ char **av;
Msg(0, "Cannot only use commands as pseudo win.");
return -1;
}
+ if (!(pwin->p_fdpat & F_PFRONT))
+ evdeq(&w->w_readev);
#ifdef TIOCPKT
{
int flag = 0;
if (ioctl(pwin->p_ptyfd, TIOCPKT, (char *)&flag))
{
- Msg(errno, "TIOCPKT ioctl");
+ Msg(errno, "TIOCPKT pwin ioctl");
FreePseudowin(w);
return -1;
}
+ if (w->w_type == W_TYPE_PTY && !(pwin->p_fdpat & F_PFRONT))
+ {
+ if (ioctl(w->w_ptyfd, TIOCPKT, (char *)&flag))
+ {
+ Msg(errno, "TIOCPKT win ioctl");
+ FreePseudowin(w);
+ return -1;
+ }
+ }
}
#endif /* TIOCPKT */
-
+
pwin->p_readev.fd = pwin->p_writeev.fd = pwin->p_ptyfd;
pwin->p_readev.type = EV_READ;
pwin->p_writeev.type = EV_WRITE;
@@ -1559,10 +1576,11 @@ char **av;
pwin->p_readev.handler = pseu_readev_fn;
pwin->p_writeev.handler = pseu_writeev_fn;
pwin->p_writeev.condpos = &pwin->p_inlen;
- evenq(&pwin->p_readev);
+ if (pwin->p_fdpat & (F_PFRONT << F_PSHIFT * 2 | F_PFRONT << F_PSHIFT))
+ evenq(&pwin->p_readev);
evenq(&pwin->p_writeev);
- pwin->p_pid = ForkWindow(w, av, t);
- if ((r = pwin->p_pid) < 0)
+ r = pwin->p_pid = ForkWindow(w, av, t);
+ if (r < 0)
FreePseudowin(w);
return r;
}
@@ -1576,6 +1594,14 @@ struct win *w;
ASSERT(pwin);
if (fcntl(w->w_ptyfd, F_SETFL, FNBLOCK))
Msg(errno, "Warning: FreePseudowin: NBLOCK fcntl failed");
+#ifdef TIOCPKT
+ if (w->w_type == W_TYPE_PTY && !(pwin->p_fdpat & F_PFRONT))
+ {
+ int flag = 1;
+ if (ioctl(w->w_ptyfd, TIOCPKT, (char *)&flag))
+ Msg(errno, "Warning: FreePseudowin: TIOCPKT win ioctl");
+ }
+#endif
/* should be able to use CloseDevice() here */
(void)chmod(pwin->p_tty, 0666);
(void)chown(pwin->p_tty, 0, 0);
@@ -1585,6 +1611,7 @@ struct win *w;
evdeq(&pwin->p_writeev);
if (w->w_readev.condneg == &pwin->p_inlen)
w->w_readev.condpos = w->w_readev.condneg = 0;
+ evenq(&w->w_readev);
free((char *)pwin);
w->w_pwin = NULL;
}
@@ -1593,15 +1620,15 @@ struct win *w;
#ifdef MULTIUSER
-/*
- * returns 0, if the lock really has been released
+/*
+ * returns 0, if the lock really has been released
*/
int
ReleaseAutoWritelock(dis, w)
struct display *dis;
struct win *w;
{
- debug2("ReleaseAutoWritelock: user %s, window %d\n",
+ debug2("ReleaseAutoWritelock: user %s, window %d\n",
dis->d_user->u_name, w->w_number);
/* release auto writelock when user has no other display here */
@@ -1623,8 +1650,8 @@ struct win *w;
return 1;
}
-/*
- * returns 0, if the lock really could be obtained
+/*
+ * returns 0, if the lock really could be obtained
*/
int
ObtainAutoWritelock(d, w)
@@ -1693,11 +1720,27 @@ struct event *ev;
ev->condneg = &D_status;
return 1;
}
- if (D_obufp - D_obuf > D_obufmax)
+ debug2("muchpending %s %d: ", D_usertty, D_blocked);
+ debug3("%d %d %d\n", D_obufp - D_obuf, D_obufmax, D_blocked_fuzz);
+ if (D_blocked)
+ continue;
+ if (D_obufp - D_obuf > D_obufmax + D_blocked_fuzz)
{
+ if (D_nonblock == 0)
+ {
+ debug1("obuf is full, stopping output to display %s\n", D_usertty);
+ D_blocked = 1;
+ continue;
+ }
debug("BLOCKING because of full obuf\n");
ev->condpos = &D_obuffree;
ev->condneg = &D_obuflenmax;
+ if (D_nonblock > 0 && !D_blockedev.queued)
+ {
+ debug1("created timeout of %g secs\n", D_nonblock/1000.);
+ SetTimeout(&D_blockedev, D_nonblock);
+ evenq(&D_blockedev);
+ }
return 1;
}
}
@@ -1715,7 +1758,7 @@ char *data;
#ifdef PSEUDOS
int wtop;
#endif
-
+
bp = buf;
size = IOSIZE;
@@ -1735,12 +1778,15 @@ char *data;
#endif
if (p->w_layer.l_cvlist && muchpending(p, ev))
return;
- if (p->w_blocked)
- {
- ev->condpos = &const_one;
- ev->condneg = &p->w_blocked;
- return;
- }
+#ifdef ZMODEM
+ if (!p->w_zdisplay)
+#endif
+ if (p->w_blocked)
+ {
+ ev->condpos = &const_one;
+ ev->condneg = &p->w_blocked;
+ return;
+ }
if (ev->condpos)
ev->condpos = ev->condneg = 0;
@@ -1792,9 +1838,14 @@ char *data;
#endif
if (len == 0)
return;
+#ifdef ZMODEM
+ if (zmodem_mode && zmodem_parse(p, bp, len))
+ return;
+#endif
#ifdef PSEUDOS
if (wtop)
{
+ debug("sending input to pwin\n");
bcopy(bp, p->w_pwin->p_inbuf + p->w_pwin->p_inlen, len);
p->w_pwin->p_inlen += len;
}
@@ -1926,7 +1977,7 @@ char *data;
{
struct win *p = (struct win *)data;
struct canvas *cv;
- debug1("FOUND silence win %d\n", p->w_number);
+ debug1("FOUND silence win %d\n", p->w_number);
for (display = displays; display; display = display->d_next)
{
for (cv = D_cvlist; cv; cv = cv->c_next)
@@ -1941,3 +1992,188 @@ char *data;
Msg(0, "Window %d: silence for %d seconds", p->w_number, p->w_silencewait);
}
}
+
+#ifdef ZMODEM
+
+static int
+zmodem_parse(p, bp, len)
+struct win *p;
+char *bp;
+int len;
+{
+ int i;
+ char *b2 = bp;
+ for (i = 0; i < len; i++, b2++)
+ {
+ if (p->w_zauto == 0)
+ {
+ for (; i < len; i++, b2++)
+ if (*b2 == 030)
+ break;
+ if (i == len)
+ break;
+ if (i > 1 && b2[-1] == '*' && b2[-2] == '*')
+ p->w_zauto = 3;
+ continue;
+ }
+ if (p->w_zauto > 5 || *b2 == "**\030B00"[p->w_zauto] || (p->w_zauto == 5 && *b2 == '1') || (p->w_zauto == 5 && p->w_zdisplay && *b2 == '8'))
+ {
+ if (++p->w_zauto < 6)
+ continue;
+ if (p->w_zauto == 6)
+ p->w_zauto = 0;
+ if (!p->w_zdisplay)
+ {
+ if (i > 6)
+ WriteString(p, bp, i + 1 - 6);
+ WriteString(p, "\r\n", 2);
+ zmodem_found(p, *b2 == '1', b2 + 1, len - i - 1);
+ return 1;
+ }
+ else if (p->w_zauto == 7 || *b2 == '8')
+ {
+ int se = p->w_zdisplay->d_blocked == 2 ? 'O' : '\212';
+ for (; i < len; i++, b2++)
+ if (*b2 == se)
+ break;
+ if (i < len)
+ {
+ zmodem_abort(p, 0);
+ D_blocked = 0;
+ D_readev.condpos = D_readev.condneg = 0;
+ while (len-- > 0)
+ AddChar(*bp++);
+ Flush();
+ Activate(D_fore ? D_fore->w_norefresh : 0);
+ return 1;
+ }
+ p->w_zauto = 6;
+ }
+ }
+ else
+ p->w_zauto = *b2 == '*' ? (p->w_zauto == 2 ? 2 : 1) : 0;
+ }
+ if (p->w_zauto == 0 && bp[len - 1] == '*')
+ p->w_zauto = len > 1 && bp[len - 2] == '*' ? 2 : 1;
+ if (p->w_zdisplay)
+ {
+ display = p->w_zdisplay;
+ while (len-- > 0)
+ AddChar(*bp++);
+ return 1;
+ }
+ return 0;
+}
+
+static void
+zmodem_fin(buf, len, data)
+char *buf;
+int len;
+char *data;
+{
+ char *s;
+ int n;
+
+ if (len)
+ RcLine(buf, strlen(buf) + 1);
+ else
+ {
+ s = "\030\030\030\030\030\030\030\030\030\030";
+ n = strlen(s);
+ LayProcess(&s, &n);
+ }
+}
+
+static void
+zmodem_found(p, send, bp, len)
+struct win *p;
+int send;
+char *bp;
+int len;
+{
+ char *s;
+ int i, n;
+ extern int zmodem_mode;
+
+ /* check for abort sequence */
+ n = 0;
+ for (i = 0; i < len ; i++)
+ if (bp[i] != 030)
+ n = 0;
+ else if (++n > 4)
+ return;
+ if (zmodem_mode == 3 || (zmodem_mode == 1 && p->w_type != W_TYPE_PLAIN))
+ {
+ struct display *d, *olddisplay;
+
+ olddisplay = display;
+ d = p->w_lastdisp;
+ if (!d || d->d_fore != p)
+ for (d = displays; d; d = d->d_next)
+ if (d->d_fore == p)
+ break;
+ if (!d && p->w_layer.l_cvlist)
+ d = p->w_layer.l_cvlist->c_display;
+ if (!d)
+ d = displays;
+ if (!d)
+ return;
+ display = d;
+ RemoveStatus();
+ p->w_zdisplay = display;
+ D_blocked = 2 + send;
+ flayer = &p->w_layer;
+ ZmodemPage();
+ display = d;
+ evdeq(&D_blockedev);
+ D_readev.condpos = &const_IOSIZE;
+ D_readev.condneg = &p->w_inlen;
+ ClearAll();
+ GotoPos(0, 0);
+ SetRendition(&mchar_blank);
+ AddStr("Zmodem active\r\n\r\n");
+ AddStr(send ? "**\030B01" : "**\030B00");
+ while (len-- > 0)
+ AddChar(*bp++);
+ display = olddisplay;
+ return;
+ }
+ flayer = &p->w_layer;
+ Input(":", 100, INP_COOKED, zmodem_fin, NULL);
+ s = send ? zmodem_sendcmd : zmodem_recvcmd;
+ n = strlen(s);
+ LayProcess(&s, &n);
+}
+
+void
+zmodem_abort(p, d)
+struct win *p;
+struct display *d;
+{
+ struct display *olddisplay = display;
+ struct layer *oldflayer = flayer;
+ if (p)
+ {
+ if (p->w_savelayer && p->w_savelayer->l_next)
+ {
+ if (oldflayer == p->w_savelayer)
+ oldflayer = flayer->l_next;
+ flayer = p->w_savelayer;
+ ExitOverlayPage();
+ }
+ p->w_zdisplay = 0;
+ p->w_zauto = 0;
+ LRefreshAll(&p->w_layer, 0);
+ }
+ if (d)
+ {
+ display = d;
+ D_blocked = 0;
+ D_readev.condpos = D_readev.condneg = 0;
+ Activate(D_fore ? D_fore->w_norefresh : 0);
+ }
+ display = olddisplay;
+ flayer = oldflayer;
+}
+
+#endif
diff --git a/window.h b/window.h
index 8bc9170..2616894 100644
--- a/window.h
+++ b/window.h
@@ -135,6 +135,7 @@ struct win
struct pseudowin *w_pwin; /* ptr to pseudo */
#endif
struct display *w_pdisplay; /* display for printer relay */
+ struct display *w_lastdisp; /* where the last input was made */
int w_number; /* window number */
struct event w_readev;
struct event w_writeev;
@@ -168,6 +169,9 @@ struct win
#ifdef FONT
char w_FontL; /* character font GL */
char w_FontR; /* character font GR */
+# ifdef ENCODINGS
+ char w_FontE; /* character font GR locked */
+# endif
int w_Charset; /* charset number GL */
int w_CharsetR; /* charset number GR */
int w_charsets[4]; /* Font = charsets[Charset] */
@@ -245,6 +249,10 @@ struct win
char w_tty[MAXSTR];
+ int w_zauto;
+#ifdef ZMODEM
+ struct display *w_zdisplay;
+#endif
#ifdef BUILTIN_TELNET
struct sockaddr_in w_telsa;
char w_telbuf[IOSIZE];
@@ -256,6 +264,15 @@ struct win
int w_telsubidx;
struct event w_telconnev;
#endif
+ struct mline *w_alt_mlines;
+ int w_alt_width;
+ int w_alt_height;
+ int w_alt_histheight;
+ int w_alt_x, w_alt_y;
+#ifdef COPY_PASTE
+ struct mline *w_alt_hlines;
+ int w_alt_histidx;
+#endif
};