386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Mon, 18 May 1992 03:28:00 +0000 (19:28 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Mon, 18 May 1992 03:28:00 +0000 (19:28 -0800)
Work on file usr/othersrc/public/screen-3.2/screen3.2/window.c
Work on file usr/othersrc/public/screen-3.2/screen3.2/terminfo/screeninfo.src
Work on file usr/othersrc/public/screen-3.2/screen3.2/terminfo/screencap
Work on file usr/othersrc/public/screen-3.2/screen3.2/terminfo/screenwinfo.src
Work on file usr/othersrc/public/screen-3.2/screen3.2/terminfo/getwinsize.c
Work on file usr/othersrc/public/screen-3.2/screen3.2/terminfo/screen-sco.src
Work on file usr/othersrc/public/screen-3.2/screen3.2/terminfo/test.txt
Work on file usr/othersrc/public/screen-3.2/screen3.2/.iscreenrc
Work on file usr/othersrc/public/screen-3.2/screen3.2/readme
Work on file usr/othersrc/public/screen-3.2/screen3.2/README
Work on file usr/othersrc/public/screen-3.2/screen3.2/INSTALLATION
Work on file usr/othersrc/public/screen-3.2/screen3.2/CHANGES
Work on file usr/othersrc/public/screen-3.2/screen3.2/COPYING
Work on file usr/othersrc/public/screen-3.2/screen3.2/poster

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

14 files changed:
usr/othersrc/public/screen-3.2/screen3.2/.iscreenrc [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/CHANGES [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/COPYING [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/INSTALLATION [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/README [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/poster [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/readme [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/terminfo/getwinsize.c [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/terminfo/screen-sco.src [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/terminfo/screencap [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/terminfo/screeninfo.src [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/terminfo/screenwinfo.src [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/terminfo/test.txt [new file with mode: 0644]
usr/othersrc/public/screen-3.2/screen3.2/window.c [new file with mode: 0644]

diff --git a/usr/othersrc/public/screen-3.2/screen3.2/.iscreenrc b/usr/othersrc/public/screen-3.2/screen3.2/.iscreenrc
new file mode 100644 (file)
index 0000000..2b44e27
--- /dev/null
@@ -0,0 +1,181 @@
+#
+# A sample .screenrc which I use for everyday work. 
+#
+# some of the commands commented out here, have been moved to 
+# /local/etc/screenrc
+#
+# we want no password, right?
+#password                 # This will ask us for a password.
+password none             # Same as not even mentioning it.
+#password 12Bz/9hNlPLZk   # "1234"
+#password YahtrWblnJw     # ypmatch jnweiger passwd. Well, ... :-)
+
+hardcopy_append on        # we append to our hardcopyfiles, not overwrite
+#bufferfile "/tmp/screen-exchange"   # default file for C-A >, C-A <
+scrollback 200            # we have a 200 lines history buffer
+markkeys "@=\177:@=^C"    # our mad facit-twist terminal buffer overflow...
+markkeys "h=^B:l=^F:\$=^E"  # some missing emacs style bindings in copymode
+
+echo -n "booting screen"
+
+# let it flash, not horn!
+#vbell on                          # "vbell" don't work any longer, sorry.
+#vbell_msg "  Wuff,  Wuff!!  "     # this is the default message
+vbell_msg "Miauuuuuuu !!"
+#bell "\aBimmmel No. %"            # sounds the bell and shows a message
+
+# we want to login all windows we create.
+#login on                  # "login", "nologin" don't work any longer, sorry 2.
+
+echo -n "."
+# we have no termcap entry for screen on the target machine? Well then 
+# we tell a lie.
+term screen              # would be the obvious default here.
+#term vt100               # screen will understand vt100 for 99%. 
+
+# we want to survive hangups
+# note that the default setting is off now!
+autodetach on
+
+# when we open a window, where shall its CWD be?
+chdir                     # without argument it's my $HOME
+
+echo -n "."
+# I hate nonexisting status lines! Force screen to believe me.
+#hardstatus off
+
+# now some Terminal setup:
+# Printing in the leftmost column is not save. We express that fact as :LP@:
+#
+# Emacs tends to smear it's highlighted status bar across the screen, producing
+# ugly areas of bright background, if termcap is'nt perfectly sober.
+# Give a little :ms@: in the termcap, this may help.
+#
+# And who invented the initialisation for facit terminals? We tell him that 
+# we non't like smooth scroll, by specifying :ti=\E[?l:.
+# \E[?3l   80 Zeichen
+# \E[?3h   132 Zeichen
+# LP       Last column Printable
+# \E[A     cursor up
+# \E[B     cursor down
+# \E[?4h   smooth scroll
+# \E[?4l   jump scroll
+# \E[%dL   insert %d lines
+# \E[K     clear to end of line
+# cs       \E[%i%d;%dr    for twist and xterm
+# ms@      Move in Standout mode is NOT save.
+# WS       our private variable, it declares that the terminal can 
+#          be resized by an escape-sequence
+# The termcap statement takes 2 or three parameters. First parameter lists
+# which TERMCAPs are affected by this statement. Second we specify changes
+# in screen's view of that terminals. Third we may specify some capabilities
+# that user-programs want to see in the $TERMCAP environment variable or in
+# screen's termcap entry.
+termcap vt* cl=\E[H\E[J\E[?1h:vi=\E[?35h:ve=\E[35l:ti=\E[?4l[vt100]
+termcap facit ti=\E[?4l[facit]
+termcap xterm* is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l:Z0=\E[?3h:Z1=\E[?3l
+
+echo -n "."
+# "\E(B", "\E(0", "\E(1", "\E(2", ... to switch between charsets.
+# screen internally emulates G1: "\E)..", G2: "\E*..", G3: "\E+.."
+# you can switch between them, with:
+#
+#  code | switch to
+# ------+------
+#  ^O   |  G0
+#  ^N   |  G1
+#  \En  |  G2
+#  \Eo  |  G3
+#termcap facit|vt100|xterm* G0
+
+# how do we resize windows? under sunview, this is standard, but xterm
+# needs to be a specially hacked xterm, to make this work.
+termcap xterm* WS=\E[8;%d;%dt
+
+# ICL 6402 testing:
+termcap icl* G0:S0=\E$[start]:E0=\E%[end]:C0=j9k<l6m3n?q\:t7u=v;w>x5 GS=\E(0^O:GE=\E(B^O:G1=k:G2=l:G3=m:G4=j:GV=x:GH=q:GR=u:GL=t:GU=w:GD=v:GC=n
+
+#Now if our terminal uses software handshake, we have to take a look at it.
+#Then, if the host transmits to fast, it will send the ^S character to make it
+#pause. And ^Q to resume. In this case 'flow on' shoud be used, as iScreen
+#then will interpret ^S and ^Q. Where the terminal uses hardware handshake
+#(RTS/CTS) we want to have 'flow off'. Switched to 'off', ^S and ^Q will
+#be passed to the application and ^A s / ^A q is not needed. 
+#If flow is set to 'auto', we will decide by the keypad mode, if the 
+#application should get these control characters or not. What a hack!
+#flow on|off|auto [interrupt]
+
+# Long Lines get wrapped around (the back of your terminal). This is the 
+# default for vt100. But now programs make different asumptions about your
+# terminal. You may find two linefeeds where you'd expect one, or you may
+# be confronted with a truncated line. Currently there is no fix, but pressing
+# C-A r and doing a redraw.
+#wrap on
+
+# the autoaka allows you to see the currently executing shell command in the
+# window name field. To use that, your shell prompt must contain ^[k^[\ or
+# you will see the string "(init)" as a name.
+# in my .cshrc I may use this for a wonderfull tcsh-prompt:
+#      set prompt="%{^[k^[\\%}%h %c2(%m)%# "
+#
+# defining a shellaka that contains a pipe-symbol (|) activites the
+# autoaka feature. To the left of that | you specify a constant part of
+# your prompt as a trigger, to the right you may place a default string
+# as in
+shellaka '> |tc'
+# but beware! specifying a window name with the -t option has priority over
+# the autoaka mechanism. Although specifying -t "> |foo" will work.
+# shellaka tc
+
+# ... now a little bit of key bindings
+# In case we don't have write permission for /etc/utmp (no s-bit)
+# we create even local windows via rlogin. -> Et voila: a utmp-slot
+# utmp-slots are strongly recomended to keep sccs and talk happy.
+# (thus we have ^A# or. ^Ac for windowcreation with or without utmp-slot.)
+# but if we run suid-root, we produce all the rlogins with -ln, 
+# as nobody shall refer to these pty's.
+bind '!' screen -ln -k faui41 rlogin faui41
+bind '@' screen -ln -k vme2 rlogin faui4_vme2
+#bind '#' screen -k faui43
+bind '#' screen -ln -k faui43 rlogin faui43
+bind '$' screen -ln -k faui44 rlogin faui44
+bind '%' screen -ln -k faui45 rlogin faui45
+bind '\^' screen -ln -k sup1 rlogin fausup1
+bind '&' screen -ln -k sup2 rlogin fausup2
+bind '*' screen -ln -k faui48 rlogin faui48
+bind '(' screen -ln -k faui09 rlogin faui09
+bind ')' screen -ln -k faui10 rlogin faui10
+bind 'J' screen -ln -k 4j rlogin faui4j
+bind 'P' screen -ln -k 4p rlogin faui4p
+bind '^C' screen -ln -k 45c rlogin faui45c
+bind '^D' screen -ln -k 45d rlogin faui45d
+bind '^E' screen -ln -k 45e rlogin faui45e
+bind '^I' screen -ln -k 45i rlogin faui45i
+
+# these two are logIn and logOut. As a toggle is too stupid.
+#bind 'I' set login on
+#bind 'O' set login off
+bind 'L'
+
+# What happens, when you 'think emacs' and want to erase a whole
+# line? You type ^A^K right? Under screen it should be ^Aa^K. But...
+# killing the window would be a real punishment for a little mistyping.
+bind k         #wow! I even manage to type ^Ak by accident.
+#bind ^k
+#bind K kill
+
+echo -n "."
+# "n:title", -k "title" and -t "title" are all the same.
+#screen 1:faui43          # My good old <nr>:<alias> syntax
+#screen -k faui43          # The way Wayne Davison thinks about it.
+#set redraw off            # we don't redraw this window on window change.
+#screen -ln -t faui43      # this one not logged in.
+#set redraw on
+#screen -ln 2:faui09 rlogin faui09 -l jnweiger
+
+# Finally another bonus feature for people using strange terminal settings like
+# different baud rate, etc. The next user will get standard settings
+# as ^[c is a reset sequence.
+#pow_detach_msg ""                # is the default
+pow_detach_msg "\ec" 
+echo "done."
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/CHANGES b/usr/othersrc/public/screen-3.2/screen3.2/CHANGES
new file mode 100644 (file)
index 0000000..e1842da
--- /dev/null
@@ -0,0 +1,296 @@
+3.1.1
+------
+
+iScreen is now under the GNU copyleft license. See file COPYING.
+
+command line option -A. $LINES, $COLUMNS improved.
+
+C-A : vbell_wait <sec>
+
+XENIX support (Ronald Khoo)
+
+SYSV has uname() instead of gethostname().
+
+hpux has setresuid.
+
+ClearScreen now saves image to scrollback buffer.
+
+mips has setenv.
+
+numerous bugfixes.
+
+3.1 finally released version.
+=============================
+
+3.0.99: last minute changes:
+----------------------------
+
+MIPS support (J{rvinen Markku)
+
+SVR4 support (Marc Boucher)
+
+secopen() secfopen() calls replace stat/access/open.
+C-a : echo improved.
+'register int'
+
+Changes up to Screen 3.0 Patchlevel 7
+=====================================
+
+Better terminfo support: Screen now checks if a termcap/info
+entry which the name "screen.$TERM" does exist. Look in the
+"VIRTUAL TERMINAL" section of the manual for more details.
+
+Many security improvements.
+
+ScrollRegion() bug fixed which caused slow scrolling if AL
+or DL was used.
+
+Pyramid and Ultrix support added. (Tim and Larry)
+  
+ENVIRONMENT support.
+  /local/etc/screenrc checks for $SYSSCREENRC
+  $HOME/.screenrc checks for $ISCREENRC and $SCREENRC
+  /local/screens checks for $ISCREENDIR and $SCREENDIR
+  .screenrc understands ${VAR} and $VAR .
+
+screen 3.0 Patchlevel 6
+=======================
+
+.screenrc:
+  screen now only opens the windows you explicitly ask for. if you 
+  specify none, you still get one window, of course.
+
+screen 3.0. Patchlevel 5
+========================
+
+Ansi prototyping by Christos.
+
+copy mode: CTRL-U / CTRL-D exchanged. code cleanup.
+
+changes to screen 3.0 patchlevel 4
+==================================
+
+markkeys "string"
+  allows to rebind the keys used in copy/history mode.
+  string is made up of pairs "<oldchar>=<newchar>" which are separated
+  by a colon. Oldchar and newchar are either single ascii characters, 
+  or the two character sequence ^x, where x is an ascii character, or
+  a 3 digit octal value prepended with '\'. the string "\040=.:^M=q"
+  rebinds '.' to set marks, and the return rey will abort copy mode.
+
+set scrollback 100
+  resizes the scrollback history buffer to 100 lines. a default of 50
+  is installed. 
+
+A Howard Chu like scrollback history is installed. Many vi-like keys
+  are added to the copy mode. The '?' key reports on cursor position.
+
+screen 3.0 Patchlevel 3
+=======================
+
+WriteString fixed, it did kill the display variable.
+
+Yet another LP bugfix.
+
+non vt100 semi-graphics character support.
+
+waynes patch fixed
+
+screen 3.0 Patchlevel 2
+=======================
+
+wayne patches cursor motion outside scrollregions.
+
+.screenrc 
+  monitor on|off
+
+changes in Screen 3.0 Patchlevel 1
+==================================
+
+screen -wipe
+
+^A : set vbell_msg "Wuff Wuff"
+
+Thousand enhancements: help resizible, copy'n'paste in main
+  socket loop, and no more '\0' hackin'. :WS=\E8;%d;%dt:
+
+screen can now resize windows under sunview.
+
+^A : set crlf on|off
+  effects markroutine join.
+
+screen learned about sized windows under X
+
+screen -ls (-d) -q
+  quiet option. We count the number of detached (attached) sessions and set
+  a return value of 10+n. The -q option inhibits all startup
+  warnings/messages. i.e. screen -R -q may return with code 12 or higher
+  or start a new/old session.
+
+pow_detach_msg "text string"
+  new command, allows messages, terminal reset, etc. on logout caused
+  by pow_detach.
+
+^A : learned a new keyword "set":
+  commands like "login on" , "vbell off", ... affect the default for
+  windows to be created. But commands like "set login off" affect
+  the actual setting of this window. and not the default.
+  such commands may be bound to keys. example: 
+  bind 'O' set login off
+  is valid in your .screenrc as well as typed at the ':' prompt.
+  a bonus is ":set all" which is synonym to ":help".
+  At the Colon prompt also KeyNames can be entered, alothough that makes
+  not always sense.
+
+^A x uses a builtin lockprg, if 
+  a) we don't find our lockprg, or
+  b) user supplies us with the environmet variable LOCKPRG set to "builtin"
+  the builtin locks until your login password is typed. on systems using
+  "shadow password files" you are prompted for a password.
+
+markroutine can append joined.
+
+screen removes the "controlling tty" from utmp while ptys are attached.
+
+markroutine performs CR+NL when '\n' is pressed
+
+screen may die quietly, when no TERMCAP entry for "screen" is
+found, and screen is run under X-windows
+
+_SEQUENT_ marks sequent386_ptx
+
+screen runs now under SunOS4.1.1 (we need setsid()!).
+
+bug in SetForeWindow fixed.
+
+rare markroutine bug fixed.
+
+we dont open every file the attacher tells us.
+
+we have now our wonderful "Wuff, Wuff" visual_bell
+
+we have now the interprocess-communication-buffer. secure version.
+
+'^A =' removes the interprocess-communication-buffer.
+
+markroutine as in 2.1
+
+markroutine: 'a' toggles append mode,
+             '>' like ' ', but immediately WriteFile(DUMP_EXCHANGE) then.
+             'A' like ' ', but first switch to append mode.
+
+.screenrc understands "screen 2:faui09 rlogin faui09 -l jnweiger"
+                  and "password none"
+                  and "vbell [on|off]"
+
+'^A :' allows .screenrc commands "online".
+
+screen now receives new $TERM from attacher, when it is reattached 
+
+MakeClientSocket() fifo version does now test for access.
+
+.screenrc learns "hardstatus {on|off}"
+
+termcap's VB is used for vbell if available.
+
+Attach() code rewritten:
+       screen now lists socket directory, if it does not find a suitable socket
+       screen -d [host.tty] detaches a running screen. 
+
+screen -[ls|list]
+       list all sockets that we find in our sockdir
+
+when the socket has been removed, send a SIGCHLD to the poor SCREEN 
+process and it will try to recover. then try a 'screen -r' again.
+all the socket stuff lives now in an extra file.
+
+Major changes in version 2.4:
+=============================
+
+*  Test version that presents the erlangen extensions from 2.0 in a 2.3
+   screen.
+
+*  window resize support
+
+*  screen locking C-a x
+
+*  support for SYSV
+
+*  password protection
+
+*  copy & paste across screens
+
+*  remote detach and power detach
+
+Major changes in version 2.3:
+
+*  Terminal emulation has been significantly enhanced and bugfixed.
+
+*  We now fully update the last character on the screen for true auto-
+   margin terminals, though there may be some delay before the character
+   can be safely added to the screen.  If your terminal has character
+   insert it will be used to shorten the delay.
+
+*  Added the "termcap" .screenrc command to tweak your terminal's termcap
+   entry AND to customize the termcap generated for the virtual terminals.
+   See also the -L and -O command-line options, and the SCREENCAP environ-
+   ment variable.
+
+*  Fixed screen's character handling when detached or suspended to NOT block
+   the child processes in their windows -- output continues to be processed
+   in the background.
+
+*  Added a.k.a.s (window-name aliases) that allow you to customize the
+   window-information line, including being able to change the name on-
+   the-fly to reflect what's currently running in the window (see the
+   -k option, shellaka command, and ALSO KNOWN AS discussion in the doc).
+
+*  Added the ability to log the output of a window to a file (see the
+   "C-a H" (log) command).
+
+*  Flow-control can now be set for each window and switched interactively
+   (see the "flow" command, -f option, and FLOW CONTROL discussion).
+
+*  Individual windows can be included or excluded from mention in the
+   /etc/utmp file (see the "login" command and -l option).
+
+*  Added an activity monitor, which allows you to have a window watched for
+   the start of any output and alert you when it occurs (see the "C-a M"
+   (monitor) command).
+
+*  Enhanced the information in the window-information line to keep track of
+   windows that have: logging turned on '(L)'; beeped in the background '!';
+   became active while being monitored '@' (see the "C-a w" (windows) command).
+
+*  Added an on-line help display that lists all the commands and their
+   key bindings (see the "C-a ?" (help) command).
+
+*  Extended handling of the beep message (and also the new activity message)
+   to allow '~' to specify a literal beep (see the "beep" and "activity"
+   .screenrc commands).
+
+*  You can now set the default action on receipt of a hangup signal:  detach
+   or terminate (see the "autodetach" .screenrc command).
+
+*  Routing of characters to their virtual terminals has been enhanced to
+   not drop characters nor (in rare circumstances) hang up screen.
+
+*  The NFS compatibility has been enhanced.
+
+Major changes in version 2.0a:
+
+*  Screen allows you to `detach' the "screen" session from the physical
+   terminal and resume it at a later point in time (possibly on a
+   different terminal or in a different login session).
+
+  To get an impression of this functionality do the following:
+
+     - call "screen" and create a couple of windows
+     - type Control-A Control-D (screen terminates; you are back
+       in the shell)
+     - call "screen -r" to resume the detached screen
+
+*  Screen supports multiple character sets and the ISO 2022 control
+   functions to designate and switch between character sets.
+   This allows you, for instance, to make use of the VT100 graphics
+   character set or national character sets.
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/COPYING b/usr/othersrc/public/screen-3.2/screen3.2/COPYING
new file mode 100644 (file)
index 0000000..e3027ae
--- /dev/null
@@ -0,0 +1,190 @@
+                   GNU GENERAL PUBLIC LICENSE
+                    Version 1, February 1989
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+                    675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The license agreements of most software companies try to keep users
+at the mercy of those companies.  By contrast, our General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  The
+General Public License applies to the Free Software Foundation's
+software and to any other program whose authors commit to using it.
+You can use it for your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Specifically, the General Public License is designed to make
+sure that you have the freedom to give away or sell copies of free
+software, that you receive source code or can get it if you want it,
+that you can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of a such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must tell them their rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any program or other work which
+contains a notice placed by the copyright holder saying it may be
+distributed under the terms of this General Public License.  The
+"Program", below, refers to any such program or work, and a "work based
+on the Program" means either the Program or any work containing the
+Program or a portion of it, either verbatim or with modifications.  Each
+licensee is addressed as "you".
+
+  1. You may copy and distribute verbatim copies of the Program's source
+code as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this
+General Public License and to the absence of any warranty; and give any
+other recipients of the Program a copy of this General Public License
+along with the Program.  You may charge a fee for the physical act of
+transferring a copy.
+
+  2. You may modify your copy or copies of the Program or any portion of
+it, and copy and distribute such modifications under the terms of Paragraph
+1 above, provided that you also do the following:
+
+    a) cause the modified files to carry prominent notices stating that
+    you changed the files and the date of any change; and
+
+    b) cause the whole of any work that you distribute or publish, that
+    in whole or in part contains the Program or any part thereof, either
+    with or without modifications, to be licensed at no charge to all
+    third parties under the terms of this General Public License (except
+    that you may choose to grant warranty protection to some or all
+    third parties, at your option).
+
+    c) If the modified program normally reads commands interactively when
+    run, you must cause it, when started running for such interactive use
+    in the simplest and most usual way, to print or display an
+    announcement including an appropriate copyright notice and a notice
+    that there is no warranty (or else, saying that you provide a
+    warranty) and that users may redistribute the program under these
+    conditions, and telling the user how to view a copy of this General
+    Public License.
+
+    d) You may charge a fee for the physical act of transferring a
+    copy, and you may at your option offer warranty protection in
+    exchange for a fee.
+
+Mere aggregation of another independent work with the Program (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other work under the scope of these terms.
+\f
+  3. You may copy and distribute the Program (or a portion or derivative of
+it, under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+    a) accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of
+    Paragraphs 1 and 2 above; or,
+
+    b) accompany it with a written offer, valid for at least three
+    years, to give any third party free (except for a nominal charge
+    for the cost of distribution) a complete machine-readable copy of the
+    corresponding source code, to be distributed under the terms of
+    Paragraphs 1 and 2 above; or,
+
+    c) accompany it with the information you received as to where the
+    corresponding source code may be obtained.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form alone.)
+
+Source code for a work means the preferred form of the work for making
+modifications to it.  For an executable file, complete source code means
+all the source code for all modules it contains; but, as a special
+exception, it need not include source code for modules which are standard
+libraries that accompany the operating system on which the executable
+file runs, or for standard header files or definitions files that
+accompany that operating system.
+
+  4. You may not copy, modify, sublicense, distribute or transfer the
+Program except as expressly provided under this General Public License.
+Any attempt otherwise to copy, modify, sublicense, distribute or transfer
+the Program is void, and will automatically terminate your rights to use
+the Program under this License.  However, parties who have received
+copies, or rights to use copies, from you under this General Public
+License will not have their licenses terminated so long as such parties
+remain in full compliance.
+
+  5. By copying, distributing or modifying the Program (or any work based
+on the Program) you indicate your acceptance of this license to do so,
+and all its terms and conditions.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the original
+licensor to copy, distribute or modify the Program subject to these
+terms and conditions.  You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein.
+\f
+  7. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of the license which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+the license, you may choose any version ever published by the Free Software
+Foundation.
+
+  8. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/INSTALLATION b/usr/othersrc/public/screen-3.2/screen3.2/INSTALLATION
new file mode 100644 (file)
index 0000000..1ec844a
--- /dev/null
@@ -0,0 +1,33 @@
+Installation of screen3.1
+
+0.)
+Unpack. Screen comes as a compressed tar archinve. But... you propably
+already managed that step, when you are reading this.
+
+1.)
+take a look at the config directory. choose one of the config files there,
+or edit one to suit your needs. If necessary cunsult the online manuals
+or look into /usr/include/...
+
+2.)
+look at the Makefiles. Different systems need different libraries. 
+Some need even the putenv code added. Build a Makefile that satisfies
+all these requirements. Then decide if you want to do screen debugging
+or want a production screen. In the first case you want to add -DDEBUG
+to CFLAGS. In the second case you may want to have -O in your CFLAGS
+and -s in your LDFLAGS, as you don't want to analyse a core-dump, if
+that ever happens. Still the executable may be 250 to 500 kbytes in size.
+
+3.)
+compile with the right compiler. If you have gcc, use it. If you have 
+a SYSV-ish and a bsd-like compiler, choose the later. E.g. on suns screen
+will not run properly when compiled with /usr/5bin/cc.
+
+4.)
+You may well run screen from your private binary directory and with a 
+private socket directory like $HOME/.screen. But to have a full featured
+screen and (from a users point of view) more secure pty's you should
+consult a system administrator and discuss installing screen setuid-root
+in some globally accessible directory like /usr/local/bin.
+
+Juergen Weigert. jnweiger@immd4.informatik.uni-erlangen.de
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/README b/usr/othersrc/public/screen-3.2/screen3.2/README
new file mode 100644 (file)
index 0000000..762a72f
--- /dev/null
@@ -0,0 +1,86 @@
+
+Short introduction to screen (Version 3.0.7)                  jw 7.9.91
+
+screen 
+  provides you with an ansi/vt100 terminal emulator, which can multiplex
+  up to 10 pseudo-terminals. On startup, it executes $SHELL in window 0.
+  Then it reads $HOME/.screenrc to learn configuration, keybindings, 
+  and may open more windows.
+
+  C-A C                Create new windows.
+
+  C-A SPACE    Advance from window to window (with wraparound)
+
+  C-A C-A      Toggle between two windows.
+
+  C-A 0
+   ...
+  C-A 9                Switch to window nr. 0 ... 9.
+
+  C-A w                Show a list of windows in the Statusline.
+
+  C-A a                (Think of goto-start-of-line in emacs or tcsh).
+  C-A s                (Think of i-search in emacs).
+  C-A q                Send a literal C-A/C-S/C-Q to the process in the window.
+
+  C-A l                Redraw this window.
+
+  C-A W                Toggle between 80 & 132 columns mode. 
+
+  C-A L                Try to toggle the utmp-slot for this window.
+
+  C-A A                Prompt for a new name for this window. (see C-A w).
+
+  C-A z                Suspend the whole screen.
+
+  C-A x                Execute /usr/bin/lock or $LOCKCMD or a builtin terminallock.
+
+  C-A C-[      Start copy&paste mode. Move cursor with h,j,k,l. Set 2 marks
+               with SPACE or y. Abort with ESC. Note that "C-[" is ESC.
+               NOTE: there is a userdefined amount of scrollback history.
+                The history buffer is entered, when the cursor hits the top
+               of the window.
+
+  C-A C-]      paste in current window's stdin. see C-A C-[.
+
+  C-A <
+  C-A >                Read or write the copybuffer from/to the exchange file.
+               Multiple screen users on the same host may thus transfer text.
+
+  C-A d                Detach screen. All processes continue and may spool output
+               to their pty's, but screen disconnects from your terminal.
+               reattach with "screen -r".
+
+  C-A D D      Power detach. Disconnect like C-A d and kill the parent shell.
+
+  C-A K                Kill a window and send SIGHUP to its processgroup. Per default
+               this would be C-A C-k. But it is redefined in the demo .screenrc
+               (think of killing a whole line in emacs).
+
+  C-A :set all  Show all keybindings. The above list is not at all complete and
+               may even be wrong, as keys can be redefined in .screenrc or
+               with "C-A :bind 'X' keyname [arguments]".
+
+  C-A : ....  Online configuration change.
+
+
+screen -r [host.tty]
+  Reattach a detached screen session. The terminal emulator reconfigures
+  according to your $TERMCAP or $TERM settings. '-R' brings up a detached
+  session or (if none) creates a new session. You should specify a socket
+  when there you have multiple screens detached. 
+
+screen -d [host.tty]
+  Detach a screen session from remote. Has the same effect as typing 'C-A d'
+  on the controlling terminal. '-D' will power-detach.
+
+screen -list
+screen -ls
+  Show all available sockets. If there are (DEAD???) sockets, you may consider 
+  removing them. If there are sockets missing, you may send a SIGCHLD to its
+  process 'SCREEN' and the process will re-establish the socket. (think of 
+  someone cleaning /tmp thoroughly).
+
+screen -h 200
+  Starts a new screen session and sets the number of lines in the scrollback
+  buffer to 200. The default is 50 lines.
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/poster b/usr/othersrc/public/screen-3.2/screen3.2/poster
new file mode 100644 (file)
index 0000000..f88fd55
--- /dev/null
@@ -0,0 +1,40 @@
+This is iScreen version 3.2. It is an upgrade to version 3.1.1 that was posted
+in dec 91 to comp.sources.unix. 
+Versions 3.1.x of iScreen are potential security riscs under SunOS 4.1.1. These
+versions fail to detach or terminate the session when the modem line hangs up.
+Anyone using telnet or rlogin could (unwillingly) connect to such a session.
+
+iScreen users on SunOS 4.1.1 please do upgrade to version 3.2! 
+
+Although fixing the bug described above was the main reason for this posting,
+there are numerous other fixes/enhancements:
+
+       * support for NeXT, Apollo, Ultrix, SVR4, SCO, ISC, SGI, bsd386, ...
+         added or enhanced. 
+       
+       * the "dead CTRL-O key" bug is fixed.
+       
+       * flow control has been redesigned.
+       
+       * I/O is no longer stripped to 7 bit.
+       
+       * new commands "hardcopy_append on", "bufferfile /tmp/myown", 
+         "(set) refresh off".
+         
+       * redesign of interrupt passing. The use of "screen -i" is now 
+         encouraged.
+       
+       * overall code cleanup.
+       
+The complete distribution of iScreen 3.2 is available via ftp from:
+
+   ftp.uni-erlangen.de[131.188.1.43]:portal/utilities/screen/screen32.tar.Z
+   
+For a brief introduction and a short summary of essential commands
+refer to the files "readme" and "README".
+   
+I wish to thank all contributors for requesting features or sending patches.
+Special thanks to Marc Boucher who tested and patched iScreen on numerous
+platforms.
+
+juergen.
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/readme b/usr/othersrc/public/screen-3.2/screen3.2/readme
new file mode 100644 (file)
index 0000000..06c0dde
--- /dev/null
@@ -0,0 +1,75 @@
+"screen" is a window manager that allows you to handle several independent
+screens (UNIX ttys) on a single physical terminal; each screen has its own
+set of processes connected to it (typically interactive shells).  Each
+virtual terminal created by "screen" emulates a DEC VT100 plus several ANSI
+X3.64 and ISO 2022 functions (including DEC VT102 features such as line and
+character deletion and insertion).
+
+Since "screen" uses pseudo-ttys, the select system call, and UNIX-domain
+sockets, it will not run under a system that does not include these
+features of 4.2 and 4.3 BSD UNIX.
+
+If you want to get a quick idea how "screen" works but don't want to read
+the entire manual, do the following:
+     -  call "screen" without arguments
+     -  wait for the shell prompt; execute some commands
+     -  type ^A ^C (Control-A followed by Control-C)
+     -  wait for the shell prompt; do something in the new window
+     -  type ^A ^A repeatedly to switch between the two windows
+     -  terminate the first shell ("screen" switches to the other window)
+     -  terminate the second shell
+
+If you have got "vttest" (the VT100 test program from mod.sources) you
+may want to run it from within "screen" to verify that it correctly
+emulates a VT100 on your terminal (except for things your terminal is
+incapable of handling, like 132 column mode and double width/height
+characters, of course).
+
+By the way, "screen" can be used to compensate for certain bugs of "real"
+VT100 terminals.  For instance, our 4.2 BSD version of mille(6) garbles
+the display on terminals of the VT100 family, but it works quite fine
+when it is invoked from within "screen".  In addition, "screen" enables
+you to use EMACS on terminals that are unable to generate Control-S and
+Control-Q from the keyboard or that require flow control using Control-S
+and Control-Q.  This is the reason why I have an alias like
+
+     alias emacs "screen emacs"
+
+in my .cshrc file.  Users who run EMACS on terminals which normally have no
+trouble with Control-S and Control-Q will probably want to run screen with
+the -fn or -fa options, or put the line "flow off" or "flow auto" in their
+.screenrc file.
+
+Before typing "make", look at the config directory and choose an appropriate 
+config file that you then copy to config.h and then edit it to
+reflect the configuration parameters of your choice.  Each define is well
+commented to help you decide what to choose.  Then give the Makefile the
+once-over and compile.
+
+To get screen to do everything it was designed to do, it should be installed
+set-uid root.  This enables it to modify the ownership of the pseudo-ttys,
+update /etc/utmp, and read the current load average from /dev/kmem.
+
+Failing to install it suid root (e.g. if you fear a trojan horse) doesn't
+have any major disadvantages, except that w(1) and some other utilities
+will display only "screen" as the current process, and the pseudo ttys
+(ptys) used for the virtual terminals won't have their owners set.  Screen
+can provide you some pty security by opening the ptys exclusively, but
+this has the unfortunate side-effect of keeping your own subprocesses from
+being able to open /dev/tty.
+
+It is also possible to create a special "screen" group and give the file
+/etc/utmp screen-group write-access, and give the file /dev/kmem screen-group
+read access to get all the features except the pty-ownership changes.  Some
+people also install it set-gid "kmem" or set-gid "utmp" to give it one or
+the other.
+
+Many people install screen as a normal program with no special privileges
+and still find it to be indispensable.  Give it a try.
+
+Send your questions, comments and bug reports for screen to:
+
+           Juergen Weigert 
+
+          jnweiger@immd4.informatik.uni-erlangen.de
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/terminfo/getwinsize.c b/usr/othersrc/public/screen-3.2/screen3.2/terminfo/getwinsize.c
new file mode 100644 (file)
index 0000000..f19d5cd
--- /dev/null
@@ -0,0 +1,33 @@
+main()
+{
+  char *term, *s;
+  int li, co;
+  char tbuf[1024];
+
+  term = (char *)getenv("TERM");
+  printf("under iScreen getenv(\"TERM\") should return \"screen\": %s\n", term);
+  printf("getenv(\"LINES\") returns ");
+  if (s = (char *)getenv("LINES"))
+    {
+      li = atoi(s);
+      printf("%d\n", li);
+    }
+  else
+    printf("nothing valuable\n");
+  printf("getenv(\"COLUMNS\") returns ");
+  if (s = (char *)getenv("COLUMNS"))
+    {
+      co = atoi(s);
+      printf("%d\n", co);
+    }
+  else
+    printf("nothing valuable\n");
+  if (tgetent(tbuf, term) != 1)
+    {
+      printf("Oh, no termcap/info entry for %s!\n", term);
+    }
+  li = tgetnum("li");
+  printf("tgetnum(\"li\") returns %d\n", li);
+  co = tgetnum("co");
+  printf("tgetnum(\"co\") returns %d\n", co);
+}
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screen-sco.src b/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screen-sco.src
new file mode 100644 (file)
index 0000000..bd95e4f
--- /dev/null
@@ -0,0 +1,65 @@
+From root%mjbtn.UUCP@uunet.UU.NET Tue Oct 22 03:09:14 1991
+Received: from relay2.UU.NET by immd4.informatik.uni-erlangen.de  with SMTP (5.64+/7.3a-FAU)
+       id AA10018; Tue, 22 Oct 91 03:09:04 +0100
+Received: from uunet.uu.net (via LOCALHOST.UU.NET) by relay2.UU.NET with SMTP 
+       (5.61/UUNET-internet-primary) id AA09640; Mon, 21 Oct 91 22:09:07 -0400
+Received: from mjbtn.UUCP by uunet.uu.net with UUCP/RMAIL
+       (queueing-rmail) id 220830.17203; Mon, 21 Oct 1991 22:08:30 EDT
+Received: by mjbtn.jobsoft.com (/\==/\ Smail3.1.21.1); Mon, 21 Oct 91 20:49 CDT
+Message-Id: <m0kZBFd-0007XHC@mjbtn.jobsoft.com>
+From: root@mjbtn.jobsoft.com (Mark J. Bailey [ADMIN])
+Subject: Re: oh yes
+To: jnweiger%immd4.informatik.uni-erlangen.de%uunet.UUCP@uunet.UU.NET (Juergen Weigert)
+Date: Mon, 21 Oct 91 20:49:49 CDT
+In-Reply-To: <9110212148.AA01737@faui43.informatik.uni-erlangen.de>; from "Juergen Weigert" at Oct 21, 91 10:48 pm
+X-Mailer: ELM [version 2.3 PL11]
+Status: OR
+
+Hi,
+
+Well, more playing and finally some progress!  :-)
+
+This is my .screenrc:
+
+terminfo ansi G0:hs@:am:LP@:OP
+
+Now, I am not worried about its total accurracy, but I just wanted to show
+you what I tried.  I also fixed a screen-25 terminfo entry:
+
+screen-25|VT 100/ANSI X3.64 virtual terminal,
+       am, msgr, xon,
+       cols#80, it#8, lines#25,
+       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, dl=\E[%p1%dM, dl1=\E[M,
+       ed=\E[J, el=\E[K, home=\E[H, ht=\t, hts=\EH,
+       il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0, kbs=\b,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E?,
+       ll=\E[25H, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM,
+       rmkx=\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+       sgr0=\E[m, smkx=\E=, smso=\E[3m, smul=\E[4m,
+       tbc=\E[3g,
+
+And notice for SCO Unix that I added 'am' to the entry for screen-25.  Even
+though the external (login shell) type 'ansi' was modified with the .screenrc,
+when I added 'am' to the screen window term screen-25, it functioned flawlessly
+and I am not sure why.  Anyway, vi and all the others seem to work great 
+now.  Next, I need to work on the G0 -> C0 graphics character mappings.  I 
+don't fully understand that yet.  Anyway, this should be of help to others
+under SCO.  BTW, that copy of the message you got from me that I sent to
+Ronald Khoo -- I applied SCO SLS patch xnx141 (for xenix) to fix the bug 
+in select() when dealing with pipes, and it solved my problems on xenix.
+
+Mark.
+
+-- 
+Mark J. Bailey, N4XHX                              _______/====X11====\_______
+USMAIL: 511 Memorial Blvd., Murfreesboro, TN 37129 |         JobSoft         |
+VOICE:  +1 615 893 0098                            | Design & Development Co.|
+UUCP:   ...!uunet!mjbtn!mjb, ...!raider!mjbtn!mjb  |  Murfreesboro, TN  USA  |
+DOMAIN: mjb@mjbtn.JOBSOFT.COM      CIS: 76314,160  ---------------------------
+<KA9Q-UNIX-USERS Mailing List-Subscribe: ka9q-unix-requests@mjbtn.jobsoft.com>
+
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screencap b/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screencap
new file mode 100644 (file)
index 0000000..35a6954
--- /dev/null
@@ -0,0 +1,10 @@
+SC|screen|VT 100/ANSI X3.64 virtual terminal|\
+       :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
+       :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
+       :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
+       :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:xv:\
+       :li#43:co#80:LP:us=\E[4m:ue=\E[24m:so=\E[3m:se=\E[23m:\
+       :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:sr=\EM:al=\E[L:\
+       :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:mi:ic=\E[@:IC=\E[%d@:\
+       :ks=\E=:ke=\E>:G0:
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screeninfo.src b/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screeninfo.src
new file mode 100644 (file)
index 0000000..139f19d
--- /dev/null
@@ -0,0 +1,16 @@
+screen|VT 100/ANSI X3.64 virtual terminal,
+       msgr, xon,
+       cols#80, it#8, lines#24,
+       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, dl=\E[%p1%dM, dl1=\E[M,
+       ed=\E[J, el=\E[K, home=\E[H, ht=\t, hts=\EH,
+       il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0, kbs=\b,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E?,
+       nel=\EE, rc=\E8, rev=\E[7m, ri=\EM,
+       rmkx=\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+       sgr0=\E[m, smkx=\E=, smso=\E[3m, smul=\E[4m,
+       tbc=\E[3g,
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screenwinfo.src b/usr/othersrc/public/screen-3.2/screen3.2/terminfo/screenwinfo.src
new file mode 100644 (file)
index 0000000..0922d90
--- /dev/null
@@ -0,0 +1,16 @@
+screen-w|VT 100/ANSI X3.64 virtual terminal,
+       msgr, xon,
+       cols#132, it#8, lines#24,
+       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, dl=\E[%p1%dM, dl1=\E[M,
+       ed=\E[J, el=\E[K, home=\E[H, ht=\t, hts=\EH,
+       il=\E[%p1%dL, il1=\E[L, ind=\n, is2=\E)0, kbs=\b,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, khome=\E?,
+       nel=\EE, rc=\E8, rev=\E[7m, ri=\EM,
+       rmkx=\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+       sgr0=\E[m, smkx=\E=, smso=\E[3m, smul=\E[4m,
+       tbc=\E[3g,
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/terminfo/test.txt b/usr/othersrc/public/screen-3.2/screen3.2/terminfo/test.txt
new file mode 100644 (file)
index 0000000..2da65e5
--- /dev/null
@@ -0,0 +1,603 @@
+
+\f\e<\e[H\e[J\e(A\e)0\e[?4h\e[?5l\e[m
+    \ elqqqqqqqqqwwwqqqqqqqqqk                sssssssssssssssssssssssssssss
+    x\ f\e[1mMerry Chr\ e\e[mx\e[1mx\e[mx\ f\e[1mmas * Mer\ e\e[mx                \                           /
+    x\ fry Christ\ ex\e[1mx\e[mx\ f * Merry \ ex                 pr                       rp
+    x\ f\e[1mChristmas\ e\e[mx\e[1mx\e[mx\ f\e[1mMerry Chr\ e\e[mx                   oqrs               srqo
+    x\ fistmas * \ ex\e[1mx\e[mx\ fry Christ\ ex                       ooppqqwqwqqppoo
+    tqqqqqqqqqj\e[1mx\e[mmqqqqqqqqqu                             x x
+    t\e[1mqqqqqqqqqq`qqqqqqqqqq\e[mu                             x x
+    tqqqqqqqqqk\e[1mx\e[mlqqqqqqqqqu                             x x
+    x\ fry Christ\ ex\e[1mx\e[mx\ f * Merry \ ex                             x x
+    x\ f\e[1mChristmas\ e\e[mx\e[1mx\e[mx\ f\e[1mMerry Chr\ e\e[mx                             x x
+    x\ fistmas * \ ex\e[1mx\e[mx\ fry Christ\ ex                             x x
+    x\ f\e[1mmas * Mer\ e\e[mx\e[1mx\e[mx\ f\e[1mChristmas\ e\e[mx                         srqqj mqqrs
+    mqqqqqqqqqvvvqqqqqqqqqj                    \e[4m rqpo           opqr \e[m\e[1;10r
+\e[5;79Hl\e[8;79Hm\e[6;79Hx\e[7;79Hx
+\e[5;78Hlq\e[8;78Hmq\e[6;78Hx \e[7;78Hx 
+\e[5;77Hlqw\e[8;77Hmqv\e[6;77Hx x\e[7;77Hx x
+\e[5;76Hlqwq\e[8;76Hmqvq\e[6;76Hx x \e[7;76Hx x 
+\e[5;75Hlqwq\e[8;75Hmqvq\e[6;75Hx x \e[7;75Hx x 
+\e[5;74Hlqwq\e[8;74Hmqvq\e[6;74Hx x \e[7;74Hx x 
+\e[5;73Hlqwq\e[8;73Hmqvq\e[6;73Hx x \e[7;73Hx x 
+\e[5;72Hlqwq\e[8;72Hmqvq\e[6;72Hx x \e[7;72Hx x 
+\e[5;71Hlqwq\e[8;71Hmqvq\e[6;71Hx x \e[7;71Hx x 
+\e[5;70Hlqwq\e[8;70Hmqvq\e[6;70Hx x \e[7;70Hx x 
+\e[8;69H/\e[7;69H/
+\e[9;69H/\e[8;68H/ 
+\e[10;69H/\e[9;68H\e[1m/\e[m \e[8;68H /\e[7;69H \e[6;69H/
+\e[11;69H\e[1;4m/\e[m\e[10;68H/ \e[9;68H \e[1m/\e[m\e[8;68H /\e[7;68H\e[1m/\e[m/
+\e[12;69H\e[1m/\e[m\e[11;68H\e[1;4m/ \e[m\e[10;68H /\e[9;69H\e[1m/\e[m\e[8;68H/\e[7;68H\e[1m/\e[m 
+\e[13;69H/\e[12;68H/ \e[11;68H\e[4m /\e[m\e[10;69H\e[1m/\e[m\e[9;68H\e[1m/\e[m/\e[7;68H /\e[6;69H\e[1m/\e[m
+\e[13;68H\e[1m/\e[m \e[12;68H \e[1m/\e[m\e[10;68H//\e[9;68H/\e[8;68H \e[7;68H\e[1m/\e[m \e[6;69H/
+\e[13;68H /\e[11;68H\e[4m/\e[m\e[9;68H \e[8;68H/ \e[7;68H//\e[6;69H 
+\e[13;68H/\e[12;68H\e[1m/\e[m\e[10;68H \e[9;68H\e[1m/\e[m  \e[8;68H/\e[1m/\e[m\e[7;68H \e[6;69H\e[1m/\e[m
+\e[13;68H\e[1m/\e[m\e[12;68H/\e[11;68Hs\e[10;68H\e[1m/\e[m \e[9;68H//\e[8;69H \e[6;69H 
+\e[14;53Hsssssssssss
+\e[13;68H/\e[12;68H \e[11;68H\e[1;4m/ \e[m\e[10;68H//\e[9;69H \e[8;68H \e[1m/\e[m\e[7;68H/ \e[6;69H\e[1m/\e[m
+\e[14;52Hs\e[14;64Hs
+\e[13;68H \e[12;68H/ \e[11;68H\e[4m/\e[1m/\e[m\e[10;69H \e[9;68H /\e[8;68H/ \e[7;68H \e[1m/\e[m\e[6;69H/
+\e[14;53Hrrrrrrrrrrr
+\e[13;68H\e[1m/\e[m \e[12;69H/\e[11;69Hs\e[10;68H \e[1m/\e[m\e[9;68H\e[1m/\e[m \e[8;68H /\e[7;69H/
+\e[14;54Hqqqqqqqqq
+\e[13;68H/\e[1m/\e[m\e[12;69H \e[11;68H\e[4m /\e[m\e[10;68H/ \e[9;68H /\e[7;68H\e[1m/\e[m
+\e[14;52Hsrqqqqqqqqqrs
+\e[13;69H \e[12;68H \e[1m/\e[m\e[11;68H\e[4m/ \e[m\e[10;68H \e[1m/\e[m\e[8;68H\e[1m/\e[m\e[7;68H/
+\e[14;51Hsr\e[14;64Hrs
+\e[13;69H/\e[12;68H/ \e[11;68H\e[4m /\e[m\e[10;69H\e[1m/\e[m\e[9;68H\e[1m/\e[m/\e[7;68H /\e[6;69H\e[1m/\e[m
+\e[14;51Hrrqq\e[14;62Hqqrr
+\e[13;68H\e[1m/\e[m \e[12;68H \e[1m/\e[m\e[10;68H//\e[9;68H/\e[8;68H \e[7;68H\e[1m/\e[m \e[6;69H/
+\e[14;55Hppppppp
+\e[13;68H /\e[11;68H\e[4m/\e[m\e[9;68H \e[8;68H/ \e[7;68H//\e[6;69H 
+\e[14;51Hrrq\e[14;63Hqrr
+\e[13;68H/\e[12;68H\e[1m/\e[m\e[10;68H \e[9;68H\e[1m/\e[m  \e[8;68H/\e[1m/\e[m\e[7;68H \e[6;69H\e[1m/\e[m
+\e[14;51Hrqpp\e[14;62Hppqr
+\e[13;68H\e[1m/\e[m\e[12;68H/\e[11;68Hs\e[10;68H\e[1m/\e[m \e[9;68H//\e[8;69H \e[6;69H 
+\e[14;50H\e[4mr\e[mqpppooooooopppq\e[4mr\e[m
+\e[13;68H/\e[12;68H \e[11;68H\e[1;4m/ \e[m\e[10;68H//\e[9;69H \e[8;68H \e[1m/\e[m\e[7;68H/ \e[6;69H\e[1m/\e[m
+\e[14;50H\e[4mq\e[mppooooooooooopp\e[4mq\e[m
+\e[13;68H \e[12;68H/ \e[11;68H\e[4m/\e[1m/\e[m\e[10;69H \e[9;68H /\e[8;68H/ \e[7;68H \e[1m/\e[m\e[6;69H/
+\e[13;55Hsssssss\e[14;52Hooo       ooo\e[14;57H. \ fo\ e f
+\e[13;68H\e[1m/\e[m \e[12;69H/\e[11;69Hs\e[10;68H \e[1m/\e[m\e[9;68H\e[1m/\e[m \e[8;68H /\e[7;69H/\e[14;56H.f    
+\e[13;53Hss\e[13;62Hss\e[14;53H  .f       
+\e[13;68H/\e[1m/\e[m\e[12;69H \e[11;68H\e[4m /\e[m\e[10;68H/ \e[9;68H /\e[7;68H\e[1m/\e[m\e[14;53H       f
+\e[13;48Hssssrrrrqqqqqrrrrssss\e[14;50Hs               s
+\e[13;69H \e[12;68H \e[1m/\e[m\e[11;68H\e[4m/ \e[m\e[10;68H \e[1m/\e[m\e[8;68H\e[1m/\e[m\e[7;68H/\e[14;51H.    .      .
+\e[13;47Hsssrrrrqqqqqqqqqrrrrsss\e[14;51Hf    f  .   f
+\e[13;69H\e[4m/\e[m\e[12;68H/ \e[11;68H\e[4m /\e[m\e[10;69H\e[1m/\e[m\e[9;68H\e[1m/\e[m/\e[7;68H /\e[6;69H\e[14;51H        f .  
+\e[13;47Hrrrqqqqpppppppppqqqqrss\e[14;52H.    . \ fo\ e f
+\e[13;68H\e[1;4m/\e[m \e[12;68H \e[1m/\e[m\e[10;68H//\e[9;68H/\e[8;68H \e[7;68H\e[1m/\e[m \e[6;69H/\e[14;52Hf   .f    
+\e[13;47Hqqqppppooooooooopppqrss\e[14;52H   .f       .
+\e[13;68Hs/\e[11;68H\e[4m/\e[m\e[9;68H \e[8;68H/ \e[7;68H//\e[6;69H \e[14;55Hf        f
+\e[12;54Hsssssssss\e[13;47Hqppoooo         oopqrss\e[13;54H.\ fo\ e      .\e[14;55H          
+\e[13;68H\e[4m/\e[m\e[12;68H\e[1m/\e[m\e[10;68H \e[9;68H\e[1m/\e[m  \e[8;68H/\e[1m/\e[m\e[7;68H \e[6;69H\e[1m/\e[m\e[13;54Hf       f\e[14;51H.    .    
+\e[12;52Hssrrrrrrrrrs\e[13;47Hqpooo            opqrss\e[13;53Hf \e[14;51Hf    f  .   f
+\e[13;68H\e[1;4m/\e[m\e[12;68H/\e[11;68Hs\e[10;68H\e[1m/\e[m \e[9;68H//\e[8;69H \e[13;53Hf  \ fo      o\ e\e[14;51H        f .  
+\e[12;46Hssssssrr\e[12;63Hrrssssss\e[13;47H     \e[13;64H      \e[6;69H \e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;68Hs\e[11;68H\e[4m/ \e[m\e[10;68H//\e[9;69H \e[8;68H \e[1m/\e[m\e[7;69H \e[13;47H  .         \ fo o\ e      f\e[14;52Hf   .f    
+\e[12;45Hsrrrrrrqqqqqqqqqqqqqqrrssrq\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;68H\e[4m/ \e[11;68H/\e[1m/\e[m\e[10;69H \e[9;68H /\e[8;69H  mqvqqqqqq\e[5;70H lqwqqqqqq\e[7;70H x x\e[6;70H x x\e[13;49H .     \ fo\ e      f\e
+\e[12;45Hrqqqqqqppppppppppppppq\e[8;71H mqvqqqqq\e[5;71H lqwqqqqq\e[7;71H x x\e[6;71H x x\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;69H\e[4m/\e[m\e[11;69Hs\e[10;68H \e[1m/\e[m\e[9;69H \e[8;72H mqvqqqq\e[5;72H lqwqqqq\e[7;72H x x\e[6;72H x x\e[13;50H    f       f  \e[14;51
+\e[12;45Hqppppppoooooooooooooo\e[8;73H mqvqqq\e[5;73H lqwqqq\e[7;73H x x\e[6;73H x x\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;69Hs\e[11;68H\e[4m /\e[m\e[10;69H \e[8;74H mqvqq\e[5;74H lqwqq\e[7;74H x x\e[6;74H x x\e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f 
+\e[12;45Hpoooooo             \e[8;75H mqvq\e[5;75H lqwq\e[7;75H x x\e[6;75H x x\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e
+\e[11;44H\e[4mrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\e[m\e[12;45H       \e[12;64H        \e[8;76H mqv\e[5;76H lqw\e[7;76H x x\e[6;76H x x\e[12;47H\ fo   
+\e[8;77H mq\e[5;77H lq\e[7;77H x \e[6;77H x \e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[8;78H m\e[5;78H l\e[7;78H x\e[6;78H x\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[8;79H \e[5;79H \e[7;79H \e[6;79H \e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\ f\e[1;7m\e[5;25H\e#3 Cheers! 
+\e[6;25H\e#4 Cheers! \e[m
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[5;1H\e[K\e#5
+\e[6;1H\e[K\e#5
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[10;1H       /ooooooooooooooo\
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[10;1H      /   sss     sss   \
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[10;1H      x  (\e[4msOs\e[m)   (\e[4msOs\e[m)  x
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[10;1H      x        `        x
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[10;1H       \  \sssssssss/  /
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[10;1H        \             /
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[10;1H         \sssssssssss/
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[10;1H          ooppqqrrsss
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[10;1H          ooppqqrrsss
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[10;1H          ooppqqrrsss
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[10;1H          ooppqqrrsss
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[10;1H          ooppqqrrsss
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[10;1H          ooppqqrrsss
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[10;1H          ooppqqrrsss\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[H\eM      x        `        x
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[H\eM      x  (\e[4msOs\e[m)   (\e[4msOs\e[m)  x
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[H\eM      /   sss     sss   \
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[H\eM       /ooooooooooooooo\ 
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[H\eM
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[H\eM
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[H\eM
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[H\eM
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[10;1H        \             /
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[10;1H         \sssssssssss/
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[10;1H          ooppqqrrsss
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[10;1H          ooppqqrrsss
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[10;1H          ooppqqrrsss
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[10;1H          ooppqqrrsss
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[10;1H          ooppqqrrsss\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[H\eM      /   sss     sss   \
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[H\eM       /ooooooooooooooo\ 
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[H\eM
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[H\eM
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[10;1H          ooppqqrrsss
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[10;1H          ooppqqrrsss
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[10;1H          ooppqqrrsss
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[10;1H          ooppqqrrsss\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[H\eM       /ooooooooooooooo\ 
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[H\eM
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[H\eM
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[H\eM
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[10;1H         \sssssssssss/
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[10;1H          ooppqqrrsss
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[10;1H          ooppqqrrsss\e[r
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[4;45H\ f\a\aJin\ e
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[4;48H\ fgle\ e
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[4;52H\ f\aBells,\ e
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[4;59H\ f\a\aJin\ e
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[4;62H\ fgle\ e
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[4;66H\ f\aBells,\ e
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[5;45H\ f\a\aJin\ e
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[5;48H\ fgle\ e
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[5;52H\ f\aall\ e
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[5;56H\ f\athe\ e
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[5;60H\ f\away,\ e
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[6;45H\ f\aOh!\ e
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[6;50H\ f\aWhat\ e
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[6;55H\ f\afun\ e
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[6;59H\ f\a\ait\ e
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[6;62H\ fis\ e
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[6;65H\ f\ato\ e
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[6;68H\ f\aride,\ e
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[7;45H\ f\a\aOn\ e
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[7;48H\ fa\ e
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[7;50H\ f\a\aone-\ e
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[7;54H\ fhorse\ e
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[7;60H\ f\a\aop\ e
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[7;62H\ fen\ e
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[7;65H\ f\asleigh.\ e
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H            \ fo o      o\ e\e[13;49Hf  \ fo    o\ e           \e[14;52H             
+\e[12;45H.   \ fo  o\ e    \ fo\ e             \e[13;49H               \e[14;55H          
+\e[12;45Hf          \ fo      o\ e       \e[13;50H               \e[14;55H          \ f
+\e[12;45H                   
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H            \ fo o      o\ e\e[13;49Hf  \ fo    o\ e           \e[14;52H             
+\e[12;45H.   \ fo  o\ e    \ fo\ e             \e[13;49H               \e[14;55H          
+\e[12;45Hf          \ fo      o\ e       \e[13;50H               \e[14;55H          \ f
+\e[12;45H                   
+\e[4;45H\e[K\e[4;55HMerry Christmas
+\e[5;45H\e[K
+\e[6;45H\e[K\e[6;60H-
+\e[7;45H\e[K
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H            \ fo o      o\ e\e[13;49Hf  \ fo    o\ e           \e[14;52H             
+\e[12;45H.   \ fo  o\ e    \ fo\ e             \e[13;49H               \e[14;55H          
+\e[12;45Hf          \ fo      o\ e       \e[13;50H               \e[14;55H          \ f
+\e[12;45H                   
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf   .f    
+\e[12;47H       .    \ fo o      o\ e\e[13;49Hf  \ fo    o\ e     .     \e[14;52H   .f       .
+\e[12;45H.   \ fo  o\ e f  \ fo\ e        .   .\e[13;49H .     \ fo\ e      f\e[14;55Hf        f
+\e[12;45Hf          \ fo      o\ e  f . f\e[13;50Hf   .\ fo      . o\ e\e[14;55H          
+\e[12;45H  .  \ fo    o    .   o\ e   f  \e[13;50H    f       f  \e[14;51H.    .      .
+\e[12;47Hf .    \ fo\ e  .  f \ fo\ e     f\e[13;53Hf \e[13;62H   .\e[14;51Hf    f  .   f
+\e[12;47H  f       f  f        \e[13;47H.   \ fo\ e f  \ fo      o\ e f\e[14;51H        f .  
+\e[12;49H  \ fo    o      o\ e\e[13;47Hf     \ fo           o\ e  .\e[14;52H.    . \ fo\ e f
+\e[12;47H\ fo     o           o\e[13;47H  .         o o\ e      f\e[14;52Hf    f    
+\e[12;47H            \ fo o      o\ e\e[13;49Hf  \ fo    o\ e           \e[14;52H             
+\e[12;45H.   \ fo  o\ e    \ fo\ e             \e[13;49H               \e[14;55H          
+\e[12;45Hf          \ fo      o\ e       \e[13;50H               \e[14;55H          \ f
+\e[12;45H                   
+\e[22;1H\e[?4l
+
diff --git a/usr/othersrc/public/screen-3.2/screen3.2/window.c b/usr/othersrc/public/screen-3.2/screen3.2/window.c
new file mode 100644 (file)
index 0000000..ea11443
--- /dev/null
@@ -0,0 +1,601 @@
+/* Copyright (c) 1991
+ *      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 1, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (see the file COPYING); if not, write to the
+ * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Noteworthy contributors to screen's design and implementation:
+ *     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 (lwv27%cas.BITNET@CUNYVM.CUNY.Edu)
+ *     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)
+ *
+ ****************************************************************
+ */
+
+#ifndef lint
+  static char rcs_id[] = "$Id: window.c,v 1.2 92/02/03 02:28:20 jnweiger Exp $ FAU";
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <signal.h>
+#ifndef sun
+#include <sys/ioctl.h>
+#endif
+#ifdef BSDI
+# include <string.h>
+#endif /* BSDI */
+
+#ifdef ISC
+# include <sys/tty.h>
+# include <sys/sioctl.h>
+# include <sys/pty.h>
+#endif
+
+#ifdef MIPS
+extern int errno;
+#endif
+
+#include "config.h"
+#include "screen.h"
+#include "extern.h"
+
+static void FreeScrollback __P((struct win *));
+
+static int ResizeHistArray __P((struct win *, char ***, int, int, int));
+static int ResizeScreenArray __P((struct win *, char ***, int, int, int));
+static void FreeArray __P((char ***, int));
+
+extern TermcapCOLS, TermcapROWS;
+extern int maxwidth;
+extern int default_width, default_height, screenwidth, screenheight;
+extern char *blank, *null, *OldImage, *OldAttr;
+extern char *OldFont, *LastMsg;
+extern struct win *wtab[], *fore;
+extern int WinList, ForeNum;
+extern char *Z0, *Z1, *WS;
+extern int Z0width, Z1width;
+
+extern int Detached;
+
+#if defined(TIOCGWINSZ) || defined(TIOCSWINSZ)
+  struct winsize glwz;
+#endif
+
+/*
+ * ChangeFlag:   0: try to modify no window
+ *               1: modify fore (and try to modify no other)
+ *               2: modify all windows
+ *
+ * Note: Activate() is only called if change_flag == 1
+ *       i.e. on a WINCH event
+ */
+
+void
+CheckScreenSize(change_flag)
+int change_flag;
+{
+  int width, height, n;
+  struct win *p;
+
+  if (Detached)
+    {
+      debug("CheckScreenSize: Detached -> No check.\n");
+      return;
+    }
+#ifdef TIOCGWINSZ
+  if (ioctl(0, TIOCGWINSZ, &glwz) != 0)
+    {
+      debug1("CheckScreenSize: ioctl(0, TIOCGWINSZ) errno %d\n", errno);
+      width = TermcapCOLS;
+      height = TermcapROWS;
+    }
+  else
+    {
+      width = glwz.ws_col;
+      height = glwz.ws_row;
+      if (width == 0)
+        width = TermcapCOLS;
+      if (height == 0)
+        height = TermcapROWS;
+    }
+#else
+  width = TermcapCOLS;
+  height = TermcapROWS;
+#endif
+  
+  debug2("CheckScreenSize: screen is (%d,%d)\n", width, height);
+
+  if (change_flag == 2)
+    {
+      for (n = WinList; n != -1; n = p->WinLink)
+        {
+          p = wtab[n];
+          ChangeWindowSize(p, width, height);
+       }
+    }
+  if (screenwidth == width && screenheight == height)
+    {
+      debug("CheckScreenSize: No change -> return.\n");
+      return;
+    }
+  ChangeScreenSize(width, height, change_flag);
+  if (change_flag == 1 && WinList != -1)       /* was HasWindow */
+    Activate(fore->norefresh);
+}
+
+void
+ChangeScreenSize(width, height, change_fore)
+int width, height;
+int change_fore;
+{
+  struct win *p;
+  int n, wwi;
+
+  if (screenwidth == width && screenheight == height)
+    {
+      debug("ChangeScreenSize: no change\n");
+      return;
+    }
+  debug3("ChangeScreenSize to (%d,%d) (change_fore: %d)\n",width, height, change_fore);
+  screenwidth = width;
+  screenheight = height;
+
+  if (WS)
+    {
+      default_width = TermcapCOLS;
+      default_height = TermcapROWS;
+    }
+  else
+    {
+      if (Z0 && (width == Z0width || width == Z1width) &&
+          (TermcapCOLS == Z0width || TermcapCOLS == Z1width))
+        default_width = TermcapCOLS;
+      else
+        default_width = width;
+      default_height = height;
+    }
+  debug2("Default size: (%d,%d)\n",default_width, default_height);
+  if (change_fore)
+    {
+      if (WinList != -1 && change_fore) /* was HasWindow */
+        {
+          debug("Trying to change fore.\n");
+          ChangeWindowSize(fore, width, height);
+        }
+    }
+  if (WS == NULL)
+    {
+      /* We have to adapt all windows */
+      for (n = WinList; n != -1; n = p->WinLink)
+        {
+          p = wtab[n];
+          debug1("Trying to change window %d.\n",n);
+          wwi = width;
+          if (Z0 && (width==Z0width || width==Z1width))
+           {
+             if (p->width > (Z0width + Z1width) / 2)
+               wwi = Z0width;
+             else
+               wwi = Z1width;
+           }
+          ChangeWindowSize(p, wwi, height);
+        }
+    }
+}
+
+int
+ChangeScrollback(p, histheight, histwidth)
+struct win *p;
+int histheight, histwidth;
+{
+  if (histheight > MAXHISTHEIGHT)
+    histheight = MAXHISTHEIGHT;
+  debug2("ChangeScrollback(..., %d, %d)\n", histheight, histwidth);
+  debug2("  was %d, %d\n", p->histheight, p->width);
+
+  if (histheight == 0)
+    {
+      FreeScrollback(p);
+      return 0;
+    }
+
+  if (ResizeHistArray(p, &p->ihist, histwidth, histheight, 1)
+      || ResizeHistArray(p, &p->ahist, histwidth, histheight, 0)
+      || ResizeHistArray(p, &p->fhist, histwidth, histheight, 0))
+    {
+      debug("   failed, removing all histbuf\n");
+      FreeScrollback(p);
+      Msg_nomem;
+      return (-1);
+    }
+  if (p->histheight != histheight)
+    p->histidx = 0;
+  p->histheight = histheight;
+
+  return(0);
+}
+
+static void FreeScrollback(p)
+struct win *p;
+{
+  FreeArray(&p->ihist, p->histheight);
+  FreeArray(&p->ahist, p->histheight);
+  FreeArray(&p->fhist, p->histheight);
+  p->histheight = 0;
+}
+
+static int
+ResizeHistArray(p, arr, wi, hi, fillblank)
+struct win *p;
+char ***arr;
+int wi, hi, fillblank;
+{
+  char **narr, **np, **onp, **onpe;
+  int t, x, first;
+
+  if (p->width == wi && p->histheight == hi)
+    return(0);
+  if (p->histheight != hi)
+    {
+      if ((narr = (char **)calloc(sizeof(char *), hi)) == NULL)
+       {
+         FreeArray(arr, p->histheight);
+         return(-1);
+       }
+      np = narr;
+      onp = (*arr) + p->histidx;
+      onpe = (*arr) + p->histheight;
+      first = p->histheight - hi;
+      if (first<0)
+        np-=first;
+      for(t=0; t<p->histheight; t++)
+       {
+          if (t-first >=0 && t-first < hi)
+           *np++ = *onp;
+         else
+           Free(*onp);
+         if (++onp == onpe)
+           onp = *arr;
+       }
+      if (*arr)
+       Free(*arr);
+    }
+  else
+    narr = *arr;
+  for (t=0, np=narr; t<hi; t++, np++)
+    {
+      x = p->width;
+      if (*np == 0)
+       {
+         *np = (char *)malloc(wi);
+          x = 0;
+       }
+      else if (p->width != wi)
+       {
+         *np = (char *)xrealloc(*np, wi);
+       }
+      if (*np == 0)
+       {
+         FreeArray(&narr, hi);
+         return(-1);
+       }
+      if (x<wi)
+       {
+         if (fillblank)
+           bclear(*np+x, wi-x);
+         else
+           bzero(*np+x, wi-x);
+       }
+    }
+  *arr = narr;
+  return(0);
+}
+      
+
+static int
+ResizeScreenArray(p, arr, wi, hi, fillblank)
+struct win *p;
+char ***arr;
+int wi, hi, fillblank;
+{
+  int minr;
+  char **cp;
+
+  if (p->width == wi && p->height == hi)
+    return(0);
+
+  if (hi > p->height)
+    minr = p->height;
+  else
+    minr = hi;
+
+  if (p->height > hi)
+    {
+      for (cp = *arr; cp < *arr + (p->height - hi); cp++)
+       Free(*cp);
+      bcopy((char *)(*arr + (p->height - hi)), (char *)(*arr),
+           hi * sizeof(char *));
+    }
+  if (*arr && p->width != wi)
+    for (cp = *arr; cp < *arr + minr; cp++)
+      {
+       if ((*cp = (char *)xrealloc(*cp, (unsigned) wi)) == 0)
+         {
+           FreeArray(arr, p->height);
+           return(-1);
+         }
+       if (wi > p->width)
+         {
+           if (fillblank)
+             bclear(*cp + p->width, wi - p->width);
+           else
+             bzero(*cp + p->width, wi - p->width);
+         }
+      }
+  if (*arr)
+    *arr = (char **) xrealloc((char *) *arr, (unsigned) hi * sizeof(char *));
+  else
+    *arr = (char **) malloc((unsigned) hi * sizeof(char *));
+  if (*arr == 0)
+    return(-1);
+  for (cp = *arr + p->height; cp < *arr + hi; cp++)
+    {
+      if ((*cp = malloc((unsigned) wi)) == 0)
+       {
+         while (--cp >= *arr)
+           Free(*cp);
+         Free(*arr);
+          return(-1);
+       }
+      if (fillblank)
+       bclear(*cp, wi);
+      else
+       bzero(*cp, wi);
+    }
+  return(0);
+}
+
+static void
+FreeArray(arr, hi)
+char ***arr;
+int hi;
+{
+  register char **p;
+  register int t;
+
+  if (*arr == 0)
+    return;
+  for (t = hi, p = *arr; t--; p++)
+    if (*p)
+      Free(*p);
+  Free(*arr);
+}
+
+
+int
+ChangeWindowSize(p, width, height)
+struct win *p;
+int width, height;
+{
+  int t, scr;
+  
+  if (width > maxwidth)
+    {
+      maxwidth = width;
+      debug1("New maxwidth: %d\n", maxwidth);
+      if (blank == 0)
+        blank = malloc((unsigned) maxwidth);
+      else
+        blank = xrealloc(blank, (unsigned) maxwidth);
+      if (null == 0)
+        null = malloc((unsigned) maxwidth);
+      else
+        null = xrealloc(null, (unsigned) maxwidth);
+      if (OldImage == 0)
+        OldImage = malloc((unsigned) maxwidth);
+      else
+        OldImage = xrealloc(OldImage, (unsigned) maxwidth);
+      if (OldAttr == 0)
+        OldAttr = malloc((unsigned) maxwidth);
+      else
+        OldAttr = xrealloc(OldAttr, (unsigned) maxwidth);
+      if (OldFont == 0)
+        OldFont = malloc((unsigned) maxwidth);
+      else
+        OldFont = xrealloc(OldFont, (unsigned) maxwidth);
+      if (LastMsg == 0)
+        {
+          LastMsg = malloc((unsigned) maxwidth + 1);
+          *LastMsg = 0;
+        }
+      else
+        LastMsg = xrealloc(LastMsg, (unsigned) maxwidth + 1);
+      LastMsg[maxwidth]=0;
+      if (!(blank && null && OldImage && OldAttr && OldFont && LastMsg))
+       {
+nomem:   for (t = WinList; t != -1 && wtab[t] != p; t = p->WinLink) 
+           ;
+         if (t >= 0)
+           KillWindow(t);
+         Msg(0, "Out of memory -> Window destroyed !!");
+         return(-1);
+       }
+      MakeBlankLine(blank, maxwidth);
+      bzero(null, maxwidth);
+    }
+  
+  if (width == p->width && height == p->height)
+    {
+      debug("ChangeWindowSize: No change.\n");
+      return(0);
+    }
+
+  debug2("ChangeWindowSize from (%d,%d) to ", p->width, p->height);
+  debug2("(%d,%d)\n", width, height);
+
+  if (width == 0 && height == 0)
+    {
+      FreeArray(&p->image, p->height);
+      FreeArray(&p->attr, p->height);
+      FreeArray(&p->font, p->height);
+      if (p->tabs)
+       Free(p->tabs);
+      p->width = 0;
+      p->height = 0;
+      FreeScrollback(p);
+      return(0);
+    }
+
+  /* when window gets smaller, scr is the no. of lines we scroll up */
+  scr = p->height - height;
+  if (scr < 0)
+    scr = 0;
+  for (t = 0; t < scr; t++)
+    AddLineToHist(p, p->image+t, p->attr+t, p->font+t); 
+  if (ResizeScreenArray(p, &p->image, width, height, 1)
+      || ResizeScreenArray(p, &p->attr, width, height, 0)
+      || ResizeScreenArray(p, &p->font, width, height, 0))
+    {
+      goto nomem;
+    }
+  /* this won't change the height of the scrollback history buffer, but
+   * it will check the width of the lines.
+   */
+  ChangeScrollback(p, p->histheight, width);
+
+  if (p->tabs == 0)
+    {
+      /* tabs get width+1 because 0 <= x <= width */
+      if ((p->tabs = malloc((unsigned) width + 1)) == 0)
+        goto nomem;
+      t = 8;
+    }
+  else
+    {
+      if ((p->tabs = xrealloc(p->tabs, (unsigned) width + 1)) == 0)
+        goto nomem;
+      t = p->width;
+    }
+  for (t = (t + 7) & 8; t < width; t += 8)
+    p->tabs[t] = 1; 
+  p->height = height;
+  p->width = width;
+  if (p->x >= width)
+    p->x = width - 1;
+  if ((p->y -= scr) < 0)
+    p->y = 0;
+  if (p->Saved_x >= width)
+    p->Saved_x = width - 1;
+  if ((p->Saved_y -= scr) < 0)
+    p->Saved_y = 0;
+  if (p->autoaka > 0) 
+    if ((p->autoaka -= scr) < 1)
+      p->autoaka = 1;
+  p->top = 0;
+  p->bot = height - 1;
+#ifdef TIOCSWINSZ
+  if (p->ptyfd && p->wpid)
+    {
+      glwz.ws_col = width;
+      glwz.ws_row = height;
+      debug("Setting pty winsize.\n");
+      if (ioctl(p->ptyfd, TIOCSWINSZ, &glwz))
+       debug2("SetPtySize: errno %d (fd:%d)\n", errno, p->ptyfd);
+# if defined(STUPIDTIOCSWINSZ) && defined(SIGWINCH)
+#  ifdef POSIX
+      pgrp = tcgetpgrp(p->ptyfd);
+#  else
+      if (ioctl(p->ptyfd, TIOCGPGRP, &pgrp))
+       pgrp = 0;
+#  endif
+      if (pgrp)
+       {
+         debug1("Sending SIGWINCH to pgrp %d.\n", pgrp);
+         if (killpg(pgrp, SIGWINCH))
+           debug1("killpg: errno %d\n", errno);
+       }
+      else
+       debug1("Could not get pgrp: errno %d\n", errno);
+# endif /* STUPIDTIOCSWINSZ */
+    }
+#endif
+  return(0);
+}
+
+
+void
+ResizeScreen(wi)
+struct win *wi;
+{
+  int width, height;
+
+  if (wi)
+    {
+      width = wi->width;
+      height = wi->height;
+    }
+  else
+    {
+      width = default_width;
+      height = default_height;
+    }
+  if (screenwidth == width && screenheight == height)
+    {
+      debug("ResizeScreen: No change\n");
+      return;
+    }
+  debug2("ResizeScreen: to (%d,%d).\n", width, height);
+  if (WS)
+    {
+      debug("ResizeScreen: using WS\n");
+      WSresize(width, height);
+      ChangeScreenSize(width, height, 0);
+    }
+  else if (Z0 && (width == Z0width || width == Z1width))
+    {
+      debug("ResizeScreen: using Z0/Z1\n");
+      PutStr(width == Z0width ? Z0 : Z1);
+      ChangeScreenSize(width, screenheight, 0);
+    }
+  if (screenwidth != width || screenheight != height)
+    {
+      debug2("BUG: Cannot resize from (%d,%d)",screenwidth, screenheight);
+      debug2(" to (%d,%d) !!\n", width, height);
+      if (wi)
+       ChangeWindowSize(wi, screenwidth, screenheight);
+    }
+}
+
+char *
+xrealloc(mem, len)
+char *mem;
+int len;
+{
+  register char *nmem;
+
+  if (nmem = realloc(mem, len))
+    return(nmem);
+  free(mem);
+  return((char *)0);
+}