aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2000-11-30 21:05:33 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2000-11-30 21:05:33 +0000
commit3b6eaa7b1ef31985836f61a8d833b90490c337b5 (patch)
treea212ee10b5214f5c4302ff44d44c2542d83cf7b6
parentb3a5f6c29dfc2c09b67dab73ff97cb6b5fcb425b (diff)
downloadsrc-3b6eaa7b1ef31985836f61a8d833b90490c337b5.tar.gz
src-3b6eaa7b1ef31985836f61a8d833b90490c337b5.zip
Initial import of slightly trimmed tcsh 6.10
Notes
Notes: svn path=/vendor/tcsh/dist/; revision=69408
-rw-r--r--contrib/tcsh/FAQ6
-rw-r--r--contrib/tcsh/Fixes79
-rw-r--r--contrib/tcsh/Imakefile6
-rw-r--r--contrib/tcsh/Makefile.in27
-rw-r--r--contrib/tcsh/Makefile.std7
-rw-r--r--contrib/tcsh/Makefile.vms4
-rw-r--r--contrib/tcsh/Ported13
-rw-r--r--contrib/tcsh/README17
-rw-r--r--contrib/tcsh/complete.tcsh253
-rwxr-xr-xcontrib/tcsh/config.guess972
-rwxr-xr-xcontrib/tcsh/config.sub969
-rw-r--r--contrib/tcsh/config/bsd4.4149
-rw-r--r--contrib/tcsh/config_f.h4
-rwxr-xr-xcontrib/tcsh/configure1863
-rw-r--r--contrib/tcsh/configure.in319
-rw-r--r--contrib/tcsh/ed.chared.c100
-rw-r--r--contrib/tcsh/ed.decls.h4
-rw-r--r--contrib/tcsh/ed.defns.c33
-rw-r--r--contrib/tcsh/ed.h14
-rw-r--r--contrib/tcsh/ed.init.c34
-rw-r--r--contrib/tcsh/ed.inputl.c20
-rw-r--r--contrib/tcsh/ed.refresh.c32
-rw-r--r--contrib/tcsh/ed.screen.c96
-rw-r--r--contrib/tcsh/ed.term.c10
-rw-r--r--contrib/tcsh/ed.xmap.c36
-rw-r--r--contrib/tcsh/glob.c5
-rw-r--r--contrib/tcsh/host.defs13
-rw-r--r--contrib/tcsh/mi.termios.c8
-rw-r--r--contrib/tcsh/nls/ukrainian/set1140
-rw-r--r--contrib/tcsh/nls/ukrainian/set108
-rw-r--r--contrib/tcsh/nls/ukrainian/set1110
-rw-r--r--contrib/tcsh/nls/ukrainian/set124
-rw-r--r--contrib/tcsh/nls/ukrainian/set1313
-rw-r--r--contrib/tcsh/nls/ukrainian/set146
-rw-r--r--contrib/tcsh/nls/ukrainian/set157
-rw-r--r--contrib/tcsh/nls/ukrainian/set1613
-rw-r--r--contrib/tcsh/nls/ukrainian/set1716
-rw-r--r--contrib/tcsh/nls/ukrainian/set184
-rw-r--r--contrib/tcsh/nls/ukrainian/set1915
-rw-r--r--contrib/tcsh/nls/ukrainian/set2111
-rw-r--r--contrib/tcsh/nls/ukrainian/set2041
-rw-r--r--contrib/tcsh/nls/ukrainian/set215
-rw-r--r--contrib/tcsh/nls/ukrainian/set2217
-rw-r--r--contrib/tcsh/nls/ukrainian/set2334
-rw-r--r--contrib/tcsh/nls/ukrainian/set244
-rw-r--r--contrib/tcsh/nls/ukrainian/set256
-rw-r--r--contrib/tcsh/nls/ukrainian/set2615
-rw-r--r--contrib/tcsh/nls/ukrainian/set278
-rw-r--r--contrib/tcsh/nls/ukrainian/set294
-rw-r--r--contrib/tcsh/nls/ukrainian/set3117
-rw-r--r--contrib/tcsh/nls/ukrainian/set3016
-rw-r--r--contrib/tcsh/nls/ukrainian/set317
-rw-r--r--contrib/tcsh/nls/ukrainian/set445
-rw-r--r--contrib/tcsh/nls/ukrainian/set54
-rw-r--r--contrib/tcsh/nls/ukrainian/set611
-rw-r--r--contrib/tcsh/nls/ukrainian/set730
-rw-r--r--contrib/tcsh/nls/ukrainian/set85
-rw-r--r--contrib/tcsh/nls/ukrainian/set912
-rw-r--r--contrib/tcsh/patchlevel.h8
-rw-r--r--contrib/tcsh/sh.c74
-rw-r--r--contrib/tcsh/sh.char.c79
-rw-r--r--contrib/tcsh/sh.char.h51
-rw-r--r--contrib/tcsh/sh.dir.c13
-rw-r--r--contrib/tcsh/sh.dol.c14
-rw-r--r--contrib/tcsh/sh.err.c6
-rw-r--r--contrib/tcsh/sh.exec.c139
-rw-r--r--contrib/tcsh/sh.file.c10
-rw-r--r--contrib/tcsh/sh.func.c83
-rw-r--r--contrib/tcsh/sh.glob.c15
-rw-r--r--contrib/tcsh/sh.h87
-rw-r--r--contrib/tcsh/sh.lex.c48
-rw-r--r--contrib/tcsh/sh.print.c10
-rw-r--r--contrib/tcsh/sh.proc.c24
-rw-r--r--contrib/tcsh/sh.sem.c19
-rw-r--r--contrib/tcsh/sh.set.c14
-rw-r--r--contrib/tcsh/sh.types.h6
-rw-r--r--contrib/tcsh/tc.alloc.c8
-rw-r--r--contrib/tcsh/tc.bind.c53
-rw-r--r--contrib/tcsh/tc.const.c20
-rw-r--r--contrib/tcsh/tc.decls.h9
-rw-r--r--contrib/tcsh/tc.func.c126
-rw-r--r--contrib/tcsh/tc.os.c16
-rw-r--r--contrib/tcsh/tc.os.h33
-rw-r--r--contrib/tcsh/tc.prompt.c10
-rw-r--r--contrib/tcsh/tc.sched.c8
-rw-r--r--contrib/tcsh/tc.sig.c6
-rw-r--r--contrib/tcsh/tc.sig.h15
-rw-r--r--contrib/tcsh/tc.wait.h6
-rw-r--r--contrib/tcsh/tc.who.c45
-rw-r--r--contrib/tcsh/tcsh.man11
-rw-r--r--contrib/tcsh/tw.color.c12
-rw-r--r--contrib/tcsh/tw.decls.h4
-rw-r--r--contrib/tcsh/tw.h4
-rw-r--r--contrib/tcsh/tw.init.c46
-rw-r--r--contrib/tcsh/tw.parse.c28
-rw-r--r--contrib/tcsh/vms.termcap.c6
96 files changed, 6229 insertions, 758 deletions
diff --git a/contrib/tcsh/FAQ b/contrib/tcsh/FAQ
index 86fea4a3e5d6..1a530b0d502b 100644
--- a/contrib/tcsh/FAQ
+++ b/contrib/tcsh/FAQ
@@ -1,6 +1,6 @@
Last Updated:
-Fri Mar 12 12:53:43 EST 1999
+Fri Aug 25 13:27:45 EDT 2000
This is for people who do not read the manual!
@@ -34,6 +34,10 @@ be able to get ftp it... :-)
would work..
+ Finally, tcsh will bind all printable meta characters to the self
+ insert command. If you don't want that to happen (i.e. use the printable
+ meta characters for commands) setenv NOREBIND.
+
2. I ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in cbreak
and no echo mode?
diff --git a/contrib/tcsh/Fixes b/contrib/tcsh/Fixes
index 303963ca19d4..d90e2eef5580 100644
--- a/contrib/tcsh/Fixes
+++ b/contrib/tcsh/Fixes
@@ -1,20 +1,69 @@
- 78. V6.09.01 - 20000114
- 79. Circumvent IRIX4D ESTALE bug by exiting.
- 78. IRIS4D de-linting.
- 77. Finnish nls catalogs (Jukka A. Ukkonen)
- 76. Even more multibyte fixes (Taga Nayuta)
- 75. Patches to statically link tcsh under solaris-2.6 (John Hawkinson)
- 74. Manual page typos (R. Bernstein)
- 73. HP/UX-11 (9000/800) HP/UX-10.20 (9000/820) (Haflidi Sigtryggur Magnusson)
- 72. Color-ls fixes (Luis Francisco Gonzalez)
- 71. Don't re-use time0 to compare to stat's st_mtime, cause it could be
+ 57. V6.10.00 - 20001119
+ 56. Completion fixes (Tom Warzeka)
+ 55. add missing linux kanji define (Tsuyoshi Kawabe)
+ 54. More WINNT_NATIVE fixes (amol)
+ 53. Fix compile error on winnt (Yoshiyuki Sakakibara)
+ 52. nonstopux configure and makefile fixes (Tom Bates)
+ 51. V6.09.04 - 20001111
+ 50. Order of initialization for multibyte display was wrong
+ (HyunChul Kim)
+ 49. Follow the guideline for linux for japanese locale:
+ http://www.linux.or.jp/JF/JFdocs/Japanese-Locale-Policy.txt
+ (Tomohiro KUBOTA)
+ 48. Ukrainian nls map (Olexander Kunytsa)
+ 47. exit immeditiately if we get an error while we are setting up
+ (Michael Shalayeff)
+ 46. (unset path; unsetenv PATH; rehash) -> crash (Kent Vander Velden)
+ 45. change winnt to winnt_native (Randolph Fritz)
+ 44. Support home/end in the editor (Andrey A. Chernov)
+ 43. Typo s/gycwin/cygwin/ in tc.os.h (Andreas Schott)
+ 42. Alpha ev6 addition (Karen R. McArthur)
+ 41. DSPMBYTE patch from (Issei Suzuki)
+ 40. Security fix for here-doc tmp files (proton@ENERGYMECH.NET)
+ 39. Fix resource limit rounding *again* (Johannes Gross)
+ 38. Fix $ expansion in prompt (Takashi Sumiyoshi)
+ 37. V6.09.03 - 20000715
+ 36. cygwin port fixes (Arihiro Yoshida)
+ 35. Add a new "catalog" variable that specifies which NLS catalog
+ to be used (Issei Suzuki)
+ 34. cleanup and addition of page up/down (amol)
+ 33. fix vfork compile problem.
+ 32. use inet_addr instead of inet_aton for portability.
+ 31. V6.09.02 - 20000704
+ 30. lots more completions (George Cox)
+ 29. change FILSIZ to BUFSIZE [now that BUFSIZE >> MAXPATHLEN] and
+ avoid a potential buffer overflow in sh.dir.c (Volker Schmidt)
+ 28. _MINIX_VMD port (Martijn van Buul)
+ 27. inet6 handling for remotehost and configure (Hajimu UMEMOTO)
+ 26. aix-4 does not need gethostname (Darren Reed)
+ 25. IBM OS/390 Unix Systems Services support (Peter Prymmer)
+ 24. Fix prompt formatting (Andrey A. Chernov)
+ 23. Use HostType from Imakefile correctly (Kjetil Torgrim Homme)
+ 22. Handle long and expanded history lines better (Boleslaw Ciesielski)
+ 21. With symlinks=expand expand valid paths only (Martin Kraemer)
+ 20. Make one-byte charsets work with KANJI (Andrey A. Chernov)
+ 19. NT-specific executable detection moved to NT code (amol)
+ 18. New "complete module" (Dan Nicolaescu)
+ 17. Correctly display scaling string in limit error messages (Nathan Ahlstrom)
+ 16. Don't display "unset watch" message when not appropriate (kim)
+ 15. V6.09.01 - 20000114
+ 14. Circumvent IRIX4D ESTALE bug by exiting.
+ 13. IRIS4D de-linting.
+ 12. Finnish nls catalogs (Jukka A. Ukkonen)
+ 11. Even more multibyte fixes (Taga Nayuta)
+ 10. Patches to statically link tcsh under solaris-2.6 (John Hawkinson)
+ 9. Manual page typos (R. Bernstein)
+ 8. HP/UX-11 (9000/800) HP/UX-10.20 (9000/820) (Haflidi Sigtryggur Magnusson)
+ 7. Color-ls fixes (Luis Francisco Gonzalez)
+ 6. Don't re-use time0 to compare to stat's st_mtime, cause it could be
the value returned from times(2) which is the ticks since system
startup (Frank van der Linden)
- 70. Time percentage wrap fix (Simon Burge)
- 69. EUCKR support (HyunChul Kim)
- 68. Grammar and typo fixes for tcsh.man (Steve Kelem)
- 67. More multibyte fixes (Rodney Ruddock)
- 66. Change 6.08 -> 6.09 where I missed it; update for utlrix 4.5 (Simon Burge)
+ 5. Time percentage wrap fix (Simon Burge)
+ 4. EUCKR support (HyunChul Kim)
+ 3. Grammar and typo fixes for tcsh.man (Steve Kelem)
+ 2. More multibyte fixes (Rodney Ruddock)
+ 1. Change 6.08 -> 6.09 where I missed it; update for utlrix 4.5 (Simon Burge)
+
65. V6.09.00 - 19990816
64. Add csh emacs mode (Dan Harkless)
63. Make sure the the glob buffer matches the word buffer size (Brian Biswas)
diff --git a/contrib/tcsh/Imakefile b/contrib/tcsh/Imakefile
index 0af87e91c964..8a956039248f 100644
--- a/contrib/tcsh/Imakefile
+++ b/contrib/tcsh/Imakefile
@@ -1,7 +1,7 @@
XCOMM
-XCOMM $Id: Imakefile,v 1.77 2000/01/14 22:57:25 christos Exp $
+XCOMM $Id: Imakefile,v 1.78 2000/11/19 20:50:41 christos Exp $
XCOMM
-XCOMM Imakefile for tcsh 6.09
+XCOMM Imakefile for tcsh 6.10
XCOMM Marc Horowitz, MIT SIPB
XCOMM
@@ -480,7 +480,7 @@ LDLIBS = MyLibs
#endif
SUF = o
-VERSION = 6.09
+VERSION = 6.10
SHSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
diff --git a/contrib/tcsh/Makefile.in b/contrib/tcsh/Makefile.in
index 683433ac55fa..54c8897d9f46 100644
--- a/contrib/tcsh/Makefile.in
+++ b/contrib/tcsh/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 3.13 2000/01/14 22:57:25 christos Exp $
+# $Id: Makefile.in,v 3.15 2000/11/19 20:50:41 christos Exp $
# Makefile.in 4.3 6/11/83
#
# C Shell with process control; VM/UNIX VAX Makefile
@@ -8,7 +8,7 @@
# things; Paul Placeway, CIS Dept., Ohio State University
#
SHELL=/bin/sh
-VERSION=6.09
+VERSION=6.10
BUILD=tcsh
VPATH=@srcdir@
srcdir=@srcdir@
@@ -247,6 +247,7 @@ CPP = @CPP@ # This is set by autoconf.
# The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which
# on the suns does not know how to make dynamically linked binaries.
CC = @CC@ # This is set by autoconf.
+#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror
#CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic
#CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux)
#CC= shlicc # BSDI2.1 w/ shared libraries
@@ -474,14 +475,14 @@ vgrind:
install-strip: install
install: tcsh
- mkdir -p ${DESTBIN}
+ -mkdir -p ${DESTBIN}
-mv -f ${DESTBIN}/tcsh ${DESTBIN}/tcsh.old
cp tcsh ${DESTBIN}/tcsh
-strip ${DESTBIN}/tcsh
chmod 555 ${DESTBIN}/tcsh
install.man: tcsh.man
- mkdir -p ${DESTMAN}
+ -mkdir -p ${DESTMAN}
-rm -f ${DESTMAN}/tcsh.${MANSECT}
cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT}
chmod 444 ${DESTMAN}/tcsh.${MANSECT}
@@ -515,7 +516,7 @@ tags: /tmp
tar.Z:
rm -f tcsh-${VERSION}.tar.Z
rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
+ -mkdir tcsh-${VERSION} tcsh-${VERSION}/config
cp ${ALLSRCS} tcsh-${VERSION}
cp ${CONFSRCS} tcsh-${VERSION}/config
tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
@@ -525,7 +526,7 @@ tar.Z:
tar.gz:
rm -f tcsh-${VERSION}.tar.gz
rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
+ -mkdir tcsh-${VERSION} tcsh-${VERSION}/config
cp ${ALLSRCS} tcsh-${VERSION}
cp ${CONFSRCS} tcsh-${VERSION}/config
tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
@@ -535,7 +536,7 @@ tar.gz:
shar:
rm -f tcsh-*.shar
rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
+ -mkdir tcsh-${VERSION} tcsh-${VERSION}/config
cp ${ALLSRCS} tcsh-${VERSION}
cp ${CONFSRCS} tcsh-${VERSION}/config
tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
@@ -550,11 +551,11 @@ catalogs:
tcsh-${VERSION}.tar.Z:
rm -rf tcsh-${VERSION}
rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh-${VERSION}
+ -mkdir tcsh-${VERSION}
./MAKEDIFFS bsd
mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
cp ${DISTSRCS} tcsh-${VERSION}
- mkdir tcsh-${VERSION}/config
+ -mkdir tcsh-${VERSION}/config
cp ${CONFSRCS} tcsh-${VERSION}/config
cp Makefile tcsh-${VERSION}/Makefile.new
tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
@@ -564,11 +565,11 @@ tcsh-${VERSION}.tar.Z:
tcsh.tahoe-${VERSION}.tar.Z:
rm -rf tcsh.tahoe-${VERSION}
rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh.tahoe-${VERSION}
+ -mkdir tcsh.tahoe-${VERSION}
./MAKEDIFFS tahoe
mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
cp ${DISTSRCS} tcsh.tahoe-${VERSION}
- mkdir tcsh.tahoe-${VERSION}/config
+ -mkdir tcsh.tahoe-${VERSION}/config
cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
@@ -578,11 +579,11 @@ tcsh.tahoe-${VERSION}.tar.Z:
tcsh.reno-${VERSION}.tar.Z:
rm -rf tcsh.reno-${VERSION}
rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh.reno-${VERSION}
+ -mkdir tcsh.reno-${VERSION}
./MAKEDIFFS reno
mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
cp ${DISTSRCS} tcsh.reno-${VERSION}
- mkdir tcsh.reno-${VERSION}/config
+ -mkdir tcsh.reno-${VERSION}/config
cp ${CONFSRCS} tcsh.reno-${VERSION}/config
cp Makefile tcsh.reno-${VERSION}/Makefile.new
tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
diff --git a/contrib/tcsh/Makefile.std b/contrib/tcsh/Makefile.std
index 33a6f022cb4b..f2199cf8d252 100644
--- a/contrib/tcsh/Makefile.std
+++ b/contrib/tcsh/Makefile.std
@@ -1,4 +1,4 @@
-# $Id: Makefile.std,v 1.89 2000/01/14 22:57:25 christos Exp $
+# $Id: Makefile.std,v 1.91 2000/11/19 20:50:42 christos Exp $
# Makefile.std 4.3 6/11/83
#
# C Shell with process control; VM/UNIX VAX Makefile
@@ -8,7 +8,7 @@
# things; Paul Placeway, CIS Dept., Ohio State University
#
SHELL=/bin/sh
-VERSION=6.09
+VERSION=6.10
BUILD=tcsh
srcdir=.
@@ -110,6 +110,9 @@ CFLAGS=-O2 $(INCLUDES)
# SINIX RMx00
#CFLAGS= -O # -D_POSIX_SOURCE # -kansi
+# Minix-VMD
+# CFLAGS= -O -D_ANSI_H -I /usr/include/bsdcompat $(INCLUDES)
+
# Apollo's with cc [apollo builtins don't work with gcc]
# and apollo should not define __STDC__ if it does not have
# the standard header files. RT's (aos4.3) need that too;
diff --git a/contrib/tcsh/Makefile.vms b/contrib/tcsh/Makefile.vms
index 791aa1e852d6..399570790f33 100644
--- a/contrib/tcsh/Makefile.vms
+++ b/contrib/tcsh/Makefile.vms
@@ -1,4 +1,4 @@
-# $Id: Makefile.vms,v 1.33 2000/01/14 22:57:25 christos Exp $
+# $Id: Makefile.vms,v 1.34 2000/11/19 20:50:42 christos Exp $
# Makefile.vms 4.3 6/11/83
#
# C Shell with process control; VM/UNIX VAX Makefile
@@ -8,7 +8,7 @@
# things; Paul Placeway, CIS Dept., Ohio State University
#
SHELL=/bin/sh
-VERSION=6.09
+VERSION=6.10
BUILD=tcsh
################################################################
diff --git a/contrib/tcsh/Ported b/contrib/tcsh/Ported
index f5aee5986a32..2d8c12cd0b73 100644
--- a/contrib/tcsh/Ported
+++ b/contrib/tcsh/Ported
@@ -194,6 +194,19 @@ NOTES : aix 4.1 does not need -lbsd anymore.
VERSION : 6.06.00 (rs6000)
VENDOR : ibm
+MODELS : ibm390
+COMPILER: c89
+CFLAGS : normal
+LIBES : -lcurses
+OS : os390 R 2.7
+CONFIG : os390
+ENVIRON : USS (formerly OpenEdition, aka POSIX)
+NOTES : Used GNU make for OS/390.
+NOTES : Use `CFLAGS="" ./configure` to avoid -g and make binary
+NOTES : half as large.
+VERSION : 6.09.00
+
+VENDOR : ibm
MODELS : rt
COMPILER: hc, gcc
CFLAGS : -I. -U__STDC__
diff --git a/contrib/tcsh/README b/contrib/tcsh/README
index 13a2cddebafa..658ba6988aa8 100644
--- a/contrib/tcsh/README
+++ b/contrib/tcsh/README
@@ -1,4 +1,4 @@
-This is tcsh version 6.09. Tcsh is a version of the Berkeley
+This is tcsh version 6.10. Tcsh is a version of the Berkeley
C-Shell, with the addition of: a command line editor, command and file
name completion, listing, etc. and a bunch of small additions to the
shell itself.
@@ -58,14 +58,17 @@ To install tcsh:
other than in /usr/local/bin/tcsh, you should #define _PATH_TCSHELL
"/your/installation/directory/tcsh" in pathnames.h.
-6) make
+6) If you've changed any of the configuration variables you may need
+ to re-run configure.
-7) Read the documentation while you are waiting. The file tcsh.man
+7) make
+
+8) Read the documentation while you are waiting. The file tcsh.man
is in standard [nt]roff -man format. If you like, you can run the
tcsh.man2html script (requires Perl) to generate an HTML version of
the manpage which you can read with Mosaic, lynx or other HTML browser.
-8) Test tcsh by typing ./tcsh to see that it has compiled correctly.
+9) Test tcsh by typing ./tcsh to see that it has compiled correctly.
The history command should give a time stamp on every entry.
Typing normal characters should echo each exactly once. Control-A
should put the cursor at the beginning of the input line, but after
@@ -83,14 +86,14 @@ To install tcsh:
passwd appears on the screen, you have lost /dev/tty. Otherwise
everything is fine.
-9) Once satisfied that tcsh is working correctly, complete the installation
+10) Once satisfied that tcsh is working correctly, complete the installation
by typing "make install" to install the binary, and "make install.man" to
install the documentation. Don't forget to look at complete.tcsh for
useful completions...
-10) Enjoy.
+11) Enjoy.
-11) PLEASE send any bug reports (and fixes), code for new features,
+12) PLEASE send any bug reports (and fixes), code for new features,
comments, questions, etc. (even flames) to:
The tcsh mailing list
diff --git a/contrib/tcsh/complete.tcsh b/contrib/tcsh/complete.tcsh
index 2a1715f1609c..a903094cac58 100644
--- a/contrib/tcsh/complete.tcsh
+++ b/contrib/tcsh/complete.tcsh
@@ -1,5 +1,5 @@
#
-# $Id: complete.tcsh,v 1.33 2000/06/10 18:54:34 kim Exp $
+# $Id: complete.tcsh,v 1.36 2000/11/19 20:50:42 christos Exp $
# example file using the new completion code
#
@@ -123,7 +123,7 @@ if ($?complete) then
c/-l/f:*.a/ \
n/*/f:*.{c,C,cc,o,a,s,i}/
complete g++ n/*/f:*.{C,cc,o,s,i}/
- complete CC n/*/f:*.{C,cc,o,s,i}/
+ complete CC n/*/f:*.{C,cc,cpp,o,s,i}/
complete rm c/--/"(directory force interactive verbose \
recursive help version)"/ c/-/"(d f i v r R -)"/ \
n/*/f:^*.{c,cc,C,h,in}/ # Protect precious files
@@ -155,7 +155,6 @@ if ($?complete) then
complete -co* p/0/"(compress)"/ # make compress completion
# not ambiguous
complete zcat n/*/f:*.Z/
- complete nm n/*/f:^*.{h,C,c,cc}/
complete finger c/*@/\$hosts/ n/*/u/@
complete ping p/1/\$hosts/
@@ -416,9 +415,216 @@ if ($?complete) then
'C%[^-]*%`eval Compl_module`%'
endif
- # these from Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
+ # from George Cox
+ complete acroread 'p/*/f:*.pdf/'
+ complete apachectl 'c/*/(start stop restart fullstatus status graceful \
+ configtest help)/'
+ complete appletviewer 'p/*/f:*.class/'
+ complete bison 'c/--/(debug defines file-prefix= fixed-output-files \
+ help name-prefix= no-lines no-parser output= \
+ token-table verbose version yacc)/' \
+ 'c/-/(b d h k l n o p t v y V)/' 'n/-b/f/' 'n/-o/f/' \
+ 'n/-p/f/'
+ complete bunzip2 'p/*/f:*.bz2/'
+ complete bzip2 'n/-9/f:^*.bz2/' 'n/-d/f:*.bz2/'
+ complete c++ 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/'
+ complete co 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@'
+ complete crontab 'n/-u/u/'
+ complete camcontrol 'p/1/(cmd debug defects devlist eject inquiry \
+ modepage negotiate periphlist rescan reset start \
+ stop tags tur)/'
+ complete ctlinnd 'p/1/(addhist allow begin cancel changegroup \
+ checkfile drop feedinfo flush flushlogs go hangup \
+ logmode mode name newgroup param pause readers refile \
+ reject reload renumber reserve rmgroup send shutdown \
+ kill throttle trace xabort xexec)/'
+ complete cvs 'c/--/(help help-commands help-synonyms)/' \
+ 'p/1/(add admin annotate checkout commit diff \
+ edit editors export history import init log login \
+ logout rdiff release remove rtag status tag unedit \
+ update watch watchers)/' 'n/-a/(edit unedit commit \
+ all none)/' 'n/watch/(on off add remove)/'
+ complete cxx 'p/*/f:*.{c++,cxx,c,cc,C,cpp}/'
+ complete detex 'p/*/f:*.tex/'
+ complete edquota 'n/*/u/'
+ complete exec 'p/1/c/'
+ complete ghostview 'p/*/f:*.ps/'
+ complete gv 'p/*/f:*.ps/'
+ complete ifconfig 'p@1@`ifconfig -l`@' 'n/*/(range phase link netmask \
+ mtu vlandev vlan metric mediaopt down delete \
+ broadcast arp debug)/'
+ complete imake 'c/-I/d/'
+ complete ipfw 'p/1/(flush add delete list show zero)/' \
+ 'n/add/(allow permit accept pass deny drop reject \
+ reset count skipto num divert port tee port)/'
+ complete javac 'p/*/f:*.java/'
+ complete ldif2ldbm 'n/-i/f:*.ldif/'
+ complete libtool 'c/--mode=/(compile execute finish install link \
+ uninstall)/' 'c/--/(config debug dry-run features \
+ finish help quiet silent version mode=)/'
+ complete libtoolize 'c/--/(automake copy debug dry-run force help ltdl \
+ ltdl-tar version)/'
+ complete links 'c/-/(assume-codepage async-dns download-dir \
+ format-cache-size ftp-proxy help http-proxy \
+ max-connections max-connections-to-host \
+ memory-cache-size receive-timeout retries \
+ unrestartable-receive-timeout version)/'
+ complete natd c/-/'(alias_address config deny_incoming dynamic \
+ inport interface log log_denied log_facility \
+ outport outport port pptpalias proxy_only \
+ proxy_rule redirect_address redirect_port \
+ reverse same_ports unregistered_only use_sockets \
+ verbose)'/ 'n@-interface@`ifconfig -l`@'
+ complete netstat 'n@-I@`ifconfig -l`@'
+ complete objdump 'c/--/(adjust-vma= all-headers architecture= \
+ archive-headers debugging demangle disassemble \
+ disassemble-all disassemble-zeroes dynamic-reloc \
+ dynamic-syms endian= file-headers full-contents \
+ headers help info line-numbers no-show-raw-insn \
+ prefix-addresses private-headers reloc section-headers \
+ section=source stabs start-address= stop-address= \
+ syms target= version wide)/' \
+ 'c/-/(a h i f C d D p r R t T x s S l w)/'
+ complete xmodmap 'c/-/(display help grammar verbose quiet n e pm pk \
+ pke pp)/'
+ complete lynx 'c/-/(accept_all_cookies anonymous assume_charset= \
+ assume_local_charset= assume_unrec_charset= auth= base \
+ book buried_news cache= case cfg= child cookie_file= \
+ cookies core crawl debug_partial display= dump editor= \
+ emacskeys enable_scrollback error_file= force_html \
+ force_secure forms_options from ftp get_data head help \
+ hiddenlinks= historical homepage= image_links index= \
+ ismap link= localhost mime_header minimal \
+ newschunksize= newsmaxchunk= nobrowse nocc nocolor \
+ nofilereferer nolist nolog nopause noprint noredir \
+ noreferer nostatus number_links partial partial_thres \
+ pauth= popup post_data preparsed print pseudo_inlines \
+ raw realm reload restrictions= resubmit_posts rlogin \
+ selective show_cursor soft_dquotes source stack_dump \
+ startfile_ok tagsoup telnet term= tlog trace traversal \
+ underscore useragent= validate verbose version vikeys \
+ width=)/' 'c/(http|ftp)/$URLS/'
+ complete gmake 'c/{--directory=,--include-dir=}/d/' \
+ 'c/{--assume-new,--assume-old,--makefile,--new-file,--what-if,--file}/f/' \
+ 'c/--/(assume-new= assume-old= debug directory= \
+ dry-run environment-overrides file= help \
+ ignore-errors include-dir= jobs[=N] just-print \
+ keep-going load-average[=N] makefile= max-load[=N] \
+ new-file= no-builtin-rules no-keep-going \
+ no-print-directory old-file= print-data-base \
+ print-directory question quiet recon silent stop \
+ touch version warn-undefined-variables what-if=)/' \
+ 'n@*@`cat -s GNUMakefile Makefile makefile |& sed -n -e "/No such file/d" -e "s/^\([A-Za-z0-9-]*\):.*/\1/p"`@' \
+ 'n/=/f/' 'n/-f/f/'
+ complete mixer p/1/'(vol bass treble synth pcm speaker mic cd mix \
+ pcm2 rec igain ogain line1 line2 line3)'/ \
+ p@2@'`mixer $:-1 | awk \{\ print\ \$7\ \}`'@
+
+ complete mpg123 'c/--/(2to1 4to1 8bit aggressive au audiodevice \
+ auth buffer cdr check doublespeed equalizer frames \
+ gain halfspeed headphones left lineout list mix mono \
+ proxy quiet random rate reopen resync right scale \
+ shuffle single0 single1 skip speaker stdout stereo \
+ test verbose wav)/'
+ complete mysqladmin 'n/*/(create drop extended-status flush-hosts \
+ flush-logs flush-status flush-tables flush-privileges \
+ kill password ping processlist reload refresh \
+ shutdown status variables version)/'
+ complete mutt c@-f=@F:${HOME}/Mail/@ \
+ n/-a/f/ \
+ n/-F/f/ n/-H/f/ \
+ n/-s/x:'<subject line>'/ \
+ n/-e/x:'<command>'/ \
+ n@-b@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@ \
+ n@-c@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@ \
+ n@*@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@
+ complete ndc 'n/*/(status dumpdb reload stats trace notrace \
+ querylog start stop restart )/'
+ complete nm 'c/--/(debug-syms defined-only demangle dynamic \
+ extern-only format= help line-numbers no-demangle \
+ no-sort numeric-sort portability print-armap \
+ print-file-name reverse-sort size-sort undefined-only \
+ version)/' 'p/*/f:^*.{h,C,c,cc}/'
+ complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/'
+ complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@'
+ complete postfix 'n/*/(start stop reload abort flush check)/'
+ complete postmap 'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/'
+ complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@'
+ complete X 'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \
+ allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \
+ bgamma bpp broadcast bs c cc class co core deferglyphs \
+ disableModInDev disableVidMode displayID dpi dpms f fc \
+ flipPixels fn fp gamma ggamma help indirect kb keeptty \
+ ld lf logo ls nolisten string noloadxkb nolock nopn \
+ once p pn port probeonly query quiet r rgamma s \
+ showconfig sp su t terminate to tst v verbose version \
+ weight wm x xkbdb xkbmap)/'
+ complete users 'c/--/(help version)/' 'p/1/x:"<accounting_file>"/'
+ complete vidcontrol 'p/1/(132x25 132x30 132x43 132x50 132x60 40x25 80x25 \
+ 80x30 80x43 80x50 80x60 EGA_80x25 EGA_80x43 \
+ VESA_132x25 VESA_132x30 VESA_132x43 VESA_132x50 \
+ VESA_132x60 VESA_800x600 VGA_320x200 VGA_40x25 \
+ VGA_80x25 VGA_80x30 VGA_80x50 VGA_80x60)/'
+ complete vim 'n/*/f:^*.[oa]/'
+ complete where 'n/*/c/'
+ complete which 'n/*/c/'
+ complete wmsetbg 'c/-/(display D S a b c d e m p s t u w)/' \
+ 'c/--/(back-color center colors dither help match \
+ maxscale parse scale smooth tile update-domain \
+ update-wmaker version workspace)/'
+ complete xdb 'p/1/c/'
+ complete xdvi 'c/-/(allowshell debug display expert gamma hushchars \
+ hushchecksums hushspecials install interpreter keep \
+ margins nogrey noinstall nomakepk noscan paper safer \
+ shrinkbuttonn thorough topmargin underlink version)/' \
+ 'n/-paper/(a4 a4r a5 a5r)/' 'p/*/f:*.dvi/'
+ complete xlock 'c/-/(allowaccess allowroot debug description \
+ echokeys enablesaver grabmouse grabserver hide inroot \
+ install inwindow mono mousemotion nolock remote \
+ resetsaver sound timeelapsed use3d usefirst verbose \
+ wireframe background batchcount bg bitmap both3d \
+ count cycles delay delta3d display dpmsoff \
+ dpmsstandby dpmssuspend endCmd erasedelay erasemode \
+ erasetime fg font foreground geometry help \
+ icongeometry info invalid left3d lockdelay logoutCmd \
+ mailCmd mailIcon message messagefile messagefont \
+ messagesfile mode name ncolors nice nomailIcon none3d \
+ parent password planfont program resources right3d \
+ saturation size startCmd timeout username validate \
+ version visual)/' 'n/-mode/(ant atlantis ball bat \
+ blot bouboule bounce braid bubble bubble3d bug cage \
+ cartoon clock coral crystal daisy dclock decay deco \
+ demon dilemma discrete drift eyes fadeplot flag flame \
+ flow forest galaxy gears goop grav helix hop hyper \
+ ico ifs image invert julia kaleid kumppa lament laser \
+ life life1d life3d lightning lisa lissie loop lyapunov \
+ mandelbrot marquee matrix maze moebius morph3d \
+ mountain munch nose pacman penrose petal pipes puzzle \
+ pyro qix roll rotor rubik shape sierpinski slip sphere \
+ spiral spline sproingies stairs star starfish strange \
+ superquadrics swarm swirl tetris thornbird triangle \
+ tube turtle vines voters wator wire world worm xjack \
+ blank bomb random)/'
+ complete xfig 'c/-/(display)/' 'p/*/f:*.fig/'
+ complete wget c/--/"(accept= append-output= background cache= \
+ continue convert-links cut-dirs= debug \
+ delete-after directory-prefix= domains= \
+ dont-remove-listing dot-style= exclude-directories= \
+ exclude-domains= execute= follow-ftp \
+ force-directories force-html glob= header= help \
+ http-passwd= http-user= ignore-length \
+ include-directories= input-file= level= mirror \
+ no-clobber no-directories no-host-directories \
+ no-host-lookup no-parent non-verbose \
+ output-document= output-file= passive-ftp \
+ proxy-passwd= proxy-user= proxy= quiet quota= \
+ recursive reject= relative retr-symlinks save-headers \
+ server-response span-hosts spider timeout= \
+ timestamping tries= user-agent= verbose version wait=)"/
+
+ # these from Tom Warzeka <tom@waz.cc>
# you may need to set the following variables for your host
- set _elispdir = /usr/local/share/emacs/20.2/lisp # GNU Emacs lisp directory
+ set _elispdir = /usr/local/share/emacs/20.7/lisp # GNU Emacs lisp directory
set _maildir = /var/spool/mail # Post Office: /var/spool/mail or /usr/mail
set _ypdir = /var/yp # directory where NIS (YP) maps are kept
set _domain = "`domainname`"
@@ -467,6 +673,9 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \
complete compress c/-/"(c f v b)"/ n/-b/x:'<max_bits>'/ n/*/f:^*.Z/
complete uncompress c/-/"(c f v)"/ n/*/f:*.Z/
+ complete uuencode p/1/f/ p/2/x:'<decode_pathname>'/ n/*/n/
+ complete uudecode c/-/"(f)"/ n/-f/f:*.{uu,UU}/ p/1/f:*.{uu,UU}/ n/*/n/
+
complete xhost c/[+-]/\$hosts/ n/*/\$hosts/
# these conform to the latest GNU versions available at press time ...
@@ -556,7 +765,7 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \
complete chown c/--/"(changes dereference no-dereference silent \
quiet reference recursive verbose help version)"/ \
c/-/"(c f h R v -)"/ C@[./\$~]@f@ c/*[.:]/g/ \
- n/-/u/. p/1/u/. n/*/f/
+ n/-/u/: p/1/u/: n/*/f/
complete chgrp c/--/"(changes no-dereference silent quiet reference \
recursive verbose help version)"/ \
c/-/"(c f h R v -)"/ n/-/g/ p/1/g/ n/*/f/
@@ -633,8 +842,9 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \
block-compress help version)"/ \
c/-/"(b B C f F g G h i k K l L m M N o O p P R s S \
T v V w W X z Z 0 1 2 3 4 5 6 7 -)"/ \
+ C@[/dev]@f@ \
n/-c*f/x:'<new_tar_file, device_file, or "-">'/ \
- n/{-[Adrtux]*f,--file}/f:*.tar/ \
+ n/{-[Adrtux]*f,--file}/f:*.{tar,taz,tgz}/ \
N/{-x*f,--file}/'`tar -tf $:-1`'/ \
n/--use-compress-program/c/ \
n/{-b,--block-size}/x:'<block_size>'/ \
@@ -646,21 +856,21 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \
n/-[0-7]/"(l m h)"/
# SVR4 filesystems
- #complete mount c/-/"(a F m o O p r v V)"/ n/-p/n/ n/-v/n/ \
- # n/-o/x:'<FSType_options>'/ \
- # n@-F@'`\ls -1 /usr/lib/fs`'@ \
- # n@*@'`grep -v "^#" /etc/vfstab | tr -s " " " " | cut -f 3`'@
- #complete umount c/-/"(a o V)"/ n/-o/x:'<FSType_options>'/ \
- # n/*/'`mount | cut -d " " -f 1`'/
- #complete mountall c/-/"(F l r)"/ n@-F@'`\ls -1 /usr/lib/fs`'@
- #complete umountall c/-/"(F h k l r s)"/ n@-F@'`\ls -1 /usr/lib/fs`'@ \
- # n/-h/'`df -k | cut -s -d ":" -f 1 | sort -u`'/
+ complete mount c/-/"(a F m o O p r v V)"/ n/-p/n/ n/-v/n/ \
+ n/-o/x:'<FSType_options>'/ \
+ n@-F@'`\ls -1 /usr/lib/fs`'@ \
+ n@*@'`grep -v "^#" /etc/vfstab | tr -s " " " " | cut -f 3`'@
+ complete umount c/-/"(a o V)"/ n/-o/x:'<FSType_options>'/ \
+ n/*/'`mount | cut -d " " -f 1`'/
+ complete mountall c/-/"(F l r)"/ n@-F@'`\ls -1 /usr/lib/fs`'@
+ complete umountall c/-/"(F h k l r s)"/ n@-F@'`\ls -1 /usr/lib/fs`'@ \
+ n/-h/'`df -k | cut -s -d ":" -f 1 | sort -u`'/
# BSD 4.3 filesystems
- complete mount c/-/"(a r t v)"/ n/-t/"(4.2 nfs)"/ \
- n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@
- complete umount c/-/"(a h t v)"/ n/-t/"(4.2 nfs)"/ \
- n/-h/'`df | cut -s -d ":" -f 1 | sort -u`'/ \
- n/*/'`mount | cut -d " " -f 3`'/
+ #complete mount c/-/"(a r t v)"/ n/-t/"(4.2 nfs)"/ \
+ # n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@
+ #complete umount c/-/"(a h t v)"/ n/-t/"(4.2 nfs)"/ \
+ # n/-h/'`df | cut -s -d ":" -f 1 | sort -u`'/ \
+ # n/*/'`mount | cut -d " " -f 3`'/
# BSD 4.2 filesystems
#complete mount c/-/"(a r t v)"/ n/-t/"(ufs nfs)"/ \
# n@*@'`cut -d ":" -f 2 /etc/fstab`'@
@@ -696,6 +906,7 @@ n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \
complete lprm 'c/-P/$printers/'
complete lpquota 'p/1/(-Qprlogger)/' 'c/-P/$printers/'
complete dvips 'c/-P/$printers/' 'n/-o/f:*.{ps,PS}/' 'n/*/f:*.dvi/'
+ complete dvilj 'p/*/f:*.dvi/'
endif
unset noglob
diff --git a/contrib/tcsh/config.guess b/contrib/tcsh/config.guess
new file mode 100755
index 000000000000..cdd153076ade
--- /dev/null
+++ b/contrib/tcsh/config.guess
@@ -0,0 +1,972 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, 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; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ ${CC-cc} dummy.s -o dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f dummy.s dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >dummy.c
+ int main (argc, argv) int argc; char **argv; {
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ ${CC-cc} dummy.c -o dummy \
+ && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/6?? | 9000/7?? | 9000/80[024] | 9000/820 | 9000/8?[13679] | 9000/892 )
+ sed 's/^ //' << EOF >dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
+ rm -f dummy.c dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex*:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex*:ConvexOS:C2*:*)
+ if /usr/convex/getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex*:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex*:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex*:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo t3e-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+ # uname on the ARM produces all sorts of strangeness, and we need to
+ # filter it out.
+ case "$UNAME_MACHINE" in
+ arm* | sa110*) UNAME_MACHINE="arm" ;;
+ esac
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us.
+ ld_help_string=`ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
+ i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
+ sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ ${CC-cc} dummy.s -o dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f dummy.s dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >dummy.c <<EOF
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >dummy.c <<EOF
+#include <features.h>
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i?86:UnixWare:*:*)
+ if /bin/uname -X 2>/dev/null >/dev/null ; then
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ fi
+ echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
+ exit 0 ;;
+ pc:*:*:*)
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ BS2000:POSIX-BC:*:*)
+ echo bs2000-siemens-posix
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo s390-ibm-os390
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
+rm -f dummy.c dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `/usr/convex/getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if /usr/convex/getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/contrib/tcsh/config.sub b/contrib/tcsh/config.sub
new file mode 100755
index 000000000000..7ed374b0b5ef
--- /dev/null
+++ b/contrib/tcsh/config.sub
@@ -0,0 +1,969 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, 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; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple)
+ os=
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
+ | hppa2.0n \
+ | alpha | alphaev5 | alphaev56 | alphaev6 \
+ | we32k | ns16k | clipper \
+ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+ | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i[34567]86)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+ | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
+ | hppa2.0n-* \
+ | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* \
+ | we32k-* | cydra-* \
+ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-cbm
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-cbm
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-cbm
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ s390-ibm* )
+ basic_machine=s390-ibm
+ os=-os390
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i[34567]86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i[34567]86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i[34567]86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i[34567]86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | nexen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | k6 | 6x86)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | nexen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | k6-* | 6x86-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sparc)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -os390*)
+ os=-os390
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f301-fujitsu)
+ os=-uxpv
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs*)
+ vendor=ibm
+ ;;
+ -os390*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
diff --git a/contrib/tcsh/config/bsd4.4 b/contrib/tcsh/config/bsd4.4
new file mode 100644
index 000000000000..fd077939b877
--- /dev/null
+++ b/contrib/tcsh/config/bsd4.4
@@ -0,0 +1,149 @@
+/*
+ * config.h -- configure various defines for tcsh
+ *
+ * All source files should #include this FIRST.
+ *
+ * Edit this to match your system type.
+ */
+
+#ifndef _h_config
+#define _h_config
+/****************** System dependant compilation flags ****************/
+/*
+ * POSIX This system supports IEEE Std 1003.1-1988 (POSIX).
+ */
+#define POSIX
+
+/*
+ * POSIXJOBS This system supports the optional IEEE Std 1003.1-1988 (POSIX)
+ * job control facilities.
+ */
+#define POSIXJOBS
+
+/*
+ * POSIXSIGS Use the POSIX signal facilities to emulate BSD signals.
+ */
+#undef POSIXSIGS
+
+/*
+ * VFORK This machine has a vfork().
+ * It used to be that for job control to work, this define
+ * was mandatory. This is not the case any more.
+ * If you think you still need it, but you don't have vfork,
+ * define this anyway and then do #define vfork fork.
+ * I do this anyway on a Sun because of yellow pages brain damage,
+ * [should not be needed under 4.1]
+ * and on the iris4d cause SGI's fork is sufficiently "virtual"
+ * that vfork isn't necessary. (Besides, SGI's vfork is weird).
+ * Note that some machines eg. rs6000 have a vfork, but not
+ * with the berkeley semantics, so we cannot use it there either.
+ */
+#define VFORK
+
+/*
+ * BSDJOBS You have BSD-style job control (both process groups and
+ * a tty that deals correctly
+ */
+#define BSDJOBS
+
+/*
+ * BSDSIGS You have 4.2-style signals, rather than USG style.
+ * Note: POSIX systems should not define this unless they
+ * have sigvec() and friends (ie: 4.3BSD-RENO, HP-UX).
+ */
+#define BSDSIGS
+
+/*
+ * BSDTIMES You have BSD-style process time stuff (like rusage)
+ * This may or may not be true. For example, Apple Unix
+ * (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES.
+ */
+#define BSDTIMES
+
+/*
+ * BSDLIMIT You have BSD-style resource limit stuff (getrlimit/setrlimit)
+ */
+#define BSDLIMIT
+
+/*
+ * BSDNICE Your system uses setpriority() instead of nice, to
+ * change a processes scheduling priority
+ */
+#define BSDNICE
+
+/*
+ * TERMIO You have struct termio instead of struct sgttyb.
+ * This is usually the case for SYSV systems, where
+ * BSD uses sgttyb. POSIX systems should define this
+ * anyway, even though they use struct termios.
+ */
+#define TERMIO
+
+/*
+ * SYSVREL Your machine is SYSV based (HPUX, A/UX)
+ * NOTE: don't do this if you are on a Pyramid -- tcsh is
+ * built in a BSD universe.
+ * Set SYSVREL to 1, 2, 3, or 4, depending the version of System V
+ * you are running. Or set it to 0 if you are not SYSV based
+ */
+#define SYSVREL 0
+
+/*
+ * YPBUGS Work around Sun YP bugs that cause expansion of ~username
+ * to send command output to /dev/null
+ */
+#undef YPBUGS
+
+/*
+ * SIGVOID Define this if your signal handlers return void. On older
+ * systems, signal returns int, but on newer ones, it returns void.
+ */
+#define SIGVOID
+
+/*
+ * HAVEDUP2 Define this if your system supports dup2().
+ */
+#define HAVEDUP2
+
+/*
+ * UTHOST Does the utmp file have a host field?
+ */
+#define UTHOST
+
+/*
+ * DIRENT Your system has <dirent.h> instead of <sys/dir.h>
+ */
+#define DIRENT
+/****************** local defines *********************/
+/****************** configurable hacks ****************/
+
+/* have been moved to config_f.h */
+#include "config_f.h"
+
+#if defined(__FreeBSD__)
+#define NLS_BUGS
+#endif
+
+#if defined(__bsdi__)
+/*
+ * _PATH_TCSHELL if you've change the installation location (vix)
+ */
+# ifdef _BSDI_VERSION >= 199701
+# define _PATH_TCSHELL "/bin/tcsh"
+# undef SYSMALLOC
+# define SYSMALLOC
+# else
+# define _PATH_TCSHELL "/usr/contrib/bin/tcsh"
+# endif
+
+# undef NLS
+# undef NLS_CATALOGS
+
+#elif defined(__APPLE__)
+# define SYSMALLOC
+
+#else
+# define NLS_CATALOGS
+#endif
+
+#endif /* _h_config */
diff --git a/contrib/tcsh/config_f.h b/contrib/tcsh/config_f.h
index 4a8401ce52fa..3a4d8d2b625e 100644
--- a/contrib/tcsh/config_f.h
+++ b/contrib/tcsh/config_f.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/config_f.h,v 3.22 1999/05/11 13:07:42 christos Exp $ */
+/* $Header: /src/pub/tcsh/config_f.h,v 3.23 2000/06/11 02:14:10 kim Exp $ */
/*
* config_f.h -- configure various defines for tcsh
*
@@ -143,7 +143,7 @@
* This can be much slower and no memory statistics will be
* provided.
*/
-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX)
+#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__)
# define SYSMALLOC
#else
# undef SYSMALLOC
diff --git a/contrib/tcsh/configure b/contrib/tcsh/configure
new file mode 100755
index 000000000000..d783e54b8a2b
--- /dev/null
+++ b/contrib/tcsh/configure
@@ -0,0 +1,1863 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --with-hesiod=PREFIX Use Hesiod lookup for ~ expansion"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=tc.vers.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:554: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+ case $nonopt in
+ NONE)
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) host_alias=$nonopt ;;
+ esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+
+echo $ac_n "checking cached host tuple""... $ac_c" 1>&6
+echo "configure:576: checking cached host tuple" >&5
+if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+ test x"$ac_cv_host_system_type" != x"$host"; }; then
+ echo "$ac_t""different" 1>&6
+ { echo "configure: error: remove config.cache and re-run configure" 1>&2; exit 1; }
+else
+ echo "$ac_t""ok" 1>&6
+fi
+ac_cv_host_system_type="$host"
+
+
+
+case "${host}" in
+
+ ## Alpha (DEC) machines.
+ alpha*-dec-osf* )
+ tcsh_config_file=decosf1
+ ;;
+
+ ## Ultrix
+ *-dec-ultrix* )
+ tcsh_config_file=ultrix
+ ;;
+
+ ## DGUX
+ *-dg-dguxR4* )
+ tcsh_config_file=dgux5.4
+ ;;
+ m88k-dg-dgux5.4R* )
+ tcsh_config_file=dgux5.4
+ ;;
+
+ ## HP/UX
+ *-hp-hpux7* )
+ tcsh_config_file=hpux7
+ ;;
+ *-hp-hpux[89]* )
+ tcsh_config_file=hpux8
+ ;;
+ *-hp-hpux1[0-9]* )
+ tcsh_config_file=hpux8
+ ;;
+
+ ## IBM AIX systems
+ *-ibm-aix*)
+ tcsh_config_file=aix
+ ;;
+
+ ## SX-4
+ sx4-nec-*)
+ CC='cc -h0,ansi,novector,float0'
+ LDFLAGS='-Gsmall'
+ tcsh_config_file=superux8
+ ;;
+
+ ## IBM OS/390 systems
+ *-ibm-os390*)
+ CC='c89'
+ tcsh_config_file=os390
+ ;;
+
+ ## Linux
+ *-*-linux* )
+ tcsh_config_file=linux
+ ;;
+
+ ## Motorola systems
+ m68k-motorola-sysv* )
+ tcsh_config_file=sysV68
+ ;;
+ m88k-motorola-sysv3* )
+ tcsh_config_file=sysV88
+ ;;
+
+ ## NetBSD systems
+ *-*-netbsd*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## FreeBSD systems
+ *-*-freebsd*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## OpenBSD systems
+ *-*-openbsd*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## BSDI systems
+ *-*-bsdi*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## Mac OS X Server
+ *-*-rhapsody* )
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## Silicon Graphics machines
+ *-sgi-iri* )
+ tcsh_config_file=irix
+ case "${host_os}" in
+ irix[34]*) # Irix-3.x - Irix 4.x
+ NON_GNU_DFLAGS='-D__STDC__'
+ LIBS='-lsun -lbsd -lc_s'
+ ;;
+ irix5* | irix6.[01]*) # Irix 5.x, Irix 6.0 - 6.1
+ LIBS='-lbsd'
+ ;;
+ irix6.[2-9]*) # Irix 6.2 and later
+ tcsh_config_file=irix62
+ ;;
+ esac
+ ;;
+
+ ## Suns
+ *-sun-sunos3* )
+ tcsh_config_file=sunos35
+ ;;
+ *-sun-sunos4.0* )
+ tcsh_config_file=sunos40
+ ;;
+ *-sun-sunos4.1.[12]* )
+ tcsh_config_file=sunos41
+ ;;
+ *-sun-sunos4.1.[3456]* )
+ tcsh_config_file=sunos413
+ ;;
+ *-*-solaris2.[01]* ) # Should handle sparc or x86
+ tcsh_config_file=sol2
+ ;;
+ *-sun-solaris2.2* ) # Sparc only release
+ tcsh_config_file=sol22
+ ;;
+ *-sun-solaris2.3* ) # Sparc only release
+ tcsh_config_file=sol23
+ ;;
+ *-*-solaris2.[45]* ) # Should handle sparc, x86 and powerpc
+ tcsh_config_file=sol24
+ ;;
+ *-*-solaris2.* ) # Should handle sparc, x86 and powerpc
+ tcsh_config_file=sol26
+ ;;
+
+ ## Dell SVR4
+ *-dell-sysv4* )
+ tcsh_config_file=sysv4
+ DFLAGS="$DFLAGS -DDELL"
+ ;;
+
+ ## SVR4 (Generic and otherwise)
+ *-*-sysv4* )
+ tcsh_config_file=sysv4
+ ;;
+
+ ## Tektronix systems
+ m68k-tektronix-bsd* )
+ tcsh_config_file=bsd
+ NON_GNU_DFLAGS='-DBSD -DUTek'
+ ;;
+ m88k-tektronix-sysv3* )
+ tcsh_config_file=tekXD88
+ ;;
+
+ ## SCO
+ *-sco3.2v5*)
+ tcsh_config_file=sco32v5
+ ;;
+ *-sco3.2v4*)
+ tcsh_config_file=sco32v4
+ ;;
+ *-sco3.2v2*)
+ tcsh_config_file=sco32v2
+ ;;
+
+ ## Siemens BS2000 Mainframe
+ bs2000-siemens-posix)
+ tcsh_config_file=bs2000
+ ;;
+
+ ## Convex
+ *-convex*)
+ tcsh_config_file=convex
+ ;;
+
+ ## Cray
+ *-cray-unicos*)
+ tcsh_config_file=cray
+ ;;
+
+ ## Cygnus GNU Win32
+ *-cygwin)
+ tcsh_config_file=cygwin32
+ ;;
+
+ ## mips-compaq-nonstopux
+ *-*-nonstopux)
+ tcsh_config_file=sysv4
+ ;;
+
+ * )
+ { echo "configure: error: Tcsh can't guess the configuration file name
+for \`${host}' systems.
+Check tcsh's \`Ported' file for manual configuration instructions." 1>&2; exit 1; }
+ ;;
+
+esac
+
+echo "Tcsh will use configuration file \`$tcsh_config_file'."
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:791: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:821: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:872: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 915 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:951: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:979: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1011: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1026 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1043 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1060 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
+echo "configure:1092: checking whether ${CC-cc} needs -traditional" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat > conftest.$ac_ext <<EOF
+#line 1098 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+Autoconf TIOCGETP
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+else
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat > conftest.$ac_ext <<EOF
+#line 1116 "configure"
+#include "confdefs.h"
+#include <termio.h>
+Autoconf TCGETA
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+
+if test $ac_cv_prog_gcc = no ; then
+ DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
+ CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
+fi
+
+case "${host}" in
+ ## Cygnus GNU Win32
+ *-cygwin)
+ CFLAGS="$CFLAGS -mno-win32"
+ ;;
+esac
+
+
+echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
+echo "configure:1152: checking for library containing crypt" >&5
+if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_crypt="no"
+cat > conftest.$ac_ext <<EOF
+#line 1159 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt();
+
+int main() {
+crypt()
+; return 0; }
+EOF
+if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_crypt="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_crypt" = "no" && for i in crypt; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1181 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt();
+
+int main() {
+crypt()
+; return 0; }
+EOF
+if { (eval echo configure:1192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_crypt="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_crypt" 1>&6
+if test "$ac_cv_search_crypt" != "no"; then
+ test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
+
+else :
+
+fi
+
+echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
+echo "configure:1214: checking for library containing tgetent" >&5
+if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_tgetent="no"
+cat > conftest.$ac_ext <<EOF
+#line 1221 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_tgetent="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_tgetent" = "no" && for i in termlib curses termcap; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1243 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_tgetent="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_tgetent" 1>&6
+if test "$ac_cv_search_tgetent" != "no"; then
+ test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
+
+else :
+
+fi
+
+echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
+echo "configure:1276: checking for library containing gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_gethostbyname="no"
+cat > conftest.$ac_ext <<EOF
+#line 1283 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_gethostbyname="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1305 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_gethostbyname="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
+if test "$ac_cv_search_gethostbyname" != "no"; then
+ test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
+
+else :
+
+fi
+
+echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
+echo "configure:1338: checking for library containing connect" >&5
+if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_connect="no"
+cat > conftest.$ac_ext <<EOF
+#line 1345 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_connect="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_connect" = "no" && for i in socket; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1367 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:1378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_connect="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_connect" 1>&6
+if test "$ac_cv_search_connect" != "no"; then
+ test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
+
+else :
+
+fi
+
+
+
+
+# Check whether --with-hesiod or --without-hesiod was given.
+if test "${with_hesiod+set}" = set; then
+ withval="$with_hesiod"
+ hesiod="$withval"
+else
+ hesiod=no
+fi
+
+if test "$hesiod" != no; then
+ HESLIB="-lhesiod"
+ echo $ac_n "checking for res_send""... $ac_c" 1>&6
+echo "configure:1413: checking for res_send" >&5
+if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1418 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char res_send(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_send();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_res_send) || defined (__stub___res_send)
+choke me
+#else
+res_send();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_res_send=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_res_send=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
+echo "configure:1459: checking for res_send in -lresolv" >&5
+ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lresolv $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1467 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_send();
+
+int main() {
+res_send()
+; return 0; }
+EOF
+if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ HESLIB="$HESLIB -lresolv"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+ HESDEF=-DHESIOD
+ if test "$hesiod" != yes; then
+ HESDEF="$HESDEF -I$hesiod/include"
+ HESLIB="-L$hesiod/lib $HESLIB"
+ fi
+fi
+
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote substitution
+ # turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+
+trap 'rm -fr `echo "Makefile config.h:config/${tcsh_config_file}:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@DFLAGS@%$DFLAGS%g
+s%@HESDEF@%$HESDEF%g
+s%@HESLIB@%$HESLIB%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='\([ ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+ CONFIG_HEADERS="config.h:config/${tcsh_config_file}:config.h.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ echo creating $ac_file
+
+ rm -f conftest.frag conftest.in conftest.out
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h. And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+ ac_lines=`grep -c . conftest.vals`
+ # grep -c gives empty output for an empty file on some AIX systems.
+ if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+ # Write a limited-size here document to conftest.frag.
+ echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF
+ sed -f conftest.frag conftest.in > conftest.out
+ rm -f conftest.in
+ mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+ rm -f conftest.frag conftest.h
+ echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
+ cat conftest.in >> conftest.h
+ rm -f conftest.in
+ if cmp -s $ac_file conftest.h 2>/dev/null; then
+ echo "$ac_file is unchanged"
+ rm -f conftest.h
+ else
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ fi
+ rm -f $ac_file
+ mv conftest.h $ac_file
+ fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/contrib/tcsh/configure.in b/contrib/tcsh/configure.in
new file mode 100644
index 000000000000..561fb83bffd3
--- /dev/null
+++ b/contrib/tcsh/configure.in
@@ -0,0 +1,319 @@
+dnl Autoconf script for tcsh
+dnl To rebuild the `configure' script from this, execute the command
+dnl autoconf
+dnl in the directory containing this script.
+dnl
+dnl You'll also need a version of config.guess from a gnu package
+dnl
+dnl Written by Kaveh Ghazi (ghazi@caip.rutgers.edu) 5/11/96.
+dnl
+
+AC_PREREQ(2.13)dnl Minimum Autoconf version required.
+AC_INIT(tc.vers.c)
+
+AC_CANONICAL_HOST
+
+dnl We don't use AC_VALIDATE_CACHED_SYSTEM_TUPLE here because we only
+dnl care about the HOST value, not the HOST/BUILD/TARGET triplet.
+AC_MSG_CHECKING([cached host tuple])
+if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+ test x"$ac_cv_host_system_type" != x"$host"; }; then
+ AC_MSG_RESULT([different])
+ AC_MSG_ERROR([remove config.cache and re-run configure])
+else
+ AC_MSG_RESULT(ok)
+fi
+ac_cv_host_system_type="$host"
+
+
+changequote(, )dnl
+
+case "${host}" in
+
+ ## Alpha (DEC) machines.
+ alpha*-dec-osf* )
+ tcsh_config_file=decosf1
+ ;;
+
+ ## Ultrix
+ *-dec-ultrix* )
+ tcsh_config_file=ultrix
+ ;;
+
+ ## DGUX
+ *-dg-dguxR4* )
+ tcsh_config_file=dgux5.4
+ ;;
+ m88k-dg-dgux5.4R* )
+ tcsh_config_file=dgux5.4
+ ;;
+
+ ## HP/UX
+ *-hp-hpux7* )
+ tcsh_config_file=hpux7
+ ;;
+ *-hp-hpux[89]* )
+ tcsh_config_file=hpux8
+ ;;
+ *-hp-hpux1[0-9]* )
+ tcsh_config_file=hpux8
+ ;;
+
+ ## IBM AIX systems
+ *-ibm-aix*)
+ tcsh_config_file=aix
+ ;;
+
+ ## SX-4
+ sx4-nec-*)
+ CC='cc -h0,ansi,novector,float0'
+ LDFLAGS='-Gsmall'
+ tcsh_config_file=superux8
+ ;;
+
+ ## IBM OS/390 systems
+ *-ibm-os390*)
+ CC='c89'
+ tcsh_config_file=os390
+ ;;
+
+ ## Linux
+ *-*-linux* )
+ tcsh_config_file=linux
+ ;;
+
+ ## Motorola systems
+ m68k-motorola-sysv* )
+ tcsh_config_file=sysV68
+ ;;
+ m88k-motorola-sysv3* )
+ tcsh_config_file=sysV88
+ ;;
+
+ ## NetBSD systems
+ *-*-netbsd*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## FreeBSD systems
+ *-*-freebsd*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## OpenBSD systems
+ *-*-openbsd*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## BSDI systems
+ *-*-bsdi*)
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## Mac OS X Server
+ *-*-rhapsody* )
+ tcsh_config_file=bsd4.4
+ ;;
+
+ ## Silicon Graphics machines
+ *-sgi-iri* )
+ tcsh_config_file=irix
+ case "${host_os}" in
+ irix[34]*) # Irix-3.x - Irix 4.x
+ NON_GNU_DFLAGS='-D__STDC__'
+ LIBS='-lsun -lbsd -lc_s'
+ ;;
+ irix5* | irix6.[01]*) # Irix 5.x, Irix 6.0 - 6.1
+ LIBS='-lbsd'
+ ;;
+ irix6.[2-9]*) # Irix 6.2 and later
+ tcsh_config_file=irix62
+ ;;
+ esac
+ ;;
+
+ ## Suns
+ *-sun-sunos3* )
+ tcsh_config_file=sunos35
+ ;;
+ *-sun-sunos4.0* )
+ tcsh_config_file=sunos40
+ ;;
+ *-sun-sunos4.1.[12]* )
+ tcsh_config_file=sunos41
+ ;;
+ *-sun-sunos4.1.[3456]* )
+ tcsh_config_file=sunos413
+ ;;
+ *-*-solaris2.[01]* ) # Should handle sparc or x86
+ tcsh_config_file=sol2
+ ;;
+ *-sun-solaris2.2* ) # Sparc only release
+ tcsh_config_file=sol22
+ ;;
+ *-sun-solaris2.3* ) # Sparc only release
+ tcsh_config_file=sol23
+ ;;
+ *-*-solaris2.[45]* ) # Should handle sparc, x86 and powerpc
+ tcsh_config_file=sol24
+ ;;
+ *-*-solaris2.* ) # Should handle sparc, x86 and powerpc
+ tcsh_config_file=sol26
+ ;;
+
+ ## Dell SVR4
+ *-dell-sysv4* )
+ tcsh_config_file=sysv4
+ DFLAGS="$DFLAGS -DDELL"
+ ;;
+
+ ## SVR4 (Generic and otherwise)
+ *-*-sysv4* )
+ tcsh_config_file=sysv4
+ ;;
+
+ ## Tektronix systems
+ m68k-tektronix-bsd* )
+ tcsh_config_file=bsd
+ NON_GNU_DFLAGS='-DBSD -DUTek'
+ ;;
+ m88k-tektronix-sysv3* )
+ tcsh_config_file=tekXD88
+ ;;
+
+ ## SCO
+ *-sco3.2v5*)
+ tcsh_config_file=sco32v5
+ ;;
+ *-sco3.2v4*)
+ tcsh_config_file=sco32v4
+ ;;
+ *-sco3.2v2*)
+ tcsh_config_file=sco32v2
+ ;;
+
+ ## Siemens BS2000 Mainframe
+ bs2000-siemens-posix)
+ tcsh_config_file=bs2000
+ ;;
+
+ ## Convex
+ *-convex*)
+ tcsh_config_file=convex
+ ;;
+
+ ## Cray
+ *-cray-unicos*)
+ tcsh_config_file=cray
+ ;;
+
+ ## Cygnus GNU Win32
+ *-cygwin)
+ tcsh_config_file=cygwin32
+ ;;
+
+ ## mips-compaq-nonstopux
+ *-*-nonstopux)
+ tcsh_config_file=sysv4
+ ;;
+
+ * )
+ changequote([, ])dnl
+ AC_MSG_ERROR([Tcsh can't guess the configuration file name
+for \`${host}' systems.
+Check tcsh's \`Ported' file for manual configuration instructions.])
+ changequote(, )dnl
+ ;;
+
+esac
+
+echo "Tcsh will use configuration file \`$tcsh_config_file'."
+changequote([, ])dnl
+
+AC_CONFIG_HEADER(config.h:config/${tcsh_config_file}:config.h.in)
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_GCC_TRADITIONAL
+
+if test $ac_cv_prog_gcc = no ; then
+ DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
+ CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
+fi
+
+case "${host}" in
+ ## Cygnus GNU Win32
+ *-cygwin)
+ CFLAGS="$CFLAGS -mno-win32"
+ ;;
+esac
+
+AC_SEARCH_LIBS(crypt, crypt)
+AC_SEARCH_LIBS(tgetent, termlib curses termcap)
+AC_SEARCH_LIBS(gethostbyname, nsl)
+AC_SEARCH_LIBS(connect, socket)
+
+dnl This is not good enough; we need sockaddr_storage too.
+dnl See whether we can use IPv6 related functions
+dnl AC_DEFUN(IPv6_CHECK_FUNC, [
+dnl changequote(, )dnl
+dnl ac_tr_lib=HAVE_`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+dnl -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+dnl changequote([, ])dnl
+dnl AC_CHECK_FUNC($1, [dnl
+dnl AC_DEFINE_UNQUOTED($ac_tr_lib)
+dnl ac_cv_lib_inet6_$1=no], [dnl
+dnl AC_MSG_CHECKING([whether your system has IPv6 directory])
+dnl AC_CACHE_VAL(ipv6_cv_dir, [dnl
+dnl for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
+dnl if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
+dnl break
+dnl fi
+dnl done])dnl
+dnl AC_MSG_RESULT($ipv6_cv_dir)
+dnl if test $ipv6_cv_dir = no; then
+dnl ac_cv_lib_inet6_$1=no
+dnl else
+dnl if test x$ipv6_libinet6 = x; then
+dnl ipv6_libinet6=no
+dnl SAVELDFLAGS="$LDFLAGS"
+dnl LDFLAGS="-L$ipv6_cv_dir/lib"
+dnl fi
+dnl AC_CHECK_LIB(inet6, $1, [dnl
+dnl AC_DEFINE_UNQUOTED($ac_tr_lib)
+dnl if test $ipv6_libinet6 = no; then
+dnl ipv6_libinet6=yes
+dnl LIBS="$LIBS -linet6"
+dnl fi],)dnl
+dnl if test $ipv6_libinet6 = no; then
+dnl LDFLAGS="$SAVELDFLAGS"
+dnl fi
+dnl fi])dnl
+dnl if test $ac_cv_func_$1 = yes -o $ac_cv_lib_inet6_$1 = yes
+dnl then
+dnl ipv6_cv_$1=yes
+dnl ifelse([$2], , :, [$2])
+dnl else
+dnl ipv6_cv_$1=no
+dnl ifelse([$3], , :, [$3])
+dnl fi])
+dnl IPv6_CHECK_FUNC(getaddrinfo, DFLAGS="$DFLAGS -DINET6")
+
+AC_SUBST(DFLAGS)
+
+AC_ARG_WITH(hesiod,
+ [ --with-hesiod=PREFIX Use Hesiod lookup for ~ expansion],
+ [hesiod="$withval"], [hesiod=no])
+if test "$hesiod" != no; then
+ HESLIB="-lhesiod"
+ AC_CHECK_FUNC(res_send, :,
+ AC_CHECK_LIB(resolv, res_send, HESLIB="$HESLIB -lresolv"))
+ HESDEF=-DHESIOD
+ if test "$hesiod" != yes; then
+ HESDEF="$HESDEF -I$hesiod/include"
+ HESLIB="-L$hesiod/lib $HESLIB"
+ fi
+fi
+AC_SUBST(HESDEF)
+AC_SUBST(HESLIB)
+
+AC_OUTPUT(Makefile)
diff --git a/contrib/tcsh/ed.chared.c b/contrib/tcsh/ed.chared.c
index e8ac90654724..da43977f6c34 100644
--- a/contrib/tcsh/ed.chared.c
+++ b/contrib/tcsh/ed.chared.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.chared.c,v 3.60 2000/06/10 22:07:55 kim Exp $ */
+/* $Header: /src/pub/tcsh/ed.chared.c,v 3.63 2000/11/11 23:03:33 christos Exp $ */
/*
* ed.chared.c: Character editing functions.
*/
@@ -76,7 +76,7 @@
#include "sh.h"
-RCSID("$Id: ed.chared.c,v 3.60 2000/06/10 22:07:55 kim Exp $")
+RCSID("$Id: ed.chared.c,v 3.63 2000/11/11 23:03:33 christos Exp $")
#include "ed.h"
#include "tw.h"
@@ -118,8 +118,8 @@ static Char srch_char = 0; /* Search target */
/* all routines that start with c_ are private to this set of routines */
static void c_alternativ_key_map __P((int));
static void c_insert __P((int));
-static void c_delafter __P((int));
-static void c_delbefore __P((int));
+void c_delafter __P((int));
+void c_delbefore __P((int));
static int c_to_class __P((int));
static Char *c_prev_word __P((Char *, Char *, int));
static Char *c_next_word __P((Char *, Char *, int));
@@ -187,7 +187,7 @@ c_insert(num)
LastChar += num;
}
-static void
+void
c_delafter(num)
register int num;
{
@@ -254,7 +254,7 @@ c_delafter(num)
#endif /* notdef */
}
-static void
+void
c_delbefore(num) /* delete before dot, with bounds checking */
register int num;
{
@@ -1258,12 +1258,12 @@ v_search(dir)
break;
case 0033: /* ESC */
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
case '\r': /* Newline */
case '\n':
#else
- case '\012': /* Newline */
- case '\015': /* Return */
+ case '\012': /* ASCII Line feed */
+ case '\015': /* ASCII (or EBCDIC) Return */
#endif
break;
@@ -3337,11 +3337,11 @@ v_change_case(cc)
USE(cc);
if (Cursor < LastChar) {
-#ifndef WINNT
+#ifndef WINNT_NATIVE
c = *Cursor;
#else
c = CHAR & *Cursor;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (Isupper(c))
*Cursor++ = Tolower(c);
else if (Islower(c))
@@ -3411,16 +3411,16 @@ e_tty_int(c)
int c;
{
USE(c);
-#if defined(_MINIX) || defined(WINNT)
+#if defined(_MINIX) || defined(WINNT_NATIVE)
/* SAK PATCH: erase all of current line, start again */
ResetInLine(0); /* reset the input pointers */
xputchar('\n');
ClearDisp();
return (CC_REFRESH);
-#else /* !_MINIX && !WINNT */
+#else /* !_MINIX && !WINNT_NATIVE */
/* do no editing */
return (CC_NORM);
-#endif /* _MINIX || WINNT */
+#endif /* _MINIX || WINNT_NATIVE */
}
/*
@@ -3868,7 +3868,7 @@ v_rsrch_back(c)
F_DOWN_SEARCH_HIST : F_UP_SEARCH_HIST));
}
-#ifndef WINNT
+#ifndef WINNT_NATIVE
/* Since ed.defns.h is generated from ed.defns.c, these empty
functions will keep the F_NUM_FNS consistent
*/
@@ -3902,81 +3902,21 @@ e_dosify_prev(c)
USE(c);
return (CC_ERROR);
}
-#else /* WINNT */
-/*ARGSUSED*/
CCRETVAL
-e_dosify_next(c)
+e_page_up(c)
int c;
{
- register Char *cp, *p, *kp;
-
USE(c);
- if (Cursor == LastChar)
- return(CC_ERROR);
- /* else */
-
- cp = Cursor;
- while( cp < LastChar) {
- if ( (*cp & CHAR == ' ') && (cp[-1] & CHAR != '\\') )
- break;
- cp++;
- }
-
- for (p = Cursor, kp = KillBuf; p < cp; p++) {/* save the text */
- if ( ( *p & CHAR ) == '/') {
- *kp++ = '\\';
- *kp++ = '\\';
- }
- else
- *kp++ = *p;
- }
- LastKill = kp;
-
- c_delafter((int)(cp - Cursor)); /* delete after dot */
- if (Cursor > LastChar)
- Cursor = LastChar; /* bounds check */
- return (e_yank_kill(c));
+ return (CC_ERROR);
}
-/*ARGSUSED*/
CCRETVAL
-e_dosify_prev(c)
+e_page_down(c)
int c;
{
- register Char *cp, *p, *kp;
-
USE(c);
- if (Cursor == InputBuf)
- return(CC_ERROR);
- /* else */
-
- cp = Cursor-1;
- /* Skip trailing spaces */
- while ((cp > InputBuf) && ( (*cp & CHAR) == ' '))
- cp--;
-
- while (cp > InputBuf) {
- if ( ((*cp & CHAR) == ' ') && ((cp[-1] & CHAR) != '\\') )
- break;
- cp--;
- }
-
- for (p = cp, kp = KillBuf; p < Cursor; p++) {/* save the text */
- if ( ( *p & CHAR ) == '/') {
- *kp++ = '\\';
- *kp++ = '\\';
- }
- else
- *kp++ = *p;
- }
- LastKill = kp;
-
- c_delbefore((int)(Cursor - cp)); /* delete before dot */
- Cursor = cp;
- if (Cursor < InputBuf)
- Cursor = InputBuf; /* bounds check */
- return(e_yank_kill(c));
+ return (CC_ERROR);
}
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
#ifdef notdef
void
diff --git a/contrib/tcsh/ed.decls.h b/contrib/tcsh/ed.decls.h
index 4b96d6d05075..074b96679b01 100644
--- a/contrib/tcsh/ed.decls.h
+++ b/contrib/tcsh/ed.decls.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.decls.h,v 3.28 1998/09/04 21:16:38 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.decls.h,v 3.29 2000/07/15 19:58:50 christos Exp $ */
/*
* ed.decls.h: Editor external definitions
*/
@@ -238,6 +238,8 @@ extern CCRETVAL e_copy_to_clipboard __P((int));
extern CCRETVAL e_paste_from_clipboard __P((int));
extern CCRETVAL e_dosify_next __P((int));
extern CCRETVAL e_dosify_prev __P((int));
+extern CCRETVAL e_page_up __P((int));
+extern CCRETVAL e_page_down __P((int));
/*
* ed.inputl.c
diff --git a/contrib/tcsh/ed.defns.c b/contrib/tcsh/ed.defns.c
index 41d79929202f..3dd0c2c96900 100644
--- a/contrib/tcsh/ed.defns.c
+++ b/contrib/tcsh/ed.defns.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.defns.c,v 3.33 1998/11/24 18:17:18 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.defns.c,v 3.36 2000/11/11 23:03:33 christos Exp $ */
/*
* ed.defns.c: Editor function definitions and initialization
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.defns.c,v 3.33 1998/11/24 18:17:18 christos Exp $")
+RCSID("$Id: ed.defns.c,v 3.36 2000/11/11 23:03:33 christos Exp $")
#include "ed.h"
@@ -277,8 +277,12 @@ PFCmd CcFuncTbl[] = { /* table of available commands */
#define F_DOSIFY_NEXT 115
e_dosify_prev,
#define F_DOSIFY_PREV 116
+ e_page_up,
+#define F_PAGE_UP 117
+ e_page_down,
+#define F_PAGE_DOWN 118
0 /* DUMMY VALUE */
-#define F_NUM_FNS 117
+#define F_NUM_FNS 119
};
@@ -289,11 +293,11 @@ KEYCMD CcAltMap[NT_NUM_KEYS]; /* the alternative key map */
#define F_NUM_FUNCNAMES (F_NUM_FNS + 2)
struct KeyFuncs FuncNames[F_NUM_FUNCNAMES];
-#ifdef WINNT
+#ifdef WINNT_NATIVE
extern KEYCMD CcEmacsMap[];
extern KEYCMD CcViMap[];
extern KEYCMD CcViCmdMap[];
-#else /* !WINNT*/
+#else /* !WINNT_NATIVE*/
KEYCMD CcEmacsMap[] = {
/* keymap table, each index into above tbl; should be 256*sizeof(KEYCMD)
bytes long */
@@ -1114,7 +1118,7 @@ KEYCMD CcViCmdMap[] = {
F_UNASSIGNED, /* M-~ */
F_UNASSIGNED /* M-^? */
};
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
void
@@ -1122,7 +1126,7 @@ editinit()
{
struct KeyFuncs *f;
-#if defined(NLS_CATALOGS) || defined(WINNT)
+#if defined(NLS_CATALOGS) || defined(WINNT_NATIVE)
int i;
for (i = 0; i < F_NUM_FUNCNAMES; i++)
@@ -1747,6 +1751,15 @@ editinit()
f->name = "e_dosify_prev";
f->func = F_DOSIFY_PREV;
f->desc = CSAVS(3, 118, "(win32 only)Convert each '/' in previous word to '\\\\'");
+ f++;
+ f->name = "e_page_up";
+ f->func = F_PAGE_UP;
+ f->desc = CSAVS(3, 118, "(win32 only)Page visible console window up");
+ f++;
+ f->name = "e_page_down";
+ f->func = F_PAGE_DOWN;
+ f->desc = CSAVS(3, 118, "(win32 only)Page visible console window down");
+
f++;
f->name = NULL;
@@ -1837,7 +1850,7 @@ ed_InitMetaBindings()
cstr.len = 2;
for (i = 0200; i <= 0377; i++) {
if (map[i] != F_INSERT && map[i] != F_UNASSIGNED && map[i] != F_XKEY) {
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
buf[1] = i & ASCII;
#else
buf[1] = _toebcdic[_toascii[i] & ASCII];
@@ -1913,7 +1926,7 @@ ed_InitMaps()
{
if (MapsAreInited)
return;
-#ifdef _OSD_POSIX
+#ifndef IS_ASCII
/* This machine has an EBCDIC charset. The assumptions made for the
* initialized keymaps therefore don't hold, since they are based on
* ASCII (or ISO8859-1).
@@ -1937,7 +1950,7 @@ ed_InitMaps()
}
}
}
-#endif /* _OSD_POSIX */
+#endif /* !IS_ASCII */
#ifdef VIDEFAULT
ed_InitVIMaps();
diff --git a/contrib/tcsh/ed.h b/contrib/tcsh/ed.h
index 659a0a66aa5e..f92e481711d7 100644
--- a/contrib/tcsh/ed.h
+++ b/contrib/tcsh/ed.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.h,v 3.28 1998/11/24 18:17:21 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.h,v 3.30 2000/11/11 23:03:34 christos Exp $ */
/*
* ed.h: Editor declarations and globals
*/
@@ -44,11 +44,9 @@
#define TABSIZE 8 /* usually 8 spaces/tab */
#define MAXMACROLEVELS 10 /* max number of nested kbd macros */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# define NT_NUM_KEYS 256
-#endif /* WINNT */
-
-extern int errno;
+#endif /* WINNT_NATIVE */
/****************************************************************************/
/* stuff for the different states returned by the character editor routines */
@@ -190,9 +188,9 @@ EXTERN Char T_HasMeta; /* true if we have a meta key */
* Terminal dependend data structures
*/
typedef struct {
-#ifdef WINNT
+#ifdef WINNT_NATIVE
int dummy;
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
# if defined(POSIX) || defined(TERMIO)
# ifdef POSIX
struct termios d_t;
@@ -216,7 +214,7 @@ typedef struct {
# ifdef TIOCGLTC
struct ltchars d_ltc;
# endif /* TIOCGLTC */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
} ttydata_t;
#define MODE_INSERT 0
diff --git a/contrib/tcsh/ed.init.c b/contrib/tcsh/ed.init.c
index e03fef6f1247..55ae2fcd9d92 100644
--- a/contrib/tcsh/ed.init.c
+++ b/contrib/tcsh/ed.init.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.init.c,v 3.42 2000/01/14 22:57:26 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.init.c,v 3.43 2000/11/11 23:03:34 christos Exp $ */
/*
* ed.init.c: Editor initializations
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.init.c,v 3.42 2000/01/14 22:57:26 christos Exp $")
+RCSID("$Id: ed.init.c,v 3.43 2000/11/11 23:03:34 christos Exp $")
#include "ed.h"
#include "ed.term.h"
@@ -177,7 +177,7 @@ ed_Setup(rst)
return(0);
#if defined(POSIX) && defined(_PC_VDISABLE) && !defined(BSD4_4) && \
- !defined(WINNT)
+ !defined(WINNT_NATIVE)
{
long pcret;
@@ -193,9 +193,9 @@ ed_Setup(rst)
ttychars[EX_IO][rst] = vdisable;
}
}
-#else /* ! POSIX || !_PC_VDISABLE || BSD4_4 || WINNT */
+#else /* ! POSIX || !_PC_VDISABLE || BSD4_4 || WINNT_NATIVE */
vdisable = (unsigned char) _POSIX_VDISABLE;
-#endif /* POSIX && _PC_VDISABLE && !BSD4_4 && !WINNT */
+#endif /* POSIX && _PC_VDISABLE && !BSD4_4 && !WINNT_NATIVE */
if ((imode = adrof(STRinputmode)) != NULL) {
if (!Strcmp(*(imode->vec), STRinsert))
@@ -209,7 +209,7 @@ ed_Setup(rst)
Hist_num = 0;
Expand = 0;
-#ifndef WINNT
+#ifndef WINNT_NATIVE
if (tty_getty(SHTTY, &extty) == -1) {
# ifdef DEBUG_TTY
xprintf("ed_Setup: tty_getty: %s\n", strerror(errno));
@@ -288,12 +288,12 @@ ed_Setup(rst)
# ifdef SIG_WINDOW
(void) sigset(SIG_WINDOW, window_change); /* for window systems */
# endif
-#else /* WINNT */
+#else /* WINNT_NATIVE */
# ifdef DEBUG
if (rst)
xprintf("rst received in ed_Setup() %d\n", rst);
# endif
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
havesetup = 1;
return(0);
}
@@ -321,7 +321,7 @@ ed_Init()
GetTermCaps(); /* does the obvious, but gets term type each
* time */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# if defined(TERMIO) || defined(POSIX)
edtty.d_t.c_iflag &= ~ttylist[ED_IO][M_INPUT].t_clrmask;
edtty.d_t.c_iflag |= ttylist[ED_IO][M_INPUT].t_setmask;
@@ -356,7 +356,7 @@ ed_Init()
# endif /* POSIX || TERMIO */
tty_setchar(&edtty, ttychars[ED_IO]);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
}
/*
@@ -368,9 +368,9 @@ Rawmode()
if (Tty_raw_mode)
return (0);
-#ifdef WINNT
+#ifdef WINNT_NATIVE
do_nt_raw_mode();
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
# ifdef _IBMR2
tty_setdisc(SHTTY, ED_IO);
# endif /* _IBMR2 */
@@ -542,7 +542,7 @@ Rawmode()
# endif /* DEBUG_TTY */
return(-1);
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
Tty_raw_mode = 1;
flush(); /* flush any buffered output */
return (0);
@@ -551,7 +551,7 @@ Rawmode()
int
Cookedmode()
{ /* set tty in normal setup */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
do_nt_cooked_mode();
#else
signalfun_t orig_intr;
@@ -603,7 +603,7 @@ Cookedmode()
# else
(void) sigset(SIGINT, orig_intr); /* take these again */
# endif /* BSDSIGS */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
Tty_raw_mode = 0;
return (0);
@@ -688,7 +688,7 @@ QuoteModeOn()
if (MacroLvl >= 0)
return;
-#ifndef WINNT
+#ifndef WINNT_NATIVE
qutty = edtty;
#if defined(TERMIO) || defined(POSIX)
@@ -716,7 +716,7 @@ QuoteModeOn()
#endif /* DEBUG_TTY */
return;
}
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
Tty_quote_mode = 1;
return;
}
diff --git a/contrib/tcsh/ed.inputl.c b/contrib/tcsh/ed.inputl.c
index ed58cd39aac5..7ba2ed6c9d5f 100644
--- a/contrib/tcsh/ed.inputl.c
+++ b/contrib/tcsh/ed.inputl.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.inputl.c,v 3.48 2000/06/10 20:14:57 kim Exp $ */
+/* $Header: /src/pub/tcsh/ed.inputl.c,v 3.49 2000/11/11 23:03:34 christos Exp $ */
/*
* ed.inputl.c: Input line handling.
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.inputl.c,v 3.48 2000/06/10 20:14:57 kim Exp $")
+RCSID("$Id: ed.inputl.c,v 3.49 2000/11/11 23:03:34 christos Exp $")
#include "ed.h"
#include "ed.defns.h" /* for the function names */
@@ -737,9 +737,9 @@ GetNextChar(cp)
if (Rawmode() < 0) /* make sure the tty is set up correctly */
return 0; /* oops: SHIN was closed */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
__nt_want_vcode = 1;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
while ((num_read = read(SHIN, (char *) &tcp, 1)) == -1) {
if (errno == EINTR)
continue;
@@ -751,14 +751,14 @@ GetNextChar(cp)
if (errno != EINTR)
stderror(ERR_SYSTEM, progname, strerror(errno));
#endif /* convex */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
__nt_want_vcode = 0;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
*cp = '\0';
return -1;
}
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
if (__nt_want_vcode == 2)
*cp = __nt_vcode;
else
@@ -766,7 +766,7 @@ GetNextChar(cp)
__nt_want_vcode = 0;
#else
*cp = tcp;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
return num_read;
}
@@ -810,12 +810,12 @@ SpellLine(cmdonly)
mismatch[1] = HISTSUB;
if (!Strchr(mismatch, *argptr) &&
(!cmdonly || starting_a_command(argptr, InputBuf))) {
-#ifdef WINNT
+#ifdef WINNT_NATIVE
/*
* This hack avoids correcting drive letter changes
*/
if((Cursor - InputBuf) != 2 || (char)InputBuf[1] != ':')
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
{
#ifdef HASH_SPELL_CHECK
Char save;
diff --git a/contrib/tcsh/ed.refresh.c b/contrib/tcsh/ed.refresh.c
index 5a5a9cfaa483..a7414dff515c 100644
--- a/contrib/tcsh/ed.refresh.c
+++ b/contrib/tcsh/ed.refresh.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.refresh.c,v 3.26 2000/06/10 20:14:57 kim Exp $ */
+/* $Header: /src/pub/tcsh/ed.refresh.c,v 3.28 2000/11/11 23:03:34 christos Exp $ */
/*
* ed.refresh.c: Lower level screen refreshing functions
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.refresh.c,v 3.26 2000/06/10 20:14:57 kim Exp $")
+RCSID("$Id: ed.refresh.c,v 3.28 2000/11/11 23:03:34 christos Exp $")
#include "ed.h"
/* #define DEBUG_UPDATE */
@@ -151,7 +151,7 @@ Draw(c) /* draw c, expand tabs, ctl chars */
}
}
else if (Iscntrl(ch)) {
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
Vdraw('^');
if (ch == CTL_ESC('\177')) {
Vdraw('?');
@@ -159,7 +159,7 @@ Draw(c) /* draw c, expand tabs, ctl chars */
else {
/* uncontrolify it; works only for iso8859-1 like sets */
Vdraw((c | 0100));
-#else /*_OSD_POSIX*/
+#else
if (ch == CTL_ESC('\177')) {
Vdraw('^');
Vdraw('?');
@@ -178,7 +178,7 @@ Draw(c) /* draw c, expand tabs, ctl chars */
Vdraw(((c >> 3) & 7) + '0');
Vdraw((c & 7) + '0');
}
-#endif /*_OSD_POSIX*/
+#endif
}
}
#ifdef KANJI
@@ -352,9 +352,9 @@ Refresh()
for (cur_line = 0; cur_line <= new_vcv; cur_line++) {
/* NOTE THAT update_line MAY CHANGE Display[cur_line] */
update_line(Display[cur_line], Vdisplay[cur_line], cur_line);
-#ifdef WINNT
+#ifdef WINNT_NATIVE
flush();
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* Copy the new line to be the current one, and pad out with spaces
@@ -383,9 +383,9 @@ Refresh()
dprintf("\r\nCursorH = %d, CursorV = %d, cur_h = %d, cur_v = %d\r\n",
CursorH, CursorV, cur_h, cur_v);
#endif /* DEBUG_REFRESH */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
flush();
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
MoveToLine(cur_v); /* go to where the cursor is */
MoveToChar(cur_h);
SetAttributes(0); /* Clear all attributes */
@@ -919,14 +919,14 @@ update_line(old, new, cur_line)
#ifdef DEBUG_REFRESH
dprintf("cleareol %d\n", (oe - old) - (ne - new));
#endif /* DEBUG_UPDATE */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
ClearEOL((oe - old) - (ne - new));
#else
/*
* The calculation above does not work too well on NT
*/
ClearEOL(TermH - CursorH);
-#endif /*WINNT*/
+#endif /*WINNT_NATIVE*/
/*
* Done
*/
@@ -982,14 +982,14 @@ update_line(old, new, cur_line)
#ifdef DEBUG_REFRESH
dprintf("cleareol %d\n", olen - (ne - new));
#endif /* DEBUG_UPDATE */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
ClearEOL(olen - (ne - new));
#else
/*
* The calculation above does not work too well on NT
*/
ClearEOL(TermH - CursorH);
-#endif /*WINNT*/
+#endif /*WINNT_NATIVE*/
}
}
@@ -1243,11 +1243,11 @@ RefPlusOne()
} /* else (only do at end of line, no TAB) */
if (Iscntrl(c)) { /* if control char, do caret */
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
mc = (c == '\177') ? '?' : (c | 0100);
PutPlusOne('^');
PutPlusOne(mc);
-#else /*_OSD_POSIX*/
+#else
if (_toascii[c] == '\177' || Isupper(_toebcdic[_toascii[c]|0100])
|| strchr("@[\\]^_", _toebcdic[_toascii[c]|0100]) != NULL)
{
@@ -1262,7 +1262,7 @@ RefPlusOne()
PutPlusOne(((c >> 3) & 7) + '0');
PutPlusOne((c & 7) + '0');
}
-#endif /*_OSD_POSIX*/
+#endif
}
else if (Isprint(c)) { /* normal char */
PutPlusOne(c);
diff --git a/contrib/tcsh/ed.screen.c b/contrib/tcsh/ed.screen.c
index 2d4be8ad3a6c..5e620aef9fa5 100644
--- a/contrib/tcsh/ed.screen.c
+++ b/contrib/tcsh/ed.screen.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.screen.c,v 3.46 1999/02/06 15:18:56 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.screen.c,v 3.48 2000/11/11 23:03:34 christos Exp $ */
/*
* ed.screen.c: Editor/termcap-curses interface
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.screen.c,v 3.46 1999/02/06 15:18:56 christos Exp $")
+RCSID("$Id: ed.screen.c,v 3.48 2000/11/11 23:03:34 christos Exp $")
#include "ed.h"
#include "tc.h"
@@ -187,7 +187,9 @@ static struct {
#define T_LE 33
#define T_RI 34
#define T_UP 35
-#define T_str 36
+#define T_kh 36
+#define T_at7 37
+#define T_str 38
static struct termcapstr {
char *name;
char *long_name;
@@ -329,6 +331,12 @@ terminit()
tstr[T_UP].name = "UP";
tstr[T_UP].long_name = CSAVS(4, 36, "cursor up multiple");
+ tstr[T_kh].name = "kh";
+ tstr[T_kh].long_name = CSAVS(4, 37, "send cursor home");
+
+ tstr[T_at7].name = "@7";
+ tstr[T_at7].long_name = CSAVS(4, 38, "send cursor end");
+
tstr[T_str].name = NULL;
tstr[T_str].long_name = NULL;
@@ -809,9 +817,13 @@ static struct {
#define A_K_LT 2
{ STRleft, T_kl },
#define A_K_RT 3
- { STRright, T_kr }
+ { STRright, T_kr },
+#define A_K_HO 4
+ { STRhome, T_kh },
+#define A_K_EN 5
+ { STRend, T_at7}
};
-
+#define A_K_NKEYS 6
void
ResetArrowKeys()
@@ -828,6 +840,11 @@ ResetArrowKeys()
arrow[A_K_RT].fun.cmd = F_CHARFWD;
arrow[A_K_RT].type = XK_CMD;
+ arrow[A_K_HO].fun.cmd = F_TOBEG;
+ arrow[A_K_HO].type = XK_CMD;
+
+ arrow[A_K_EN].fun.cmd = F_TOEND;
+ arrow[A_K_EN].type = XK_CMD;
}
void
@@ -837,23 +854,31 @@ DefaultArrowKeys()
static Char strB[] = {033, '[', 'B', '\0'};
static Char strC[] = {033, '[', 'C', '\0'};
static Char strD[] = {033, '[', 'D', '\0'};
+ static Char strH[] = {033, '[', 'H', '\0'};
+ static Char strF[] = {033, '[', 'F', '\0'};
static Char stOA[] = {033, 'O', 'A', '\0'};
static Char stOB[] = {033, 'O', 'B', '\0'};
static Char stOC[] = {033, 'O', 'C', '\0'};
static Char stOD[] = {033, 'O', 'D', '\0'};
+ static Char stOH[] = {033, 'O', 'H', '\0'};
+ static Char stOF[] = {033, 'O', 'F', '\0'};
CStr cs;
-#ifdef _OSD_POSIX
+#ifndef IS_ASCII
if (strA[0] == 033)
{
strA[0] = CTL_ESC('\033');
strB[0] = CTL_ESC('\033');
strC[0] = CTL_ESC('\033');
strD[0] = CTL_ESC('\033');
+ strH[0] = CTL_ESC('\033');
+ strF[0] = CTL_ESC('\033');
stOA[0] = CTL_ESC('\033');
stOB[0] = CTL_ESC('\033');
stOC[0] = CTL_ESC('\033');
stOD[0] = CTL_ESC('\033');
+ stOH[0] = CTL_ESC('\033');
+ stOF[0] = CTL_ESC('\033');
}
#endif
@@ -863,21 +888,29 @@ DefaultArrowKeys()
cs.buf = strB; AddXkey(&cs, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
cs.buf = strC; AddXkey(&cs, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
cs.buf = strD; AddXkey(&cs, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
+ cs.buf = strH; AddXkey(&cs, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
+ cs.buf = strF; AddXkey(&cs, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
cs.buf = stOA; AddXkey(&cs, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
cs.buf = stOB; AddXkey(&cs, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
cs.buf = stOC; AddXkey(&cs, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
cs.buf = stOD; AddXkey(&cs, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
-
+ cs.buf = stOH; AddXkey(&cs, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
+ cs.buf = stOF; AddXkey(&cs, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
+
if (VImode) {
cs.len = 2;
cs.buf = &strA[1]; AddXkey(&cs, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
cs.buf = &strB[1]; AddXkey(&cs, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
cs.buf = &strC[1]; AddXkey(&cs, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
cs.buf = &strD[1]; AddXkey(&cs, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
+ cs.buf = &strH[1]; AddXkey(&cs, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
+ cs.buf = &strF[1]; AddXkey(&cs, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
cs.buf = &stOA[1]; AddXkey(&cs, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
cs.buf = &stOB[1]; AddXkey(&cs, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
cs.buf = &stOC[1]; AddXkey(&cs, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
cs.buf = &stOD[1]; AddXkey(&cs, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
+ cs.buf = &stOH[1]; AddXkey(&cs, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
+ cs.buf = &stOF[1]; AddXkey(&cs, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
}
}
@@ -889,7 +922,7 @@ SetArrowKeys(name, fun, type)
int type;
{
int i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < A_K_NKEYS; i++)
if (Strcmp(name->buf, arrow[i].name) == 0) {
arrow[i].fun = *fun;
arrow[i].type = type;
@@ -903,7 +936,7 @@ IsArrowKey(name)
Char *name;
{
int i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < A_K_NKEYS; i++)
if (Strcmp(name, arrow[i].name) == 0)
return 1;
return 0;
@@ -914,7 +947,7 @@ ClearArrowKeys(name)
CStr *name;
{
int i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < A_K_NKEYS; i++)
if (Strcmp(name->buf, arrow[i].name) == 0) {
arrow[i].type = XK_NOD;
return 0;
@@ -928,7 +961,7 @@ PrintArrowKeys(name)
{
int i;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < A_K_NKEYS; i++)
if (name->len == 0 || Strcmp(name->buf, arrow[i].name) == 0)
if (arrow[i].type != XK_NOD) {
CStr cs;
@@ -954,7 +987,7 @@ BindArrowKeys()
DefaultArrowKeys();
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < A_K_NKEYS; i++) {
p = tstr[arrow[i].key].str;
if (p && *p) {
j = (unsigned char) *p;
@@ -1083,7 +1116,7 @@ MoveToLine(where) /* move to line <where> (first line == 0) */
del = where - CursorV;
-#ifndef WINNT
+#ifndef WINNT_NATIVE
if (del > 0) {
while (del > 0) {
if ((T_Margin & MARGIN_AUTO) && Display[CursorV][0] != '\0') {
@@ -1115,9 +1148,9 @@ MoveToLine(where) /* move to line <where> (first line == 0) */
(void) tputs(Str(T_up), 1, PUTPURE);
}
}
-#else /* WINNT */
+#else /* WINNT_NATIVE */
NT_MoveToLineOrChar(del, 1);
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
CursorV = where; /* now where is here */
}
@@ -1125,11 +1158,11 @@ void
MoveToChar(where) /* move to character position (where) */
int where;
{ /* as efficiently as possible */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
int del;
mc_again:
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (where == CursorH)
return;
@@ -1147,7 +1180,7 @@ mc_again:
return;
}
-#ifndef WINNT
+#ifndef WINNT_NATIVE
del = where - CursorH;
if ((del < -4 || del > 4) && GoodStr(T_ch))
@@ -1159,7 +1192,12 @@ mc_again:
if ((del > 4) && GoodStr(T_RI))
(void) tputs(tgoto(Str(T_RI), del, del), del, PUTPURE);
else {
- if (T_Tabs) { /* if I can do tabs, use them */
+ /* if I can do tabs, use them */
+ if (T_Tabs
+#ifdef DSPMBYTE
+ && !_enable_mbdisp
+#endif /* DSPMBYTE */
+ ) {
if ((CursorH & 0370) != (where & 0370)) {
/* if not within tab stop */
for (i = (CursorH & 0370); i < (where & 0370); i += 8)
@@ -1194,9 +1232,9 @@ mc_again:
}
}
}
-#else /* WINNT */
+#else /* WINNT_NATIVE */
NT_MoveToLineOrChar(where, 0);
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
CursorH = where; /* now where is here */
}
@@ -1225,7 +1263,7 @@ so_write(cp, n)
xprintf("so: litnum %d, litptr %x\r\n",
*cp & CHAR, litptr[*cp & CHAR]);
#endif /* DEBUG_LITERAL */
-#if defined(WINNT) && !defined(COLOR_LS_F)
+#if defined(WINNT_NATIVE) && !defined(COLOR_LS_F)
{
char buf[256], *ptr = &buf[0];
for (d = litptr[*cp++ & CHAR]; *d & LITERAL; d++)
@@ -1233,10 +1271,10 @@ so_write(cp, n)
flush();
set_cons_attr(buf);
}
-#else /* !WINNT || COLOR_LS_F */
+#else /* !WINNT_NATIVE || COLOR_LS_F */
for (d = litptr[*cp++ & CHAR]; *d & LITERAL; d++)
(void) putraw(*d & CHAR);
-#endif /* WINNT && !COLOR_LS_F */
+#endif /* WINNT_NATIVE && !COLOR_LS_F */
(void) putraw(*d);
}
@@ -1413,11 +1451,11 @@ SoundBeep()
/* what termcap says we should use */
(void) tputs(Str(T_bl), 1, PUTPURE);
else
-#ifndef WINNT
+#ifndef WINNT_NATIVE
(void) putraw(CTL_ESC('\007')); /* an ASCII bell; ^G */
-#else /* WINNT */
+#else /* WINNT_NATIVE */
MessageBeep(MB_ICONQUESTION);
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
}
void
@@ -1619,9 +1657,9 @@ ChangeSize(lins, cols)
Val(T_co) = (cols < 2) ? 80 : cols;
Val(T_li) = (lins < 1) ? 24 : lins;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_set_size(lins,cols);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef KNOWsize
/*
* We want to affect the environment only when we have a valid
diff --git a/contrib/tcsh/ed.term.c b/contrib/tcsh/ed.term.c
index 9e730643f97f..b7ea98742200 100644
--- a/contrib/tcsh/ed.term.c
+++ b/contrib/tcsh/ed.term.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.term.c,v 1.24 1999/08/12 14:19:23 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.term.c,v 1.25 2000/11/11 23:03:34 christos Exp $ */
/*
* ed.term.c: Low level terminal interface
*/
@@ -35,9 +35,9 @@
* SUCH DAMAGE.
*/
#include "sh.h"
-#ifndef WINNT
+#ifndef WINNT_NATIVE
-RCSID("$Id: ed.term.c,v 1.24 1999/08/12 14:19:23 christos Exp $")
+RCSID("$Id: ed.term.c,v 1.25 2000/11/11 23:03:34 christos Exp $")
#include "ed.h"
#include "ed.term.h"
@@ -1140,11 +1140,11 @@ tty_printchar(s)
xputchar('\n');
}
#endif /* DEBUG_TTY */
-#else /* WINNT */
+#else /* WINNT_NATIVE */
int
tty_cooked_mode(td)
void *td;
{
return do_nt_check_cooked_mode();
}
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
diff --git a/contrib/tcsh/ed.xmap.c b/contrib/tcsh/ed.xmap.c
index d4d9bd657665..3436f57fc37b 100644
--- a/contrib/tcsh/ed.xmap.c
+++ b/contrib/tcsh/ed.xmap.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.xmap.c,v 3.21 1999/06/01 20:01:32 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.xmap.c,v 3.23 2000/11/11 23:03:35 christos Exp $ */
/*
* ed.xmap.c: This module contains the procedures for maintaining
* the extended-key map.
@@ -92,7 +92,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.xmap.c,v 3.21 1999/06/01 20:01:32 christos Exp $")
+RCSID("$Id: ed.xmap.c,v 3.23 2000/11/11 23:03:35 christos Exp $")
#include "ed.h"
#include "ed.defns.h"
@@ -632,13 +632,13 @@ unparsech(cnt, ch)
}
if (Iscntrl(*ch)) {
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
printbuf[cnt++] = '^';
if (*ch == CTL_ESC('\177'))
printbuf[cnt] = '?';
else
printbuf[cnt] = *ch | 0100;
-#else /*_OSD_POSIX*/
+#else
if (*ch == CTL_ESC('\177'))
{
printbuf[cnt++] = '^';
@@ -657,7 +657,7 @@ unparsech(cnt, ch)
printbuf[cnt++] = ((*ch >> 3) & 7) + '0';
printbuf[cnt] = (*ch & 7) + '0';
}
-#endif /*_OSD_POSIX*/
+#endif
}
else if (*ch == '^') {
printbuf[cnt++] = '\\';
@@ -743,7 +743,7 @@ parseescape(ptr)
"Octal constant does not fit in a char.\n"));
return 0;
}
-#ifdef _OSD_POSIX
+#ifndef IS_ASCII
if (CTL_ESC(val) != val && adrof(STRwarnebcdic))
xprintf(/*CGETS(9, 9, no NLS-String yet!*/
"Warning: Octal constant \\%3.3o is interpreted as EBCDIC value.\n", val/*)*/);
@@ -760,14 +760,14 @@ parseescape(ptr)
else if ((*p & CHAR) == '^' && (Isalpha(p[1] & CHAR) ||
strchr("@^_?\\|[{]}", p[1] & CHAR))) {
p++;
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
c = ((*p & CHAR) == '?') ? CTL_ESC('\177') : ((*p & CHAR) & 0237);
-#else /*_OSD_POSIX*/
+#else
c = ((*p & CHAR) == '?') ? CTL_ESC('\177') : _toebcdic[_toascii[*p & CHAR] & 0237];
if (adrof(STRwarnebcdic))
xprintf(/*CGETS(9, 9, no NLS-String yet!*/
"Warning: Control character ^%c may be interpreted differently in EBCDIC.\n", *p & CHAR /*)*/);
-#endif /*_OSD_POSIX*/
+#endif
}
else
c = *p;
@@ -788,22 +788,22 @@ unparsestring(str, buf, sep)
b = buf;
if (sep[0])
-#ifndef WINNT
+#ifndef WINNT_NATIVE
*b++ = sep[0];
-#else /* WINNT */
+#else /* WINNT_NATIVE */
*b++ = CHAR & sep[0];
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
for (l = 0; l < str->len; l++) {
p = str->buf[l];
if (Iscntrl(p)) {
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
*b++ = '^';
if (p == CTL_ESC('\177'))
*b++ = '?';
else
*b++ = (unsigned char) (p | 0100);
-#else /*_OSD_POSIX*/
+#else
if (_toascii[p] == '\177' || Isupper(_toebcdic[_toascii[p]|0100])
|| strchr("@[\\]^_", _toebcdic[_toascii[p]|0100]) != NULL)
{
@@ -817,7 +817,7 @@ unparsestring(str, buf, sep)
*b++ = ((p >> 3) & 7) + '0';
*b++ = (p & 7) + '0';
}
-#endif /*_OSD_POSIX*/
+#endif
}
else if (p == '^' || p == '\\') {
*b++ = '\\';
@@ -834,11 +834,11 @@ unparsestring(str, buf, sep)
}
}
if (sep[0] && sep[1])
-#ifndef WINNT
+#ifndef WINNT_NATIVE
*b++ = sep[1];
-#else /* WINNT */
+#else /* WINNT_NATIVE */
*b++ = CHAR & sep[1];
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
*b++ = 0;
return buf; /* should check for overflow */
}
diff --git a/contrib/tcsh/glob.c b/contrib/tcsh/glob.c
index f6a2fd213dff..23dc61bff771 100644
--- a/contrib/tcsh/glob.c
+++ b/contrib/tcsh/glob.c
@@ -63,9 +63,9 @@ static char sccsid[] = "@(#)glob.c 5.12 (Berkeley) 6/24/91";
#include <ctype.h>
typedef void * ptr_t;
#endif
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#pragma warning(disable:4244)
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#define Char __Char
#include "sh.h"
@@ -568,7 +568,6 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob, no_match)
glob_t *pglob;
int no_match;
{
- extern int errno;
DIR *dirp;
struct dirent *dp;
int err;
diff --git a/contrib/tcsh/host.defs b/contrib/tcsh/host.defs
index f5297d7c5681..b00090c3f66e 100644
--- a/contrib/tcsh/host.defs
+++ b/contrib/tcsh/host.defs
@@ -1,5 +1,5 @@
newcode :
-/* $Header: /src/pub/tcsh/host.defs,v 1.26 2000/06/10 18:48:09 kim Exp $ */
+/* $Header: /src/pub/tcsh/host.defs,v 1.28 2000/11/11 23:03:35 christos Exp $ */
/*
* host.defs: Hosttype/Machtype etc.
*/
@@ -37,7 +37,7 @@ newcode :
*/
#include "sh.h"
-RCSID("$Id: host.defs,v 1.26 2000/06/10 18:48:09 kim Exp $")
+RCSID("$Id: host.defs,v 1.28 2000/11/11 23:03:35 christos Exp $")
endcode :
@@ -1004,6 +1004,14 @@ ostype : : "posix"
machtype: : "bs2000"
enddef :
+newdef : defined(__MVS__)
+comment : ibm uss s/390 (mainframe, EBCDIC)
+vendor : : "ibm"
+hosttype: : "s390"
+ostype : : "os390"
+machtype: : "s390"
+enddef :
+
newdef : defined(_SX)
comment : NEC Corporation (SX-4)
vendor : : "nec"
@@ -1081,7 +1089,6 @@ newdef : SYSVREL == 0
ostype : defined(BSD4_4) : "bsd44"
ostype : defined(BSD) : "bsd"
ostype : defined(POSIX) : "posix"
-ostype : defined(unix) || defined(__unix__) : "unix"
enddef :
diff --git a/contrib/tcsh/mi.termios.c b/contrib/tcsh/mi.termios.c
index b4834b607174..87e375e36256 100644
--- a/contrib/tcsh/mi.termios.c
+++ b/contrib/tcsh/mi.termios.c
@@ -1,12 +1,12 @@
-/* $Header: /src/pub/tcsh/mi.termios.c,v 1.3 1996/04/26 19:18:38 christos Exp $ */
+/* $Header: /src/pub/tcsh/mi.termios.c,v 1.4 2000/07/04 19:38:14 christos Exp $ */
/* termios.c - fake termios interface using sgtty interface
* by Magnus Doell and Bruce Evans.
*
*/
#include "sh.h"
-RCSID("$Id: mi.termios.c,v 1.3 1996/04/26 19:18:38 christos Exp $")
+RCSID("$Id: mi.termios.c,v 1.4 2000/07/04 19:38:14 christos Exp $")
-#ifdef _MINIX
+#if defined(_MINIX) && !defined(_MINIX_VMD)
/* Undefine everything that clashes with sgtty.h. */
@@ -390,4 +390,4 @@ struct termios *termios_p;
ioctl(filedes, TIOCSETC, (struct sgttyb *) &tcbuf) < 0 ?
-1 : 0;
}
-#endif /* _MINIX */
+#endif /* _MINIX && !_MINIX_VMD */
diff --git a/contrib/tcsh/nls/ukrainian/set1 b/contrib/tcsh/nls/ukrainian/set1
new file mode 100644
index 000000000000..d5547b3d50f8
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set1
@@ -0,0 +1,140 @@
+$ $Id: set1,v 1.1 2000/11/11 23:03:42 christos Exp $
+$ Error messages
+$set 1
+1 Синтаксична помилка
+2 %s is not allowed
+3 Word too long
+4 $< line too long
+5 No file for $0
+6 Incomplete [] modifier
+7 $ expansion must end before ]
+8 Bad : modifier in $ (%c)
+9 Subscript error
+10 Badly formed number
+11 No more words
+12 Пропущено ╕м'я файлу
+13 Internal glob error
+14 Нев╕дома команда
+15 Замало параметр╕в
+16 Забагато параметр╕в
+17 Небезпечно створювати такий псевдон╕м
+18 Порожн╕й оператор if
+19 Improper then
+20 Words not parenthesized
+21 %s не знайдено
+22 Improper mask
+23 No such limit
+24 Argument too large
+25 Improper or unknown scale factor
+26 Undefined variable
+27 Directory stack not that deep
+28 Поганий номер сигналу
+29 Unknown signal; kill -l lists signals
+30 Variable name must begin with a letter
+31 Variable name too long
+32 Variable name must contain alphanumeric characters
+33 No job control in this shell
+34 Expression Syntax
+35 Нема╓ домашнього каталогу
+36 Не можу перейти до домашнього каталогу
+37 Invalid null command
+38 Assignment missing expression
+39 Нев╕домий оператор
+40 Неоднозначно
+41 %s: Файл ╕сну╓
+42 Argument for -c ends in backslash
+43 Перервано
+44 Subscript out of range
+45 Line overflow
+46 Нема тако╖ задач╕
+47 Неможливо з терм╕налу
+48 Not in while/foreach
+49 Не можна б╕льше процес╕в
+50 Нема╓ сп╕впадань
+51 Missing %c
+52 Unmatched %c
+53 Мало пам'ят╕
+54 Can't make pipe
+55 %s: %s
+56 %s
+57 Використання: jobs [ -l ]
+58 Arguments should be jobs or process id's
+59 Нема╓ поточно╖ задач╕
+60 Нема╓ попередньо╖ задач╕
+61 No job matches pattern
+62 Fork nesting > %d; maybe `...` loop
+63 No job control in subshells
+64 Sync fault: Process %d not found
+65 %sЩе ╓ 'п╕дв╕шен╕' задач╕
+66 %sЩе ╓ 'призупинен╕' задач╕
+67 No other directory
+68 Стек каталог╕в пустий
+69 Поганий каталог
+70 Використання: %s [-%s]%s
+71 No operand for -h flag
+72 Not a login shell
+73 Д╕лення на 0
+74 Д╕лення на 0
+75 Bad scaling; did you mean "%s"?
+76 Can't suspend a login shell (yet)
+77 Нев╕домий користувач: %s
+78 Зм╕нна $home не визначена
+79 Використання: history [-%s] [# к╕льк╕сть под╕й]
+80 $, ! та < не дозволя╓ться з $# чи $?
+81 Newline in variable name
+82 * not allowed with $# or $?
+83 $?<цифра> чи $#<цифра> не дозволя╓ться
+84 Illegal variable name
+85 Newline in variable index
+86 Expansion buffer overflow
+87 Variable syntax
+88 Bad ! form
+89 No previous substitute
+90 Bad substitute
+91 No previous left hand side
+92 Right hand side too long
+93 Bad ! modifier: %c
+94 Modifier failed
+95 Substitution buffer overflow
+96 Bad ! arg selector
+97 No prev search
+98 %s: Под╕ю не знайдено
+99 Багато лапок )
+100 Багато лапок (
+101 Погано розм╕щено лапки (
+102 В╕дсутн╓ ╕м'я для перенаправлення
+103 Ambiguous output redirect
+104 Can't << within ()'s
+105 Ambiguous input redirect
+106 Погано розм╕щено лапки ()'s
+107 Alias loop
+108 No $watch variable set
+109 No scheduled events
+110 Використання: sched -<item#>.\nВикористання: sched [+]hh:mm <command>
+111 Not that many scheduled events
+112 No command to run
+113 Invalid time for event
+114 Relative time inconsistent with am/pm
+115 Out of termcap string space
+116 Використання: settc %s [yes|no]
+117 Unknown capability `%s'
+118 Unknown termcap parameter `%%%c'
+119 Too many arguments for `%s' (%d)
+120 `%s' requires %d arguments
+121 Використання: echotc [-v|-s] [<capability> [<args>]]
+122 %s: %s. Wrong Architecture
+123 !# History loop
+124 Malformed file inquiry
+125 Selector overflow
+126 Unknown option: `-%s'\nВикористання: %s [ -bcdefilmnqstvVxX -Dname[=value] ] [ argument ... ]
+127 Unknown option: `-%s'\nВикористання: %s [ -bcdefFilmnqstvVxX ] [ argument ... ]
+128 Unknown option: `-%s'\nВикористання: %s [ -bcdefilmnqstvVxX ] [ argument ... ]
+129 \nInvalid completion: "%s"
+130 \nInvalid %s: '%c'
+131 \nMissing separator '%c' after %s "%s"
+132 \nIncomplete %s: "%s"
+133 No operand for -m flag
+134 Використання: unlimit [-fh] [limits]
+135 $%S лише для читання
+136 Нема╓ тако╖ задач╕
+137 Unknown colorls variable `%c%c'
diff --git a/contrib/tcsh/nls/ukrainian/set10 b/contrib/tcsh/nls/ukrainian/set10
new file mode 100644
index 000000000000..e82aa5ca8bb7
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set10
@@ -0,0 +1,8 @@
+$ $Id: set10,v 1.1 2000/11/11 23:03:42 christos Exp $
+$ ma.setp.c
+$set 10
+1 setpath: invalid command '%s'.\n
+2 setpath: insufficient arguments to command '%s'.\n
+3 setpath: value missing in path '%s'\n
+4 setpath: %s not found in %s\n
+5 setpath: %d not valid position in %s\n
diff --git a/contrib/tcsh/nls/ukrainian/set11 b/contrib/tcsh/nls/ukrainian/set11
new file mode 100644
index 000000000000..4b902a39b0f9
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set11
@@ -0,0 +1,10 @@
+$ $Id: set11,v 1.1 2000/11/11 23:03:42 christos Exp $
+$ sh.c
+$set 11
+1 Warning: no access to tty (%s).\n
+2 Thus no job control in this shell.\n
+3 You have %d mail messages.\n
+4 You have %d mail messages in %s.\n
+5 У Вас ╓ %sпошта.\n
+6 нова
+7 У Вас ╓ %sпошта в %s.\n
diff --git a/contrib/tcsh/nls/ukrainian/set12 b/contrib/tcsh/nls/ukrainian/set12
new file mode 100644
index 000000000000..6636c8103e66
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set12
@@ -0,0 +1,4 @@
+$ $Id: set12,v 1.1 2000/11/11 23:03:42 christos Exp $
+$ sh.dir.c
+$set 12
+1 %s: Trying to start from "%s"\n
diff --git a/contrib/tcsh/nls/ukrainian/set13 b/contrib/tcsh/nls/ukrainian/set13
new file mode 100644
index 000000000000..569939882442
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set13
@@ -0,0 +1,13 @@
+$ $Id: set13,v 1.1 2000/11/11 23:03:42 christos Exp $
+$ sh.exec.c
+$set 13
+1 hash=%-4d dir=%-2d prog=%s\n
+2 %d hash buckets of %d bits each\n
+3 debug mask = 0x%08x\n
+4 %d попадань, %d промах╕в, %d%%\n
+5 %S: shell built-in command.\n
+6 %S: Command not found.\n
+7 where: / in command makes no sense\n
+8 %S is aliased to
+9 %S is a shell built-in\n
+10 hash miss:
diff --git a/contrib/tcsh/nls/ukrainian/set14 b/contrib/tcsh/nls/ukrainian/set14
new file mode 100644
index 000000000000..a21afca2e879
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set14
@@ -0,0 +1,6 @@
+$ $Id: set14,v 1.1 2000/11/11 23:03:42 christos Exp $
+$ sh.file.c
+$set 14
+1 \nYikes!! Too many %s!!\n
+2 names in password file
+3 files
diff --git a/contrib/tcsh/nls/ukrainian/set15 b/contrib/tcsh/nls/ukrainian/set15
new file mode 100644
index 000000000000..e0abb011f104
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set15
@@ -0,0 +1,7 @@
+$ $Id: set15,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ sh.func.c
+$set 15
+1 %s: %s: Can't %s%s limit\n
+2 remove
+3 set
+4 \040hard
diff --git a/contrib/tcsh/nls/ukrainian/set16 b/contrib/tcsh/nls/ukrainian/set16
new file mode 100644
index 000000000000..5fa6e19c3d57
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set16
@@ -0,0 +1,13 @@
+$ $Id: set16,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ sh.lex.c
+$set 16
+1 Reset tty pgrp from %d to %d\n
+2 \nВикористайте "logout" щоб вийти.\n
+3 \nВикористайте "exit" щоб вийти з %s.\n
+4 seek to eval %x %x\n
+5 seek to alias %x %x\n
+6 seek to file %x\n
+7 Bad seek type %d\n
+8 tell eval %x %x\n
+9 tell alias %x %x\n
+10 tell file %x\n
diff --git a/contrib/tcsh/nls/ukrainian/set17 b/contrib/tcsh/nls/ukrainian/set17
new file mode 100644
index 000000000000..50dae4b22514
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set17
@@ -0,0 +1,16 @@
+$ $Id: set17,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ sh.proc.c
+$set 17
+1 BUG: waiting for background job!\n
+2 Exit %d\n
+3 BUG: process flushed twice
+4 Running
+5 Signal
+6 Exit %-25d
+7 Done
+8 BUG: status=%-9o
+9 \040(записано core)
+10 \040(wd:
+11 wd тепер:
+12 %S: Already suspended\n
+13 %S: Already stopped\n
diff --git a/contrib/tcsh/nls/ukrainian/set18 b/contrib/tcsh/nls/ukrainian/set18
new file mode 100644
index 000000000000..5af57395e713
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set18
@@ -0,0 +1,4 @@
+$ $Id: set18,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ sh.set.c
+$set 18
+1 Warning: ridiculously long PATH truncated\n
diff --git a/contrib/tcsh/nls/ukrainian/set19 b/contrib/tcsh/nls/ukrainian/set19
new file mode 100644
index 000000000000..71debca45a5a
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set19
@@ -0,0 +1,15 @@
+$ $Id: set19,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.alloc.c
+$set 19
+1 nbytes=%d: Out of memory\n
+2 free(%lx) called before any allocations.
+3 free(%lx) above top of memory.
+4 free(%lx) below bottom of memory.
+5 free(%lx) bad block.
+6 free(%lx) bad range check.
+7 free(%lx) bad block index.
+8 Нин╕шн╓ розпод╕лення пам'ят╕ %s:\nв╕льно:\t
+9 \nзанято:\t
+10 \n\tВсього занято: %d, всього в╕льно: %d\n
+11 \tAllocated memory from 0x%lx to 0x%lx. Real top at 0x%lx\n
+12 Allocated memory from 0x%lx to 0x%lx (%ld).\n
diff --git a/contrib/tcsh/nls/ukrainian/set2 b/contrib/tcsh/nls/ukrainian/set2
new file mode 100644
index 000000000000..b17016bf93df
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set2
@@ -0,0 +1,111 @@
+$ $Id: set2,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ Signal names
+$set 2
+1 Null signal
+2 Hangup
+3 Interrupt
+4 Quit
+5 Illegal instruction
+6 Trace/BPT trap
+7 Abort
+8 IOT trap
+9 System Crash Imminent
+10 Error exit
+11 EMT trap
+12 Floating exception
+13 Вбито
+14 User signal 1
+15 User signal 2
+16 Segmentation fault
+17 Bus error
+18 Program range error
+19 Operand range error
+20 Bad system call
+21 Broken pipe
+22 Alarm clock
+23 Terminated
+24 Child status change
+25 Death of child
+26 Apollo-specific fault
+27 Child stopped or exited
+28 Child exited
+29 Power failure
+30 Resource Lost
+31 Break (Ctrl-Break)
+32 Input/output possible signal
+33 Asynchronous I/O (select)
+34 Urgent condition on I/O channel
+35 Multitasking wake-up
+36 Multitasking kill
+37 Fortran asynchronous I/O completion
+38 Recovery
+39 Uncorrectable memory error
+40 CPU time limit exceeded
+41 System shutdown imminent
+42 micro-tasking group-no wakeup flag set
+43 Thread error - (use cord -T for detailed info)
+44 CRAY Y-MP register parity error
+45 Information request
+46 Suspended (signal)
+47 Stopped (signal)
+48 Suspended
+49 Stopped
+50 Continued
+51 Suspended (tty input)
+52 Stopped (tty input)
+53 Suspended (tty output)
+54 Stopped (tty output)
+55 Window status changed
+56 Window size changed
+57 Phone status changed
+58 Cputime limit exceeded
+59 Filesize limit exceeded
+60 Virtual time alarm
+61 Profiling time alarm
+62 DIL signal
+63 Pollable event occured
+64 Process's lwps are blocked
+65 Special LWP signal
+66 Special CPR Signal
+67 Special CPR Signal
+68 First Realtime Signal
+69 Second Realtime Signal
+70 Third Realtime Signal
+71 Fourth Realtime Signal
+72 Fourth Last Realtime Signal
+73 Third Last Realtime Signal
+74 Second Last Realtime Signal
+75 Last Realtime Signal
+76 LAN Asyncronous I/O
+77 PTY read/write availability
+78 I/O intervention required
+79 HFT monitor mode granted
+80 HFT monitor mode should be relinguished
+81 HFT sound control has completed
+82 Data in HFT ring buffer
+83 Migrate process
+84 Secure attention key
+85 Reschedule
+86 Signaling SS$_DEBUG
+87 Priority changed
+88 True deadlock detected
+89 New input character
+90 Stack limit exceeded
+91 Unused signal
+92 LM overlay
+93 system freeze
+94 system defreeze
+95 dead lock
+96 exceeded memory size limit
+97 exceeded data size limit
+98 exceeded memory size limit of 32KB
+99 exce error for no memory
+100 check point start
+101 check point start of kernel
+102 restart start
+103 restart of kernel
+104 exeeded XMU size limit
+105 exeeded RLG0 limit
+106 exeeded RLG1 limit
+107 exeeded RLG2 limit
+108 exeeded RLG3 limit
diff --git a/contrib/tcsh/nls/ukrainian/set20 b/contrib/tcsh/nls/ukrainian/set20
new file mode 100644
index 000000000000..6418f2b41fad
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set20
@@ -0,0 +1,41 @@
+$ $Id: set20,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.bind.c
+$set 20
+1 Invalid key name `%S'\n
+2 Bad key name: %S\n
+3 Bad command name: %S\n
+4 Bad key spec %S\n
+5 Null string specification\n
+6 Standard key bindings\n
+7 Alternative key bindings\n
+8 Multi-character bindings\n
+9 Arrow key bindings\n
+10 %-15s-> is undefined\n
+11 BUG!!! %s isn't bound to anything.\n
+12 Usage: bindkey [options] [--] [KEY [COMMAND]]\n
+13 -a list or bind KEY in alternative key map\n
+14 -b interpret KEY as a C-, M-, F- or X- key name\n
+15 -s interpret COMMAND as a literal string to be output\n
+16 -c interpret COMMAND as a builtin or external command\n
+17 -v bind all keys to vi bindings\n
+18 -e bind all keys to emacs bindings\n
+19 -d bind all keys to default editor's bindings\n
+20 -l list editor commands with descriptions\n
+21 -r remove KEY's binding\n
+22 -k interpret KEY as a symbolic arrow-key name\n
+23 -- force a break from option processing\n
+24 -u (or any invalid option) this message\n
+25 Without KEY or COMMAND, prints all bindings\n
+26 Without COMMAND, prints the binding for KEY.\n
+27 bad key specification -- null string\n
+28 bad key specification -- empty string\n
+29 Bad function-key specification. Null key not allowed\n
+30 bad key specification -- malformed hex number\n
+31 bad key specification -- malformed octal number\n
+32 bad key specification -- malformed decimal number\n
+33 Bad function-key specification.\n
+34 Null key not allowed\n
+35 bad key specification -- unknown name "%S"\n
+36 usage: bind [KEY | COMMAND KEY | "emacs" | "vi" | "-a"]\n
+37 Invalid function
+38 %s\t\tis undefined\n
diff --git a/contrib/tcsh/nls/ukrainian/set21 b/contrib/tcsh/nls/ukrainian/set21
new file mode 100644
index 000000000000..593e0eb7527f
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set21
@@ -0,0 +1,5 @@
+$ $Id: set21,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.disc.c
+$set 21
+1 Couldn't get local chars.\n
+2 Couldn't set local chars.\n
diff --git a/contrib/tcsh/nls/ukrainian/set22 b/contrib/tcsh/nls/ukrainian/set22
new file mode 100644
index 000000000000..0a2626d1908b
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set22
@@ -0,0 +1,17 @@
+$ $Id: set22,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.func.c
+$set 22
+1 %S: \t aliased to
+2 \nIncorrect passwd for %s\n
+3 Faulty alias 'precmd' removed.\n
+4 Faulty alias 'cwdcmd' removed.\n
+5 Faulty alias 'beepcmd' removed.\n
+6 Faulty alias 'periodic' removed.\n
+7 parsing command line\n
+8 Do you really want to delete all files? [n/y]
+9 skipping deletion of files!\n
+10 command line now is:\n
+11 parsing command line\n
+12 in one of the lists\n
+13 command line now is:\n
+14 yY
diff --git a/contrib/tcsh/nls/ukrainian/set23 b/contrib/tcsh/nls/ukrainian/set23
new file mode 100644
index 000000000000..c7ee923097a6
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set23
@@ -0,0 +1,34 @@
+$ $Id: set23,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.os.c
+$set 23
+1 Bad cpu/site name
+2 Site path too long
+3 unknown
+4 site: %s\n
+5 %d: Site not found\n
+6 setlocal: %s: %s\n
+7 Site not found
+8 You're trapped in a universe you never made
+9 Getwarp failed
+10 Invalid warp
+11 Setwarp failed
+12 Illegal universe
+13 Unknown Error: %d
+14 sysname: %s\n
+15 nodename: %s\n
+16 release: %s\n
+17 version: %s\n
+18 machine: %s\n
+19 getwd: Cannot open ".." (%s)
+20 getwd: Cannot chdir to ".." (%s)
+21 getwd: Read error in ".." (%s)
+22 getwd: Cannot change back to "." (%s)
+23 getwd: Cannot stat "/" (%s)
+24 getwd: Cannot stat "." (%s)
+25 getwd: Cannot stat directory "%s" (%s)
+26 getwd: Cannot open directory "%s" (%s)
+27 getwd: Cannot find "." in ".." (%s)
+28 Invalid system type
+29 System type is not set
+30 Too many arguments
+31 Invalid argument
diff --git a/contrib/tcsh/nls/ukrainian/set24 b/contrib/tcsh/nls/ukrainian/set24
new file mode 100644
index 000000000000..d66225ed3776
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set24
@@ -0,0 +1,4 @@
+$ $Id: set24,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.sched.c
+$set 24
+1 kludge
diff --git a/contrib/tcsh/nls/ukrainian/set25 b/contrib/tcsh/nls/ukrainian/set25
new file mode 100644
index 000000000000..5d67f3f9ed7c
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set25
@@ -0,0 +1,6 @@
+$ $Id: set25,v 1.1 2000/11/11 23:03:43 christos Exp $
+$ tc.sig.c
+$set 25
+1 our wait %d\n
+2 error: bsd_signal(%d) signal out of range\n
+3 error: bsd_signal(%d) - sigaction failed, errno %d\n
diff --git a/contrib/tcsh/nls/ukrainian/set26 b/contrib/tcsh/nls/ukrainian/set26
new file mode 100644
index 000000000000..e3cb250271ed
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set26
@@ -0,0 +1,15 @@
+$ $Id: set26,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ tc.who.c
+$set 26
+1 cannot stat %s. Please "unset watch".\n
+2 %s cannot be opened. Please "unset watch".\n
+3 BUG! last element is not whotail!\n
+4 backward:
+5 BUG! first element is not whohead!\n
+6 new: %s/%s\n
+7 %n has %a %l from %m.
+8 %n has %a %l.
+9 logged on
+10 logged off
+11 replaced %s on
+12 local
diff --git a/contrib/tcsh/nls/ukrainian/set27 b/contrib/tcsh/nls/ukrainian/set27
new file mode 100644
index 000000000000..287b12bb6910
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set27
@@ -0,0 +1,8 @@
+$ $Id: set27,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ tw.comp.c
+$set 27
+1 command
+2 separator
+3 pattern
+4 range
+5 completion
diff --git a/contrib/tcsh/nls/ukrainian/set29 b/contrib/tcsh/nls/ukrainian/set29
new file mode 100644
index 000000000000..9bae9079e83b
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set29
@@ -0,0 +1,4 @@
+$ $Id: set29,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ tw.help.c
+$set 29
+1 No help file for %S\n
diff --git a/contrib/tcsh/nls/ukrainian/set3 b/contrib/tcsh/nls/ukrainian/set3
new file mode 100644
index 000000000000..88055f3c537d
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set3
@@ -0,0 +1,117 @@
+$ $Id: set3,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ Editor function descriptions
+$set 3
+1 Move back a character
+2 Delete the character behind cursor
+3 Cut from beginning of current word to cursor - saved in cut buffer
+4 Cut from beginning of line to cursor - save in cut buffer
+5 Move to beginning of current word
+6 Move to beginning of line
+7 Capitalize the characters from cursor to end of current word
+8 Vi change case of character under cursor and advance one character
+9 Vi change to end of line
+10 Clear screen leaving current line on top
+11 Complete current word
+12 Tab forward through files
+13 Tab backward through files
+14 Complete current word ignoring programmable completions
+15 Copy current word to cursor
+16 Copy area between mark and cursor to cut buffer
+17 Expand to preceding word for which this is a prefix
+18 Delete character under cursor
+19 Delete character under cursor or signal end of file on an empty line
+20 Delete character under cursor or list completions if at end of line
+21 Delete character under cursor, list completions or signal end of file
+22 Cut from cursor to end of current word - save in cut buffer
+23 Adds to argument if started or enters digit
+24 Digit that starts argument
+25 Move to next history line
+26 Lowercase the characters from cursor to end of current word
+27 Indicate end of file
+28 Move cursor to end of line
+29 Exchange the cursor and mark
+30 Expand file name wildcards
+31 Expand history escapes
+32 Expand the history escapes in a line
+33 Expand variables
+34 Move forward one character
+35 Move forward to end of current word
+36 Exchange the two characters before the cursor
+37 Search in history backward for line beginning as current
+38 Search in history forward for line beginning as current
+39 Insert last item of previous command
+40 Incremental search forward
+41 Incremental search backward
+42 Clear line
+43 Cut to end of line and save in cut buffer
+44 Cut area between mark and cursor and save in cut buffer
+45 Cut the entire line and save in cut buffer
+46 List choices for completion
+47 List choices for completion overriding programmable completion
+48 List file name wildcard matches
+49 List choices for completion or indicate end of file if empty line
+50 Display load average and current process status
+51 Expand history escapes and insert a space
+52 Execute command
+53 Expand pathnames, eliminating leading .'s and ..'s
+54 Expand commands to the resulting pathname or alias
+55 Switch from insert to overwrite mode or vice versa
+56 Add 8th bit to next character typed
+57 Add the next character typed to the line verbatim
+58 Redisplay everything
+59 Restart stopped editor
+60 Look for help on current command
+61 This character is added to the line
+62 This character is the first in a character sequence
+63 Set the mark at cursor
+64 Correct the spelling of current word
+65 Correct the spelling of entire line
+66 Send character to tty in cooked mode
+67 Toggle between literal and lexical current history line
+68 Exchange the character to the left of the cursor with the one under
+69 Exchange the two characters before the cursor
+70 Tty delayed suspend character
+71 Tty flush output character
+72 Tty interrupt character
+73 Tty quit character
+74 Tty suspend character
+75 Tty allow output character
+76 Tty disallow output character
+77 Indicates unbound character
+78 Emacs universal argument (argument times 4)
+79 Move to previous history line
+80 Uppercase the characters from cursor to end of current word
+81 Vi goto the beginning of next word
+82 Vi enter insert mode after the cursor
+83 Vi enter insert mode at end of line
+84 Vi change case of character under cursor and advance one character
+85 Vi change prefix command
+86 Vi change to end of line
+87 Enter vi command mode (use alternative key bindings)
+88 Vi command mode complete current word
+89 Vi move to previous character (backspace)
+90 Vi delete prefix command
+91 Vi move to the end of the current space delimited word
+92 Vi move to the end of the current word
+93 Vi move to the character specified backward
+94 Vi move to the character specified forward
+95 Vi move up to the character specified backward
+96 Vi move up to the character specified forward
+97 Enter vi insert mode
+98 Enter vi insert mode at beginning of line
+99 Vi repeat current character search in the same search direction
+100 Vi repeat current character search in the opposite search direction
+101 Vi repeat current search in the same search direction
+102 Vi repeat current search in the opposite search direction
+103 Vi replace character under the cursor with the next character typed
+104 Vi replace mode
+105 Vi search history backward
+106 Vi search history forward
+107 Vi replace character under the cursor and enter insert mode
+108 Vi replace entire line
+109 Vi move to the previous word
+110 Vi move to the next word
+111 Vi undo last change
+112 Vi goto the beginning of line
+113 Perform which of current command
+114 Paste cut buffer at cursor position
diff --git a/contrib/tcsh/nls/ukrainian/set30 b/contrib/tcsh/nls/ukrainian/set30
new file mode 100644
index 000000000000..bdb0c880ee50
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set30
@@ -0,0 +1,16 @@
+$ $Id: set30,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ tw.parse.c
+$set 30
+1 starting_a_command %d\n
+2 complete %d
+3 complete %d %S\n
+4 %s: Internal match error.\n
+5 items
+6 rows
+7 There are %d %s, list them anyway? [n/y]
+8 looking = %d\n
+9 \nвнутр╕шня помилка tcsh: I don't know what I'm looking for!\n
+10 не каталог
+11 не знайдено
+12 unreadable
+13 yY
diff --git a/contrib/tcsh/nls/ukrainian/set31 b/contrib/tcsh/nls/ukrainian/set31
new file mode 100644
index 000000000000..c50777b71936
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set31
@@ -0,0 +1,7 @@
+$ $Id: set31,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ vms.termcap.c
+$set 31
+1 Can't open TERMCAP: [%s]\n
+2 Can't open %s.\n
+3 Found %s in %s.\n
+4 No match found for %s in file %s\n
diff --git a/contrib/tcsh/nls/ukrainian/set4 b/contrib/tcsh/nls/ukrainian/set4
new file mode 100644
index 000000000000..f758f6738acd
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set4
@@ -0,0 +1,45 @@
+$ $Id: set4,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ Termcap strings
+$set 4
+1 add new blank line
+2 audible bell
+3 clear to bottom
+4 clear to end of line
+5 cursor to horiz pos
+6 clear screen
+7 delete a character
+8 delete a line
+9 start delete mode
+10 end delete mode
+11 end insert mode
+12 cursor from status line
+13 home cursor
+14 insert character
+15 start insert mode
+16 insert padding
+17 sends cursor down
+18 sends cursor left
+19 sends cursor right
+20 sends cursor up
+21 begin bold
+22 end attributes
+23 non destructive space
+24 end standout
+25 begin standout
+26 cursor to status line
+27 cursor up one
+28 begin underline
+29 end underline
+30 visible bell
+31 delete multiple chars
+32 cursor down multiple
+33 insert multiple chars
+34 cursor left multiple
+35 cursor right multiple
+36 cursor up multiple
+37 Has automatic margins
+38 Can use physical tabs
+39 Number of lines
+40 Number of columns
+41 Has meta key
+42 Newline ignored at right margin
diff --git a/contrib/tcsh/nls/ukrainian/set5 b/contrib/tcsh/nls/ukrainian/set5
new file mode 100644
index 000000000000..ce186b78fdba
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set5
@@ -0,0 +1,4 @@
+$ $Id: set5,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ ed.chared.c
+$set 5
+1 Load average unavailable\n
diff --git a/contrib/tcsh/nls/ukrainian/set6 b/contrib/tcsh/nls/ukrainian/set6
new file mode 100644
index 000000000000..fb19a93a6414
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set6
@@ -0,0 +1,11 @@
+$ $Id: set6,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ ed.inputl.c
+$set 6
+1 ERROR: illegal command from key 0%o\r\n
+2 yes\n
+3 edit\n
+4 abort\n
+5 no\n
+6 No matching command\n
+7 Ambiguous command\n
+8 *** editor fatal ERROR ***\r\n\n
diff --git a/contrib/tcsh/nls/ukrainian/set7 b/contrib/tcsh/nls/ukrainian/set7
new file mode 100644
index 000000000000..fd28aea207f5
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set7
@@ -0,0 +1,30 @@
+$ $Id: set7,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ ed.screen.c
+$set 7
+1 \n\tTcsh thinks your terminal has the\n
+2 \tfollowing characteristics:\n\n
+3 \tIt has %d columns and %d lines\n
+4 \tIt has %s meta key\n
+5 a
+6 no
+7 \tIt can%s use tabs\n
+8 not
+9 \tIt %s automatic margins\n
+10 has
+11 does not have
+12 \tIt %s magic margins\n
+13 (empty)
+14 yes
+15 no
+16 ERROR: cannot delete\r\n
+17 DeleteChars: num is riduculous: %d\r\n
+18 ERROR: cannot insert\r\n
+19 StartInsert: num is riduculous: %d\r\n
+20 %s: Cannot open /etc/termcap.\n
+21 %s: No entry for terminal type "%s"\n
+22 %s: використання настройок тупого терм╕налу.\n
+23 %s: WARNING: Your terminal cannot move up.\n
+24 Editing may be odd for long lines.\n
+25 no clear EOL capability.\n
+26 no delete char capability.\n
+27 no insert char capability.\n
diff --git a/contrib/tcsh/nls/ukrainian/set8 b/contrib/tcsh/nls/ukrainian/set8
new file mode 100644
index 000000000000..dafcf894b1cf
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set8
@@ -0,0 +1,5 @@
+$ $Id: set8,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ ed.term.c
+$set 8
+1 Unknown switch
+2 Invalid argument
diff --git a/contrib/tcsh/nls/ukrainian/set9 b/contrib/tcsh/nls/ukrainian/set9
new file mode 100644
index 000000000000..ccae7f3f66c6
--- /dev/null
+++ b/contrib/tcsh/nls/ukrainian/set9
@@ -0,0 +1,12 @@
+$ $Id: set9,v 1.1 2000/11/11 23:03:44 christos Exp $
+$ ed.xmap.c
+$set 9
+1 AddXkey: Null extended-key not allowed.\n
+2 AddXkey: sequence-lead-in command not allowed\n
+3 DeleteXkey: Null extended-key not allowed.\n
+4 Unbound extended key "%S"\n
+5 Some extended keys too long for internal print buffer
+6 Enumerate: BUG!! Null ptr passed\n!
+7 no input
+8 Something must follow: %c\n
+9 Octal constant does not fit in a char.\n
diff --git a/contrib/tcsh/patchlevel.h b/contrib/tcsh/patchlevel.h
index 98fba2ba9529..aca35375b0ac 100644
--- a/contrib/tcsh/patchlevel.h
+++ b/contrib/tcsh/patchlevel.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/patchlevel.h,v 3.122 2000/01/14 22:57:26 christos Exp $ */
+/* $Header: /src/pub/tcsh/patchlevel.h,v 3.126 2000/11/19 20:50:43 christos Exp $ */
/*
* patchlevel.h: Our life story.
*/
@@ -7,8 +7,8 @@
#define ORIGIN "Astron"
#define REV 6
-#define VERS 9
-#define PATCHLEVEL 1
-#define DATE "2000-01-14"
+#define VERS 10
+#define PATCHLEVEL 0
+#define DATE "2000-11-19"
#endif /* _h_patchlevel */
diff --git a/contrib/tcsh/sh.c b/contrib/tcsh/sh.c
index 4c034cbf4dc4..088d31099452 100644
--- a/contrib/tcsh/sh.c
+++ b/contrib/tcsh/sh.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.c,v 3.90 2000/01/14 22:57:27 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.c,v 3.92 2000/11/11 23:03:35 christos Exp $ */
/*
* sh.c: Main shell routines
*/
@@ -43,7 +43,7 @@ char copyright[] =
All rights reserved.\n";
#endif /* not lint */
-RCSID("$Id: sh.c,v 3.90 2000/01/14 22:57:27 christos Exp $")
+RCSID("$Id: sh.c,v 3.92 2000/11/11 23:03:35 christos Exp $")
#include "tc.h"
#include "ed.h"
@@ -86,9 +86,9 @@ extern bool NoNLSRebind;
jmp_buf_t reslab INIT_ZERO_STRUCT;
static const char tcshstr[] = "tcsh";
-#ifdef WINNT
+#ifdef WINNT_NATIVE
static const char tcshstr_nt[] = "tcsh.exe";
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
signalfun_t parintr = 0; /* Parents interrupt catch */
signalfun_t parterm = 0; /* Parents terminate catch */
@@ -124,6 +124,7 @@ time_t t_period;
Char *ffile = NULL;
bool dolzero = 0;
int insource = 0;
+int exitset = 0;
static time_t chktim; /* Time mail last checked */
char *progname;
int tcsh;
@@ -190,9 +191,9 @@ main(argc, argv)
sigvec_t osv;
#endif /* BSDSIGS */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_init();
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#if defined(NLS_CATALOGS) && defined(LC_MESSAGES)
(void) setlocale(LC_MESSAGES, "");
#endif /* NLS_CATALOGS && LC_MESSAGES */
@@ -248,13 +249,13 @@ main(argc, argv)
char *t;
t = strrchr(argv[0], '/');
-#ifdef WINNT
+#ifdef WINNT_NATIVE
{
char *s = strrchr(argv[0], '\\');
if (s)
t = s;
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
t = t ? t + 1 : argv[0];
if (*t == '-') t++;
progname = strsave((t && *t) ? t : tcshstr); /* never want a null */
@@ -708,16 +709,16 @@ main(argc, argv)
#endif /* COLOR_LS_F */
doldol = putn((int) getpid()); /* For $$ */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
{
char *strtmp1, strtmp2[MAXPATHLEN];
if ((strtmp1 = getenv("TMP")) != NULL)
wsprintf(strtmp2, "%s/%s", strtmp1, "sh");
shtemp = Strspl(SAVE(strtmp2), doldol); /* For << */
}
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
shtemp = Strspl(STRtmpsh, doldol); /* For << */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* Record the interrupt states from the parent process. If the parent is
@@ -760,6 +761,24 @@ main(argc, argv)
#endif /* TCF */
/*
+ * dspkanji/dspmbyte autosetting
+ */
+ /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */
+#if defined(DSPMBYTE)
+#if defined(NLS) && defined(LC_CTYPE)
+ if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL) && !adrof(CHECK_MBYTEVAR)) {
+#else
+ if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR)) {
+#endif
+ autoset_dspmbyte(str2short(tcp));
+ }
+#if defined(WINNT_NATIVE)
+ else if (!adrof(CHECK_MBYTEVAR))
+ nt_autoset_dspmbyte();
+#endif /* WINNT_NATIVE */
+#endif
+
+ /*
* Process the arguments.
*
* Note that processing of -v/-x is actually delayed till after script
@@ -1211,6 +1230,7 @@ main(argc, argv)
* start-up scripts.
*/
reenter = setexit(); /* PWP */
+ exitset++;
haderr = 0; /* In case second time through */
if (!fast && reenter == 0) {
/* Will have varval(STRhome) here because set fast if don't */
@@ -1282,20 +1302,6 @@ main(argc, argv)
}
/*
- * dspkanji/dspmbyte autosetting
- */
- /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */
-#if defined(DSPMBYTE)
- if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR)) {
- autoset_dspmbyte(str2short(tcp));
- }
-#if defined(WINNT)
- else if (!adrof(CHECK_MBYTEVAR))
- nt_autoset_dspmbyte();
-#endif /* WINNT */
-#endif
-
- /*
* Now are ready for the -v and -x flags
*/
if (nverbose)
@@ -1376,10 +1382,10 @@ importpath(cp)
else
break;
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
else if (*dp == '\\')
*dp = '/';
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
dp++;
}
pv[i] = 0;
@@ -1400,13 +1406,13 @@ srccat(cp, dp)
char *ptr;
int rv;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
ep = cp;
while(*ep)
ep++;
if (ep[-1] == '/' && dp[0] == '/') /* silly win95 */
dp++;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
ep = Strspl(cp, dp);
ptr = short2str(ep);
@@ -1850,9 +1856,9 @@ pintr1(wantnl)
(void) sigrelse(SIGCHLD);
#endif
drainoline();
-#if !defined(_VMS_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(WINNT_NATIVE)
(void) endpwent();
-#endif /* !_VMS_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !WINNT_NATIVE */
/*
* If we have an active "onintr" then we search for the label. Note that if
@@ -1998,7 +2004,7 @@ process(catch)
* read fresh stuff. Otherwise, we are rereading input and don't
* need or want to prompt.
*/
- if (fseekp == feobp && aret == F_SEEK)
+ if (fseekp == feobp && aret == TCSH_F_SEEK)
printprompt(0, NULL);
flush();
setalarm(1);
@@ -2373,9 +2379,9 @@ xexit(i)
if (child == 0)
(void) catclose(catd);
#endif /* NLS_CATALOGS */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_cleanup();
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
_exit(i);
}
diff --git a/contrib/tcsh/sh.char.c b/contrib/tcsh/sh.char.c
index b3cfaf1e9fdb..fe32777f32dc 100644
--- a/contrib/tcsh/sh.char.c
+++ b/contrib/tcsh/sh.char.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.char.c,v 3.12 1998/09/18 16:09:06 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.char.c,v 3.13 2000/06/11 02:14:13 kim Exp $ */
/*
* sh.char.c: Character classification tables
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.char.c,v 3.12 1998/09/18 16:09:06 christos Exp $")
+RCSID("$Id: sh.char.c,v 3.13 2000/06/11 02:14:13 kim Exp $")
#include "sh.char.h"
@@ -1204,3 +1204,78 @@ unsigned short _toebcdic[256] = {
};
#endif /*_OSD_POSIX*/
+
+#ifdef __MVS__
+/*
+ The IBM 1047 coded char set to/from ISO 8859-1 mapping differs from
+ the POSIX-BC mapping in several places
+ */
+unsigned short _toascii[256] = {
+ 0x00, 0x01, 0x02, 0x03, 0x9c, 0x09, 0x86, 0x7f,
+ 0x97, 0x8d, 0x8e, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x9d, 0x0a, 0x08, 0x87,
+ 0x18, 0x19, 0x92, 0x8f, 0x1c, 0x1d, 0x1e, 0x1f,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1b,
+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x05, 0x06, 0x07,
+ 0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04,
+ 0x98, 0x99, 0x9a, 0x9b, 0x14, 0x15, 0x9e, 0x1a,
+ 0x20, 0xa0, 0xe2, 0xe4, 0xe0, 0xe1, 0xe3, 0xe5,
+ 0xe7, 0xf1, 0xa2, 0x2e, 0x3c, 0x28, 0x2b, 0x7c,
+ 0x26, 0xe9, 0xea, 0xeb, 0xe8, 0xed, 0xee, 0xef,
+ 0xec, 0xdf, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x5e,
+ 0x2d, 0x2f, 0xc2, 0xc4, 0xc0, 0xc1, 0xc3, 0xc5,
+ 0xc7, 0xd1, 0xa6, 0x2c, 0x25, 0x5f, 0x3e, 0x3f,
+ 0xf8, 0xc9, 0xca, 0xcb, 0xc8, 0xcd, 0xce, 0xcf,
+ 0xcc, 0x60, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22,
+ 0xd8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0xab, 0xbb, 0xf0, 0xfd, 0xfe, 0xb1,
+ 0xb0, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
+ 0x71, 0x72, 0xaa, 0xba, 0xe6, 0xb8, 0xc6, 0xa4,
+ 0xb5, 0x7e, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
+ 0x79, 0x7a, 0xa1, 0xbf, 0xd0, 0x5b, 0xde, 0xae,
+ 0xac, 0xa3, 0xa5, 0xb7, 0xa9, 0xa7, 0xb6, 0xbc,
+ 0xbd, 0xbe, 0xdd, 0xa8, 0xaf, 0x5d, 0xb4, 0xd7,
+ 0x7b, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+ 0x48, 0x49, 0xad, 0xf4, 0xf6, 0xf2, 0xf3, 0xf5,
+ 0x7d, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
+ 0x51, 0x52, 0xb9, 0xfb, 0xfc, 0xf9, 0xfa, 0xff,
+ 0x5c, 0xf7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
+ 0x59, 0x5a, 0xb2, 0xd4, 0xd6, 0xd2, 0xd3, 0xd5,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0xb3, 0xdb, 0xdc, 0xd9, 0xda, 0x9f,
+};
+unsigned short _toebcdic[256] = {
+ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f,
+ 0x16, 0x05, 0x15, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26,
+ 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f,
+ 0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d,
+ 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61,
+ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
+ 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f,
+ 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,
+ 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6,
+ 0xe7, 0xe8, 0xe9, 0xad, 0xe0, 0xbd, 0x5f, 0x6d,
+ 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
+ 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
+ 0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x07,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x06, 0x17,
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b,
+ 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08,
+ 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff,
+ 0x41, 0xaa, 0x4a, 0xb1, 0x9f, 0xb2, 0x6a, 0xb5,
+ 0xbb, 0xb4, 0x9a, 0x8a, 0xb0, 0xca, 0xaf, 0xbc,
+ 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3,
+ 0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab,
+ 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68,
+ 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77,
+ 0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf,
+ 0x80, 0xfd, 0xfe, 0xfb, 0xfc, 0xba, 0xae, 0x59,
+ 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48,
+ 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57,
+ 0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1,
+ 0x70, 0xdd, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf
+};
+#endif /*__MVS__*/
diff --git a/contrib/tcsh/sh.char.h b/contrib/tcsh/sh.char.h
index 63c127c4e515..d5286d4f23de 100644
--- a/contrib/tcsh/sh.char.h
+++ b/contrib/tcsh/sh.char.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.char.h,v 3.15 1998/09/18 16:09:07 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.char.h,v 3.17 2000/11/11 23:03:35 christos Exp $ */
/*
* sh.char.h: Table for spotting special characters quickly
* Makes for very obscure but efficient coding.
@@ -86,34 +86,35 @@ extern tcshuc _cmap_lower[], _cmap_upper[];
#define _PUN 0x8000 /* punctuation */
#if defined(SHORT_STRINGS) && defined(KANJI)
-#define ASC(ch) ch
-#define CTL_ESC(ch) ch
-#define cmap(c, bits) \
+# define ASC(ch) ch
+# define CTL_ESC(ch) ch
+# define cmap(c, bits) \
((((c) & QUOTE) || ((c & 0x80) && adrof(STRnokanji))) ? \
0 : (_cmap[(tcshuc)(c)] & (bits)))
-#else
-#ifndef _OSD_POSIX
-#define ASC(ch) ch
-#define CTL_ESC(ch) ch
-#define cmap(c, bits) \
+#else /* SHORT_STRINGS && KANJI */
+# ifdef IS_ASCII
+# define ASC(ch) ch
+# define CTL_ESC(ch) ch
+# define cmap(c, bits) \
(((c) & QUOTE) ? 0 : (_cmap[(tcshuc)(c)] & (bits)))
-#else /*_OSD_POSIX*/
+# else /* IS_ASCII */
/* "BS2000 OSD" is a POSIX on a main frame using a EBCDIC char set */
+/* "OS/390 USS" is a POSIX on a main frame using an IBM1047 char set */
extern unsigned short _toascii[256];
extern unsigned short _toebcdic[256];
/* mainly for comparisons if (ASC(ch)=='\177')... */
-#define ASC(ch) _toascii[(tcshuc)ch]
+# define ASC(ch) _toascii[(tcshuc)ch]
/* Literal escapes ('\010') must be mapped to EBCDIC,
* for C-Escapes ('\b'), the compiler already does it.
*/
-#define CTL_ESC(ch) _toebcdic[(tcshuc)ch]
+# define CTL_ESC(ch) _toebcdic[(tcshuc)ch]
-#define cmap(c, bits) \
+# define cmap(c, bits) \
(((c) & QUOTE) ? 0 : (_cmap[_toascii[(tcshuc)(c)]] & (bits)))
-#endif /*_OSD_POSIX*/
-#endif
+# endif /* IS_ASCII */
+#endif /* SHORT_STRINGS && KANJI */
#define isglob(c) cmap(c, _GLOB)
#define isspc(c) cmap(c, _SP)
@@ -150,7 +151,7 @@ extern unsigned short _toebcdic[256];
#endif /* !defined(DSPMBYTE) */
# define Ispunct(c) (((Char)(c) & QUOTE) ? 0 : NXIsPunct((unsigned) (c)))
# else /* !NeXT */
-# ifndef WINNT
+# ifndef WINNT_NATIVE
# define Isspace(c) (((Char)(c) & QUOTE) ? 0 : isspace((tcshuc) (c)))
# define Isdigit(c) (((Char)(c) & QUOTE) ? 0 : isdigit((tcshuc) (c)))
# define Isalpha(c) (((Char)(c) & QUOTE) ? 0 : isalpha((tcshuc) (c)))
@@ -191,7 +192,7 @@ extern unsigned short _toebcdic[256];
# define Isprint(c) ( (IsprintM(c)) || (_enable_mbdisp&&(IsmbyteU((c)))) )
#endif /* !defined(DSPMBYTE) */
# define Ispunct(c) (((Char)(c) & QUOTE) ? 0 : ispunct((tcshuc) (c)))
-# else /* WINNT */
+# else /* WINNT_NATIVE */
# define Isspace(c) (((Char)(c) & QUOTE) ? 0 : isspace( oem_it((tcshuc)(c))))
# define Isdigit(c) (((Char)(c) & QUOTE) ? 0 : isdigit( oem_it((tcshuc)(c))))
# define Isalpha(c) (((Char)(c) & QUOTE) ? 0 : isalpha( oem_it((tcshuc)(c))))
@@ -211,7 +212,7 @@ extern unsigned short _toebcdic[256];
# define Iscntrl(c) (((Char)(c) & QUOTE) ? 0 : iscntrl( oem_it((tcshuc)(c))))
# define Isprint(c) (((Char)(c) & QUOTE) ? 0 : isprint( oem_it((tcshuc)(c))))
#endif /* !defined(DSPMBYTE) */
-# endif /* WINNT */
+# endif /* WINNT_NATIVE */
# endif /* !NeXT */
#else /* !NLS */
# define Isspace(c) cmap(c, _SP|_NL)
@@ -219,14 +220,14 @@ extern unsigned short _toebcdic[256];
# define Isalpha(c) (cmap(c,_LET) && !(((c) & META) && AsciiOnly))
# define Islower(c) (cmap(c,_DOW) && !(((c) & META) && AsciiOnly))
# define Isupper(c) (cmap(c, _UP) && !(((c) & META) && AsciiOnly))
-#ifndef _OSD_POSIX
-# define Tolower(c) (_cmap_lower[(tcshuc)(c)])
-# define Toupper(c) (_cmap_upper[(tcshuc)(c)])
-#else /*_OSD_POSIX*/
+# ifdef IS_ASCII
+# define Tolower(c) (_cmap_lower[(tcshuc)(c)])
+# define Toupper(c) (_cmap_upper[(tcshuc)(c)])
+# else
/* "BS2000 OSD" is a POSIX on a main frame using a EBCDIC char set */
-# define Tolower(c) (_cmap_lower[_toascii[(tcshuc)(c)]])
-# define Toupper(c) (_cmap_upper[_toascii[(tcshuc)(c)]])
-#endif /*_OSD_POSIX*/
+# define Tolower(c) (_cmap_lower[_toascii[(tcshuc)(c)]])
+# define Toupper(c) (_cmap_upper[_toascii[(tcshuc)(c)]])
+# endif
# define Isxdigit(c) cmap(c, _XD)
# define Isalnum(c) (cmap(c, _DIG|_LET) && !(((Char)(c) & META) && AsciiOnly))
#if defined(DSPMBYTE)
diff --git a/contrib/tcsh/sh.dir.c b/contrib/tcsh/sh.dir.c
index d6e90ed66cff..2b6fe041c66d 100644
--- a/contrib/tcsh/sh.dir.c
+++ b/contrib/tcsh/sh.dir.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.dir.c,v 3.52 1998/10/25 15:10:03 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.dir.c,v 3.54 2000/11/11 23:03:36 christos Exp $ */
/*
* sh.dir.c: Directory manipulation functions
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.dir.c,v 3.52 1998/10/25 15:10:03 christos Exp $")
+RCSID("$Id: sh.dir.c,v 3.54 2000/11/11 23:03:36 christos Exp $")
/*
* C Shell - directory management
@@ -513,11 +513,11 @@ dgoto(cp)
else
dp = cp;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
cp = SAVE(getcwd(NULL, 0));
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
cp = dcanon(cp, dp);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
return cp;
}
@@ -1268,7 +1268,8 @@ getstakd(s, cnt)
return (0);
}
}
- (void) Strcpy(s, dp->di_name);
+ (void) Strncpy(s, dp->di_name, BUFSIZE);
+ s[BUFSIZE - 1] = '\0';
return (1);
}
diff --git a/contrib/tcsh/sh.dol.c b/contrib/tcsh/sh.dol.c
index 4f1e9bd6b98b..5d13270c7356 100644
--- a/contrib/tcsh/sh.dol.c
+++ b/contrib/tcsh/sh.dol.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.dol.c,v 3.42 2000/10/31 16:55:52 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.dol.c,v 3.45 2000/11/19 20:50:43 christos Exp $ */
/*
* sh.dol.c: Variable substitutions
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.dol.c,v 3.42 2000/10/31 16:55:52 christos Exp $")
+RCSID("$Id: sh.dol.c,v 3.45 2000/11/19 20:50:43 christos Exp $")
/*
* C shell
@@ -1025,9 +1025,11 @@ heredoc(term)
Char **vp;
bool quoted;
char *tmp;
+#ifndef WINNT_NATIVE
struct timeval tv;
again:
+#endif /* WINNT_NATIVE */
tmp = short2str(shtemp);
#ifndef O_CREAT
# define O_CREAT 0
@@ -1043,14 +1045,16 @@ again:
#endif
if (open(tmp, O_RDWR|O_CREAT|O_EXCL|O_TEMPORARY) == -1) {
int oerrno = errno;
+#ifndef WINNT_NATIVE
if (errno == EEXIST) {
if (unlink(tmp) == -1) {
(void) gettimeofday(&tv, NULL);
shtemp = Strspl(STRtmpsh, putn((((int)tv.tv_sec) ^
- ((int)tv.tv_usec) ^ ((int)doldol)) & 0x00ffffff));
+ ((int)tv.tv_usec) ^ ((int)getpid())) & 0x00ffffff));
}
goto again;
}
+#endif /* WINNT_NATIVE */
(void) unlink(tmp);
errno = oerrno;
stderror(ERR_SYSTEM, tmp, strerror(errno));
@@ -1065,9 +1069,9 @@ again:
ocnt = BUFSIZE;
obp = obuf;
inheredoc = 1;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
__dup_stdin = 1;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
for (;;) {
/*
* Read up a line
diff --git a/contrib/tcsh/sh.err.c b/contrib/tcsh/sh.err.c
index b53fe7e56b9a..f6ec6d59bde4 100644
--- a/contrib/tcsh/sh.err.c
+++ b/contrib/tcsh/sh.err.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.err.c,v 3.34 1999/05/11 13:07:45 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.err.c,v 3.35 2000/11/11 23:03:36 christos Exp $ */
/*
* sh.err.c: Error printing routines.
*/
@@ -37,7 +37,7 @@
#define _h_sh_err /* Don't redefine the errors */
#include "sh.h"
-RCSID("$Id: sh.err.c,v 3.34 1999/05/11 13:07:45 christos Exp $")
+RCSID("$Id: sh.err.c,v 3.35 2000/11/11 23:03:36 christos Exp $")
/*
* C Shell
@@ -504,7 +504,7 @@ stderror(va_alist)
/*
* Go away if -e or we are a child shell
*/
- if (exiterr || child)
+ if (!exitset || exiterr || child)
xexit(1);
/*
diff --git a/contrib/tcsh/sh.exec.c b/contrib/tcsh/sh.exec.c
index 1751cf95fb13..1808c6b3b2a2 100644
--- a/contrib/tcsh/sh.exec.c
+++ b/contrib/tcsh/sh.exec.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.exec.c,v 3.48 2000/01/14 22:57:27 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.exec.c,v 3.51 2000/11/11 23:03:36 christos Exp $ */
/*
* sh.exec.c: Search, find, and execute a command!
*/
@@ -36,13 +36,13 @@
*/
#include "sh.h"
-RCSID("$Id: sh.exec.c,v 3.48 2000/01/14 22:57:27 christos Exp $")
+RCSID("$Id: sh.exec.c,v 3.51 2000/11/11 23:03:36 christos Exp $")
#include "tc.h"
#include "tw.h"
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#include <nt.const.h>
-#endif /*WINNT*/
+#endif /*WINNT_NATIVE*/
/*
* C shell
@@ -147,7 +147,7 @@ static Char *justabs[] = {STRNULL, 0};
static void pexerr __P((void));
static void texec __P((Char *, Char **));
-static int hashname __P((Char *));
+int hashname __P((Char *));
static int iscommand __P((Char *));
void
@@ -431,9 +431,9 @@ texec(sf, st)
switch (errno) {
case ENOEXEC:
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_feed_to_cmd(f,t);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* From: casper@fwi.uva.nl (Casper H.S. Dik) If we could not execute
* it, don't feed it to the shell if it looks like a binary!
@@ -617,9 +617,9 @@ execash(t, kp)
* Decrement the shell level
*/
shlvl(-1);
-#ifdef WINNT
+#ifdef WINNT_NATIVE
__nt_really_exec=1;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
doexec(kp);
}
@@ -673,10 +673,10 @@ dohash(vv, c)
struct varent *v = adrof(STRpath);
Char **pv;
int hashval;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
int is_windir; /* check if it is the windows directory */
USE(hashval);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
USE(c);
#ifdef FASTHASH
@@ -697,6 +697,8 @@ dohash(vv, c)
hashwidth = uhashwidth;
else {
hashwidth = 0;
+ if (v == NULL)
+ return;
for (pv = v->vec; *pv; pv++, hashwidth++)
continue;
if (hashwidth <= widthof(unsigned char))
@@ -738,9 +740,9 @@ dohash(vv, c)
continue;
}
#endif
-#ifdef WINNT
+#ifdef WINNT_NATIVE
is_windir = nt_check_if_windir(short2str(*pv));
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
while ((dp = readdir(dirp)) != NULL) {
if (dp->d_ino == 0)
continue;
@@ -748,10 +750,10 @@ dohash(vv, c)
(dp->d_name[1] == '\0' ||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
continue;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_check_name_and_hash(is_windir, dp->d_name, i);
-#else /* !WINNT */
-#if defined(_UWIN) /* XXX: Add cygwin too */
+#else /* !WINNT_NATIVE*/
+#if defined(_UWIN) || defined(__CYGWIN__)
/* Turn foo.{exe,com,bat} into foo since UWIN's readdir returns
* the file with the .exe, .com, .bat extension
*/
@@ -762,7 +764,7 @@ dohash(vv, c)
strcmp(&dp->d_name[ext], ".com") == 0))
dp->d_name[ext] = '\0';
}
-#endif /* _UWIN */
+#endif /* _UWIN || __CYGWIN__ */
# ifdef FASTHASH
hashval = hashname(str2short(dp->d_name));
bis(hashval, i);
@@ -774,7 +776,7 @@ dohash(vv, c)
bis(xhash, hashval);
# endif /* FASTHASH */
/* tw_add_comm_name (dp->d_name); */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
}
(void) closedir(dirp);
}
@@ -823,7 +825,7 @@ hashstat(v, c)
/*
* Hash a command name.
*/
-static int
+int
hashname(cp)
register Char *cp;
{
@@ -893,6 +895,7 @@ cont:
* Thanks again!!
*/
+#ifndef WINNT_NATIVE
/*
* executable() examines the pathname obtained by concatenating dir and name
* (dir may be NULL), and returns 1 either if it is executable by us, or
@@ -907,37 +910,11 @@ executable(dir, name, dir_ok)
struct stat stbuf;
Char path[MAXPATHLEN + 1];
char *strname;
-#ifdef WINNT
- int nt_exetype;
-#endif /* WINNT */
(void) memset(path, 0, sizeof(path));
if (dir && *dir) {
copyn(path, dir, MAXPATHLEN);
catn(path, name, MAXPATHLEN);
-#ifdef WINNT
- {
- char *ptr = short2str(path);
- char *p2 = ptr;
- int has_ext = 0;
-
- while (*ptr++)
- continue;
- --ptr;
-
- while(ptr > p2) {
- if (*ptr == '/')
- break;
- if (*ptr == '.') {
- has_ext = 1;
- break;
- }
- ptr--;
- }
- if (!has_ext && (stat(p2, &stbuf) == -1))
- catn(path, STRdotEXE, MAXPATHLEN);
- }
-#endif /* WINNT */
strname = short2str(path);
}
else
@@ -947,15 +924,11 @@ executable(dir, name, dir_ok)
((dir_ok && S_ISDIR(stbuf.st_mode)) ||
(S_ISREG(stbuf.st_mode) &&
/* save time by not calling access() in the hopeless case */
-#ifdef WINNT
- (GetBinaryType(strname,&nt_exetype) ||
- (stbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)))
-#else /* !WINNT */
(stbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)) &&
access(strname, X_OK) == 0
-#endif /* WINNT */
)));
}
+#endif /*!WINNT_NATIVE*/
int
tellmewhat(lexp, str)
@@ -1017,7 +990,7 @@ tellmewhat(lexp, str)
return TRUE;
}
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++) {
if (eq(sp->word, str2short(bptr->bname))) {
if (str == NULL) {
@@ -1033,7 +1006,7 @@ tellmewhat(lexp, str)
return TRUE;
}
}
-#endif /* WINNT*/
+#endif /* WINNT_NATIVE*/
sp->word = cmd = globone(sp->word, G_IGNORE);
@@ -1148,7 +1121,7 @@ find_cmd(cmd, prt)
return rval;
}
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++) {
if (eq(cmd, str2short(bptr->bname))) {
rval = 1;
@@ -1158,7 +1131,7 @@ find_cmd(cmd, prt)
return rval;
}
}
-#endif /* WINNT*/
+#endif /* WINNT_NATIVE*/
/* last, look through the path for the command */
@@ -1200,54 +1173,7 @@ find_cmd(cmd, prt)
xfree((ptr_t) sv);
return rval;
}
-
-#ifdef WINNT
-int
-nt_check_if_windir(path)
- char *path;
-{
- char windir[MAX_PATH];
-
- (void)GetWindowsDirectory(windir, sizeof(windir));
- windir[2] = '/';
-
- return (strstr(path, windir) != NULL);
-}
-
-void
-nt_check_name_and_hash(is_windir, file, i)
- int is_windir;
- char *file;
- int i;
-{
- char name_only[MAX_PATH];
- char *tmp = (char *)strrchr(file, '.');
- char uptmp[5], *nameptr, *np2;
- int icount, hashval;
-
- if(!tmp || tmp[4])
- goto nodot;
-
- for (icount = 0; icount < 4; icount++)
- uptmp[icount] = toupper(tmp[icount]);
- uptmp[4]=0;
-
- if (is_windir)
- if((uptmp[1] != 'E') || (uptmp[2] != 'X') || (uptmp[3] != 'E'))
- return;
- (void) memset(name_only, 0, MAX_PATH);
- nameptr = file;
- np2 = name_only;
- while(nameptr != tmp) {
- *np2++= tolower(*nameptr);
- nameptr++;
- }
- hashval = hashname(str2short(name_only));
- bis(hashval, i);
-nodot:
- hashval = hashname(str2short(file));
- bis(hashval, i);
-}
+#ifdef WINNT_NATIVE
int hashval_extern(cp)
Char *cp;
{
@@ -1259,4 +1185,11 @@ int bit_extern(val,i)
{
return bit(val,i);
}
-#endif /* WINNT */
+void bis_extern(val,i)
+ int val;
+ int i;
+{
+ bis(val,i);
+}
+#endif /* WINNT_NATIVE */
+
diff --git a/contrib/tcsh/sh.file.c b/contrib/tcsh/sh.file.c
index 28646f1dc018..5b8d7bac79bd 100644
--- a/contrib/tcsh/sh.file.c
+++ b/contrib/tcsh/sh.file.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.file.c,v 3.15 1997/10/02 16:36:29 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.file.c,v 3.16 2000/06/11 02:14:14 kim Exp $ */
/*
* sh.file.c: File completion for csh. This file is not used in tcsh.
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.file.c,v 3.15 1997/10/02 16:36:29 christos Exp $")
+RCSID("$Id: sh.file.c,v 3.16 2000/06/11 02:14:14 kim Exp $")
#ifdef FILEC
@@ -456,14 +456,14 @@ static void
beep()
{
if (adrof(STRnobeep) == 0)
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
(void) write(SHOUT, "\007", 1);
-#else /*_OSD_POSIX*/
+#else
{
unsigned char beep_ch = CTL_ESC('\007');
(void) write(SHOUT, &beep_ch, 1);
}
-#endif /*_OSD_POSIX*/
+#endif
}
/*
diff --git a/contrib/tcsh/sh.func.c b/contrib/tcsh/sh.func.c
index fb8c898d0f5a..b26ea8ee1140 100644
--- a/contrib/tcsh/sh.func.c
+++ b/contrib/tcsh/sh.func.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.func.c,v 3.87 2000/06/09 19:43:43 kim Exp $ */
+/* $Header: /src/pub/tcsh/sh.func.c,v 3.91 2000/11/11 23:03:36 christos Exp $ */
/*
* sh.func.c: csh builtin functions
*/
@@ -36,14 +36,14 @@
*/
#include "sh.h"
-RCSID("$Id: sh.func.c,v 3.87 2000/06/09 19:43:43 kim Exp $")
+RCSID("$Id: sh.func.c,v 3.91 2000/11/11 23:03:36 christos Exp $")
#include "ed.h"
#include "tw.h"
#include "tc.h"
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#include "nt.const.h"
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* C shell
@@ -126,9 +126,9 @@ isbfunc(t)
else
bp1 = bp + 1;
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
return nt_check_additional_builtins(cp);
-#endif /*WINNT*/
+#endif /*WINNT_NATIVE*/
return (0);
}
@@ -347,9 +347,9 @@ dologin(v, c)
struct command *c;
{
USE(c);
-#ifdef WINNT
+#ifdef WINNT_NATIVE
USE(v);
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
islogin();
rechist(NULL, adrof(STRsavehist) != NULL);
(void) signal(SIGTERM, parterm);
@@ -357,7 +357,7 @@ dologin(v, c)
(void) execl(_PATH_USRBIN_LOGIN, "login", short2str(v[1]), NULL);
untty();
xexit(1);
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
}
@@ -484,7 +484,7 @@ gotolab(lab)
*/
zlast = TC_GOTO;
for (wp = whyles; wp; wp = wp->w_next)
- if (wp->w_end.type == F_SEEK && wp->w_end.f_seek == 0) {
+ if (wp->w_end.type == TCSH_F_SEEK && wp->w_end.f_seek == 0) {
search(TC_BREAK, 0, NULL);
btell(&wp->w_end);
}
@@ -600,7 +600,7 @@ doforeach(v, c)
btell(&nwp->w_start);
nwp->w_fename = Strsave(cp);
nwp->w_next = whyles;
- nwp->w_end.type = F_SEEK;
+ nwp->w_end.type = TCSH_F_SEEK;
whyles = nwp;
/*
* Pre-read the loop so as to be more comprehensible to a terminal user.
@@ -639,7 +639,7 @@ dowhile(v, c)
(struct whyle *) xcalloc(1, sizeof(*nwp));
nwp->w_start = lineloc;
- nwp->w_end.type = F_SEEK;
+ nwp->w_end.type = TCSH_F_SEEK;
nwp->w_end.f_seek = 0;
nwp->w_next = whyles;
whyles = nwp;
@@ -661,7 +661,7 @@ dowhile(v, c)
static void
preread()
{
- whyles->w_end.type = I_SEEK;
+ whyles->w_end.type = TCSH_I_SEEK;
if (setintr)
#ifdef BSDSIGS
(void) sigsetmask(sigblock((sigmask_t) 0) & ~sigmask(SIGINT));
@@ -836,12 +836,12 @@ search(type, level, goal)
Sgoal = goal;
if (type == TC_GOTO) {
struct Ain a;
- a.type = F_SEEK;
+ a.type = TCSH_F_SEEK;
a.f_seek = 0;
bseek(&a);
}
do {
- if (intty && fseekp == feobp && aret == F_SEEK)
+ if (intty && fseekp == feobp && aret == TCSH_F_SEEK)
printprompt(1, isrchx(type == TC_BREAK ? zlast : type));
/* xprintf("? "), flush(); */
aword[0] = 0;
@@ -1020,7 +1020,7 @@ past:
static void
toend()
{
- if (whyles->w_end.type == F_SEEK && whyles->w_end.f_seek == 0) {
+ if (whyles->w_end.type == TCSH_F_SEEK && whyles->w_end.f_seek == 0) {
search(TC_BREAK, 0, NULL);
btell(&whyles->w_end);
whyles->w_end.f_seek--;
@@ -1066,9 +1066,9 @@ wfree()
/*
* XXX: We free loops that have different seek types.
*/
- if (wp->w_end.type != I_SEEK && wp->w_start.type == wp->w_end.type &&
+ if (wp->w_end.type != TCSH_I_SEEK && wp->w_start.type == wp->w_end.type &&
wp->w_start.type == o.type) {
- if (wp->w_end.type == F_SEEK) {
+ if (wp->w_end.type == TCSH_F_SEEK) {
if (o.f_seek >= wp->w_start.f_seek &&
(wp->w_end.f_seek == 0 || o.f_seek < wp->w_end.f_seek))
break;
@@ -1390,18 +1390,13 @@ dosetenv(v, c)
xfree((ptr_t) lp);
return;
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
if (eq(vp, STRtcshlang)) {
nlsinit();
xfree((ptr_t) lp);
return;
}
- if (eq(vp, STRtcshonlystartexes)) {
- __nt_only_start_exes = 1;
- xfree((ptr_t) lp);
- return;
- }
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (eq(vp, STRKTERM)) {
char *t;
set(STRterm, quote(lp), VAR_READWRITE); /* lp memory used here */
@@ -1571,15 +1566,12 @@ dounsetenv(v, c)
ed_InitNLSMaps();
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
else if (eq(name,(STRtcshlang))) {
nls_dll_unload();
nlsinit();
}
- else if (eq(name,(STRtcshonlystartexes))) {
- __nt_only_start_exes = 0;
- }
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef COLOR_LS_F
else if (eq(name, STRLS_COLORS))
parseLS_COLORS(n);
@@ -1617,16 +1609,16 @@ tsetenv(name, val)
Char *blk[2];
Char **oep = ep;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_set_env(name,val);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
for (; *ep; ep++) {
-#ifdef WINNT
+#ifdef WINNT_NATIVE
for (cp = name, dp = *ep; *cp && Tolower(*cp & TRIM) == Tolower(*dp);
cp++, dp++)
#else
for (cp = name, dp = *ep; *cp && (*cp & TRIM) == *dp; cp++, dp++)
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
continue;
if (*cp != 0 || *dp != '=')
continue;
@@ -1657,9 +1649,9 @@ Unsetenv(name)
register Char *cp, *dp;
Char **oep = ep;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_set_env(name,NULL);
-#endif /*WINNT */
+#endif /*WINNT_NATIVE */
for (; *ep; ep++) {
for (cp = name, dp = *ep; *cp && *cp == *dp; cp++, dp++)
continue;
@@ -1938,7 +1930,7 @@ getval(lp, v)
cp++;
if (*cp == 0) {
if (*v == 0)
- return f == 0.0 ? (RLIM_TYPE) 0 : restrict_limit((f + 0.5) * lp->limdiv);
+ return restrict_limit((f * lp->limdiv) + 0.5);
cp = *v;
}
switch (*cp) {
@@ -2375,13 +2367,13 @@ struct command *c;
xputchar('\n');
}
}
-#ifdef WINNT
+#ifdef WINNT_NATIVE
nt_print_builtins(maxwidth);
#else
if (Tty_raw_mode)
xputchar('\r');
xputchar('\n');
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
lbuffed = 1; /* turn back on line buffering */
flush();
@@ -2391,11 +2383,16 @@ void
nlsinit()
{
#ifdef NLS_CATALOGS
- catd = catopen("tcsh", MCLoadBySet);
-#endif
-#ifdef WINNT
+ char catalog[ 256 ] = { 't', 'c', 's', 'h', '\0' };
+
+ if (adrof(STRcatalog) != NULL)
+ xsnprintf((char *)catalog, sizeof(catalog), "tcsh.%s",
+ short2str(varval(STRcatalog)));
+ catd = catopen(catalog, MCLoadBySet);
+#endif /* NLS_CATALOGS */
+#ifdef WINNT_NATIVE
nls_dll_init();
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
errinit(); /* init the errorlist in correct locale */
mesginit(); /* init the messages for signals */
dateinit(); /* init the messages for dates */
diff --git a/contrib/tcsh/sh.glob.c b/contrib/tcsh/sh.glob.c
index 9bcd9790a335..0af58252f371 100644
--- a/contrib/tcsh/sh.glob.c
+++ b/contrib/tcsh/sh.glob.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.glob.c,v 3.44 2000/01/14 22:57:28 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.glob.c,v 3.47 2000/11/11 23:03:37 christos Exp $ */
/*
* sh.glob.c: Regular expression expansion
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.glob.c,v 3.44 2000/01/14 22:57:28 christos Exp $")
+RCSID("$Id: sh.glob.c,v 3.47 2000/11/11 23:03:37 christos Exp $")
#include "tc.h"
@@ -452,8 +452,11 @@ globexpand(v)
*/
if ( symlinks == SYM_EXPAND )
for (s = *vl; s; s = *++vl) {
- *vl = dnormalize(s, 1);
- xfree((ptr_t) s);
+ char *path = short2str(s);
+ if (strstr(path, "..") != NULL && access(path, F_OK) == 0) {
+ *vl = dnormalize(s, 1);
+ xfree((ptr_t) s);
+ }
}
vl = nv;
@@ -901,10 +904,10 @@ backeval(cp, literal)
c = (*ip++ & TRIM);
if (c == 0)
break;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
if (c == '\r')
c = ' ';
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (c == '\n') {
/*
* Continue around the loop one more time, so that we can eat
diff --git a/contrib/tcsh/sh.h b/contrib/tcsh/sh.h
index b2c8b1e64d9e..55ed4cc43c1e 100644
--- a/contrib/tcsh/sh.h
+++ b/contrib/tcsh/sh.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.h,v 3.88 2000/06/10 22:06:27 kim Exp $ */
+/* $Header: /src/pub/tcsh/sh.h,v 3.93 2000/11/19 20:50:43 christos Exp $ */
/*
* sh.h: Catch it all globals and includes file!
*/
@@ -42,10 +42,10 @@
#ifndef EXTERN
# define EXTERN extern
#else /* !EXTERN */
-# ifdef WINNT
+# ifdef WINNT_NATIVE
# define IZERO = 0
# define IZERO_STRUCT = {0}
-# endif /* WINNT */
+# endif /* WINNT_NATIVE */
#endif /* EXTERN */
#ifndef IZERO
@@ -55,11 +55,11 @@
# define IZERO_STRUCT
# endif /* IZERO_STRUCT */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# define INIT_ZERO
# define INIT_ZERO_STRUCT
# define force_read read
-#endif /*!WINNT */
+#endif /*!WINNT_NATIVE */
/*
* Sanity
*/
@@ -107,12 +107,12 @@ typedef int sigret_t;
/*
* Return true if the path is absolute
*/
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# define ABSOLUTEP(p) (*(p) == '/')
-#else /* WINNT */
+#else /* WINNT_NATIVE */
# define ABSOLUTEP(p) ((p)[0] == '/' || \
(Isalpha((p)[0]) && (p)[1] == ':' && (p)[2] == '/'))
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* Fundamental definitions which may vary from system to system.
@@ -182,11 +182,11 @@ typedef int sigret_t;
* Path separator in environment variables
*/
#ifndef PATHSEP
-# if defined(__EMX__) || defined(WINNT)
+# if defined(__EMX__) || defined(WINNT_NATIVE)
# define PATHSEP ';'
# else /* unix */
# define PATHSEP ':'
-# endif /* __EMX__ || WINNT */
+# endif /* __EMX__ || WINNT_NATIVE */
#endif /* !PATHSEP */
#ifdef __HP_CXD_SPP
@@ -207,23 +207,23 @@ typedef int sigret_t;
#ifdef _SEQUENT_
# include <sys/procstats.h>
#endif /* _SEQUENT_ */
-#if (defined(POSIX) || SYSVREL > 0) && !WINNT
+#if (defined(POSIX) || SYSVREL > 0) && !defined(WINNT_NATIVE)
# include <sys/times.h>
-#endif /* (POSIX || SYSVREL > 0) && !WINNT */
+#endif /* (POSIX || SYSVREL > 0) && !WINNT_NATIVE */
#ifdef NLS
# include <locale.h>
#endif /* NLS */
-#if !defined(_MINIX) && !defined(_VMS_POSIX) && !defined(WINNT)
+#if !defined(_MINIX) && !defined(_VMS_POSIX) && !defined(WINNT_NATIVE) && !defined(__MVS__)
# include <sys/param.h>
-#endif /* !_MINIX && !_VMS_POSIX && !WINNT */
+#endif /* !_MINIX && !_VMS_POSIX && !WINNT_NATIVE && !__MVS__ */
#include <sys/stat.h>
#if defined(BSDTIMES) || defined(BSDLIMIT)
# include <sys/time.h>
-# if SYSVREL>3 && !defined(SCO) && !defined(sgi) && !defined(SNI) && !defined(sun) && !(defined(__alpha) && defined(__osf__)) && !defined(_SX)
+# if SYSVREL>3 && !defined(SCO) && !defined(sgi) && !defined(SNI) && !defined(sun) && !(defined(__alpha) && defined(__osf__)) && !defined(_SX) && !defined(__MVS__)
# include "/usr/ucbinclude/sys/resource.h"
# else
# ifdef convex
@@ -236,7 +236,7 @@ typedef int sigret_t;
# endif /* SYSVREL>3 */
#endif /* BSDTIMES */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifndef POSIX
# ifdef TERMIO
# include <termio.h>
@@ -256,13 +256,13 @@ typedef int sigret_t;
# define CSWTCH _POSIX_VDISABLE /* So job control works */
# endif /* SYSVREL > 3 */
# endif /* POSIX */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef sonyrisc
# include <sys/ttold.h>
#endif /* sonyrisc */
-#if defined(POSIX) && !defined(WINNT)
+#if defined(POSIX) && !defined(WINNT_NATIVE)
/*
* We should be using setpgid and setpgid
* by now, but in some systems we use the
@@ -295,7 +295,7 @@ typedef int sigret_t;
# undef realloc
# endif /* linux || sgi */
# include <limits.h>
-#endif /* POSIX && !WINNT */
+#endif /* POSIX && !WINNT_NATIVE */
#if SYSVREL > 0 || defined(_IBMR2) || defined(_MINIX)
# if !defined(pyr) && !defined(stellar)
@@ -310,7 +310,7 @@ typedef int sigret_t;
* versions of DECOSF1 will get TIOCGWINSZ. This might break older versions...
*/
#if !((defined(SUNOS4) || defined(_MINIX) /* || defined(DECOSF1) */) && defined(TERMIO))
-# if !defined(COHERENT) && !defined(_VMS_POSIX) && !defined(WINNT)
+# if !defined(COHERENT) && !defined(_VMS_POSIX) && !defined(WINNT_NATIVE)
# include <sys/ioctl.h>
# endif
#endif
@@ -320,13 +320,13 @@ typedef int sigret_t;
#define CSWTCH _POSIX_VDISABLE
#endif
-#if (!defined(FIOCLEX) && defined(SUNOS4)) || ((SYSVREL == 4) && !defined(_SEQUENT_) && !defined(SCO) && !defined(_SX))
+#if (!defined(FIOCLEX) && defined(SUNOS4)) || ((SYSVREL == 4) && !defined(_SEQUENT_) && !defined(SCO) && !defined(_SX)) && !defined(__MVS__)
# include <sys/filio.h>
#endif /* (!FIOCLEX && SUNOS4) || (SYSVREL == 4 && !_SEQUENT_ && !SCO && !_SX ) */
-#if !defined(_MINIX) && !defined(COHERENT) && !defined(supermax) && !defined(WINNT) && !defined(IRIS4D)
+#if !defined(_MINIX) && !defined(COHERENT) && !defined(supermax) && !defined(WINNT_NATIVE) && !defined(IRIS4D)
# include <sys/file.h>
-#endif /* !_MINIX && !COHERENT && !supermax && !WINNT && !defined(IRIS4D) */
+#endif /* !_MINIX && !COHERENT && !supermax && !WINNT_NATIVE && !defined(IRIS4D) */
#if !defined(O_RDONLY) || !defined(O_NDELAY)
# include <fcntl.h>
@@ -359,10 +359,10 @@ typedef int sigret_t;
#if defined(hpux) || defined(sgi) || defined(OREO) || defined(COHERENT)
# include <stdio.h> /* So the fgetpwent() prototypes work */
#endif /* hpux || sgi || OREO || COHERENT */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
#include <pwd.h>
#include <grp.h>
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef PW_SHADOW
# include <shadow.h>
#endif /* PW_SHADOW */
@@ -393,6 +393,9 @@ typedef int sigret_t;
# include <netinet/in.h>
# include <arpa/inet.h>
# include <sys/socket.h>
+# if defined(_SS_SIZE) || defined(_SS_MAXSIZE)
+# define INET6
+# endif
# include <sys/uio.h> /* For struct iovec */
#endif /* REMOTEHOST */
@@ -440,9 +443,18 @@ typedef void pret_t;
typedef int bool;
+/*
+ * ASCII vs. EBCDIC
+ */
+#if 'Z' - 'A' == 25
+# ifndef IS_ASCII
+# define IS_ASCII
+# endif
+#endif
+
#include "sh.types.h"
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifndef POSIX
extern pid_t getpgrp __P((int));
# else /* POSIX */
@@ -453,7 +465,7 @@ extern pid_t getpgrp __P((void));
# endif /* BSD || SUNOS4 || IRISD || DGUX */
# endif /* POSIX */
extern pid_t setpgrp __P((pid_t, pid_t));
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
typedef sigret_t (*signalfun_t) __P((int));
@@ -591,7 +603,10 @@ extern Char *ffile; /* Name of shell file for $0 */
extern bool dolzero; /* if $?0 should return true... */
extern char *seterr; /* Error message from scanner/parser */
+#ifndef BSD4_4
extern int errno; /* Error from C library routines */
+#endif
+extern int exitset;
EXTERN Char *shtemp IZERO; /* Temp name for << shell files in /tmp */
#ifdef BSDTIMES
@@ -768,10 +783,10 @@ EXTERN struct Bin {
*/
struct Ain {
int type;
-#define I_SEEK -1 /* Invalid seek */
-#define A_SEEK 0 /* Alias seek */
-#define F_SEEK 1 /* File seek */
-#define E_SEEK 2 /* Eval seek */
+#define TCSH_I_SEEK 0 /* Invalid seek */
+#define TCSH_A_SEEK 1 /* Alias seek */
+#define TCSH_F_SEEK 2 /* File seek */
+#define TCSH_E_SEEK 3 /* Eval seek */
union {
off_t _f_seek;
Char* _c_seek;
@@ -936,10 +951,10 @@ extern struct biltins {
int minargs, maxargs;
} bfunc[];
extern int nbfunc;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
extern struct biltins nt_bfunc[];
extern int nt_nbfunc;
-#endif /* WINNT*/
+#endif /* WINNT_NATIVE*/
extern struct srch {
char *s_name;
@@ -1177,7 +1192,7 @@ extern int errno, sys_nerr;
# endif /* !linux */
#endif
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifdef NLS_CATALOGS
# ifdef linux
# include <locale.h>
@@ -1214,10 +1229,10 @@ EXTERN nl_catd catd;
# define CGETS(b, c, d) d
# define CSAVS(b, c, d) d
# endif
-#else /* WINNT */
+#else /* WINNT_NATIVE */
# define CGETS(b, c, d) nt_cgets( b, c, d)
# define CSAVS(b, c, d) strsave(CGETS(b, c, d))
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* Since on some machines characters are unsigned, and the signed
diff --git a/contrib/tcsh/sh.lex.c b/contrib/tcsh/sh.lex.c
index b252eaae344e..60d5fb44d006 100644
--- a/contrib/tcsh/sh.lex.c
+++ b/contrib/tcsh/sh.lex.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.lex.c,v 3.50 2000/01/14 22:57:28 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.lex.c,v 3.52 2000/11/11 23:03:37 christos Exp $ */
/*
* sh.lex.c: Lexical analysis into tokens
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.lex.c,v 3.50 2000/01/14 22:57:28 christos Exp $")
+RCSID("$Id: sh.lex.c,v 3.52 2000/11/11 23:03:37 christos Exp $")
#include "ed.h"
/* #define DEBUG_INP */
@@ -97,7 +97,7 @@ static struct wordent *exclnxt = NULL;
static int exclc = 0;
/* "Globp" for alias resubstitution */
-int aret = F_SEEK;
+int aret = TCSH_F_SEEK;
/*
* Labuf implements a general buffer for lookahead during lexical operations.
@@ -1504,13 +1504,13 @@ readc(wanteof)
if (numeof < 1) numeof = 26; /* Sanity check */
top:
- aret = F_SEEK;
+ aret = TCSH_F_SEEK;
if (alvecp) {
arun = 1;
#ifdef DEBUG_INP
xprintf("alvecp %c\n", *alvecp & 0xff);
#endif
- aret = A_SEEK;
+ aret = TCSH_A_SEEK;
if ((c = *alvecp++) != 0)
return (c);
if (alvec && *alvec) {
@@ -1519,7 +1519,7 @@ top:
}
else {
alvecp = NULL;
- aret = F_SEEK;
+ aret = TCSH_F_SEEK;
return('\n');
}
}
@@ -1534,14 +1534,14 @@ top:
}
arun = 0;
if (evalp) {
- aret = E_SEEK;
+ aret = TCSH_E_SEEK;
if ((c = *evalp++) != 0)
return (c);
if (evalvec && *evalvec) {
evalp = *evalvec++;
return (' ');
}
- aret = F_SEEK;
+ aret = TCSH_F_SEEK;
evalp = 0;
}
if (evalvec) {
@@ -1574,7 +1574,7 @@ reread:
#endif /* BSDJOBS */
c = bgetc();
if (c < 0) {
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifndef POSIX
# ifdef TERMIO
struct termio tty;
@@ -1584,11 +1584,11 @@ reread:
# else /* POSIX */
struct termios tty;
# endif /* POSIX */
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
if (wanteof)
return (-1);
/* was isatty but raw with ignoreeof yields problems */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifndef POSIX
# ifdef TERMIO
if (ioctl(SHIN, TCGETA, (ioctl_t) & tty) == 0 &&
@@ -1601,9 +1601,9 @@ reread:
if (tcgetattr(SHIN, &tty) == 0 &&
(tty.c_lflag & ICANON))
# endif /* POSIX */
-#else /* WINNT */
+#else /* WINNT_NATIVE */
if (isatty(SHIN))
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
{
/* was 'short' for FILEC */
#ifdef BSDJOBS
@@ -1727,7 +1727,7 @@ bgetc()
fbuf[0][i] = (unsigned char) tbuf[i];
feobp += c;
}
-#ifndef WINNT
+#ifndef WINNT_NATIVE
c = fbuf[0][fseekp - fbobp];
fseekp++;
#else
@@ -1735,7 +1735,7 @@ bgetc()
c = fbuf[0][fseekp - fbobp];
fseekp++;
} while(c == '\r');
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
return (c);
}
@@ -1773,7 +1773,7 @@ bgetc()
if (c == 0 || (c < 0 && fixio(SHIN, errno) == -1))
return (-1);
}
-#ifndef WINNT
+#ifndef WINNT_NATIVE
c = fbuf[(int) fseekp / BUFSIZE][(int) fseekp % BUFSIZE];
fseekp++;
#else
@@ -1781,7 +1781,7 @@ bgetc()
c = fbuf[(int) fseekp / BUFSIZE][(int) fseekp % BUFSIZE];
fseekp++;
} while(c == '\r');
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
return (c);
}
@@ -1810,21 +1810,21 @@ bseek(l)
struct Ain *l;
{
switch (aret = l->type) {
- case E_SEEK:
+ case TCSH_E_SEEK:
evalvec = l->a_seek;
evalp = l->c_seek;
#ifdef DEBUG_SEEK
xprintf(CGETS(16, 4, "seek to eval %x %x\n"), evalvec, evalp);
#endif
return;
- case A_SEEK:
+ case TCSH_A_SEEK:
alvec = l->a_seek;
alvecp = l->c_seek;
#ifdef DEBUG_SEEK
xprintf(CGETS(16, 5, "seek to alias %x %x\n"), alvec, alvecp);
#endif
return;
- case F_SEEK:
+ case TCSH_F_SEEK:
#ifdef DEBUG_SEEK
xprintf(CGETS(16, 6, "seek to file %x\n"), fseekp);
#endif
@@ -1842,21 +1842,21 @@ btell(l)
struct Ain *l;
{
switch (l->type = aret) {
- case E_SEEK:
+ case TCSH_E_SEEK:
l->a_seek = evalvec;
l->c_seek = evalp;
#ifdef DEBUG_SEEK
xprintf(CGETS(16, 8, "tell eval %x %x\n"), evalvec, evalp);
#endif
return;
- case A_SEEK:
+ case TCSH_A_SEEK:
l->a_seek = alvec;
l->c_seek = alvecp;
#ifdef DEBUG_SEEK
xprintf(CGETS(16, 9, "tell alias %x %x\n"), alvec, alvecp);
#endif
return;
- case F_SEEK:
+ case TCSH_F_SEEK:
/*SUPPRESS 112*/
l->f_seek = fseekp;
l->a_seek = NULL;
@@ -1874,7 +1874,7 @@ void
btoeof()
{
(void) lseek(SHIN, (off_t) 0, L_XTND);
- aret = F_SEEK;
+ aret = TCSH_F_SEEK;
fseekp = feobp;
alvec = NULL;
alvecp = NULL;
diff --git a/contrib/tcsh/sh.print.c b/contrib/tcsh/sh.print.c
index f2b304c23c03..650731e1110e 100644
--- a/contrib/tcsh/sh.print.c
+++ b/contrib/tcsh/sh.print.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.print.c,v 3.19 2000/01/14 22:57:28 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.print.c,v 3.20 2000/06/11 02:14:15 kim Exp $ */
/*
* sh.print.c: Primitive Output routines.
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.print.c,v 3.19 2000/01/14 22:57:28 christos Exp $")
+RCSID("$Id: sh.print.c,v 3.20 2000/06/11 02:14:15 kim Exp $")
#include "ed.h"
@@ -136,17 +136,17 @@ xputchar(c)
if (c != '\t' && c != '\n' && (xlate_cr || c != '\r')) {
#endif
xputchar('^' | atr);
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
if (c == ASCII)
c = '?';
else
c |= 0100;
-#else /*_OSD_POSIX*/
+#else
if (c == CTL_ESC('\177'))
c = '?';
else
c =_toebcdic[_toascii[c]|0100];
-#endif /*_OSD_POSIX*/
+#endif
}
}
diff --git a/contrib/tcsh/sh.proc.c b/contrib/tcsh/sh.proc.c
index ed6b2accae4b..c35bba94a442 100644
--- a/contrib/tcsh/sh.proc.c
+++ b/contrib/tcsh/sh.proc.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.proc.c,v 3.70 1998/10/25 15:10:22 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.proc.c,v 3.71 2000/11/11 23:03:37 christos Exp $ */
/*
* sh.proc.c: Job manipulations
*/
@@ -36,16 +36,16 @@
*/
#include "sh.h"
-RCSID("$Id: sh.proc.c,v 3.70 1998/10/25 15:10:22 christos Exp $")
+RCSID("$Id: sh.proc.c,v 3.71 2000/11/11 23:03:37 christos Exp $")
#include "ed.h"
#include "tc.h"
#include "tc.wait.h"
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#undef POSIX
#define POSIX
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef aiws
# undef HZ
# define HZ 16
@@ -211,7 +211,7 @@ loop:
xprintf("Waiting...\n");
flush();
#endif /* JOBDEBUG */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifdef BSDJOBS
# ifdef BSDTIMES
# ifdef convex
@@ -288,13 +288,13 @@ loop:
(void) sigset(SIGCHLD, pchild);
# endif /* !BSDSIGS */
# endif /* !BSDJOBS */
-#else /* WINNT */
+#else /* WINNT_NATIVE */
{
extern int insource;
pid = waitpid(-1, &w,
(setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG));
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef JOBDEBUG
xprintf("parent %d pid %d, retval %x termsig %x retcode %x\n",
@@ -320,13 +320,13 @@ loop:
for (pp = proclist.p_next; pp != NULL; pp = pp->p_next)
if (pid == pp->p_procid)
goto found;
-#if !defined(BSDJOBS) && !defined(WINNT)
+#if !defined(BSDJOBS) && !defined(WINNT_NATIVE)
/* this should never have happened */
stderror(ERR_SYNC, pid);
xexit(0);
-#else /* BSDJOBS || WINNT */
+#else /* BSDJOBS || WINNT_NATIVE */
goto loop;
-#endif /* !BSDJOBS && !WINNT */
+#endif /* !BSDJOBS && !WINNT_NATIVE */
found:
pp->p_flags &= ~(PRUNNING | PSTOPPED | PREPORTED);
if (WIFSTOPPED(w)) {
@@ -1656,11 +1656,11 @@ pkill(v, signum)
else if (!(Isdigit(*cp) || *cp == '-'))
stderror(ERR_NAME | ERR_JOBARGS);
else {
-#ifndef WINNT
+#ifndef WINNT_NATIVE
pid = atoi(short2str(cp));
#else
pid = strtoul(short2str(cp),NULL,0);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (kill(pid, signum) < 0) {
xprintf("%d: %s\n", pid, strerror(errno));
err1++;
diff --git a/contrib/tcsh/sh.sem.c b/contrib/tcsh/sh.sem.c
index 4f4a6374dd03..940df884d89f 100644
--- a/contrib/tcsh/sh.sem.c
+++ b/contrib/tcsh/sh.sem.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.sem.c,v 3.48 1998/11/24 18:17:37 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.sem.c,v 3.51 2000/11/11 23:03:38 christos Exp $ */
/*
* sh.sem.c: I/O redirections and job forking. A touchy issue!
* Most stuff with builtins is incorrect
@@ -37,13 +37,13 @@
*/
#include "sh.h"
-RCSID("$Id: sh.sem.c,v 3.48 1998/11/24 18:17:37 christos Exp $")
+RCSID("$Id: sh.sem.c,v 3.51 2000/11/11 23:03:38 christos Exp $")
#include "tc.h"
#include "tw.h"
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#include "nt.const.h"
-#endif /*WINNT*/
+#endif /*WINNT_NATIVE*/
#ifdef CLOSE_ON_EXEC
# ifndef SUNOS4
@@ -116,7 +116,7 @@ execute(t, wanttty, pipein, pipeout)
if (t == 0)
return;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
{
if ((varval(STRNTslowexec) == STRNULL) &&
!t->t_dcdr && !t->t_dcar && !t->t_dflg && !didfds &&
@@ -129,7 +129,7 @@ execute(t, wanttty, pipein, pipeout)
return;
}
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/*
* Ed hutchins@sgi.com & Dominic dbg@sgi.com
@@ -164,9 +164,9 @@ execute(t, wanttty, pipein, pipeout)
pathname = short2str(sCName);
/* if this is a dir, tack a "cd" on as the first arg */
if ((stat(pathname, &stbuf) != -1 && S_ISDIR(stbuf.st_mode))
-#ifdef WINNT
+#ifdef WINNT_NATIVE
|| (pathname[0] && pathname[1] == ':' && pathname[2] == '\0')
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
) {
Char *vCD[2];
Char **ot_dcom = t->t_dcom;
@@ -349,7 +349,7 @@ execute(t, wanttty, pipein, pipeout)
* We have to fork for eval too.
*/
(bifunc && (t->t_dflg & F_PIPEIN) != 0 &&
- bifunc->bfunct == (bfunc_t)doeval))
+ bifunc->bfunct == (bfunc_t)doeval)) {
#ifdef VFORK
if (t->t_dtyp == NODE_PAREN ||
t->t_dflg & (F_REPEAT | F_AMPERSAND) || bifunc)
@@ -586,6 +586,7 @@ execute(t, wanttty, pipein, pipeout)
}
#endif /* VFORK */
+ }
if (pid != 0) {
/*
* It would be better if we could wait for the whole job when we
diff --git a/contrib/tcsh/sh.set.c b/contrib/tcsh/sh.set.c
index f772d644db4c..d4bc2f523f04 100644
--- a/contrib/tcsh/sh.set.c
+++ b/contrib/tcsh/sh.set.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.set.c,v 3.36 2000/01/14 22:57:28 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.set.c,v 3.37 2000/07/15 19:58:51 christos Exp $ */
/*
* sh.set.c: Setting and Clearing of variables
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.set.c,v 3.36 2000/01/14 22:57:28 christos Exp $")
+RCSID("$Id: sh.set.c,v 3.37 2000/07/15 19:58:51 christos Exp $")
#include "ed.h"
#include "tw.h"
@@ -178,6 +178,12 @@ update_vars(vp)
update_dspmbyte_vars();
}
#endif
+#ifdef NLS_CATALOGS
+ else if (eq(vp, STRcatalog)) {
+ (void) catclose(catd);
+ nlsinit();
+ }
+#endif /* NLS_CATALOGS */
}
@@ -745,6 +751,10 @@ unset(v, c)
#if defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE)
update_dspmbyte_vars();
#endif
+#ifdef NLS_CATALOGS
+ (void) catclose(catd);
+ nlsinit();
+#endif /* NLS_CATALOGS */
}
void
diff --git a/contrib/tcsh/sh.types.h b/contrib/tcsh/sh.types.h
index fe1fbe5c824e..d62da8a095a0 100644
--- a/contrib/tcsh/sh.types.h
+++ b/contrib/tcsh/sh.types.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.types.h,v 3.37 2000/01/14 22:57:29 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.types.h,v 3.38 2000/07/04 19:46:23 christos Exp $ */
/* sh.types.h: Do the necessary typedefs for each system.
* Up till now I avoided making this into a separate file
* But I just wanted to eliminate the whole mess from sh.h
@@ -172,9 +172,9 @@ extern char *sbrk();
# endif /* HPUXVERSION < 800 */
#endif /* __hpux */
-#if defined(_MINIX) || defined(__EMX__) || defined(COHERENT)
+#if (defined(_MINIX) && !defined(_MINIX_VMD)) || defined(__EMX__) || defined(COHERENT)
typedef char * caddr_t;
-#endif /* _MINIX || __EMX__ || COHERENT */
+#endif /* (_MINIX && !_MINIX_VMD) || __EMX__ || COHERENT */
/***
*** hp9000s500 running hpux-5.2
diff --git a/contrib/tcsh/tc.alloc.c b/contrib/tcsh/tc.alloc.c
index b2771dbea479..8c5e29e96e57 100644
--- a/contrib/tcsh/tc.alloc.c
+++ b/contrib/tcsh/tc.alloc.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.alloc.c,v 3.34 1999/04/20 07:48:49 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.alloc.c,v 3.35 2000/11/11 23:03:38 christos Exp $ */
/*
* tc.alloc.c (Caltech) 2/21/82
* Chris Kingsley, kingsley@cit-20.
@@ -44,7 +44,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.alloc.c,v 3.34 1999/04/20 07:48:49 christos Exp $")
+RCSID("$Id: tc.alloc.c,v 3.35 2000/11/11 23:03:38 christos Exp $")
static char *memtop = NULL; /* PWP: top of current memory */
static char *membot = NULL; /* PWP: bottom of allocatable memory */
@@ -55,12 +55,12 @@ int dont_free = 0;
# define NO_SBRK
#endif
-#ifdef WINNT
+#ifdef WINNT_NATIVE
# define malloc fmalloc
# define free ffree
# define calloc fcalloc
# define realloc frealloc
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifndef SYSMALLOC
diff --git a/contrib/tcsh/tc.bind.c b/contrib/tcsh/tc.bind.c
index 3ff3839957f8..89445576969f 100644
--- a/contrib/tcsh/tc.bind.c
+++ b/contrib/tcsh/tc.bind.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.bind.c,v 3.33 1998/11/24 18:17:40 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.bind.c,v 3.35 2000/11/11 23:03:38 christos Exp $ */
/*
* tc.bind.c: Key binding functions
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.bind.c,v 3.33 1998/11/24 18:17:40 christos Exp $")
+RCSID("$Id: tc.bind.c,v 3.35 2000/11/11 23:03:38 christos Exp $")
#include "ed.h"
#include "ed.defns.h"
@@ -292,11 +292,11 @@ parsebind(s, str)
switch (*s) {
case '^':
s++;
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
*b++ = (*s == '?') ? '\177' : ((*s & CHAR) & 0237);
-#else /*_OSD_POSIX*/
+#else
*b++ = (*s == '?') ? CTL_ESC('\177') : _toebcdic[_toascii[*s & CHAR] & 0237];
-#endif /*_OSD_POSIX*/
+#endif
*b = '\0';
break;
@@ -304,9 +304,9 @@ parsebind(s, str)
case 'M':
case 'X':
case 'C':
-#ifdef WINNT
+#ifdef WINNT_NATIVE
case 'N':
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (s[1] != '-' || s[2] == '\0') {
bad_spec(s);
return NULL;
@@ -321,20 +321,20 @@ parsebind(s, str)
break;
case 'C': case 'c': /* Turn into ^c */
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
*b++ = (*s == '?') ? '\177' : ((*s & CHAR) & 0237);
-#else /*_OSD_POSIX*/
+#else
*b++ = (*s == '?') ? CTL_ESC('\177') : _toebcdic[_toascii[*s & CHAR] & 0237];
-#endif /*_OSD_POSIX*/
+#endif
*b = '\0';
break;
case 'X' : case 'x': /* Turn into ^Xc */
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
*b++ = 'X' & 0237;
-#else /*_OSD_POSIX*/
+#else
*b++ = _toebcdic[_toascii['X'] & 0237];
-#endif /*_OSD_POSIX*/
+#endif
*b++ = *s;
*b = '\0';
break;
@@ -346,17 +346,17 @@ parsebind(s, str)
*b++ = *s;
} else {
#endif /* DSPMBYTE */
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
*b++ = *s | 0x80;
-#else /*_OSD_POSIX*/
+#else
*b++ = _toebcdic[_toascii[*s] | 0x80];
-#endif /*_OSD_POSIX*/
+#endif
#ifdef DSPMBYTE
}
#endif /* DSPMBYTE */
*b = '\0';
break;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
case 'N' : case 'n': /* NT */
{
Char bnt;
@@ -368,7 +368,7 @@ parsebind(s, str)
bad_spec(s);
}
break;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
default:
abort();
@@ -576,9 +576,10 @@ tocontrol(c)
if (c == '?')
c = CTL_ESC('\177');
else
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
c &= 037;
-#else /* EBCDIC: simulate ASCII-behavior by transforming to ASCII and back */
+#else
+ /* EBCDIC: simulate ASCII-behavior by transforming to ASCII and back */
c = _toebcdic[_toascii[c] & 037];
#endif
return (c);
@@ -621,7 +622,7 @@ unparsekey(c) /* 'c' -> "c", '^C' -> "^" + "C" */
case '\t':
(void) strcpy(cp, "Tab");
return (tmp);
-#ifndef _OSD_POSIX
+#ifdef IS_ASCII
case '\033':
(void) strcpy(cp, "Esc");
return (tmp);
@@ -638,7 +639,7 @@ unparsekey(c) /* 'c' -> "c", '^C' -> "^" + "C" */
}
*cp = '\0';
return (tmp);
-#else /*_OSD_POSIX*/
+#else /* IS_ASCII */
default:
if (*cp == CTL_ESC('\033')) {
(void) strcpy(cp, "Esc");
@@ -657,7 +658,7 @@ unparsekey(c) /* 'c' -> "c", '^C' -> "^" + "C" */
xsnprintf(cp, 3, "\\%3.3o", c);
cp += 4;
}
-#endif /*_OSD_POSIX*/
+#endif /* IS_ASCII */
}
}
@@ -898,7 +899,7 @@ dobind(v, dummy)
if (i != CTL_ESC('\033') && (CcKeyMap[i] == F_XKEY ||
CcAltMap[i] == F_XKEY)) {
p = buf;
-#ifndef _OSD_POSIX /* this is only for ASCII, not for EBCDIC */
+#ifdef IS_ASCII
if (i > 0177) {
*p++ = 033;
*p++ = i & ASCII;
@@ -906,9 +907,9 @@ dobind(v, dummy)
else {
*p++ = (Char) i;
}
-#else /*_OSD_POSIX*/
+#else
*p++ = (Char) i;
-#endif /*_OSD_POSIX*/
+#endif
for (l = s; *l != 0; l++) {
*p++ = *l;
}
diff --git a/contrib/tcsh/tc.const.c b/contrib/tcsh/tc.const.c
index afcfae712e40..635ea31ad430 100644
--- a/contrib/tcsh/tc.const.c
+++ b/contrib/tcsh/tc.const.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.const.c,v 3.53 2000/01/14 22:57:29 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.const.c,v 3.57 2000/11/19 20:50:44 christos Exp $ */
/*
* sh.const.c: String constants for tcsh.
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.const.c,v 3.53 2000/01/14 22:57:29 christos Exp $")
+RCSID("$Id: tc.const.c,v 3.57 2000/11/19 20:50:44 christos Exp $")
Char STRlogout[] = { 'l', 'o', 'g', 'o', 'u', 't', '\0' };
Char STRautologout[] = { 'a', 'u', 't', 'o', 'l', 'o', 'g', 'o', 'u', 't',
@@ -115,6 +115,9 @@ Char STRmerge[] = { 'm', 'e', 'r', 'g', 'e', '\0' };
Char STRtildothist[] = { '~', '/', '.', 'h', 'i', 's', 't', 'o', 'r',
'y', '\0' };
+#ifdef NLS_CATALOGS
+Char STRcatalog[] = { 'c', 'a', 't', 'a', 'l', 'o', 'g', '\0' };
+#endif /* NLS_CATALOGS */
#ifdef KANJI
Char STRnokanji[] = { 'n', 'o', 'k', 'a', 'n', 'j', 'i', '\0' };
# ifdef DSPMBYTE
@@ -130,7 +133,7 @@ Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' };
/* STRLANGEUCJP,STRLANGEUCJPB = EUCJP Trap */
/* STRLANGEUCKR,STRLANGEUCKRB = EUCKR Trap */
/* STRLANGSJIS,STRLANGSJISB = SJIS Trap */
-# if defined(__FreeBSD__) || defined(__uxps__) || defined(linux) || defined(sgi) || defined(aix) /* linux? */
+# if defined(__FreeBSD__) || defined(__uxps__) || defined(sgi) || defined(aix) || defined(__CYGWIN__) || defined(linux)
Char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' };
Char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' };
# if defined(__uxps__)
@@ -150,6 +153,14 @@ Char STRLANGEUCKRB[] = { '\0' };
Char STRLANGSJIS[] = { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
'\0' };
Char STRLANGSJISB[] = { '\0' };
+# elif defined(linux)
+Char STRLANGEUC[] = { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J',
+ 'P', '\0' };
+Char STRLANGEUCB[] = { 'j', 'a', '_', 'J', 'P', '.', 'u', 'j', 'i', 's',
+ '\0' };
+Char STRLANGSJIS[] = { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S',
+ '\0' };
+Char STRLANGSJISB[] = { '\0' };
# elif defined(__uxpm__)
Char STRLANGEUCJP[] = { 'j', 'a', 'p', 'a', 'n', '\0' };
Char STRLANGEUCKR[] = { 'k', 'o', 'r', 'e', 'a', '\0' };
@@ -397,7 +408,7 @@ Char STRsys53[] = { 's', 'y', 's', '5', '.', '3', '\0' };
Char STRver[] = { 'v', 'e', 'r', '\0' };
#endif /* apollo */
-#ifdef _OSD_POSIX
+#ifndef IS_ASCII
Char STRwarnebcdic[] = { 'w', 'a', 'r', 'n', 'e', 'b', 'c', 'd', 'i', 'c', '\0' };
#endif
@@ -414,6 +425,7 @@ Char STRup[] = { 'u', 'p', '\0' };
Char STRdown[] = { 'd', 'o', 'w', 'n', '\0' };
Char STRleft[] = { 'l', 'e', 'f', 't', '\0' };
Char STRright[] = { 'r', 'i', 'g', 'h', 't', '\0' };
+Char STRend[] = { 'e', 'n', 'd', '\0' };
#ifdef COLORCAT
Char STRcolorcat[] = { 'c', 'o', 'l', 'o', 'r', 'c', 'a', 't', '\0' };
diff --git a/contrib/tcsh/tc.decls.h b/contrib/tcsh/tc.decls.h
index 3498c14839c0..a0d29a199f5e 100644
--- a/contrib/tcsh/tc.decls.h
+++ b/contrib/tcsh/tc.decls.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.decls.h,v 3.44 1999/02/06 15:19:00 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.decls.h,v 3.47 2000/11/12 02:18:06 christos Exp $ */
/*
* tc.decls.h: Function declarations from all the tcsh modules
*/
@@ -41,12 +41,12 @@
* tc.alloc.c
*/
#ifndef SYSMALLOC
-#ifndef WINNT
+#ifndef WINNT_NATIVE
extern void free __P((ptr_t));
extern memalign_t malloc __P((size_t));
extern memalign_t realloc __P((ptr_t, size_t));
extern memalign_t calloc __P((size_t, size_t));
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
#else /* SYSMALLOC */
extern void sfree __P((ptr_t));
extern memalign_t smalloc __P((size_t));
@@ -272,7 +272,7 @@ extern void sigpause __P((int));
extern sigret_t (*xsignal __P((int, sigret_t (*)(int)))) ();
# define signal(a, b) xsignal(a, b)
#endif /* NEEDsignal */
-#if defined(_SEQUENT_) || ((SYSVREL > 3 || defined(_DGUX_SOURCE)) && defined(POSIXSIGS)) || (defined(_AIX) && defined(POSIXSIGS)) || defined(WINNT)
+#if defined(_SEQUENT_) || ((SYSVREL > 3 || defined(_DGUX_SOURCE)) && defined(POSIXSIGS)) || ((defined(_AIX) || defined(__CYGWIN__)) && defined(POSIXSIGS)) || defined(WINNT_NATIVE)
extern sigmask_t sigsetmask __P((sigmask_t));
# if !defined(DGUX) || (defined(DGUX) && defined(__ix86))
extern sigmask_t sigblock __P((sigmask_t));
@@ -329,6 +329,7 @@ extern const char *who_info __P((ptr_t, int, char *, size_t));
extern void dolog __P((Char **, struct command *));
# ifdef UTHOST
extern char *utmphost __P((void));
+extern size_t utmphostsize __P((void));
# endif /* UTHOST */
#endif /* HAVENOUTMP */
diff --git a/contrib/tcsh/tc.func.c b/contrib/tcsh/tc.func.c
index 2a2363d715bd..410f851f88aa 100644
--- a/contrib/tcsh/tc.func.c
+++ b/contrib/tcsh/tc.func.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.func.c,v 3.88 2000/06/10 22:05:39 kim Exp $ */
+/* $Header: /src/pub/tcsh/tc.func.c,v 3.94 2000/11/12 02:18:06 christos Exp $ */
/*
* tc.func.c: New tcsh builtins.
*/
@@ -36,15 +36,15 @@
*/
#include "sh.h"
-RCSID("$Id: tc.func.c,v 3.88 2000/06/10 22:05:39 kim Exp $")
+RCSID("$Id: tc.func.c,v 3.94 2000/11/12 02:18:06 christos Exp $")
#include "ed.h"
#include "ed.defns.h" /* for the function names */
#include "tw.h"
#include "tc.h"
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#include "nt.const.h"
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef AFS
#define PASSMAX 16
@@ -117,6 +117,14 @@ expand_lex(buf, bufsiz, sp0, from, to)
register Char prev_c;
register int i;
+ /*
+ * Make sure we have enough space to expand into. E.g. we may have
+ * "a|b" turn to "a | b" (from 3 to 5 characters) which is the worst
+ * case scenario (even "a>&! b" turns into "a > & ! b", i.e. 6 to 9
+ * characters -- am I missing any other cases?).
+ */
+ bufsiz = bufsiz / 2;
+
buf[0] = '\0';
prev_c = '\0';
d = buf;
@@ -391,9 +399,9 @@ dolist(v, c)
for (cp = tmp, dp = buf; *cp; *dp++ = (*cp++ | QUOTE))
continue;
if (
-#ifdef WINNT
+#ifdef WINNT_NATIVE
(dp[-1] != (Char) (':' | QUOTE)) &&
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
(dp[-1] != (Char) ('/' | QUOTE)))
*dp++ = '/';
else
@@ -758,8 +766,10 @@ auto_lock(n)
#define XCRYPT(a, b) crypt(a, b)
+#if !defined(__MVS__)
if ((pw = getpwuid(euid)) != NULL) /* effective user passwd */
srpp = pw->pw_passwd;
+#endif /* !MVS */
#endif /* !XCRYPT */
@@ -1937,10 +1947,10 @@ hashbang(fd, vp)
char *sargv[HACKVECSZ];
unsigned char *p, *ws;
int sargc = 0;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
int fw = 0; /* found at least one word */
int first_word = 0;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (read(fd, (char *) lbuf, HACKBUFSZ) <= 0)
return -1;
@@ -1951,16 +1961,16 @@ hashbang(fd, vp)
switch (*p) {
case ' ':
case '\t':
-#ifdef WINNT
+#ifdef WINNT_NATIVE
case '\r':
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (ws) { /* a blank after a word.. save it */
*p = '\0';
-#ifndef WINNT
+#ifndef WINNT_NATIVE
if (sargc < HACKVECSZ - 1)
sargv[sargc++] = ws;
ws = NULL;
-#else /* WINNT */
+#else /* WINNT_NATIVE */
if (sargc < HACKVECSZ - 1) {
sargv[sargc] = first_word ? NULL: hb_subst(ws);
if (sargv[sargc] == NULL)
@@ -1970,7 +1980,7 @@ hashbang(fd, vp)
ws = NULL;
fw = 1;
first_word = 1;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
}
p++;
continue;
@@ -1980,22 +1990,22 @@ hashbang(fd, vp)
case '\n': /* The end of the line. */
if (
-#ifdef WINNT
+#ifdef WINNT_NATIVE
fw ||
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
ws) { /* terminate the last word */
*p = '\0';
-#ifndef WINNT
+#ifndef WINNT_NATIVE
if (sargc < HACKVECSZ - 1)
sargv[sargc++] = ws;
-#else /* WINNT */
+#else /* WINNT_NATIVE */
if (sargc < HACKVECSZ - 1) { /* deal with the 1-word case */
sargv[sargc] = first_word? NULL : hb_subst(ws);
if (sargv[sargc] == NULL)
sargv[sargc] = ws;
sargc++;
}
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
}
sargv[sargc] = NULL;
ws = NULL;
@@ -2040,14 +2050,34 @@ static void
getremotehost()
{
const char *host = NULL;
+#ifdef INET6
+ struct sockaddr_storage saddr;
+ int len = sizeof(struct sockaddr_storage);
+ static char hbuf[NI_MAXHOST];
+#else
struct hostent* hp;
struct sockaddr_in saddr;
int len = sizeof(struct sockaddr_in);
+#endif
#if defined(UTHOST) && !defined(HAVENOUTMP)
char *sptr = NULL;
#endif
if (getpeername(SHIN, (struct sockaddr *) &saddr, &len) != -1) {
+#ifdef INET6
+#if 0
+ int flag = 0;
+#else
+ int flag = NI_NUMERICHOST;
+#endif
+
+#ifdef NI_WITHSCOPEID
+ flag |= NI_WITHSCOPEID;
+#endif
+ getnameinfo((struct sockaddr *)&saddr, len, hbuf, sizeof(hbuf),
+ NULL, 0, flag);
+ host = hbuf;
+#else
#if 0
if ((hp = gethostbyaddr((char *)&saddr.sin_addr, sizeof(struct in_addr),
AF_INET)) != NULL)
@@ -2055,6 +2085,7 @@ getremotehost()
else
#endif
host = inet_ntoa(saddr.sin_addr);
+#endif
}
#if defined(UTHOST) && !defined(HAVENOUTMP)
else {
@@ -2062,14 +2093,68 @@ getremotehost()
char *name = utmphost();
/* Avoid empty names and local X displays */
if (name != NULL && *name != '\0' && *name != ':') {
+ struct in_addr addr;
+
/* Look for host:display.screen */
+ /*
+ * There is conflict with IPv6 address and X DISPLAY. So,
+ * we assume there is no IPv6 address in utmp and don't
+ * touch here.
+ */
if ((sptr = strchr(name, ':')) != NULL)
*sptr = '\0';
- /* Leave IP address as is */
- if (isdigit(*name))
+ /* Leave IPv4 address as is */
+ /*
+ * we use inet_addr here, not inet_aton because many systems
+ * have not caught up yet.
+ */
+ addr.s_addr = inet_addr(name);
+ if (addr.s_addr != (unsigned long)~0)
host = name;
else {
if (sptr != name) {
+#ifdef INET6
+ char *s, *domain;
+ char dbuf[MAXHOSTNAMELEN], cbuf[MAXHOSTNAMELEN];
+ struct addrinfo hints, *res = NULL;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
+#if defined(UTHOST) && !defined(HAVENOUTMP)
+ if (strlen(name) < utmphostsize())
+#else
+ if (name != NULL)
+#endif
+ {
+ if (getaddrinfo(name, NULL, &hints, &res) != 0)
+ res = NULL;
+ } else if (gethostname(dbuf, sizeof(dbuf) - 1) == 0 &&
+ (domain = strchr(dbuf, '.')) != NULL) {
+ for (s = strchr(name, '.');
+ s != NULL; s = strchr(s + 1, '.')) {
+ if (*(s + 1) != '\0' &&
+ (ptr = strstr(domain, s)) != NULL) {
+ len = s - name;
+ if (len + strlen(ptr) >= sizeof(cbuf))
+ break;
+ strncpy(cbuf, name, len);
+ strcpy(cbuf + len, ptr);
+ if (getaddrinfo(cbuf, NULL, &hints, &res) != 0)
+ res = NULL;
+ break;
+ }
+ }
+ }
+ if (res != NULL) {
+ if (res->ai_canonname != NULL) {
+ strncpy(hbuf, res->ai_canonname, sizeof(hbuf));
+ host = hbuf;
+ }
+ freeaddrinfo(res);
+ }
+#else
if ((hp = gethostbyname(name)) == NULL) {
/* Try again eliminating the trailing domain */
if ((ptr = strchr(name, '.')) != NULL) {
@@ -2081,6 +2166,7 @@ getremotehost()
}
else
host = hp->h_name;
+#endif
}
}
}
diff --git a/contrib/tcsh/tc.os.c b/contrib/tcsh/tc.os.c
index b2af5f68a617..a5b8f55e069e 100644
--- a/contrib/tcsh/tc.os.c
+++ b/contrib/tcsh/tc.os.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.os.c,v 3.50 1998/10/25 15:10:35 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.os.c,v 3.52 2000/11/11 23:03:39 christos Exp $ */
/*
* tc.os.c: OS Dependent builtin functions
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.os.c,v 3.50 1998/10/25 15:10:35 christos Exp $")
+RCSID("$Id: tc.os.c,v 3.52 2000/11/11 23:03:39 christos Exp $")
#include "tw.h"
#include "ed.h"
@@ -865,7 +865,7 @@ xmemmove(vdst, vsrc, len)
#endif /* NEEDmemmove */
-#ifndef WINNT
+#ifndef WINNT_NATIVE
#ifdef tcgetpgrp
int
xtcgetpgrp(fd)
@@ -893,7 +893,7 @@ xtcsetpgrp(fd, pgrp)
}
#endif /* tcgetpgrp */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef YPBUGS
@@ -1003,16 +1003,16 @@ xstrerror(i)
#endif /* strerror */
#ifdef gethostname
-# if !defined(_MINIX) && !defined(__EMX__) && !defined(WINNT)
+# if !defined(_MINIX) && !defined(__EMX__) && !defined(WINNT_NATIVE)
# include <sys/utsname.h>
-# endif /* !_MINIX && !__EMX__ && !WINNT */
+# endif /* !_MINIX && !__EMX__ && !WINNT_NATIVE */
int
xgethostname(name, namlen)
char *name;
int namlen;
{
-# if !defined(_MINIX) && !defined(__EMX__) && !defined(WINNT)
+# if !defined(_MINIX) && !defined(__EMX__) && !defined(WINNT_NATIVE)
int i, retval;
struct utsname uts;
@@ -1164,7 +1164,7 @@ fail:
# else /* ! hp9000s500 */
-# if (SYSVREL != 0 && !defined(d_fileno)) || defined(_VMS_POSIX) || defined(WINNT)
+# if (SYSVREL != 0 && !defined(d_fileno)) || defined(_VMS_POSIX) || defined(WINNT) || defined(_MINIX_VMD)
# define d_fileno d_ino
# endif
diff --git a/contrib/tcsh/tc.os.h b/contrib/tcsh/tc.os.h
index fcd4ade46366..c362cbcfcef7 100644
--- a/contrib/tcsh/tc.os.h
+++ b/contrib/tcsh/tc.os.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.os.h,v 3.82 1999/02/06 15:19:03 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.os.h,v 3.86 2000/11/11 23:03:39 christos Exp $ */
/*
* tc.os.h: Shell os dependent defines
*/
@@ -37,9 +37,9 @@
#ifndef _h_tc_os
#define _h_tc_os
-#ifndef WINNT
+#ifndef WINNT_NATIVE
#define NEEDstrerror /* Too hard to find which systems have it */
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#ifdef notdef
@@ -51,6 +51,10 @@
# define BACKPIPE
#endif /* notdef */
+#ifdef __CYGWIN__
+# undef NEEDstrerror
+#endif
+
#ifdef _VMS_POSIX
# ifndef NOFILE
# define NOFILE 64
@@ -82,9 +86,9 @@
# define NOFILE 256
#endif /* NOFILE */
-#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || SYSVREL >= 4
+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__) || SYSVREL >= 4 || defined(_MINIX_VMD)
# undef NEEDstrerror
-#endif /* linux || __NetBSD__ || __FreeBSD__ || SYSVREL >= 4 */
+#endif /* linux || __NetBSD__ || __FreeBSD__ || SYSVREL >= 4 || _MINIX_VMD */
#if !defined(pyr) && !defined(sinix)
/* Pyramid's cpp complains about the next line */
@@ -233,7 +237,7 @@ struct ucred {
*
* From: scott@craycos.com (Scott Bolte)
*/
-#ifndef WINNT
+#ifndef WINNT_NATIVE
# ifdef F_SETFD
# define close_on_exec(fd, v) fcntl((fd), F_SETFD, v)
# else /* !F_SETFD */
@@ -243,9 +247,9 @@ struct ucred {
# define close_on_exec(fd, v) /* Nothing */
# endif /* FIOCLEX */
# endif /* F_SETFD */
-#else /* WINNT */
+#else /* WINNT_NATIVE */
# define close_on_exec(fd, v) nt_close_on_exec((fd),(v))
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
/*
* Stat
@@ -502,7 +506,7 @@ struct ucred {
#endif /* POSIX */
-#if !defined(SOLARIS2) && !defined(sinix) && !defined(BSD4_4) && !defined(WINNT)
+#if !defined(SOLARIS2) && !defined(sinix) && !defined(BSD4_4) && !defined(WINNT_NATIVE)
# if (SYSVREL > 0 && !defined(OREO) && !defined(sgi) && !defined(linux) && !defined(sinix) && !defined(_AIX) &&!defined(_UWIN)) || defined(NeXT)
# define NEEDgetcwd
# endif /* (SYSVREL > 0 && !OREO && !sgi && !linux && !sinix && !_AIX && !_UWIN) || NeXT */
@@ -527,7 +531,8 @@ typedef struct timeval timeval_t;
# define free tcsh_free
#endif /* NeXT */
-#if !defined(BSD4_4) && !defined(__linux__) && !defined(__hpux) && !defined(sgi)
+#if !defined(BSD4_4) && !defined(__linux__) && !defined(__hpux) && \
+ !defined(sgi) && !defined(_AIX) && !defined(__CYGWIN__)
#ifndef NEEDgethostname
extern int gethostname __P((char *, int));
#endif /* NEEDgethostname */
@@ -553,7 +558,7 @@ extern caddr_t sbrk __P((int));
extern int qsort();
# endif /* SYSVREL == 0 && !__lucid */
# else /* !SUNOS4 */
-# ifndef WINNT
+# ifndef WINNT_NATIVE
# ifndef hpux
# if __GNUC__ != 2
extern int abort();
@@ -565,7 +570,7 @@ extern int qsort();
extern void abort();
extern void qsort();
# endif /* hpux */
-# endif /* !WINNT */
+# endif /* !WINNT_NATIVE */
# endif /* SUNOS4 */
#ifndef _CX_UX
extern void perror();
@@ -722,12 +727,12 @@ extern void bcopy __P((const void *, void *, size_t));
# ifdef REMOTEHOST
/* Irix6 defines getpeername(int, void *, int *) which conflicts with
the definition below. */
-# if !defined(__sgi) && !defined(_OSD_POSIX)
+# if !defined(__sgi) && !defined(_OSD_POSIX) && !defined(__MVS__)
# ifndef _SOCKLEN_T /* Avoid Solaris 2.7 bogosity. */
struct sockaddr;
extern int getpeername __P((int, struct sockaddr *, int *));
# endif /* _SOCKLEN_T */
-# endif /* !__sgi && !_OSD_POSIX */
+# endif /* !__sgi && !_OSD_POSIX && !__MVS__ */
# endif /* REMOTEHOST */
# ifndef BSDTIMES
extern int getrlimit __P((int, struct rlimit *));
diff --git a/contrib/tcsh/tc.prompt.c b/contrib/tcsh/tc.prompt.c
index aebb3ca90413..95d56414287b 100644
--- a/contrib/tcsh/tc.prompt.c
+++ b/contrib/tcsh/tc.prompt.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.prompt.c,v 3.39 2000/06/10 19:20:01 kim Exp $ */
+/* $Header: /src/pub/tcsh/tc.prompt.c,v 3.41 2000/11/11 23:03:39 christos Exp $ */
/*
* tc.prompt.c: Prompt printing stuff
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.prompt.c,v 3.39 2000/06/10 19:20:01 kim Exp $")
+RCSID("$Id: tc.prompt.c,v 3.41 2000/11/11 23:03:39 christos Exp $")
#include "ed.h"
#include "tw.h"
@@ -357,7 +357,7 @@ tprintf(what, buf, fmt, siz, str, tim, info)
/* option to determine fixed # of dirs from path */
if (Scp == '.' || Scp == 'C') {
int skip;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
if (z[1] == ':') {
*p++ = attributes | *z++;
*p++ = attributes | *z++;
@@ -369,7 +369,7 @@ tprintf(what, buf, fmt, siz, str, tim, info)
*p++ = attributes | *z++;
}while(*z != '/');
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
q = z;
while (*z) /* calc # of /'s */
if (*z++ == '/')
@@ -520,7 +520,7 @@ tprintf(what, buf, fmt, siz, str, tim, info)
break;
case '$':
sz = (int) (ep - p);
- (void) expdollar(&p, &cp, &pdirs, attributes);
+ (void) expdollar(&p, &cp, &sz, attributes);
break;
case '%':
*p++ = attributes | '%';
diff --git a/contrib/tcsh/tc.sched.c b/contrib/tcsh/tc.sched.c
index 787a20671701..577bc601da68 100644
--- a/contrib/tcsh/tc.sched.c
+++ b/contrib/tcsh/tc.sched.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.sched.c,v 3.16 1998/10/25 15:10:40 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.sched.c,v 3.17 2000/07/04 19:46:23 christos Exp $ */
/*
* tc.sched.c: Scheduled command execution
*
@@ -38,7 +38,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.sched.c,v 3.16 1998/10/25 15:10:40 christos Exp $")
+RCSID("$Id: tc.sched.c,v 3.17 2000/07/04 19:46:23 christos Exp $")
#include "ed.h"
#include "tc.h"
@@ -77,11 +77,11 @@ dosched(v, c)
USE(c);
/* This is a major kludge because of a gcc linker */
/* Problem. It may or may not be needed for you */
-#ifdef _MINIX
+#if defined(_MINIX) && !defined(_MINIX_VMD)
char kludge[10];
extern char *sprintf();
sprintf(kludge, CGETS(24, 1, "kludge"));
-#endif /* _MINIX */
+#endif /* _MINIX && !_MINIX_VMD */
v++;
cp = *v++;
diff --git a/contrib/tcsh/tc.sig.c b/contrib/tcsh/tc.sig.c
index f7feae86b338..29bbded90004 100644
--- a/contrib/tcsh/tc.sig.c
+++ b/contrib/tcsh/tc.sig.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.sig.c,v 3.24 1998/04/08 17:57:36 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.sig.c,v 3.25 2000/07/04 19:46:24 christos Exp $ */
/*
* tc.sig.c: Signal routine emulations
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.sig.c,v 3.24 1998/04/08 17:57:36 christos Exp $")
+RCSID("$Id: tc.sig.c,v 3.25 2000/07/04 19:46:24 christos Exp $")
#include "tc.wait.h"
@@ -161,7 +161,7 @@ ourwait(w)
pid_t pid;
# ifdef JOBDEBUG
- xprintf(CGETS(25, 1, "our wait %d\n", stk_ptr));
+ xprintf(CGETS(25, 1, "our wait %d\n"), stk_ptr);
flush();
# endif /* JOBDEBUG */
diff --git a/contrib/tcsh/tc.sig.h b/contrib/tcsh/tc.sig.h
index b4138503259e..b817978cb4a6 100644
--- a/contrib/tcsh/tc.sig.h
+++ b/contrib/tcsh/tc.sig.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.sig.h,v 3.20 1998/04/08 17:57:37 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.sig.h,v 3.22 2000/11/11 23:03:39 christos Exp $ */
/*
* tc.sig.h: Signal handling
*
@@ -38,7 +38,7 @@
#ifndef _h_tc_sig
#define _h_tc_sig
-#if (SYSVREL > 0) || defined(BSD4_4) || defined(_MINIX) || defined(DGUX) || defined(WINNT)
+#if (SYSVREL > 0) || defined(BSD4_4) || defined(_MINIX) || defined(DGUX) || defined(WINNT_NATIVE)
# include <signal.h>
# ifndef SIGCHLD
# define SIGCHLD SIGCLD
@@ -89,7 +89,7 @@ typedef struct sigaction sigvec_t;
# define sv_handler sa_handler
# define sv_flags sa_flags
# else /* BSDSIGS */
-# define mysigvec(a, b, c) sigvec(a, b, c)
+# define mysigvec(a, b, c) sigvec(a, b, c)
typedef struct sigvec sigvec_t;
# endif /* POSIXSIGS */
# endif /* HAVE_SIGVEC */
@@ -118,7 +118,10 @@ typedef struct sigvec sigvec_t;
#ifdef _MINIX
# include <signal.h>
-# define killpg(a, b) kill((a), (b))
+# define killpg(a, b) kill((a), (b))
+# ifdef _MINIX_VMD
+# define signal(a, b) signal((a), (a) == SIGCHLD ? SIG_IGN : (b))
+# endif /* _MINIX_VMD */
#endif /* _MINIX */
#ifdef _VMS_POSIX
@@ -148,9 +151,9 @@ typedef struct sigvec sigvec_t;
# define sigmask(s) (1 << ((s)-1))
# ifdef POSIXSIGS
# define sigpause(a) (void) bsd_sigpause(a)
-# ifdef WINNT
+# ifdef WINNT_NATIVE
# undef signal
-# endif /* WINNT */
+# endif /* WINNT_NATIVE */
# define signal(a, b) bsd_signal(a, b)
# endif /* POSIXSIGS */
# ifndef _SEQUENT_
diff --git a/contrib/tcsh/tc.wait.h b/contrib/tcsh/tc.wait.h
index df93c064e4a1..9d7ac21830ad 100644
--- a/contrib/tcsh/tc.wait.h
+++ b/contrib/tcsh/tc.wait.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.wait.h,v 3.10 1997/10/27 22:44:39 christos Exp $ */
+/* $Header: /src/pub/tcsh/tc.wait.h,v 3.11 2000/11/11 23:03:39 christos Exp $ */
/*
* tc.wait.h: <sys/wait.h> for machines that don't have it or have it and
* is incorrect.
@@ -68,9 +68,9 @@
# undef NEEDwait
# include "mi.wait.h"
# else
-# ifndef WINNT
+# ifndef WINNT_NATIVE
# include <sys/wait.h>
-# endif /* WINNT */
+# endif /* WINNT_NATIVE */
# endif /* _MINIX */
#endif /* SYSVREL == 0 || linux */
diff --git a/contrib/tcsh/tc.who.c b/contrib/tcsh/tc.who.c
index 91b2c0356f5c..325db77ee35c 100644
--- a/contrib/tcsh/tc.who.c
+++ b/contrib/tcsh/tc.who.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tc.who.c,v 3.29 2000/06/09 18:33:25 kim Exp $ */
+/* $Header: /src/pub/tcsh/tc.who.c,v 3.32 2000/11/12 02:18:07 christos Exp $ */
/*
* tc.who.c: Watch logins and logouts...
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tc.who.c,v 3.29 2000/06/09 18:33:25 kim Exp $")
+RCSID("$Id: tc.who.c,v 3.32 2000/11/12 02:18:07 christos Exp $")
#include "tc.h"
@@ -54,14 +54,23 @@ RCSID("$Id: tc.who.c,v 3.29 2000/06/09 18:33:25 kim Exp $")
* Kimmo Suominen, Oct 14 1991
*/
# ifndef _PATH_UTMP
-# define _PATH_UTMP UTMPX_FILE
+# if defined(__UTMPX_FILE) && !defined(UTMPX_FILE)
+# define _PATH_UTMP __UTMPX_FILE
+# else
+# define _PATH_UTMP UTMPX_FILE
+# endif /* __UTMPX_FILE && !UTMPX_FILE */
# endif /* _PATH_UTMP */
# define utmp utmpx
-# define ut_time ut_xtime
+# ifdef __MVS__
+# define ut_time ut_tv.tv_sec
+# define ut_name ut_user
+# else
+# define ut_time ut_xtime
+# endif /* __MVS__ */
#else /* !HAVEUTMPX */
-# ifndef WINNT
+# ifndef WINNT_NATIVE
# include <utmp.h>
-# endif /* WINNT */
+# endif /* WINNT_NATIVE */
#endif /* HAVEUTMPX */
#ifndef BROKEN_CC
@@ -172,13 +181,13 @@ watch_login(force)
#if defined(UTHOST) && defined(_SEQUENT_)
char *host, *ut_find_host();
#endif
-#ifdef WINNT
+#ifdef WINNT_NATIVE
static int ncbs_posted = 0;
USE(utmp);
USE(utmpfd);
USE(sta);
USE(wpnew);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
/* stop SIGINT, lest our login list get trashed. */
#ifdef BSDSIGS
@@ -205,7 +214,7 @@ watch_login(force)
interval = 0;
(void) time(&t);
-#ifdef WINNT
+#ifdef WINNT_NATIVE
/*
* Since NCB_ASTATs take time, start em async at least 90 secs
* before we are due -amol 6/5/97
@@ -217,7 +226,7 @@ watch_login(force)
ncbs_posted = 1;
}
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (t - watch_period < interval) {
#ifdef BSDSIGS
(void) sigsetmask(omask);
@@ -227,9 +236,9 @@ watch_login(force)
return; /* not long enough yet... */
}
watch_period = t;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
ncbs_posted = 0;
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
/*
* From: Michael Schroeder <mlschroe@immd4.informatik.uni-erlangen.de>
@@ -382,7 +391,7 @@ watch_login(force)
# if defined(UTHOST) && defined(_SEQUENT_)
endutent();
# endif
-#endif /* !WINNT */
+#endif /* !WINNT_NATIVE */
if (force || vp == NULL)
return;
@@ -607,6 +616,12 @@ struct command *c;
}
# ifdef UTHOST
+size_t
+utmphostsize()
+{
+ return UTHOSTLEN;
+}
+
char *
utmphost()
{
@@ -626,7 +641,7 @@ utmphost()
}
# endif /* UTHOST */
-#ifdef WINNT
+#ifdef WINNT_NATIVE
void add_to_who_list(name, mach_nm)
char *name;
char *mach_nm;
@@ -679,5 +694,5 @@ void add_to_who_list(name, mach_nm)
wp->who_prev = wpnew; /* linked in now */
}
}
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#endif /* HAVENOUTMP */
diff --git a/contrib/tcsh/tcsh.man b/contrib/tcsh/tcsh.man
index 81f6be5d730a..a056ac5106e0 100644
--- a/contrib/tcsh/tcsh.man
+++ b/contrib/tcsh/tcsh.man
@@ -76,7 +76,7 @@
.\" used here if you can. In particular, please don't use nroff commands
.\" which aren't already used herein.
.\"
-.TH TCSH 1 "14 January 2000" "Astron 6.09.01"
+.TH TCSH 1 "19 November 2000" "Astron 6.10.00"
.SH NAME
tcsh \- C shell with file name completion and command line editing
.SH SYNOPSIS
@@ -3545,6 +3545,11 @@ If set, backslashes (`\\') always quote `\\', `'', and `"'. This may make
complex quoting tasks easier, but it can cause syntax errors in \fIcsh\fR(1)
scripts.
.TP 8
+.B catalog
+The file name of the message catalog.
+If set, tcsh use `tcsh.${catalog}' as a message catalog instead of
+default `tcsh'.
+.TP 8
.B cdpath
A list of directories in which \fIcd\fR should search for
subdirectories if they aren't found in the current directory.
@@ -4400,7 +4405,7 @@ al
\fBautologout\fR is enabled; default
.TP 4
kan
-Kanji is used and the ISO character set is ignored,
+Kanji is used if appropriate according to locale settings,
unless the \fBnokanji\fR shell variable is set
.TP 4
sm
@@ -4964,7 +4969,7 @@ pipe(2), setrlimit(2), sigvec(2), stat(2), umask(2), vfork(2), wait(2),
malloc(3), setlocale(3), tty(4), a.out(5), termcap(5), environ(7),
termio(7), Introduction to the C Shell
.SH VERSION
-This manual documents tcsh 6.09.01 (Astron) 2000-01-14.
+This manual documents tcsh 6.10.00 (Astron) 2000-11-19.
.SH AUTHORS
.PD 0
.TP 2
diff --git a/contrib/tcsh/tw.color.c b/contrib/tcsh/tw.color.c
index dd34e6f2e5ef..66d9648e61ee 100644
--- a/contrib/tcsh/tw.color.c
+++ b/contrib/tcsh/tw.color.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tw.color.c,v 1.6 2000/01/14 22:57:30 christos Exp $ */
+/* $Header: /src/pub/tcsh/tw.color.c,v 1.7 2000/06/11 02:14:16 kim Exp $ */
/*
* tw.color.c: builtin color ls-F
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tw.color.c,v 1.6 2000/01/14 22:57:30 christos Exp $")
+RCSID("$Id: tw.color.c,v 1.7 2000/06/11 02:14:16 kim Exp $")
#include "tw.h"
#include "ed.h"
@@ -76,11 +76,11 @@ static Variable variables[] = {
VAR(NOS, "fi", "0"), /* Regular file */
VAR(NOS, "no", "0"), /* Normal (non-filename) text */
VAR(NOS, "mi", ""), /* Missing file (defaults to fi) */
-#ifdef _OSD_POSIX
+#ifdef IS_ASCII
+ VAR(NOS, "lc", "\033["), /* Left code (ASCII) */
+#else
VAR(NOS, "lc", "\x27["), /* Left code (EBCDIC)*/
-#else /* _OSD_POSIX */
- VAR(NOS, "lc", "\033["), /* Left code */
-#endif /* _OSD_POSIX */
+#endif
VAR(NOS, "rc", "m"), /* Right code */
VAR(NOS, "ec", ""), /* End code (replaces lc+no+rc) */
};
diff --git a/contrib/tcsh/tw.decls.h b/contrib/tcsh/tw.decls.h
index 38f47fa86879..b3eafb4b3d49 100644
--- a/contrib/tcsh/tw.decls.h
+++ b/contrib/tcsh/tw.decls.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tw.decls.h,v 3.16 1998/06/27 12:27:44 christos Exp $ */
+/* $Header: /src/pub/tcsh/tw.decls.h,v 3.17 2000/06/11 02:14:16 kim Exp $ */
/*
* tw.decls.h: Tenex external declarations
*/
@@ -46,10 +46,12 @@ extern void do_help __P((Char *));
* tw.parse.c
*/
extern Char *dollar __P((Char *, const Char *));
+#ifndef __MVS__
extern int tenematch __P((Char *, int, COMMAND));
extern int t_search __P((Char *, Char *, COMMAND,
int, int, int, Char *,
int));
+#endif
extern int starting_a_command __P((Char *, Char *));
extern void copyn __P((Char *, Char *, int));
extern void catn __P((Char *, Char *, int));
diff --git a/contrib/tcsh/tw.h b/contrib/tcsh/tw.h
index 25b484c36e0a..80aec0bd8ac8 100644
--- a/contrib/tcsh/tw.h
+++ b/contrib/tcsh/tw.h
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tw.h,v 3.20 1997/10/02 16:36:35 christos Exp $ */
+/* $Header: /src/pub/tcsh/tw.h,v 3.21 2000/07/04 19:45:02 christos Exp $ */
/*
* tw.h: TwENEX functions headers
*/
@@ -77,7 +77,7 @@
#endif
#define ON 1
#define OFF 0
-#define FILSIZ 512 /* Max reasonable file name length */
+#define FILSIZ BUFSIZE /* Max reasonable file name length */
#define ESC CTL_ESC('\033')
#define equal(a, b) (strcmp(a, b) == 0)
diff --git a/contrib/tcsh/tw.init.c b/contrib/tcsh/tw.init.c
index e040a88f63c0..db4fe109bfe3 100644
--- a/contrib/tcsh/tw.init.c
+++ b/contrib/tcsh/tw.init.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tw.init.c,v 3.25 1998/10/25 15:10:50 christos Exp $ */
+/* $Header: /src/pub/tcsh/tw.init.c,v 3.27 2000/11/11 23:03:40 christos Exp $ */
/*
* tw.init.c: Handle lists of things to complete
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: tw.init.c,v 3.25 1998/10/25 15:10:50 christos Exp $")
+RCSID("$Id: tw.init.c,v 3.27 2000/11/11 23:03:40 christos Exp $")
#include "tw.h"
#include "ed.h"
@@ -260,6 +260,16 @@ tw_cmd_cmd()
if (recexec)
dir = Strspl(*pv, STRslash);
while ((dp = readdir(dirp)) != NULL) {
+#if defined(_UWIN) || defined(__CYGWIN__)
+ /* Turn foo.{exe,com,bat} into foo since UWIN's readdir returns
+ * the file with the .exe, .com, .bat extension
+ */
+ size_t ext = strlen(dp->d_name) - 4;
+ if ((ext > 0) && (strcmp(&dp->d_name[ext], ".exe") == 0 ||
+ strcmp(&dp->d_name[ext], ".bat") == 0 ||
+ strcmp(&dp->d_name[ext], ".com") == 0))
+ dp->d_name[ext] = '\0';
+#endif /* _UWIN || __CYGWIN__ */
/* the call to executable() may make this a bit slow */
name = str2short(dp->d_name);
if (dp->d_ino == 0 || (recexec && !executable(dir, name, 0)))
@@ -290,11 +300,11 @@ tw_cmd_builtin()
for (bptr = bfunc; bptr < &bfunc[nbfunc]; bptr++)
if (bptr->bname)
tw_cmd_add(str2short(bptr->bname));
-#ifdef WINNT
+#ifdef WINNT_NATIVE
for (bptr = nt_bfunc; bptr < &nt_bfunc[nt_nbfunc]; bptr++)
if (bptr->bname)
tw_cmd_add(str2short(bptr->bname));
-#endif /* WINNT*/
+#endif /* WINNT_NATIVE*/
} /* end tw_cmd_builtin */
@@ -634,9 +644,9 @@ tw_logname_start(dfd, pat)
{
USE(pat);
SETDIR(dfd)
-#if !defined(_VMS_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(WINNT_NATIVE)
(void) setpwent(); /* Open passwd file */
-#endif /* !_VMS_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !WINNT_NATIVE */
} /* end tw_logname_start */
@@ -660,12 +670,12 @@ tw_logname_next(dir, flags)
USE(flags);
USE(dir);
TW_HOLD();
-#if !defined(_VMS_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(WINNT_NATIVE)
/* ISC does not declare getpwent()? */
pw = (struct passwd *) getpwent();
-#else /* _VMS_POSIX || WINNT */
+#else /* _VMS_POSIX || WINNT_NATIVE */
pw = NULL;
-#endif /* !_VMS_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !WINNT_NATIVE */
TW_RELS();
if (pw == NULL) {
@@ -688,9 +698,9 @@ tw_logname_end()
#ifdef YPBUGS
fix_yp_bugs();
#endif
-#if !defined(_VMS_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(WINNT_NATIVE)
(void) endpwent();
-#endif /* !_VMS_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !WINNT_NATIVE */
} /* end tw_logname_end */
@@ -705,9 +715,9 @@ tw_grpname_start(dfd, pat)
{
USE(pat);
SETDIR(dfd)
-#if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT_NATIVE)
(void) setgrent(); /* Open group file */
-#endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT_NATIVE */
} /* end tw_grpname_start */
@@ -731,11 +741,11 @@ tw_grpname_next(dir, flags)
USE(flags);
USE(dir);
TW_HOLD();
-#if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT_NATIVE)
gr = (struct group *) getgrent();
-#else /* _VMS_POSIX || _OSD_POSIX || WINNT */
+#else /* _VMS_POSIX || _OSD_POSIX || WINNT_NATIVE */
gr = NULL;
-#endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT_NATIVE */
TW_RELS();
if (gr == NULL) {
@@ -758,9 +768,9 @@ tw_grpname_end()
#ifdef YPBUGS
fix_yp_bugs();
#endif
-#if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT)
+#if !defined(_VMS_POSIX) && !defined(_OSD_POSIX) && !defined(WINNT_NATIVE)
(void) endgrent();
-#endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT */
+#endif /* !_VMS_POSIX && !_OSD_POSIX && !WINNT_NATIVE */
} /* end tw_grpname_end */
/* tw_file_start():
diff --git a/contrib/tcsh/tw.parse.c b/contrib/tcsh/tw.parse.c
index af3f1338df64..722509be63bf 100644
--- a/contrib/tcsh/tw.parse.c
+++ b/contrib/tcsh/tw.parse.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/tw.parse.c,v 3.87 2000/01/14 22:57:30 christos Exp $ */
+/* $Header: /src/pub/tcsh/tw.parse.c,v 3.89 2000/11/11 23:03:40 christos Exp $ */
/*
* tw.parse.c: Everyone has taken a shot in this futile effort to
* lexically analyze a csh line... Well we cannot good
@@ -39,15 +39,15 @@
*/
#include "sh.h"
-RCSID("$Id: tw.parse.c,v 3.87 2000/01/14 22:57:30 christos Exp $")
+RCSID("$Id: tw.parse.c,v 3.89 2000/11/11 23:03:40 christos Exp $")
#include "tw.h"
#include "ed.h"
#include "tc.h"
-#ifdef WINNT
+#ifdef WINNT_NATIVE
#include "nt.const.h"
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
#define EVEN(x) (((x) & 1) != 1)
#define DOT_NONE 0 /* Don't display dot files */
@@ -109,7 +109,9 @@ extern int lbuffed; /* from sh.print.c */
static void extract_dir_and_name __P((Char *, Char *, Char *));
static int insert_meta __P((Char *, Char *, Char *, bool));
static Char *tilde __P((Char *, Char *));
+#ifndef __MVS__
static int expand_dir __P((Char *, Char *, DIR **, COMMAND));
+#endif
static bool nostat __P((Char *));
static Char filetype __P((Char *, Char *));
static int t_glob __P((Char ***, int));
@@ -120,10 +122,12 @@ static int is_suffix __P((Char *, Char *));
static int recognize __P((Char *, Char *, int, int, int));
static int ignored __P((Char *));
static int isadirectory __P((Char *, Char *));
+#ifndef __MVS__
static int tw_collect_items __P((COMMAND, int, Char *, Char *,
Char *, Char *, int));
static int tw_collect __P((COMMAND, int, Char *, Char *,
Char **, Char *, int, DIR *));
+#endif
static Char tw_suffix __P((int, Char *, Char *, Char *,
Char *));
static void tw_fixword __P((int, Char *, Char *, Char *, int));
@@ -820,21 +824,21 @@ recognize(exp_name, item, name_length, numitems, enhanced)
Char MCH1, MCH2;
register Char *x, *ent;
register int len = 0;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
struct varent *vp;
int igncase;
igncase = (vp = adrof(STRcomplete)) != NULL &&
Strcmp(*(vp->vec), STRigncase) == 0;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (numitems == 1) { /* 1st match */
copyn(exp_name, item, MAXNAMLEN);
return (0);
}
if (!enhanced
-#ifdef WINNT
+#ifdef WINNT_NATIVE
&& !igncase
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
) {
for (x = exp_name, ent = item; *x && (*x & TRIM) == (*ent & TRIM); x++, ent++)
len++;
@@ -988,10 +992,10 @@ tw_collect_items(command, looking, exp_dir, exp_name, target, pat, flags)
case RECOGNIZE_ALL:
case RECOGNIZE_SCROLL:
-#ifdef WINNT
+#ifdef WINNT_NATIVE
igncase = (vp = adrof(STRcomplete)) != NULL &&
Strcmp(*(vp->vec), STRigncase) == 0;
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
enhanced = (vp = adrof(STRcomplete)) != NULL && !Strcmp(*(vp->vec),STRenhance);
if (enhanced || igncase) {
if (!is_prefixmatch(target, item, igncase))
@@ -1714,10 +1718,10 @@ extract_dir_and_name(path, dir, name)
register Char *p;
p = Strrchr(path, '/');
-#ifdef WINNT
+#ifdef WINNT_NATIVE
if (p == NULL)
p = Strrchr(path, ':');
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
if (p == NULL) {
copyn(name, path, MAXNAMLEN);
dir[0] = '\0';
diff --git a/contrib/tcsh/vms.termcap.c b/contrib/tcsh/vms.termcap.c
index d48802e56dc4..deef66f73c27 100644
--- a/contrib/tcsh/vms.termcap.c
+++ b/contrib/tcsh/vms.termcap.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/vms.termcap.c,v 1.5 1997/10/02 16:36:36 christos Exp $ */
+/* $Header: /src/pub/tcsh/vms.termcap.c,v 1.6 2000/06/10 23:32:42 kim Exp $ */
/*
* termcap.c 1.1 20/7/87 agc Joypace Ltd
*
@@ -9,7 +9,7 @@
* A public domain implementation of the termcap(3) routines.
*/
#include "sh.h"
-RCSID("$Id: vms.termcap.c,v 1.5 1997/10/02 16:36:36 christos Exp $")
+RCSID("$Id: vms.termcap.c,v 1.6 2000/06/10 23:32:42 kim Exp $")
#if defined(_VMS_POSIX) || defined(_OSD_POSIX)
/* efth 1988-Apr-29
@@ -334,4 +334,4 @@ int (*outc)();
(*outc)(*cp++);
return(1);
}
-#endif /* _VMS_POSIX */
+#endif /* _VMS_POSIX || _OSD_POSIX */