FreeBSD Bugzilla – Attachment 177393 Details for
Bug 207860
[PATCH] Upgrade tcsh to 6.20.00
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for updating to tcsh-6.20.00
tcsh-upgrade-to-6.20.00.diff (text/plain), 540.42 KB, created by
Vladimir Zakharov
on 2016-11-25 20:05:18 UTC
(
hide
)
Description:
Patch for updating to tcsh-6.20.00
Filename:
MIME Type:
Creator:
Vladimir Zakharov
Created:
2016-11-25 20:05:18 UTC
Size:
540.42 KB
patch
obsolete
>Index: bin/csh/Makefile >=================================================================== >--- bin/csh/Makefile (revision 309109) >+++ bin/csh/Makefile (working copy) >@@ -24,7 +24,8 @@ > sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ > sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ > sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h >-SRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h >+SRCS+= sh.decls.h glob.c glob.h dotlock.h dotlock.c mi.termios.c \ >+ mi.wait.h mi.varargs.h > SRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ > tw.comp.c tw.color.c > SRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ >@@ -59,6 +60,7 @@ > greek:el_GR.UTF-8 \ > italian:it_IT.UTF-8 \ > ja:ja_JP.UTF-8 \ >+ pl:pl_PL.UTF-8 \ > russian:ru_RU.UTF-8 \ > spanish:es_ES.UTF-8 \ > ukrainian:uk_UA.UTF-8 >@@ -84,6 +86,7 @@ > NLSLINKS_it_IT.UTF-8 += it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-1 \ > it_IT.ISO8859-15 > NLSLINKS_ja_JP.UTF-8 = ja_JP.SJIS ja_JP.eucJP >+NLSLINKS_pl_PL.UTF-8 = pl_PL.ISO8859-2 > NLSLINKS_ru_RU.UTF-8 = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.KOI8-R > NLSLINKS_uk_UA.UTF-8 = uk_UA.ISO8859-5 uk_UA.KOI8-U > .else >Index: contrib/tcsh/Copyright >=================================================================== >--- contrib/tcsh/Copyright (nonexistent) >+++ contrib/tcsh/Copyright (working copy) >@@ -0,0 +1,28 @@ >+/*- >+ * Copyright (c) 1980, 1991 The Regents of the University of California. >+ * All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * 3. Neither the name of the University nor the names of its contributors >+ * may be used to endorse or promote products derived from this software >+ * without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND >+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE >+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >+ * SUCH DAMAGE. >+ */ >Index: contrib/tcsh/FREEBSD-Xlist >=================================================================== >--- contrib/tcsh/FREEBSD-Xlist (revision 309109) >+++ contrib/tcsh/FREEBSD-Xlist (working copy) >@@ -1,9 +1,22 @@ > $FreeBSD$ >+*/.cvsignore >+*/.gitignore >+*/.travis.yml >+*/Announce* >+*/BUG-TRACKING > */BUGS >+*/MAKERELEASE >+*/Makefile.ADMIN >+*/Makefile.man2html >+*/RELEASE-PROCEDURE >+*/bar > */config/a* > */config/bs2000 > */config/bsd > */config/bsdreno > */config/[c-z]* >+*/cygwin >+*/m4 >+*/tcsh.vcproj > */tests > */win32 >Index: contrib/tcsh/Fixes >=================================================================== >--- contrib/tcsh/Fixes (revision 309109) >+++ contrib/tcsh/Fixes (working copy) >@@ -1,3 +1,95 @@ >+ 20. V6.20.00 - 20161124 >+ 19. Don't resize the screen if it did not change size. >+ 18. V6.19.01 - 20161025 >+ 17. restore file description when cleaning up after eval: >+ repeat 99 time >+ 16. PR/572: Fix $SHLVL issue when exec'ing subshells. >+ 15. PR/403: Fix backquote expansion for multi-byte character sets. >+ 14. Fix drawing issu with multi-line prompt (Kensuke Iwahashi/David Kaspar) >+ 13. always send prusage to stdout. >+ 12. PR/526: Fix double \\ printing from previous fix in history expansion. >+ 11. Android updates from Corinna Vinschen >+ 10. PR/526: Quote backslashes properly so they can be preserved in `` >+ expansions >+ 9. Fix memory leak for paraml >+ 8. Add notempty and ask values for the noclobber setting (Martin Tournoij) >+ 7. more correct $wordchars for vimode (Luke Mewburn) >+ 6. expose VImode in $vimode (Luke Mewburn) >+ 5. display what the compiled in editor is in bindkey -d (Luke Mewburn) >+ 4. run-fg-editor improvements and documentation (Luke Mewburn) >+ 3. Fix parsing of 'if (cond)then' (Fridolin Pokorny) >+ 2. PR/437: Fix handling of invalid unicode characters. >+ 1. PR/451: Fix error messages containing %c to be always '%c' >+ >+ 41. V6.19.00 - 20150521 >+ 40. V6.18.05 - 20150510 >+ 39. fix reseting when interrupted inside an eval "eval sleep 10^C" >+ (paulo.cesar.pereira.de.andrade) >+ 38. rename handle_intr -> handle_interrupt as originally intended. >+ 37. fix input tests that need stdin on a tty >+ 36. V6.18.04 - 20150504 >+ 35. revert fix echo "\1", it is incorrect. >+ 34. revert fix to PR/437, breaks short strings. >+ 33. V6.18.03 - 20150503 >+ 32. PR/437: Nakajima Akira: Fix segmentation fault reading input files >+ 31. PR/291: Print job status messages to stderr. >+ 30. Fridolin Pokorny NUL in `` does not mean EOF. >+ 29. Pavel Raiskup fix hang with: >+ while (1) >+ ( date & ; wait ) >+ end >+ 28. Add cdtohome special variable (Martin Tournoij) >+ 27. Fix root prompt char for windows (Corinna Vinschen) >+ 26. For "next" completion matches only consider exact matches of the previous >+ word (Jamie Landeg-Jones) >+ 25. Fix echo "\1" for echo_style=both where the first character was >+ not processed properly (Gary Duzan) >+ 24. V6.18.02 - 20140618 >+ 23. fix ls-F /non printing exit value twice. >+ 22. rename configure.in to configure.ac, add aclocal.m4 to CVS >+ 21. set foo="aabaabaa"; echo $foo:as/a// should produce bb >+ 20. Add locked merge history support (Marcin Konarski) >+ 19. Support more resource limits from various BSD's >+ 18. Cache history count to speed up thing >+ 17. PR/240: minix support >+ 16. revert fix for 15. Causes extra quoting, for example (foo is a program >+ that prints its arguments): >+ $ ./foo 'abc' * >+ '\a\b\c' >+ 15. fix globbing for ``, stripping backslashes. Example: >+ cat << _EOF > huh >+ echo 'hello\;world' >+ _EOF >+ echo `./huh 0` >+ echo `./huh $?` >+ 14. fix for `` that causes hang. Example: >+ cat << _EOF > huh >+ #!/bin/sh >+ echo "[$@]" >+ echo "I am running" >+ echo "I am running ($$)" >> huh.out >+ _EOF >+ cat << _EOF > huh.tcsh >+ #!/bin/tcsh -f >+ >+ ./huh \ >+ `#comment blah blah blah` \ >+ parameter a \ >+ `#comment blah blah blah` \ >+ parameter b \ >+ `#comment blah blah blah` \ >+ parameter c >+ echo ok >+ _EOF >+ 13. remove AsciiOnly fix now that the real issue has been fixed (Roman Kollar) >+ 12. define utmp file for aix (Laurence Darby) >+ 11. fix if history in loops >+ 10. make ls-F print to stderr and set the exit code >+ 9. make rmstar interruptible on linux >+ 8. Get rid of pret_t and make the printf functions return the number of >+ characters printed as the system ones do. >+ 7. Parse a FreeBSD compat $LSCOLORS. What to do when both LSCOLORS and >+ LS_COLORS are set. I am not documenting this until we decide. > 6. V6.18.01 - 20120214 > 5. fix interruptible wait again > 4. ignore bogus compiler overflow message >Index: contrib/tcsh/Imakefile >=================================================================== >--- contrib/tcsh/Imakefile (revision 309109) >+++ contrib/tcsh/Imakefile (working copy) >@@ -1,5 +1,5 @@ > XCOMM >-XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ >+XCOMM $tcsh: Imakefile,v 1.88 2014/07/07 20:34:58 christos Exp $ > XCOMM > XCOMM Imakefile for tcsh 6.12 > XCOMM Marc Horowitz, MIT SIPB >@@ -526,8 +526,8 @@ > WishList config_f.h eight-bit.me glob.3 patchlevel.h \ > pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ > README.imake complete.tcsh vmsreadme.txt Makefile.vms termcap.vms \ >- snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.in \ >- Makefile.win32 >+ snames.h host.defs gethost.c tcsh.man2html Makefile.in configure.ac \ >+ Makefile.win32 aclocal.m4 > CONFSRCS=config/[a-z]* > > >Index: contrib/tcsh/Makefile.in >=================================================================== >--- contrib/tcsh/Makefile.in (revision 309109) >+++ contrib/tcsh/Makefile.in (working copy) >@@ -1,4 +1,4 @@ >-# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ >+# $tcsh: Makefile.in,v 3.59 2015/08/24 20:09:04 kim Exp $ > # Makefile.in 4.3 6/11/83 > # > # C Shell with process control; VM/UNIX VAX Makefile >@@ -315,8 +315,8 @@ > # on the suns does not know how to make dynamically linked binaries. > # This is set by autoconf. > CC = @CC@ >-#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra >-# -ansi -pedantic >+#CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -Wcast-qual -Wwrite-strings -Wold-style-definition -Wuninitialized -Wpointer-sign >+# -Wconversion -Wformat=2 -ansi -pedantic > #CC= gcc -Wall -pipe -B/bin/ > # Generate code for Intel 486 (linux) > #CC= gcc -m486 -pipe -Wall >@@ -377,7 +377,7 @@ > sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ > sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h \ > tw.color.c >-PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ >+PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ > vms.termcap.c > SHSRCS= ${ASSRCS} ${PSSRCS} > SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ >@@ -384,7 +384,7 @@ > sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ > sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ > sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ >- sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} \ >+ sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \ > mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF} > > TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ >@@ -411,12 +411,12 @@ > WishList config_f.h eight-bit.me glob.3 patchlevel.h \ > pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ > README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ >- host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ >- tests/testsuite.at >+ host.defs gethost.c tcsh.man2html configure.ac configure config.h.in \ >+ tests/testsuite.at aclocal.m4 > TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ > tests/expr.at tests/lexical.at tests/mb-eucjp.at \ >- tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ >- tests/variables.at tests/sh.dol.at >+ tests/mb-utf8.at tests/noexec.at tests/parenthesis.at tests/syntax.at \ >+ tests/subst.at tests/variables.at tests/sh.dol.at > > VHSRCS=${PVSRCS} ${AVSRCS} > >@@ -533,11 +533,11 @@ > ${CPP} $(CPPFLAGS) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ > $(srcdir)/tc.const.c | \ > sed -n -e 's/^\(Char STR[a-zA-Z0-9_]*\) *\[ *\].*/extern \1[];/p' | \ >- sort >> $@.tmp >+ LC_COLLATE=C sort >> $@.tmp > @echo '#endif /* _h_tc_const */' >> $@.tmp > @if [ -f $@ ] && cmp -s $@.tmp $@; then echo $@ unchanged.; rm -f $@.tmp; else mv -f $@.tmp $@; echo $@ recreated.; fi > >-$(srcdir)/tests/package.m4: $(srcdir)/configure.in >+$(srcdir)/tests/package.m4: $(srcdir)/configure.ac > { \ > echo '# Signature of the current package.'; \ > echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ >@@ -594,12 +594,12 @@ > @vgrind -t -x -h Index index >/crp/bill/csh/index.t > > install-strip: install >+ -strip ${DESTBIN}/tcsh$(EXEEXT) > > install: tcsh$(EXEEXT) install.catalogs install.man > -mkdir -p ${DESTBIN} > -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old > cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) >- -strip ${DESTBIN}/tcsh$(EXEEXT) > chmod 755 ${DESTBIN}/tcsh$(EXEEXT) > > install.catalogs: >@@ -623,25 +623,6 @@ > # nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z > # chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z > >-install.cygwin: install >- -gzip ${DESTMAN}/tcsh.${MANSECT} >- -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh >- cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh >- cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh >- cp ${srcdir}/WishList ${srcdir}/Y2K ${DESTDIR}${prefix}/share/doc/tcsh >- perl ${srcdir}/tcsh.man2html ${srcdir}/tcsh.man >- cp -rp tcsh.html ${DESTDIR}${prefix}/share/doc/tcsh >- -mkdir -p ${DESTDIR}/etc/defaults/etc/profile.d >- -mkdir -p ${DESTDIR}/etc/profile.d >- -mkdir -p ${DESTDIR}/etc/postinstall >- -mkdir -p ${DESTDIR}/etc/preremove >- cp -p ${srcdir}/cygwin/csh.cshrc ${DESTDIR}/etc/defaults/etc >- cp -p ${srcdir}/cygwin/csh.login ${DESTDIR}/etc/defaults/etc >- cp -p ${srcdir}/cygwin/bindkey.tcsh ${DESTDIR}/etc/defaults/etc/profile.d >- cp -p ${srcdir}/complete.tcsh ${DESTDIR}/etc/defaults/etc/profile.d >- cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh >- cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh >- > clean: clean.catalogs > ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost > ${RM} -f *.${SUF} *.i *.s >@@ -748,11 +729,11 @@ > > autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in > >-$(srcdir)/configure: $(srcdir)/configure.in >+$(srcdir)/configure: $(srcdir)/configure.ac > cd $(srcdir) && autoconf > > $(srcdir)/config.h.in: $(srcdir)/stamp-h.in >-$(srcdir)/stamp-h.in: $(srcdir)/configure.in >+$(srcdir)/stamp-h.in: $(srcdir)/configure.ac > cd $(srcdir) && autoheader > @echo timestamp > $(srcdir)/stamp-h.in > >@@ -787,6 +768,9 @@ > # glob.h > glob.${SUF} sh.glob.${SUF}: glob.h > >+# dotlock.h >+dotlock.${SUF}: dotlock.h >+ > # ed.defns.h > EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF} > ${EDOBJS} ${EDDINC}: ed.defns.h >Index: contrib/tcsh/Makefile.std >=================================================================== >--- contrib/tcsh/Makefile.std (revision 309109) >+++ contrib/tcsh/Makefile.std (working copy) >@@ -1,4 +1,4 @@ >-# $tcsh: Makefile.std,v 1.97 2006/03/02 18:46:44 christos Exp $ >+# $tcsh: Makefile.std,v 1.100 2015/08/24 20:09:04 kim Exp $ > # Makefile.std 4.3 6/11/83 > # > # C Shell with process control; VM/UNIX VAX Makefile >@@ -287,7 +287,7 @@ > sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ > sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ > sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h >-PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ >+PSSRCS= sh.decls.h glob.c glob.h dotlock.c dotlock.h mi.termios.c mi.wait.h mi.varargs.h ma.setp.c \ > vms.termcap.c > SHSRCS= ${ASSRCS} ${PSSRCS} > SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ >@@ -294,7 +294,7 @@ > sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ > sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ > sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ >- sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} \ >+ sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} dotlock.${SUF} \ > mi.termios.${SUF} ma.setp.${SUF} vms.termcap.${SUF} > > TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ >@@ -321,7 +321,8 @@ > WishList config_f.h eight-bit.me glob.3 patchlevel.h \ > pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ > README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ >- host.defs gethost.c tcsh.man2html configure.in configure config.h.in >+ host.defs gethost.c tcsh.man2html configure.ac configure config.h.in \ >+ aclocal.m4 > > VHSRCS=${PVSRCS} ${AVSRCS} > >@@ -424,7 +425,7 @@ > ${CPP} $(INCLUDES) ${DFLAGS} ${EXTRAFLAGS} -D_h_tc_const\ > $(srcdir)/tc.const.c | grep 'Char STR' | \ > sed -e 's/Char \([a-zA-Z0-9_]*\) *\[ *\].*/extern Char \1[];/' | \ >- sort >> $@ >+ LC_COLLATE=C sort >> $@ > @echo '#endif /* _h_tc_const */' >> $@ > > csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF} >@@ -584,11 +585,11 @@ > > autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in > >-$(srcdir)/configure: $(srcdir)/configure.in >+$(srcdir)/configure: $(srcdir)/configure.ac > cd $(srcdir) && autoconf > > $(srcdir)/config.h.in: $(srcdir)/stamp-h.in >-$(srcdir)/stamp-h.in: $(srcdir)/configure.in >+$(srcdir)/stamp-h.in: $(srcdir)/configure.ac > cd $(srcdir) && autoheader > @echo timestamp > $(srcdir)/stamp-h.in > >@@ -620,6 +621,9 @@ > # glob.h > glob.${SUF} sh.glob.${SUF}: glob.h > >+# dotlock.h >+dotlock.${SUF}: dotlock.h >+ > # ed.defns.h > EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF} > ${EDOBJS} ${EDDINC}: ed.defns.h >Index: contrib/tcsh/Makefile.vms >=================================================================== >--- contrib/tcsh/Makefile.vms (revision 309109) >+++ contrib/tcsh/Makefile.vms (working copy) >@@ -1,4 +1,4 @@ >-# $tcsh: Makefile.vms,v 1.39 2006/03/02 18:46:44 christos Exp $ >+# $tcsh: Makefile.vms,v 1.40 2014/07/07 20:34:58 christos Exp $ > # Makefile.vms 4.3 6/11/83 > # > # C Shell with process control; VM/UNIX VAX Makefile >@@ -299,7 +299,7 @@ > WishList config_f.h eight-bit.me glob.3 patchlevel.h \ > pathnames.h tcsh.man Ported src.desc Imakefile imake.config \ > README.imake complete.tcsh vmsreadme.txt termcap.vms snames.h \ >- host.defs gethost.c tcsh.man2html configure.in >+ host.defs gethost.c tcsh.man2html configure.ac aclocal.m4 > > VHSRCS=${PVSRCS} ${AVSRCS} > >Index: contrib/tcsh/README >=================================================================== >--- contrib/tcsh/README (revision 309109) >+++ contrib/tcsh/README (working copy) >@@ -1,4 +1,4 @@ >-This is tcsh version 6.18.01. Tcsh is a version of the Berkeley >+This is tcsh version 6.20.00. 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. >Index: contrib/tcsh/aclocal.m4 >=================================================================== >--- contrib/tcsh/aclocal.m4 (nonexistent) >+++ contrib/tcsh/aclocal.m4 (working copy) >@@ -0,0 +1,1409 @@ >+# generated automatically by aclocal 1.15 -*- Autoconf -*- >+ >+# Copyright (C) 1996-2014 Free Software Foundation, Inc. >+ >+# This file is free software; the Free Software Foundation >+# gives unlimited permission to copy and/or distribute it, >+# with or without modifications, as long as this notice is preserved. >+ >+# This program is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without >+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A >+# PARTICULAR PURPOSE. >+ >+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) >+# iconv.m4 serial 19 (gettext-0.18.2) >+dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. >+dnl This file is free software; the Free Software Foundation >+dnl gives unlimited permission to copy and/or distribute it, >+dnl with or without modifications, as long as this notice is preserved. >+ >+dnl From Bruno Haible. >+ >+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], >+[ >+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. >+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) >+ AC_REQUIRE([AC_LIB_RPATH]) >+ >+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV >+ dnl accordingly. >+ AC_LIB_LINKFLAGS_BODY([iconv]) >+]) >+ >+AC_DEFUN([AM_ICONV_LINK], >+[ >+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and >+ dnl those with the standalone portable GNU libiconv installed). >+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles >+ >+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV >+ dnl accordingly. >+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) >+ >+ dnl Add $INCICONV to CPPFLAGS before performing the following checks, >+ dnl because if the user has installed libiconv and not disabled its use >+ dnl via --without-libiconv-prefix, he wants to use it. The first >+ dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. >+ am_save_CPPFLAGS="$CPPFLAGS" >+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) >+ >+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ >+ am_cv_func_iconv="no, consider installing GNU libiconv" >+ am_cv_lib_iconv=no >+ AC_LINK_IFELSE( >+ [AC_LANG_PROGRAM( >+ [[ >+#include <stdlib.h> >+#include <iconv.h> >+ ]], >+ [[iconv_t cd = iconv_open("",""); >+ iconv(cd,NULL,NULL,NULL,NULL); >+ iconv_close(cd);]])], >+ [am_cv_func_iconv=yes]) >+ if test "$am_cv_func_iconv" != yes; then >+ am_save_LIBS="$LIBS" >+ LIBS="$LIBS $LIBICONV" >+ AC_LINK_IFELSE( >+ [AC_LANG_PROGRAM( >+ [[ >+#include <stdlib.h> >+#include <iconv.h> >+ ]], >+ [[iconv_t cd = iconv_open("",""); >+ iconv(cd,NULL,NULL,NULL,NULL); >+ iconv_close(cd);]])], >+ [am_cv_lib_iconv=yes] >+ [am_cv_func_iconv=yes]) >+ LIBS="$am_save_LIBS" >+ fi >+ ]) >+ if test "$am_cv_func_iconv" = yes; then >+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ >+ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, >+ dnl Solaris 10. >+ am_save_LIBS="$LIBS" >+ if test $am_cv_lib_iconv = yes; then >+ LIBS="$LIBS $LIBICONV" >+ fi >+ am_cv_func_iconv_works=no >+ for ac_iconv_const in '' 'const'; do >+ AC_RUN_IFELSE( >+ [AC_LANG_PROGRAM( >+ [[ >+#include <iconv.h> >+#include <string.h> >+ >+#ifndef ICONV_CONST >+# define ICONV_CONST $ac_iconv_const >+#endif >+ ]], >+ [[int result = 0; >+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful >+ returns. */ >+ { >+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); >+ if (cd_utf8_to_88591 != (iconv_t)(-1)) >+ { >+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ >+ char buf[10]; >+ ICONV_CONST char *inptr = input; >+ size_t inbytesleft = strlen (input); >+ char *outptr = buf; >+ size_t outbytesleft = sizeof (buf); >+ size_t res = iconv (cd_utf8_to_88591, >+ &inptr, &inbytesleft, >+ &outptr, &outbytesleft); >+ if (res == 0) >+ result |= 1; >+ iconv_close (cd_utf8_to_88591); >+ } >+ } >+ /* Test against Solaris 10 bug: Failures are not distinguishable from >+ successful returns. */ >+ { >+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); >+ if (cd_ascii_to_88591 != (iconv_t)(-1)) >+ { >+ static ICONV_CONST char input[] = "\263"; >+ char buf[10]; >+ ICONV_CONST char *inptr = input; >+ size_t inbytesleft = strlen (input); >+ char *outptr = buf; >+ size_t outbytesleft = sizeof (buf); >+ size_t res = iconv (cd_ascii_to_88591, >+ &inptr, &inbytesleft, >+ &outptr, &outbytesleft); >+ if (res == 0) >+ result |= 2; >+ iconv_close (cd_ascii_to_88591); >+ } >+ } >+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ >+ { >+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); >+ if (cd_88591_to_utf8 != (iconv_t)(-1)) >+ { >+ static ICONV_CONST char input[] = "\304"; >+ static char buf[2] = { (char)0xDE, (char)0xAD }; >+ ICONV_CONST char *inptr = input; >+ size_t inbytesleft = 1; >+ char *outptr = buf; >+ size_t outbytesleft = 1; >+ size_t res = iconv (cd_88591_to_utf8, >+ &inptr, &inbytesleft, >+ &outptr, &outbytesleft); >+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) >+ result |= 4; >+ iconv_close (cd_88591_to_utf8); >+ } >+ } >+#if 0 /* This bug could be worked around by the caller. */ >+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ >+ { >+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); >+ if (cd_88591_to_utf8 != (iconv_t)(-1)) >+ { >+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; >+ char buf[50]; >+ ICONV_CONST char *inptr = input; >+ size_t inbytesleft = strlen (input); >+ char *outptr = buf; >+ size_t outbytesleft = sizeof (buf); >+ size_t res = iconv (cd_88591_to_utf8, >+ &inptr, &inbytesleft, >+ &outptr, &outbytesleft); >+ if ((int)res > 0) >+ result |= 8; >+ iconv_close (cd_88591_to_utf8); >+ } >+ } >+#endif >+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is >+ provided. */ >+ if (/* Try standardized names. */ >+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) >+ /* Try IRIX, OSF/1 names. */ >+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) >+ /* Try AIX names. */ >+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) >+ /* Try HP-UX names. */ >+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) >+ result |= 16; >+ return result; >+]])], >+ [am_cv_func_iconv_works=yes], , >+ [case "$host_os" in >+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; >+ *) am_cv_func_iconv_works="guessing yes" ;; >+ esac]) >+ test "$am_cv_func_iconv_works" = no || break >+ done >+ LIBS="$am_save_LIBS" >+ ]) >+ case "$am_cv_func_iconv_works" in >+ *no) am_func_iconv=no am_cv_lib_iconv=no ;; >+ *) am_func_iconv=yes ;; >+ esac >+ else >+ am_func_iconv=no am_cv_lib_iconv=no >+ fi >+ if test "$am_func_iconv" = yes; then >+ AC_DEFINE([HAVE_ICONV], [1], >+ [Define if you have the iconv() function and it works.]) >+ fi >+ if test "$am_cv_lib_iconv" = yes; then >+ AC_MSG_CHECKING([how to link with libiconv]) >+ AC_MSG_RESULT([$LIBICONV]) >+ else >+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV >+ dnl either. >+ CPPFLAGS="$am_save_CPPFLAGS" >+ LIBICONV= >+ LTLIBICONV= >+ fi >+ AC_SUBST([LIBICONV]) >+ AC_SUBST([LTLIBICONV]) >+]) >+ >+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to >+dnl avoid warnings like >+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". >+dnl This is tricky because of the way 'aclocal' is implemented: >+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. >+dnl Otherwise aclocal's initial scan pass would miss the macro definition. >+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. >+dnl Otherwise aclocal would emit many "Use of uninitialized value $1" >+dnl warnings. >+m4_define([gl_iconv_AC_DEFUN], >+ m4_version_prereq([2.64], >+ [[AC_DEFUN_ONCE( >+ [$1], [$2])]], >+ [m4_ifdef([gl_00GNULIB], >+ [[AC_DEFUN_ONCE( >+ [$1], [$2])]], >+ [[AC_DEFUN( >+ [$1], [$2])]])])) >+gl_iconv_AC_DEFUN([AM_ICONV], >+[ >+ AM_ICONV_LINK >+ if test "$am_cv_func_iconv" = yes; then >+ AC_MSG_CHECKING([for iconv declaration]) >+ AC_CACHE_VAL([am_cv_proto_iconv], [ >+ AC_COMPILE_IFELSE( >+ [AC_LANG_PROGRAM( >+ [[ >+#include <stdlib.h> >+#include <iconv.h> >+extern >+#ifdef __cplusplus >+"C" >+#endif >+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) >+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); >+#else >+size_t iconv(); >+#endif >+ ]], >+ [[]])], >+ [am_cv_proto_iconv_arg1=""], >+ [am_cv_proto_iconv_arg1="const"]) >+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) >+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` >+ AC_MSG_RESULT([ >+ $am_cv_proto_iconv]) >+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], >+ [Define as const if the declaration of iconv() needs const.]) >+ dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. >+ m4_ifdef([gl_ICONV_H_DEFAULTS], >+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) >+ if test -n "$am_cv_proto_iconv_arg1"; then >+ ICONV_CONST="const" >+ fi >+ ]) >+ fi >+]) >+ >+# lib-ld.m4 serial 6 >+dnl Copyright (C) 1996-2003, 2009-2014 Free Software Foundation, Inc. >+dnl This file is free software; the Free Software Foundation >+dnl gives unlimited permission to copy and/or distribute it, >+dnl with or without modifications, as long as this notice is preserved. >+ >+dnl Subroutines of libtool.m4, >+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid >+dnl collision with libtool.m4. >+ >+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. >+AC_DEFUN([AC_LIB_PROG_LD_GNU], >+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], >+[# I'd rather use --version here, but apparently some GNU lds only accept -v. >+case `$LD -v 2>&1 </dev/null` in >+*GNU* | *'with BFD'*) >+ acl_cv_prog_gnu_ld=yes >+ ;; >+*) >+ acl_cv_prog_gnu_ld=no >+ ;; >+esac]) >+with_gnu_ld=$acl_cv_prog_gnu_ld >+]) >+ >+dnl From libtool-2.4. Sets the variable LD. >+AC_DEFUN([AC_LIB_PROG_LD], >+[AC_REQUIRE([AC_PROG_CC])dnl >+AC_REQUIRE([AC_CANONICAL_HOST])dnl >+ >+AC_ARG_WITH([gnu-ld], >+ [AS_HELP_STRING([--with-gnu-ld], >+ [assume the C compiler uses GNU ld [default=no]])], >+ [test "$withval" = no || with_gnu_ld=yes], >+ [with_gnu_ld=no])dnl >+ >+# Prepare PATH_SEPARATOR. >+# The user is always right. >+if test "${PATH_SEPARATOR+set}" != set; then >+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which >+ # contains only /bin. Note that ksh looks also at the FPATH variable, >+ # so we have to set that as well for the test. >+ PATH_SEPARATOR=: >+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ >+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ >+ || PATH_SEPARATOR=';' >+ } >+fi >+ >+ac_prog=ld >+if test "$GCC" = yes; then >+ # Check if gcc -print-prog-name=ld gives a path. >+ AC_MSG_CHECKING([for ld used by $CC]) >+ case $host in >+ *-*-mingw*) >+ # gcc leaves a trailing carriage return which upsets mingw >+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; >+ *) >+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; >+ esac >+ case $ac_prog in >+ # Accept absolute paths. >+ [[\\/]]* | ?:[[\\/]]*) >+ re_direlt='/[[^/]][[^/]]*/\.\./' >+ # Canonicalize the pathname of ld >+ ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` >+ while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do >+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` >+ done >+ test -z "$LD" && LD="$ac_prog" >+ ;; >+ "") >+ # If it fails, then pretend we aren't using GCC. >+ ac_prog=ld >+ ;; >+ *) >+ # If it is relative, then search for the first ld in PATH. >+ with_gnu_ld=unknown >+ ;; >+ esac >+elif test "$with_gnu_ld" = yes; then >+ AC_MSG_CHECKING([for GNU ld]) >+else >+ AC_MSG_CHECKING([for non-GNU ld]) >+fi >+AC_CACHE_VAL([acl_cv_path_LD], >+[if test -z "$LD"; then >+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR >+ for ac_dir in $PATH; do >+ IFS="$acl_save_ifs" >+ test -z "$ac_dir" && ac_dir=. >+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then >+ acl_cv_path_LD="$ac_dir/$ac_prog" >+ # Check to see if the program is GNU ld. I'd rather use --version, >+ # but apparently some variants of GNU ld only accept -v. >+ # Break only if it was the GNU/non-GNU ld that we prefer. >+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in >+ *GNU* | *'with BFD'*) >+ test "$with_gnu_ld" != no && break >+ ;; >+ *) >+ test "$with_gnu_ld" != yes && break >+ ;; >+ esac >+ fi >+ done >+ IFS="$acl_save_ifs" >+else >+ acl_cv_path_LD="$LD" # Let the user override the test with a path. >+fi]) >+LD="$acl_cv_path_LD" >+if test -n "$LD"; then >+ AC_MSG_RESULT([$LD]) >+else >+ AC_MSG_RESULT([no]) >+fi >+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) >+AC_LIB_PROG_LD_GNU >+]) >+ >+# lib-link.m4 serial 26 (gettext-0.18.2) >+dnl Copyright (C) 2001-2014 Free Software Foundation, Inc. >+dnl This file is free software; the Free Software Foundation >+dnl gives unlimited permission to copy and/or distribute it, >+dnl with or without modifications, as long as this notice is preserved. >+ >+dnl From Bruno Haible. >+ >+AC_PREREQ([2.54]) >+ >+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and >+dnl the libraries corresponding to explicit and implicit dependencies. >+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and >+dnl augments the CPPFLAGS variable. >+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname >+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. >+AC_DEFUN([AC_LIB_LINKFLAGS], >+[ >+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) >+ AC_REQUIRE([AC_LIB_RPATH]) >+ pushdef([Name],[m4_translit([$1],[./+-], [____])]) >+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], >+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) >+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ >+ AC_LIB_LINKFLAGS_BODY([$1], [$2]) >+ ac_cv_lib[]Name[]_libs="$LIB[]NAME" >+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" >+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME" >+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" >+ ]) >+ LIB[]NAME="$ac_cv_lib[]Name[]_libs" >+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" >+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags" >+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" >+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) >+ AC_SUBST([LIB]NAME) >+ AC_SUBST([LTLIB]NAME) >+ AC_SUBST([LIB]NAME[_PREFIX]) >+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the >+ dnl results of this search when this library appears as a dependency. >+ HAVE_LIB[]NAME=yes >+ popdef([NAME]) >+ popdef([Name]) >+]) >+ >+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) >+dnl searches for libname and the libraries corresponding to explicit and >+dnl implicit dependencies, together with the specified include files and >+dnl the ability to compile and link the specified testcode. The missing-message >+dnl defaults to 'no' and may contain additional hints for the user. >+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} >+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and >+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs >+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. >+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname >+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. >+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], >+[ >+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) >+ AC_REQUIRE([AC_LIB_RPATH]) >+ pushdef([Name],[m4_translit([$1],[./+-], [____])]) >+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], >+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) >+ >+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME >+ dnl accordingly. >+ AC_LIB_LINKFLAGS_BODY([$1], [$2]) >+ >+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, >+ dnl because if the user has installed lib[]Name and not disabled its use >+ dnl via --without-lib[]Name-prefix, he wants to use it. >+ ac_save_CPPFLAGS="$CPPFLAGS" >+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) >+ >+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ >+ ac_save_LIBS="$LIBS" >+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, >+ dnl because these -l options might require -L options that are present in >+ dnl LIBS. -l options benefit only from the -L options listed before it. >+ dnl Otherwise, add it to the front of LIBS, because it may be a static >+ dnl library that depends on another static library that is present in LIBS. >+ dnl Static libraries benefit only from the static libraries listed after >+ dnl it. >+ case " $LIB[]NAME" in >+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; >+ *) LIBS="$LIB[]NAME $LIBS" ;; >+ esac >+ AC_LINK_IFELSE( >+ [AC_LANG_PROGRAM([[$3]], [[$4]])], >+ [ac_cv_lib[]Name=yes], >+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) >+ LIBS="$ac_save_LIBS" >+ ]) >+ if test "$ac_cv_lib[]Name" = yes; then >+ HAVE_LIB[]NAME=yes >+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) >+ AC_MSG_CHECKING([how to link with lib[]$1]) >+ AC_MSG_RESULT([$LIB[]NAME]) >+ else >+ HAVE_LIB[]NAME=no >+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need >+ dnl $INC[]NAME either. >+ CPPFLAGS="$ac_save_CPPFLAGS" >+ LIB[]NAME= >+ LTLIB[]NAME= >+ LIB[]NAME[]_PREFIX= >+ fi >+ AC_SUBST([HAVE_LIB]NAME) >+ AC_SUBST([LIB]NAME) >+ AC_SUBST([LTLIB]NAME) >+ AC_SUBST([LIB]NAME[_PREFIX]) >+ popdef([NAME]) >+ popdef([Name]) >+]) >+ >+dnl Determine the platform dependent parameters needed to use rpath: >+dnl acl_libext, >+dnl acl_shlibext, >+dnl acl_libname_spec, >+dnl acl_library_names_spec, >+dnl acl_hardcode_libdir_flag_spec, >+dnl acl_hardcode_libdir_separator, >+dnl acl_hardcode_direct, >+dnl acl_hardcode_minus_L. >+AC_DEFUN([AC_LIB_RPATH], >+[ >+ dnl Tell automake >= 1.10 to complain if config.rpath is missing. >+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) >+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS >+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld >+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host >+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir >+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ >+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ >+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh >+ . ./conftest.sh >+ rm -f ./conftest.sh >+ acl_cv_rpath=done >+ ]) >+ wl="$acl_cv_wl" >+ acl_libext="$acl_cv_libext" >+ acl_shlibext="$acl_cv_shlibext" >+ acl_libname_spec="$acl_cv_libname_spec" >+ acl_library_names_spec="$acl_cv_library_names_spec" >+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" >+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" >+ acl_hardcode_direct="$acl_cv_hardcode_direct" >+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" >+ dnl Determine whether the user wants rpath handling at all. >+ AC_ARG_ENABLE([rpath], >+ [ --disable-rpath do not hardcode runtime library paths], >+ :, enable_rpath=yes) >+]) >+ >+dnl AC_LIB_FROMPACKAGE(name, package) >+dnl declares that libname comes from the given package. The configure file >+dnl will then not have a --with-libname-prefix option but a >+dnl --with-package-prefix option. Several libraries can come from the same >+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar >+dnl macro call that searches for libname. >+AC_DEFUN([AC_LIB_FROMPACKAGE], >+[ >+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], >+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) >+ define([acl_frompackage_]NAME, [$2]) >+ popdef([NAME]) >+ pushdef([PACK],[$2]) >+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], >+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) >+ define([acl_libsinpackage_]PACKUP, >+ m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) >+ popdef([PACKUP]) >+ popdef([PACK]) >+]) >+ >+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and >+dnl the libraries corresponding to explicit and implicit dependencies. >+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. >+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found >+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. >+AC_DEFUN([AC_LIB_LINKFLAGS_BODY], >+[ >+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) >+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], >+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) >+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) >+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], >+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) >+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) >+ dnl Autoconf >= 2.61 supports dots in --with options. >+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) >+ dnl By default, look in $includedir and $libdir. >+ use_additional=yes >+ AC_LIB_WITH_FINAL_PREFIX([ >+ eval additional_includedir=\"$includedir\" >+ eval additional_libdir=\"$libdir\" >+ ]) >+ AC_ARG_WITH(P_A_C_K[-prefix], >+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib >+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], >+[ >+ if test "X$withval" = "Xno"; then >+ use_additional=no >+ else >+ if test "X$withval" = "X"; then >+ AC_LIB_WITH_FINAL_PREFIX([ >+ eval additional_includedir=\"$includedir\" >+ eval additional_libdir=\"$libdir\" >+ ]) >+ else >+ additional_includedir="$withval/include" >+ additional_libdir="$withval/$acl_libdirstem" >+ if test "$acl_libdirstem2" != "$acl_libdirstem" \ >+ && ! test -d "$withval/$acl_libdirstem"; then >+ additional_libdir="$withval/$acl_libdirstem2" >+ fi >+ fi >+ fi >+]) >+ dnl Search the library and its dependencies in $additional_libdir and >+ dnl $LDFLAGS. Using breadth-first-seach. >+ LIB[]NAME= >+ LTLIB[]NAME= >+ INC[]NAME= >+ LIB[]NAME[]_PREFIX= >+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been >+ dnl computed. So it has to be reset here. >+ HAVE_LIB[]NAME= >+ rpathdirs= >+ ltrpathdirs= >+ names_already_handled= >+ names_next_round='$1 $2' >+ while test -n "$names_next_round"; do >+ names_this_round="$names_next_round" >+ names_next_round= >+ for name in $names_this_round; do >+ already_handled= >+ for n in $names_already_handled; do >+ if test "$n" = "$name"; then >+ already_handled=yes >+ break >+ fi >+ done >+ if test -z "$already_handled"; then >+ names_already_handled="$names_already_handled $name" >+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS >+ dnl or AC_LIB_HAVE_LINKFLAGS call. >+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` >+ eval value=\"\$HAVE_LIB$uppername\" >+ if test -n "$value"; then >+ if test "$value" = yes; then >+ eval value=\"\$LIB$uppername\" >+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" >+ eval value=\"\$LTLIB$uppername\" >+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" >+ else >+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined >+ dnl that this library doesn't exist. So just drop it. >+ : >+ fi >+ else >+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS >+ dnl and the already constructed $LIBNAME/$LTLIBNAME. >+ found_dir= >+ found_la= >+ found_so= >+ found_a= >+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name >+ if test -n "$acl_shlibext"; then >+ shrext=".$acl_shlibext" # typically: shrext=.so >+ else >+ shrext= >+ fi >+ if test $use_additional = yes; then >+ dir="$additional_libdir" >+ dnl The same code as in the loop below: >+ dnl First look for a shared library. >+ if test -n "$acl_shlibext"; then >+ if test -f "$dir/$libname$shrext"; then >+ found_dir="$dir" >+ found_so="$dir/$libname$shrext" >+ else >+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then >+ ver=`(cd "$dir" && \ >+ for f in "$libname$shrext".*; do echo "$f"; done \ >+ | sed -e "s,^$libname$shrext\\\\.,," \ >+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ >+ | sed 1q ) 2>/dev/null` >+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then >+ found_dir="$dir" >+ found_so="$dir/$libname$shrext.$ver" >+ fi >+ else >+ eval library_names=\"$acl_library_names_spec\" >+ for f in $library_names; do >+ if test -f "$dir/$f"; then >+ found_dir="$dir" >+ found_so="$dir/$f" >+ break >+ fi >+ done >+ fi >+ fi >+ fi >+ dnl Then look for a static library. >+ if test "X$found_dir" = "X"; then >+ if test -f "$dir/$libname.$acl_libext"; then >+ found_dir="$dir" >+ found_a="$dir/$libname.$acl_libext" >+ fi >+ fi >+ if test "X$found_dir" != "X"; then >+ if test -f "$dir/$libname.la"; then >+ found_la="$dir/$libname.la" >+ fi >+ fi >+ fi >+ if test "X$found_dir" = "X"; then >+ for x in $LDFLAGS $LTLIB[]NAME; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ case "$x" in >+ -L*) >+ dir=`echo "X$x" | sed -e 's/^X-L//'` >+ dnl First look for a shared library. >+ if test -n "$acl_shlibext"; then >+ if test -f "$dir/$libname$shrext"; then >+ found_dir="$dir" >+ found_so="$dir/$libname$shrext" >+ else >+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then >+ ver=`(cd "$dir" && \ >+ for f in "$libname$shrext".*; do echo "$f"; done \ >+ | sed -e "s,^$libname$shrext\\\\.,," \ >+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ >+ | sed 1q ) 2>/dev/null` >+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then >+ found_dir="$dir" >+ found_so="$dir/$libname$shrext.$ver" >+ fi >+ else >+ eval library_names=\"$acl_library_names_spec\" >+ for f in $library_names; do >+ if test -f "$dir/$f"; then >+ found_dir="$dir" >+ found_so="$dir/$f" >+ break >+ fi >+ done >+ fi >+ fi >+ fi >+ dnl Then look for a static library. >+ if test "X$found_dir" = "X"; then >+ if test -f "$dir/$libname.$acl_libext"; then >+ found_dir="$dir" >+ found_a="$dir/$libname.$acl_libext" >+ fi >+ fi >+ if test "X$found_dir" != "X"; then >+ if test -f "$dir/$libname.la"; then >+ found_la="$dir/$libname.la" >+ fi >+ fi >+ ;; >+ esac >+ if test "X$found_dir" != "X"; then >+ break >+ fi >+ done >+ fi >+ if test "X$found_dir" != "X"; then >+ dnl Found the library. >+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" >+ if test "X$found_so" != "X"; then >+ dnl Linking with a shared library. We attempt to hardcode its >+ dnl directory into the executable's runpath, unless it's the >+ dnl standard /usr/lib. >+ if test "$enable_rpath" = no \ >+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ >+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then >+ dnl No hardcoding is needed. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" >+ else >+ dnl Use an explicit option to hardcode DIR into the resulting >+ dnl binary. >+ dnl Potentially add DIR to ltrpathdirs. >+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. >+ haveit= >+ for x in $ltrpathdirs; do >+ if test "X$x" = "X$found_dir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ ltrpathdirs="$ltrpathdirs $found_dir" >+ fi >+ dnl The hardcoding into $LIBNAME is system dependent. >+ if test "$acl_hardcode_direct" = yes; then >+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the >+ dnl resulting binary. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" >+ else >+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then >+ dnl Use an explicit option to hardcode DIR into the resulting >+ dnl binary. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" >+ dnl Potentially add DIR to rpathdirs. >+ dnl The rpathdirs will be appended to $LIBNAME at the end. >+ haveit= >+ for x in $rpathdirs; do >+ if test "X$x" = "X$found_dir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ rpathdirs="$rpathdirs $found_dir" >+ fi >+ else >+ dnl Rely on "-L$found_dir". >+ dnl But don't add it if it's already contained in the LDFLAGS >+ dnl or the already constructed $LIBNAME >+ haveit= >+ for x in $LDFLAGS $LIB[]NAME; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X-L$found_dir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" >+ fi >+ if test "$acl_hardcode_minus_L" != no; then >+ dnl FIXME: Not sure whether we should use >+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" >+ dnl here. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" >+ else >+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH >+ dnl here, because this doesn't fit in flags passed to the >+ dnl compiler. So give up. No hardcoding. This affects only >+ dnl very old systems. >+ dnl FIXME: Not sure whether we should use >+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" >+ dnl here. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" >+ fi >+ fi >+ fi >+ fi >+ else >+ if test "X$found_a" != "X"; then >+ dnl Linking with a static library. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" >+ else >+ dnl We shouldn't come here, but anyway it's good to have a >+ dnl fallback. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" >+ fi >+ fi >+ dnl Assume the include files are nearby. >+ additional_includedir= >+ case "$found_dir" in >+ */$acl_libdirstem | */$acl_libdirstem/) >+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` >+ if test "$name" = '$1'; then >+ LIB[]NAME[]_PREFIX="$basedir" >+ fi >+ additional_includedir="$basedir/include" >+ ;; >+ */$acl_libdirstem2 | */$acl_libdirstem2/) >+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` >+ if test "$name" = '$1'; then >+ LIB[]NAME[]_PREFIX="$basedir" >+ fi >+ additional_includedir="$basedir/include" >+ ;; >+ esac >+ if test "X$additional_includedir" != "X"; then >+ dnl Potentially add $additional_includedir to $INCNAME. >+ dnl But don't add it >+ dnl 1. if it's the standard /usr/include, >+ dnl 2. if it's /usr/local/include and we are using GCC on Linux, >+ dnl 3. if it's already present in $CPPFLAGS or the already >+ dnl constructed $INCNAME, >+ dnl 4. if it doesn't exist as a directory. >+ if test "X$additional_includedir" != "X/usr/include"; then >+ haveit= >+ if test "X$additional_includedir" = "X/usr/local/include"; then >+ if test -n "$GCC"; then >+ case $host_os in >+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; >+ esac >+ fi >+ fi >+ if test -z "$haveit"; then >+ for x in $CPPFLAGS $INC[]NAME; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X-I$additional_includedir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ if test -d "$additional_includedir"; then >+ dnl Really add $additional_includedir to $INCNAME. >+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" >+ fi >+ fi >+ fi >+ fi >+ fi >+ dnl Look for dependencies. >+ if test -n "$found_la"; then >+ dnl Read the .la file. It defines the variables >+ dnl dlname, library_names, old_library, dependency_libs, current, >+ dnl age, revision, installed, dlopen, dlpreopen, libdir. >+ save_libdir="$libdir" >+ case "$found_la" in >+ */* | *\\*) . "$found_la" ;; >+ *) . "./$found_la" ;; >+ esac >+ libdir="$save_libdir" >+ dnl We use only dependency_libs. >+ for dep in $dependency_libs; do >+ case "$dep" in >+ -L*) >+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` >+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. >+ dnl But don't add it >+ dnl 1. if it's the standard /usr/lib, >+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux, >+ dnl 3. if it's already present in $LDFLAGS or the already >+ dnl constructed $LIBNAME, >+ dnl 4. if it doesn't exist as a directory. >+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ >+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then >+ haveit= >+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ >+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then >+ if test -n "$GCC"; then >+ case $host_os in >+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; >+ esac >+ fi >+ fi >+ if test -z "$haveit"; then >+ haveit= >+ for x in $LDFLAGS $LIB[]NAME; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X-L$additional_libdir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ if test -d "$additional_libdir"; then >+ dnl Really add $additional_libdir to $LIBNAME. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" >+ fi >+ fi >+ haveit= >+ for x in $LDFLAGS $LTLIB[]NAME; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X-L$additional_libdir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ if test -d "$additional_libdir"; then >+ dnl Really add $additional_libdir to $LTLIBNAME. >+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" >+ fi >+ fi >+ fi >+ fi >+ ;; >+ -R*) >+ dir=`echo "X$dep" | sed -e 's/^X-R//'` >+ if test "$enable_rpath" != no; then >+ dnl Potentially add DIR to rpathdirs. >+ dnl The rpathdirs will be appended to $LIBNAME at the end. >+ haveit= >+ for x in $rpathdirs; do >+ if test "X$x" = "X$dir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ rpathdirs="$rpathdirs $dir" >+ fi >+ dnl Potentially add DIR to ltrpathdirs. >+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. >+ haveit= >+ for x in $ltrpathdirs; do >+ if test "X$x" = "X$dir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ ltrpathdirs="$ltrpathdirs $dir" >+ fi >+ fi >+ ;; >+ -l*) >+ dnl Handle this in the next round. >+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` >+ ;; >+ *.la) >+ dnl Handle this in the next round. Throw away the .la's >+ dnl directory; it is already contained in a preceding -L >+ dnl option. >+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` >+ ;; >+ *) >+ dnl Most likely an immediate library name. >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" >+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" >+ ;; >+ esac >+ done >+ fi >+ else >+ dnl Didn't find the library; assume it is in the system directories >+ dnl known to the linker and runtime loader. (All the system >+ dnl directories known to the linker should also be known to the >+ dnl runtime loader, otherwise the system is severely misconfigured.) >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" >+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" >+ fi >+ fi >+ fi >+ done >+ done >+ if test "X$rpathdirs" != "X"; then >+ if test -n "$acl_hardcode_libdir_separator"; then >+ dnl Weird platform: only the last -rpath option counts, the user must >+ dnl pass all path elements in one option. We can arrange that for a >+ dnl single library, but not when more than one $LIBNAMEs are used. >+ alldirs= >+ for found_dir in $rpathdirs; do >+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" >+ done >+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. >+ acl_save_libdir="$libdir" >+ libdir="$alldirs" >+ eval flag=\"$acl_hardcode_libdir_flag_spec\" >+ libdir="$acl_save_libdir" >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" >+ else >+ dnl The -rpath options are cumulative. >+ for found_dir in $rpathdirs; do >+ acl_save_libdir="$libdir" >+ libdir="$found_dir" >+ eval flag=\"$acl_hardcode_libdir_flag_spec\" >+ libdir="$acl_save_libdir" >+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" >+ done >+ fi >+ fi >+ if test "X$ltrpathdirs" != "X"; then >+ dnl When using libtool, the option that works for both libraries and >+ dnl executables is -R. The -R options are cumulative. >+ for found_dir in $ltrpathdirs; do >+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" >+ done >+ fi >+ popdef([P_A_C_K]) >+ popdef([PACKLIBS]) >+ popdef([PACKUP]) >+ popdef([PACK]) >+ popdef([NAME]) >+]) >+ >+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, >+dnl unless already present in VAR. >+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes >+dnl contains two or three consecutive elements that belong together. >+AC_DEFUN([AC_LIB_APPENDTOVAR], >+[ >+ for element in [$2]; do >+ haveit= >+ for x in $[$1]; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X$element"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ [$1]="${[$1]}${[$1]:+ }$element" >+ fi >+ done >+]) >+ >+dnl For those cases where a variable contains several -L and -l options >+dnl referring to unknown libraries and directories, this macro determines the >+dnl necessary additional linker options for the runtime path. >+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) >+dnl sets LDADDVAR to linker options needed together with LIBSVALUE. >+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, >+dnl otherwise linking without libtool is assumed. >+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], >+[ >+ AC_REQUIRE([AC_LIB_RPATH]) >+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) >+ $1= >+ if test "$enable_rpath" != no; then >+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then >+ dnl Use an explicit option to hardcode directories into the resulting >+ dnl binary. >+ rpathdirs= >+ next= >+ for opt in $2; do >+ if test -n "$next"; then >+ dir="$next" >+ dnl No need to hardcode the standard /usr/lib. >+ if test "X$dir" != "X/usr/$acl_libdirstem" \ >+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then >+ rpathdirs="$rpathdirs $dir" >+ fi >+ next= >+ else >+ case $opt in >+ -L) next=yes ;; >+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` >+ dnl No need to hardcode the standard /usr/lib. >+ if test "X$dir" != "X/usr/$acl_libdirstem" \ >+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then >+ rpathdirs="$rpathdirs $dir" >+ fi >+ next= ;; >+ *) next= ;; >+ esac >+ fi >+ done >+ if test "X$rpathdirs" != "X"; then >+ if test -n ""$3""; then >+ dnl libtool is used for linking. Use -R options. >+ for dir in $rpathdirs; do >+ $1="${$1}${$1:+ }-R$dir" >+ done >+ else >+ dnl The linker is used for linking directly. >+ if test -n "$acl_hardcode_libdir_separator"; then >+ dnl Weird platform: only the last -rpath option counts, the user >+ dnl must pass all path elements in one option. >+ alldirs= >+ for dir in $rpathdirs; do >+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" >+ done >+ acl_save_libdir="$libdir" >+ libdir="$alldirs" >+ eval flag=\"$acl_hardcode_libdir_flag_spec\" >+ libdir="$acl_save_libdir" >+ $1="$flag" >+ else >+ dnl The -rpath options are cumulative. >+ for dir in $rpathdirs; do >+ acl_save_libdir="$libdir" >+ libdir="$dir" >+ eval flag=\"$acl_hardcode_libdir_flag_spec\" >+ libdir="$acl_save_libdir" >+ $1="${$1}${$1:+ }$flag" >+ done >+ fi >+ fi >+ fi >+ fi >+ fi >+ AC_SUBST([$1]) >+]) >+ >+# lib-prefix.m4 serial 7 (gettext-0.18) >+dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc. >+dnl This file is free software; the Free Software Foundation >+dnl gives unlimited permission to copy and/or distribute it, >+dnl with or without modifications, as long as this notice is preserved. >+ >+dnl From Bruno Haible. >+ >+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and >+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't >+dnl require excessive bracketing. >+ifdef([AC_HELP_STRING], >+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], >+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) >+ >+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed >+dnl to access previously installed libraries. The basic assumption is that >+dnl a user will want packages to use other packages he previously installed >+dnl with the same --prefix option. >+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate >+dnl libraries, but is otherwise very convenient. >+AC_DEFUN([AC_LIB_PREFIX], >+[ >+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) >+ AC_REQUIRE([AC_PROG_CC]) >+ AC_REQUIRE([AC_CANONICAL_HOST]) >+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) >+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) >+ dnl By default, look in $includedir and $libdir. >+ use_additional=yes >+ AC_LIB_WITH_FINAL_PREFIX([ >+ eval additional_includedir=\"$includedir\" >+ eval additional_libdir=\"$libdir\" >+ ]) >+ AC_LIB_ARG_WITH([lib-prefix], >+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib >+ --without-lib-prefix don't search for libraries in includedir and libdir], >+[ >+ if test "X$withval" = "Xno"; then >+ use_additional=no >+ else >+ if test "X$withval" = "X"; then >+ AC_LIB_WITH_FINAL_PREFIX([ >+ eval additional_includedir=\"$includedir\" >+ eval additional_libdir=\"$libdir\" >+ ]) >+ else >+ additional_includedir="$withval/include" >+ additional_libdir="$withval/$acl_libdirstem" >+ fi >+ fi >+]) >+ if test $use_additional = yes; then >+ dnl Potentially add $additional_includedir to $CPPFLAGS. >+ dnl But don't add it >+ dnl 1. if it's the standard /usr/include, >+ dnl 2. if it's already present in $CPPFLAGS, >+ dnl 3. if it's /usr/local/include and we are using GCC on Linux, >+ dnl 4. if it doesn't exist as a directory. >+ if test "X$additional_includedir" != "X/usr/include"; then >+ haveit= >+ for x in $CPPFLAGS; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X-I$additional_includedir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ if test "X$additional_includedir" = "X/usr/local/include"; then >+ if test -n "$GCC"; then >+ case $host_os in >+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; >+ esac >+ fi >+ fi >+ if test -z "$haveit"; then >+ if test -d "$additional_includedir"; then >+ dnl Really add $additional_includedir to $CPPFLAGS. >+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" >+ fi >+ fi >+ fi >+ fi >+ dnl Potentially add $additional_libdir to $LDFLAGS. >+ dnl But don't add it >+ dnl 1. if it's the standard /usr/lib, >+ dnl 2. if it's already present in $LDFLAGS, >+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux, >+ dnl 4. if it doesn't exist as a directory. >+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then >+ haveit= >+ for x in $LDFLAGS; do >+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) >+ if test "X$x" = "X-L$additional_libdir"; then >+ haveit=yes >+ break >+ fi >+ done >+ if test -z "$haveit"; then >+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then >+ if test -n "$GCC"; then >+ case $host_os in >+ linux*) haveit=yes;; >+ esac >+ fi >+ fi >+ if test -z "$haveit"; then >+ if test -d "$additional_libdir"; then >+ dnl Really add $additional_libdir to $LDFLAGS. >+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" >+ fi >+ fi >+ fi >+ fi >+ fi >+]) >+ >+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, >+dnl acl_final_exec_prefix, containing the values to which $prefix and >+dnl $exec_prefix will expand at the end of the configure script. >+AC_DEFUN([AC_LIB_PREPARE_PREFIX], >+[ >+ dnl Unfortunately, prefix and exec_prefix get only finally determined >+ dnl at the end of configure. >+ if test "X$prefix" = "XNONE"; then >+ acl_final_prefix="$ac_default_prefix" >+ else >+ acl_final_prefix="$prefix" >+ fi >+ if test "X$exec_prefix" = "XNONE"; then >+ acl_final_exec_prefix='${prefix}' >+ else >+ acl_final_exec_prefix="$exec_prefix" >+ fi >+ acl_save_prefix="$prefix" >+ prefix="$acl_final_prefix" >+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" >+ prefix="$acl_save_prefix" >+]) >+ >+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the >+dnl variables prefix and exec_prefix bound to the values they will have >+dnl at the end of the configure script. >+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], >+[ >+ acl_save_prefix="$prefix" >+ prefix="$acl_final_prefix" >+ acl_save_exec_prefix="$exec_prefix" >+ exec_prefix="$acl_final_exec_prefix" >+ $1 >+ exec_prefix="$acl_save_exec_prefix" >+ prefix="$acl_save_prefix" >+]) >+ >+dnl AC_LIB_PREPARE_MULTILIB creates >+dnl - a variable acl_libdirstem, containing the basename of the libdir, either >+dnl "lib" or "lib64" or "lib/64", >+dnl - a variable acl_libdirstem2, as a secondary possible value for >+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or >+dnl "lib/amd64". >+AC_DEFUN([AC_LIB_PREPARE_MULTILIB], >+[ >+ dnl There is no formal standard regarding lib and lib64. >+ dnl On glibc systems, the current practice is that on a system supporting >+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under >+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine >+ dnl the compiler's default mode by looking at the compiler's library search >+ dnl path. If at least one of its elements ends in /lib64 or points to a >+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. >+ dnl Otherwise we use the default, namely "lib". >+ dnl On Solaris systems, the current practice is that on a system supporting >+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under >+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or >+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. >+ AC_REQUIRE([AC_CANONICAL_HOST]) >+ acl_libdirstem=lib >+ acl_libdirstem2= >+ case "$host_os" in >+ solaris*) >+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment >+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. >+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." >+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the >+ dnl symlink is missing, so we set acl_libdirstem2 too. >+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], >+ [AC_EGREP_CPP([sixtyfour bits], [ >+#ifdef _LP64 >+sixtyfour bits >+#endif >+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) >+ ]) >+ if test $gl_cv_solaris_64bit = yes; then >+ acl_libdirstem=lib/64 >+ case "$host_cpu" in >+ sparc*) acl_libdirstem2=lib/sparcv9 ;; >+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; >+ esac >+ fi >+ ;; >+ *) >+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` >+ if test -n "$searchpath"; then >+ acl_save_IFS="${IFS= }"; IFS=":" >+ for searchdir in $searchpath; do >+ if test -d "$searchdir"; then >+ case "$searchdir" in >+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; >+ */../ | */.. ) >+ # Better ignore directories of this form. They are misleading. >+ ;; >+ *) searchdir=`cd "$searchdir" && pwd` >+ case "$searchdir" in >+ */lib64 ) acl_libdirstem=lib64 ;; >+ esac ;; >+ esac >+ fi >+ done >+ IFS="$acl_save_IFS" >+ fi >+ ;; >+ esac >+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" >+]) >+ >Index: contrib/tcsh/complete.tcsh >=================================================================== >--- contrib/tcsh/complete.tcsh (revision 309109) >+++ contrib/tcsh/complete.tcsh (working copy) >@@ -1,5 +1,5 @@ > # >-# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $ >+# $tcsh: complete.tcsh,v 1.56 2015/07/03 16:52:47 christos Exp $ > # example file using the new completion code > # > # Debian GNU/Linux >@@ -20,1209 +20,1262 @@ > # Cleanup by Martin A. Godisch <martin@godisch.de>. > > onintr - >-if (! $?prompt) goto end >+if ( ! $?prompt ) goto end > >-if ($?tcsh) then >- if ($tcsh != 1) then >- set rev=$tcsh:r >- set rel=$rev:e >- set pat=$tcsh:e >- set rev=$rev:r >+if ( $?tcsh ) then >+ if ( $tcsh != 1 ) then >+ set rev=$tcsh:r:r >+ set rel=$tcsh:r:e >+ if ( $rev > 6 || ( $rev > 5 && $rel > 1 ) ) then >+ set _has_complete=1 > endif >- if ($rev > 5 && $rel > 1) then >- set _complete=1 >- endif >- unset rev rel pat >+ endif >+ unset rev rel > endif > >-if ($?_complete) then >- set noglob >- if ( ! $?hosts ) set hosts >- foreach f ("$HOME/.hosts" /usr/local/etc/csh.hosts "$HOME/.rhosts" /etc/hosts.equiv) >- if ( -r "$f" ) then >- set hosts = ($hosts `grep -v "+" "$f" | grep -E -v "^#" | tr -s " " " " | cut -f 1`) >- endif >- end >- if ( -r "$HOME/.netrc" ) then >- set f=`awk '/machine/ { print $2 }' < "$HOME/.netrc"` >& /dev/null >- set hosts=($hosts $f) >- endif >- if ( -r "$HOME/.ssh/known_hosts" ) then >- set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ ` >& /dev/null >- set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ | sed -e 's/,/ /g'` >& /dev/null >- set hosts=($hosts $f) >- endif >- unset f >- if ( ! $?hosts ) then >- set hosts=(hyperion.ee.cornell.edu phaeton.ee.cornell.edu \ >- guillemin.ee.cornell.edu vangogh.cs.berkeley.edu \ >- ftp.uu.net prep.ai.mit.edu export.lcs.mit.edu \ >- labrea.stanford.edu sumex-aim.stanford.edu \ >- tut.cis.ohio-state.edu) >- endif >+if ( ! $?_has_complete ) goto end > >- complete ywho n/*/\$hosts/ # argument from list in $hosts >- complete rsh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ >- complete ssh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ >- complete xrsh p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ >- complete rlogin p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ >- complete telnet p/1/\$hosts/ p/2/x:'<port>'/ n/*/n/ >+if ( ! $?noglob ) set noglob _unset_noglob > >- complete cd p/1/d/ # Directories only >- complete chdir p/1/d/ >- complete pushd p/1/d/ >- complete popd p/1/d/ >- complete pu p/1/d/ >- complete po p/1/d/ >- complete complete p/1/X/ # Completions only >- complete uncomplete n/*/X/ >- complete exec p/1/c/ # Commands only >- complete trace p/1/c/ >- complete strace p/1/c/ >- complete which n/*/c/ >- complete where n/*/c/ >- complete skill p/1/c/ >- complete dde p/1/c/ >- complete adb c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ >- complete sdb p/1/c/ >- complete dbx c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ >- complete xdb p/1/c/ >- complete gdb n/-d/d/ n/*/c/ >- complete ups p/1/c/ >- complete set 'c/*=/f/' 'p/1/s/=' 'n/=/f/' >- complete unset n/*/s/ >- complete alias p/1/a/ # only aliases are valid >- complete unalias n/*/a/ >- complete xdvi n/*/f:*.dvi/ # Only files that match *.dvi >- complete dvips n/*/f:*.dvi/ >- if ($?traditional_complete) then >- complete tex n/*/f:*.tex/ # Only files that match *.tex >- else >- complete tex n/*/f:*.{tex,texi}/ # Files that match *.tex and *.texi >- endif >- complete latex n/*/f:*.{tex,ltx}/ >- complete su c/--/"(login fast preserve-environment command shell \ >- help version)"/ c/-/"(f l m p c s -)"/ \ >- n/{-c,--command}/c/ \ >- n@{-s,--shell}@'`cat /etc/shells`'@ n/*/u/ >- complete cc c/-[IL]/d/ \ >- c@-l@'`\ls -1 /usr/lib/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ >- c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ >- complete acc c/-[IL]/d/ \ >- c@-l@'`\ls -1 /usr/lang/SC1.0/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ >- c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ >- complete gcc c/-[IL]/d/ \ >- c/-f/"(caller-saves cse-follow-jumps delayed-branch \ >- elide-constructors expensive-optimizations \ >- float-store force-addr force-mem inline \ >- inline-functions keep-inline-functions \ >- memoize-lookups no-default-inline \ >- no-defer-pop no-function-cse omit-frame-pointer \ >- rerun-cse-after-loop schedule-insns \ >- schedule-insns2 strength-reduce \ >- thread-jumps unroll-all-loops \ >- unroll-loops syntax-only all-virtual \ >- cond-mismatch dollars-in-identifiers \ >- enum-int-equiv no-asm no-builtin \ >- no-strict-prototype signed-bitfields \ >- signed-char this-is-variable unsigned-bitfields \ >- unsigned-char writable-strings call-saved-reg \ >- call-used-reg fixed-reg no-common \ >- no-gnu-binutils nonnull-objects \ >- pcc-struct-return pic PIC shared-data \ >- short-enums short-double volatile)"/ \ >- c/-W/"(all aggregate-return cast-align cast-qual \ >- comment conversion enum-clash error format \ >- id-clash-len implicit missing-prototypes \ >- no-parentheses pointer-arith return-type shadow \ >- strict-prototypes switch uninitialized unused \ >- write-strings)"/ \ >- c/-m/"(68000 68020 68881 bitfield fpa nobitfield rtd \ >- short c68000 c68020 soft-float g gnu unix fpu \ >- no-epilogue)"/ \ >- c/-d/"(D M N)"/ \ >- c/-/"(f W vspec v vpath ansi traditional \ >- traditional-cpp trigraphs pedantic x o l c g L \ >- I D U O O2 C E H B b V M MD MM i dynamic \ >- nodtdlib static nostdinc undef)"/ \ >- 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,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 >- complete vi n/*/f:^*.[oa]/ >- complete bindkey N/-a/b/ N/-c/c/ n/-[ascr]/'x:<key-sequence>'/ \ >- n/-[svedlr]/n/ c/-[vedl]/n/ c/-/"(a s k c v e d l r)"/\ >- n/-k/"(left right up down)"/ p/2-/b/ \ >- p/1/'x:<key-sequence or option>'/ >+# Old TCSH versions don't define OSTYPE. >+# Use a close approximation instead. > >- complete find n/-fstype/"(nfs 4.2)"/ n/-name/f/ \ >- n/-type/"(c b d f p l s)"/ n/-user/u/ n/-group/g/ \ >- n/-exec/c/ n/-ok/c/ n/-cpio/f/ n/-ncpio/f/ n/-newer/f/ \ >- c/-/"(fstype name perm prune type user nouser \ >- group nogroup size inum atime mtime ctime exec \ >- ok print ls cpio ncpio newer xdev depth \ >- daystart follow maxdepth mindepth noleaf version \ >- anewer cnewer amin cmin mmin true false uid gid \ >- ilname iname ipath iregex links lname empty path \ >- regex used xtype fprint fprint0 fprintf \ >- print0 printf not a and o or)"/ \ >- n/*/d/ >+if ( ! $?OSTYPE ) then >+ setenv OSTYPE `echo "$HOSTTYPE" | sed -e 's/^(i[3456]86|(amd|x86_)64)-//'` >+endif > >- complete -%* c/%/j/ # fill in the jobs builtin >- complete {fg,bg,stop} c/%/j/ p/1/"(%)"// >+if ( ! $?hosts ) set hosts > >- complete limit c/-/"(h)"/ n/*/l/ >- complete unlimit c/-/"(h)"/ n/*/l/ >+foreach f ( "$HOME/."{,r,ssh/known_}hosts* \ >+ /usr/local/etc/csh.hosts /etc/hosts.equiv ) >+ if ( -r "$f" ) then >+ set hosts=($hosts `sed \ >+ -e 's/#.*//' \ >+ -e '/^[+-]@/d' \ >+ -e 's/^[-+]//' \ >+ -e 's/[[:space:]].*//' \ >+ -e 's/,/\n/g' "$f" \ >+ | sed -e '/^[.:[:xdigit:][:space:]]*$/d'`) >+ endif >+end >+unset f > >- complete -co* p/0/"(compress)"/ # make compress completion >- # not ambiguous >- if ($?traditional_complete) then >- complete zcat n/*/f:*.Z/ >- else >- # "zcat" may be linked to "compress" or "gzip" >- if (-X zcat) then >- zcat --version >& /dev/null >- if ($status != 0) then >- complete zcat n/*/f:*.Z/ >- else >- complete zcat c/--/"(force help license quiet version)"/ \ >- c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ >- endif >- endif >- endif >+if ( -r "$HOME/.netrc" ) then >+ set hosts=($hosts `awk '$1 == "machine" { print $2 }' "$HOME/.netrc"`) >+endif > >- complete finger c/*@/\$hosts/ n/*/u/@ >- complete ping p/1/\$hosts/ >- complete traceroute p/1/\$hosts/ >+set hosts=(`echo $hosts | tr ' ' '\012' | sort -u`) > >- complete {talk,ntalk,phone} p/1/'`users | tr " " "\012" | uniq`'/ \ >- n/*/\`who\ \|\ grep\ \$:1\ \|\ awk\ \'\{\ print\ \$2\ \}\'\`/ >+if ( ! $#hosts ) then >+ # This is just a hint for the user. >+ set hosts=(ftp.funet.fi ftp.gnu.org ftp.uu.net) >+endif > >- complete ftp c/-/"(d i g n v)"/ n/-/\$hosts/ p/1/\$hosts/ n/*/n/ >+complete ywho n/*/\$hosts/ # argument from list in $hosts >+complete rsh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ >+complete ssh p/1/\$hosts/ c/-/"(l n)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ >+complete xrsh p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ N/-l/c/ n/-/c/ p/2/c/ p/*/f/ >+complete rlogin p/1/\$hosts/ c/-/"(l 8 e)"/ n/-l/u/ >+complete telnet p/1/\$hosts/ p/2/x:'<port>'/ n/*/n/ > >- # this one is simple... >- #complete rcp c/*:/f/ C@[./\$~]*@f@ n/*/\$hosts/: >- # From Michael Schroeder <mlschroe@immd4.informatik.uni-erlangen.de> >- # This one will rsh to the file to fetch the list of files! >- complete rcp 'c%*@*:%`set q=$:-0;set q="$q:s/@/ /";set q="$q:s/:/ /";set q=($q " ");rsh $q[2] -l $q[1] ls -dp $q[3]\*`%' 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");rsh $q[1] ls -dp $q[2]\*`%' 'c%*@%$hosts%:' 'C@[./$~]*@f@' 'n/*/$hosts/:' >+complete cd p/1/d/ # Directories only >+complete chdir p/1/d/ >+complete pushd p/1/d/ >+complete popd p/1/d/ >+complete pu p/1/d/ >+complete po p/1/d/ >+complete complete p/1/X/ # Completions only >+complete uncomplete n/*/X/ >+complete exec p/1/c/ # Commands only >+complete trace p/1/c/ >+complete strace p/1/c/ >+complete which n/*/c/ >+complete where n/*/c/ >+complete skill p/1/c/ >+complete dde p/1/c/ >+complete adb c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ >+complete sdb p/1/c/ >+complete dbx c/-I/d/ n/-/c/ N/-/"(core)"/ p/1/c/ p/2/"(core)"/ >+complete xdb p/1/c/ >+complete gdb n/-d/d/ n/*/c/ >+complete ups p/1/c/ >+complete set 'c/*=/f/' 'p/1/s/=' 'n/=/f/' >+complete unset n/*/s/ >+complete alias p/1/a/ # only aliases are valid >+complete unalias n/*/a/ >+complete xdvi n/*/f:*.dvi/ >+complete dvips n/*/f:*.dvi/ >+complete tex n/*/f:*.{tex,texi}/ >+complete latex n/*/f:*.{tex,ltx}/ > >- complete dd c/--/"(help version)"/ c/[io]f=/f/ \ >- c/conv=*,/"(ascii ebcdic ibm block unblock \ >- lcase notrunc ucase swab noerror sync)"/,\ >- c/conv=/"(ascii ebcdic ibm block unblock \ >- lcase notrunc ucase swab noerror sync)"/,\ >- c/*=/x:'<number>'/ \ >- n/*/"(if of conv ibs obs bs cbs files skip file seek count)"/= >+complete su \ >+ c/--/"(login fast preserve-environment command shell help version)"/ \ >+ c/-/"(f l m p c s -)"/ \ >+ n/{-c,--command}/c/ \ >+ n@{-s,--shell}@'`cat /etc/shells`'@ \ >+ n/*/u/ >+complete cc \ >+ c/-[IL]/d/ \ >+ c@-l@'`\ls -1 /usr/lib/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ >+ c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ >+complete acc \ >+ c/-[IL]/d/ \ >+ c@-l@'`\ls -1 /usr/lang/SC1.0/lib*.a | sed s%^.\*/lib%%\;s%\\.a\$%%`'@ \ >+ c/-/"(o l c g L I D U)"/ n/*/f:*.[coasi]/ >+complete gcc \ >+ c/-[IL]/d/ \ >+ c/-f/"(caller-saves cse-follow-jumps delayed-branch elide-constructors \ >+ expensive-optimizations float-store force-addr force-mem inline \ >+ inline-functions keep-inline-functions memoize-lookups \ >+ no-default-inline no-defer-pop no-function-cse omit-frame-pointer \ >+ rerun-cse-after-loop schedule-insns schedule-insns2 strength-reduce \ >+ thread-jumps unroll-all-loops unroll-loops syntax-only all-virtual \ >+ cond-mismatch dollars-in-identifiers enum-int-equiv no-asm no-builtin \ >+ no-strict-prototype signed-bitfields signed-char this-is-variable \ >+ unsigned-bitfields unsigned-char writable-strings call-saved-reg \ >+ call-used-reg fixed-reg no-common no-gnu-binutils nonnull-objects \ >+ pcc-struct-return pic PIC shared-data short-enums short-double \ >+ volatile)"/ \ >+ c/-W/"(all aggregate-return cast-align cast-qual comment conversion \ >+ enum-clash error format id-clash-len implicit missing-prototypes \ >+ no-parentheses pointer-arith return-type shadow strict-prototypes \ >+ switch uninitialized unused write-strings)"/ \ >+ c/-m/"(68000 68020 68881 bitfield fpa nobitfield rtd short c68000 c68020 \ >+ soft-float g gnu unix fpu no-epilogue)"/ \ >+ c/-d/"(D M N)"/ \ >+ c/-/"(f W vspec v vpath ansi traditional traditional-cpp trigraphs pedantic \ >+ x o l c g L I D U O O2 C E H B b V M MD MM i dynamic nodtdlib static \ >+ nostdinc undef)"/ \ >+ 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,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 >+complete vi n/*/f:^*.[oa]/ >+complete bindkey \ >+ N/-a/b/ N/-c/c/ n/-[ascr]/'x:<key-sequence>'/ \ >+ n/-[svedlr]/n/ c/-[vedl]/n/ c/-/"(a s k c v e d l r)"/ \ >+ n/-k/"(left right up down)"/ p/2-/b/ \ >+ p/1/'x:<key-sequence or option>'/ > >- complete nslookup p/1/x:'<host>'/ p/2/\$hosts/ >+complete find \ >+ n/-fstype/"(nfs 4.2)"/ \ >+ n/-name/f/ \ >+ n/-type/"(c b d f p l s)"/ \ >+ n/-user/u/ \ >+ n/-group/g/ \ >+ n/-exec/c/ \ >+ n/-ok/c/ \ >+ n/-cpio/f/ \ >+ n/-ncpio/f/ \ >+ n/-newer/f/ \ >+ c/-/"(fstype name perm prune type user nouser group nogroup size inum \ >+ atime mtime ctime exec ok print ls cpio ncpio newer xdev depth \ >+ daystart follow maxdepth mindepth noleaf version anewer cnewer \ >+ amin cmin mmin true false uid gid ilname iname ipath iregex links \ >+ lname empty path regex used xtype fprint fprint0 fprintf print0 \ >+ printf not a and o or)"/ \ >+ n/*/d/ > >- complete ar c/[dmpqrtx]/"(c l o u v a b i)"/ p/1/"(d m p q r t x)"// \ >- p/2/f:*.a/ p/*/f:*.o/ >+complete -%* c/%/j/ # fill in the jobs builtin >+complete {fg,bg,stop} c/%/j/ p/1/"(%)"// > >- # these should be merged with the MH completion hacks below - jgotts >- complete {refile,sprev,snext,scan,pick,rmm,inc,folder,show} \ >- "c@+@F:$HOME/Mail/@" >+complete limit c/-/"(h)"/ n/*/l/ >+complete unlimit c/-/"(h)"/ n/*/l/ > >- # these and interrupt handling from Jaap Vermeulen <jaap@sequent.com> >- complete {rexec,rxexec,rxterm,rmterm} \ >- 'p/1/$hosts/' 'c/-/(l L E)/' 'n/-l/u/' 'n/-L/f/' \ >- 'n/-E/e/' 'n/*/c/' >- complete kill 'c/-/S/' 'c/%/j/' \ >- 'n/*/`ps -u $LOGNAME | awk '"'"'{print $1}'"'"'`/' >+#complete -co* p/0/"(compress)"/ # make compress completion >+# # not ambiguous > >- # these from Marc Horowitz <marc@cam.ov.com> >- complete attach 'n/-mountpoint/d/' 'n/-m/d/' 'n/-type/(afs nfs rvd ufs)/' \ >- 'n/-t/(afs nfs rvd ufs)/' 'n/-user/u/' 'n/-U/u/' \ >- 'c/-/(verbose quiet force printpath lookup debug map \ >- nomap remap zephyr nozephyr readonly write \ >- mountpoint noexplicit explicit type mountoptions \ >- nosetuid setuid override skipfsck lock user host)/' \ >- 'n/-e/f/' 'n/*/()/' >- complete hesinfo 'p/1/u/' \ >- 'p/2/(passwd group uid grplist pcap pobox cluster \ >- filsys sloc service)/' >+# "zcat" may be linked to "compress" or "gzip" >+if (-X zcat) then >+ zcat --version >& /dev/null >+ if ($status != 0) then >+ complete zcat n/*/f:*.Z/ >+ else >+ complete zcat c/--/"(force help license quiet version)"/ \ >+ c/-/"(f h L q V -)"/ \ >+ n/*/f:*.{gz,Z,z,zip}/ >+ endif >+endif > >- # these from E. Jay Berkenbilt <ejb@ERA.COM> >- # = isn't always followed by a filename or a path anymore - jgotts >- if ($?traditional_complete) then >- complete ./configure \ >- 'c/--*=/f/' 'c/--{cache-file,prefix,exec-prefix,\ >- bindir,sbindir,libexecdir,datadir,\ >- sysconfdir,sharedstatedir,localstatedir,\ >- libdir,includedir,oldincludedir,infodir,\ >- mandir,srcdir}/(=)//' \ >- 'c/--/(cache-file verbose prefix exec-prefix bindir \ >- sbindir libexecdir datadir sysconfdir \ >- sharedstatedir localstatedir libdir \ >- includedir oldincludedir infodir mandir \ >- srcdir)//' >- else >- complete ./configure \ >- 'c@--{prefix,exec-prefix,bindir,sbindir,libexecdir,datadir,sysconfdir,sharedstatedir,localstatedir,infodir,mandir,srcdir,x-includes,x-libraries}=*@x:<directory e.g. /usr/local>'@ \ >- 'c/--cachefile=*/x:<filename>/' \ >- 'c/--{enable,disable,with}-*/x:<feature>//' \ >- 'c/--*=/x:<directory>//' \ >- 'c/--/(prefix= exec-prefix= bindir= \ >- sbindir= libexecdir= datadir= sysconfdir= \ >- sharedstatedir= localstatedir= infodir= \ >- mandir= srcdir= x-includes= x-libraries= cachefile= \ >- enable- disable- with- \ >- help no-create quiet silent version verbose )//' >- endif >- complete gs 'c/-sDEVICE=/(x11 cdjmono cdj550 epson eps9high epsonc \ >- dfaxhigh dfaxlow laserjet ljet4 sparc pbm \ >- pbmraw pgm pgmraw ppm ppmraw bit)/' \ >- 'c/-sOutputFile=/f/' 'c/-s/(DEVICE OutputFile)/=' \ >- 'c/-d/(NODISPLAY NOPLATFONTS NOPAUSE)/' 'n/*/f/' >- complete perl 'n/-S/c/' >- complete printenv 'n/*/e/' >- complete sccs p/1/"(admin cdc check clean comb deledit delget \ >- delta diffs edit enter fix get help info \ >- print prs prt rmdel sccsdiff tell unedit \ >- unget val what)"/ >- complete setenv 'p/1/e/' 'c/*:/f/' >+complete finger c/*@/\$hosts/ n/*/u/@ >+complete ping p/1/\$hosts/ >+complete traceroute p/1/\$hosts/ > >- # these and method of setting hosts from Kimmo Suominen <kim@tac.nyc.ny.us> >- if ( -f "$HOME/.mh_profile" && -x "`which folders`" ) then >+complete {talk,ntalk,phone} \ >+ p/1/'`users | tr " " "\012" | uniq`'/ \ >+ n/*/\`who\ \|\ grep\ \$:1\ \|\ awk\ \'\{\ print\ \$2\ \}\'\`/ > >- if ( ! $?FOLDERS ) setenv FOLDERS "`folders -fast -recurse`" >- if ( ! $?MHA ) setenv MHA "`ali | sed -e '/^ /d' -e 's/:.*//'`" >+complete ftp c/-/"(d i g n v)"/ n/-/\$hosts/ p/1/\$hosts/ n/*/n/ > >- set folders = ( $FOLDERS ) >- set mha = ( $MHA ) >+# this one is simple... >+#complete rcp c/*:/f/ C@[./\$~]*@f@ n/*/\$hosts/: >+# From Michael Schroeder <mlschroe@immd4.informatik.uni-erlangen.de> >+# This one will rsh to the file to fetch the list of files! >+complete rcp 'c%*@*:%`set q=$:-0;set q="$q:s/@/ /";set q="$q:s/:/ /";set q=($q " ");rsh $q[2] -l $q[1] ls -dp $q[3]\*`%' 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");rsh $q[1] ls -dp $q[2]\*`%' 'c%*@%$hosts%:' 'C@[./$~]*@f@' 'n/*/$hosts/:' > >- complete ali \ >- 'c/-/(alias nolist list nonormalize normalize nouser user help)/' \ >- 'n,-alias,f,' >+complete dd \ >+ c/--/"(help version)"/ c/[io]f=/f/ \ >+ c/conv=*,/"(ascii ebcdic ibm block unblock \ >+ lcase notrunc ucase swab noerror sync)"/,\ >+ c/conv=/"(ascii ebcdic ibm block unblock \ >+ lcase notrunc ucase swab noerror sync)"/,\ >+ c/*=/x:'<number>'/ \ >+ n/*/"(if of conv ibs obs bs cbs files skip file seek count)"/= > >- complete anno \ >- 'c/-/(component noinplace inplace nodate date text help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+complete nslookup p/1/x:'<host>'/ p/2/\$hosts/ > >- complete burst \ >- 'c/-/(noinplace inplace noquiet quiet noverbose verbose help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+complete ar \ >+ c/[dmpqrtx]/"(c l o u v a b i)"/ \ >+ p/1/"(d m p q r t x)"// \ >+ p/2/f:*.a/ \ >+ p/*/f:*.o/ > >- complete comp \ >- 'c/-/(draftfolder draftmessage nodraftfolder editor noedit file form nouse use whatnowproc nowhatnowproc help)/' \ >- 'c,+,$folders,' \ >- 'n,-whatnowproc,c,' \ >- 'n,-file,f,'\ >- 'n,-form,f,'\ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+# these should be merged with the MH completion hacks below - jgotts >+complete {refile,sprev,snext,scan,pick,rmm,inc,folder,show} \ >+ "c@+@F:$HOME/Mail/@" > >- complete dist \ >- 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit form noinplace inplace whatnowproc nowhatnowproc help)/' \ >- 'c,+,$folders,' \ >- 'n,-whatnowproc,c,' \ >- 'n,-form,f,'\ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+# these and interrupt handling from Jaap Vermeulen <jaap@sequent.com> >+complete {rexec,rxexec,rxterm,rmterm} \ >+ 'p/1/$hosts/' \ >+ 'c/-/(l L E)/' \ >+ 'n/-l/u/' \ >+ 'n/-L/f/' \ >+ 'n/-E/e/' \ >+ 'n/*/c/' >+complete kill \ >+ 'c/-/S/' \ >+ 'c/%/j/' \ >+ 'n/*/`ps -u $LOGNAME | awk '"'"'{print $1}'"'"'`/' > >- complete folder \ >- 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+# these from Marc Horowitz <marc@cam.ov.com> >+complete attach \ >+ 'n/-mountpoint/d/' \ >+ 'n/-m/d/' \ >+ 'n/-type/(afs nfs rvd ufs)/' \ >+ 'n/-t/(afs nfs rvd ufs)/' \ >+ 'n/-user/u/' \ >+ 'n/-U/u/' \ >+ 'c/-/(verbose quiet force printpath lookup debug map nomap remap zephyr \ >+ nozephyr readonly write mountpoint noexplicit explicit type \ >+ mountoptions nosetuid setuid override skipfsck lock user host)/' \ >+ 'n/-e/f/' \ >+ 'n/*/()/' >+complete hesinfo \ >+ 'p/1/u/' \ >+ 'p/2/(passwd group uid grplist pcap pobox cluster filsys sloc service)/' > >- complete folders \ >- 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+complete ./configure \ >+ 'c@--{prefix,exec-prefix,bindir,sbindir,libexecdir,datadir,sysconfdir,sharedstatedir,localstatedir,infodir,mandir,srcdir,x-includes,x-libraries}=*@x:<directory e.g. /usr/local>'@ \ >+ 'c/--cachefile=*/x:<filename>/' \ >+ 'c/--{enable,disable,with}-*/x:<feature>//' \ >+ 'c/--*=/x:<directory>//' \ >+ 'c/--/(prefix= exec-prefix= bindir= sbindir= libexecdir= datadir= \ >+ sysconfdir= sharedstatedir= localstatedir= infodir= mandir= \ >+ srcdir= x-includes= x-libraries= cachefile= enable- disable- \ >+ with- help no-create quiet silent version verbose )//' > >- complete forw \ >- 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit filter form noformat format noinplace inplace digest issue volume whatnowproc nowhatnowproc help)/' \ >- 'c,+,$folders,' \ >- 'n,-whatnowproc,c,' \ >- 'n,-filter,f,'\ >- 'n,-form,f,'\ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+complete gs \ >+ 'c/-sDEVICE=/(x11 cdjmono cdj550 epson eps9high epsonc dfaxhigh dfaxlow \ >+ laserjet ljet4 sparc pbm pbmraw pgm pgmraw ppm ppmraw bit)/' \ >+ 'c/-sOutputFile=/f/' 'c/-s/(DEVICE OutputFile)/=' \ >+ 'c/-d/(NODISPLAY NOPLATFONTS NOPAUSE)/' 'n/*/f/' >+complete perl 'n/-S/c/' >+complete sccs \ >+ p/1/"(admin cdc check clean comb deledit delget delta diffs edit enter \ >+ fix get help info print prs prt rmdel sccsdiff tell unedit unget \ >+ val what)"/ > >- complete inc \ >- 'c/-/(audit file noaudit nochangecur changecur file form format nosilent silent notruncate truncate width help)/' \ >- 'c,+,$folders,' \ >- 'n,-audit,f,'\ >- 'n,-form,f,' >+complete printenv 'n/*/e/' >+complete setenv 'p/1/e/' 'c/*:/f/' > >- complete mark \ >- 'c/-/(add delete list sequence nopublic public nozero zero help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+# these and method of setting hosts from Kimmo Suominen <kim@tac.nyc.ny.us> >+if ( -f "$HOME/.mh_profile" && -X folders ) then >+ if ( ! $?FOLDERS ) setenv FOLDERS "`folders -fast -recurse`" >+ if ( ! $?MHA ) setenv MHA "`ali | sed -e '/^ /d' -e 's/:.*//'`" > >- complete mhmail \ >- 'c/-/(body cc from subject help)/' \ >- 'n,-cc,$mha,' \ >- 'n,-from,$mha,' \ >- 'n/*/$mha/' >+ set folders = ( $FOLDERS ) >+ set mha = ( $MHA ) > >- complete mhpath \ >- 'c/-/(help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete ali \ >+ 'c/-/(alias nolist list nonormalize normalize nouser user help)/' \ >+ 'n,-alias,f,' > >- complete msgchk \ >- 'c/-/(nodate date nonotify notify help)/' >+ complete anno \ >+ 'c/-/(component noinplace inplace nodate date text help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete msh \ >- 'c/-/(prompt noscan scan notopcur topcur help)/' >+ complete burst \ >+ 'c/-/(noinplace inplace noquiet quiet noverbose verbose help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete next \ >- 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ >- 'c,+,$folders,' \ >- 'n,-moreproc,c,' \ >- 'n,-showproc,c,' \ >- 'n,-form,f,' >+ complete comp \ >+ 'c/-/(draftfolder draftmessage nodraftfolder editor noedit file form nouse use whatnowproc nowhatnowproc help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-whatnowproc,c,' \ >+ 'n,-file,f,'\ >+ 'n,-form,f,'\ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete packf \ >- 'c/-/(file help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete dist \ >+ 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit form noinplace inplace whatnowproc nowhatnowproc help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-whatnowproc,c,' \ >+ 'n,-form,f,'\ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete pick \ >- 'c/-/(and or not lbrace rbrace cc date from search subject to othercomponent after before datefield sequence nopublic public nozero zero nolist list help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete folder \ >+ 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete prev \ >- 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ >- 'c,+,$folders,' \ >- 'n,-moreproc,c,' \ >- 'n,-showproc,c,' \ >- 'n,-form,f,' >+ complete folders \ >+ 'c/-/(all nofast fast noheader header nopack pack noverbose verbose norecurse recurse nototal total noprint print nolist list push pop help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete prompter \ >- 'c/-/(erase kill noprepend prepend norapid rapid nodoteof doteof help)/' >+ complete forw \ >+ 'c/-/(noannotate annotate draftfolder draftmessage nodraftfolder editor noedit filter form noformat format noinplace inplace digest issue volume whatnowproc nowhatnowproc help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-whatnowproc,c,' \ >+ 'n,-filter,f,'\ >+ 'n,-form,f,'\ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete refile \ >- 'c/-/(draft nolink link nopreserve preserve src file help)/' \ >- 'c,+,$folders,' \ >- 'n,-file,f,'\ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete inc \ >+ 'c/-/(audit file noaudit nochangecur changecur file form format nosilent silent notruncate truncate width help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-audit,f,'\ >+ 'n,-form,f,' > >- complete rmf \ >- 'c/-/(nointeractive interactive help)/' \ >- 'c,+,$folders,' >+ complete mark \ >+ 'c/-/(add delete list sequence nopublic public nozero zero help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete rmm \ >- 'c/-/(help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete mhmail \ >+ 'c/-/(body cc from subject help)/' \ >+ 'n,-cc,$mha,' \ >+ 'n,-from,$mha,' \ >+ 'n/*/$mha/' > >- complete scan \ >- 'c/-/(noclear clear form format noheader header width noreverse reverse file help)/' \ >- 'c,+,$folders,' \ >- 'n,-form,f,'\ >- 'n,-file,f,'\ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete mhpath \ >+ 'c/-/(help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete send \ >- 'c/-/(alias draft draftfolder draftmessage nodraftfolder filter nofilter noformat format noforward forward nomsgid msgid nopush push noverbose verbose nowatch watch width help)/' \ >- 'n,-alias,f,'\ >- 'n,-filter,f,' >+ complete msgchk \ >+ 'c/-/(nodate date nonotify notify help)/' > >- complete show \ >- 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ >- 'c,+,$folders,' \ >- 'n,-moreproc,c,' \ >- 'n,-showproc,c,' \ >- 'n,-form,f,'\ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete msh \ >+ 'c/-/(prompt noscan scan notopcur topcur help)/' > >- complete sortm \ >- 'c/-/(datefield textfield notextfield limit nolimit noverbose verbose help)/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete next \ >+ 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-moreproc,c,' \ >+ 'n,-showproc,c,' \ >+ 'n,-form,f,' > >- complete vmh \ >- 'c/-/(prompt vmhproc novmhproc help)/' \ >- 'n,-vmhproc,c,' >+ complete packf \ >+ 'c/-/(file help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete whatnow \ >- 'c/-/(draftfolder draftmessage nodraftfolder editor noedit prompt help)/' >+ complete pick \ >+ 'c/-/(and or not lbrace rbrace cc date from search subject to othercomponent after before datefield sequence nopublic public nozero zero nolist list help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- complete whom \ >- 'c/-/(alias nocheck check draft draftfolder draftmessage nodraftfolder help)/' \ >- 'n,-alias,f,' >+ complete prev \ >+ 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-moreproc,c,' \ >+ 'n,-showproc,c,' \ >+ 'n,-form,f,' > >- complete plum \ >- 'c/-/()/' \ >- 'c,+,$folders,' \ >- 'n,*,`(mark | sed "s/:.*//";echo next cur prev first last)|tr " " "\12" | sort -u`,' >+ complete prompter \ >+ 'c/-/(erase kill noprepend prepend norapid rapid nodoteof doteof help)/' > >- complete mail \ >- 'c/-/()/' \ >- 'n/*/$mha/' >+ complete refile \ >+ 'c/-/(draft nolink link nopreserve preserve src file help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-file,f,'\ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- endif >+ complete rmf \ >+ 'c/-/(nointeractive interactive help)/' \ >+ 'c,+,$folders,' > >- #from Dan Nicolaescu <dann@ics.uci.edu> >- if ( $?MODULESHOME ) then >- alias Compl_module 'find ${MODULEPATH:as/:/ /} -name .version -o -name .modulea\* -prune -o -print | sed `echo "-e s@${MODULEPATH:as%:%/\*@@g -e s@%}/\*@@g"`' >- complete module 'p%1%(add load unload switch display avail use unuse update purge list clear help initadd initrm initswitch initlist initclear)%' \ >- 'n%{unl*,sw*,inits*}%`echo "$LOADEDMODULES:as/:/ /"`%' \ >- 'n%{lo*,di*,he*,inita*,initr*}%`eval Compl_module`%' \ >- 'N%{sw*,initsw*}%`eval Compl_module`%' 'C%-%(-append)%' 'n%{use,unu*,av*}%d%' 'n%-append%d%' \ >- 'C%[^-]*%`eval Compl_module`%' >- endif >+ complete rmm \ >+ 'c/-/(help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' > >- # from George Cox >- complete acroread 'p/*/f:*.{pdf,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 bzcat c/--/"(help test quiet verbose license version)"/ \ >+ complete scan \ >+ 'c/-/(noclear clear form format noheader header width noreverse reverse file help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-form,f,'\ >+ 'n,-file,f,'\ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' >+ >+ complete send \ >+ 'c/-/(alias draft draftfolder draftmessage nodraftfolder filter nofilter noformat format noforward forward nomsgid msgid nopush push noverbose verbose nowatch watch width help)/' \ >+ 'n,-alias,f,'\ >+ 'n,-filter,f,' >+ >+ complete show \ >+ 'c/-/(draft form moreproc nomoreproc length width showproc noshowproc header noheader help)/' \ >+ 'c,+,$folders,' \ >+ 'n,-moreproc,c,' \ >+ 'n,-showproc,c,' \ >+ 'n,-form,f,'\ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' >+ >+ complete sortm \ >+ 'c/-/(datefield textfield notextfield limit nolimit noverbose verbose help)/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' >+ >+ complete vmh \ >+ 'c/-/(prompt vmhproc novmhproc help)/' \ >+ 'n,-vmhproc,c,' >+ >+ complete whatnow \ >+ 'c/-/(draftfolder draftmessage nodraftfolder editor noedit prompt help)/' >+ >+ complete whom \ >+ 'c/-/(alias nocheck check draft draftfolder draftmessage nodraftfolder help)/' \ >+ 'n,-alias,f,' >+ >+ complete plum \ >+ 'c/-/()/' \ >+ 'c,+,$folders,' \ >+ 'n,*,`(mark | sed "s/:.*//" ; echo next cur prev first last)|tr " " "\012" | sort -u`,' >+ >+ complete mail \ >+ 'c/-/()/' \ >+ 'n/*/$mha/' >+ >+endif >+ >+#from Dan Nicolaescu <dann@ics.uci.edu> >+if ( $?MODULESHOME ) then >+ alias Compl_module \ >+ 'find ${MODULEPATH:as/:/ /} -name .version -o -name .modulea\* -prune \ >+ -o -print | sed `echo "-e s@${MODULEPATH:as%:%/\*@@g -e s@%}/\*@@g"`' >+ complete module \ >+ 'p%1%(add load unload switch display avail use unuse update purge list \ >+ clear help initadd initrm initswitch initlist initclear)%' \ >+ 'n%{unl*,sw*,inits*}%`echo "$LOADEDMODULES:as/:/ /"`%' \ >+ 'n%{lo*,di*,he*,inita*,initr*}%`eval Compl_module`%' \ >+ 'N%{sw*,initsw*}%`eval Compl_module`%' \ >+ 'C%-%(-append)%' \ >+ 'n%{use,unu*,av*}%d%' \ >+ 'n%-append%d%' \ >+ 'C%[^-]*%`eval Compl_module`%' >+endif >+ >+# from George Cox >+complete acroread 'p/*/f:*.{pdf,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 bzcat c/--/"(help test quiet verbose license version)"/ \ > c/-/"(h t L V -)"/ n/*/f:*.{bz2,tbz}/ >- complete bunzip2 c/--/"(help keep force test stdout quiet verbose \ >- license version)"/ c/-/"(h k f t c q v L V -)"/ \ >+complete bunzip2 c/--/"(help keep force test stdout quiet verbose \ >+ license version)"/ \ >+ c/-/"(h k f t c q v L V -)"/ \ > n/*/f:*.{bz2,tbz}/ >- complete bzip2 c/--/"(help decompress compress keep force test \ >- stdout quiet verbose license version small)"/ \ >+complete bzip2 c/--/"(help decompress compress keep force test \ >+ stdout quiet verbose license version small)"/ \ > c/-/"(h d z k f t c q v L V s 1 2 3 4 5 6 7 8 9 -)"/ \ > n/{-d,--decompress}/f:*.{bz2,tbz}/ \ > N/{-d,--decompress}/f:*.{bz2,tbz}/ n/*/f:^*.{bz2,tbz}/ >- 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 svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ >+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 svn 'C@file:///@`'"${HOME}/etc/tcsh/complete.d/svn"'`@@' \ > 'n@ls@(file:/// svn+ssh:// svn://)@@' \ >- 'n@help@(add blame cat checkout \ >- cleanup commit copy delete export help \ >- import info list ls lock log merge mkdir \ >- move propdel propedit propget proplist \ >- propset resolved revert status switch unlock \ >- update)@' 'p@1@(add blame cat checkout \ >- cleanup commit copy delete export help \ >- import info list ls lock log merge mkdir \ >- move propdel propedit propget proplist \ >- propset resolved revert status switch unlock \ >- update)@' >- 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@help@(add blame cat checkout cleanup commit copy \ >+ delete export help import info list ls \ >+ lock log merge mkdir move propdel propedit \ >+ propget proplist propset resolved revert \ >+ status switch unlock update)@' \ >+ 'p@1@(add blame cat checkout cleanup commit copy \ >+ delete export help import info list ls lock \ >+ log merge mkdir move propdel propedit propget \ >+ proplist propset resolved revert status switch \ >+ unlock update)@' >+ >+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)/' \ >+ 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/' \ >+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=)/' \ >+ 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)'/ \ >+ '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 )/' >- if ($?traditional_complete) then >- 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}/' >- else >- complete nm \ >- 'c/--radix=/x:<radix: _o_ctal _d_ecimal he_x_adecimal>/' \ >- 'c/--target=/x:<bfdname>/' \ >- 'c/--format=/(bsd sysv posix)/n/' \ >- 'c/--/(debugsyms extern-only demangle dynamic print-armap \ >- print-file-name numeric-sort no-sort reverse-sort \ >- size-sort undefined-only portability target= radix= \ >- format= defined-only\ line-numbers no-demangle version \ >- help)//' \ >- 'n/*/f:^*.{h,c,cc,s,S}/' >- endif >- 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=)"/ >+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)/' > >- # these from Tom Warzeka <tom@waz.cc> >+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 }'"'"\`@ > >- # this one works but is slow and doesn't descend into subdirectories >- # complete cd C@[./\$~]*@d@ \ >- # p@1@'`\ls -1F . $cdpath | grep /\$ | sort -u`'@ n@*@n@ >+complete ndc 'n/*/(status dumpdb reload stats trace notrace \ >+ querylog start stop restart )/' > >- if ( -r /etc/shells ) then >- complete setenv p@1@e@ n@DISPLAY@\$hosts@: n@SHELL@'`cat /etc/shells`'@ >- else >- complete setenv p@1@e@ n@DISPLAY@\$hosts@: >- endif >- complete unsetenv n/*/e/ >+complete nm \ >+ 'c/--radix=/x:<radix: _o_ctal _d_ecimal he_x_adecimal>/' \ >+ 'c/--target=/x:<bfdname>/' \ >+ 'c/--format=/(bsd sysv posix)/n/' \ >+ 'c/--/(debugsyms extern-only demangle dynamic print-armap \ >+ print-file-name numeric-sort no-sort reverse-sort \ >+ size-sort undefined-only portability target= radix= \ >+ format= defined-only\ line-numbers no-demangle version \ >+ help)//' \ >+ 'n/*/f:^*.{h,c,cc,s,S}/' > >- set _maildir = /var/mail >- if (-r "$HOME/.mailrc") then >- complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ >- "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:'<subject>'/ \ >- n@-u@T:$_maildir@ n/-f/f/ \ >- n@*@'`sed -n s/alias//p "$HOME/.mailrc" | \ >- tr -s " " " " | cut -f 2`'@ >+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> >+ >+# this one works but is slow and doesn't descend into subdirectories >+# complete cd C@[./\$~]*@d@ \ >+# p@1@'`\ls -1F . $cdpath | grep /\$ | sort -u`'@ n@*@n@ >+ >+if ( -r /etc/shells ) then >+ complete setenv p@1@e@ n@DISPLAY@\$hosts@: n@SHELL@'`cat /etc/shells`'@ >+else >+ complete setenv p@1@e@ n@DISPLAY@\$hosts@: >+endif >+complete unsetenv n/*/e/ >+ >+set _maildir = /var/mail >+if (-r "$HOME/.mailrc") then >+ complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ >+ "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:'<subject>'/ \ >+ n@-u@T:$_maildir@ n/-f/f/ \ >+ n@*@'`sed -n s/alias//p "$HOME/.mailrc" | \ >+ tr -s " " " " | cut -f 2`'@ >+else >+ complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ >+ "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:'<subject>'/ \ >+ n@-u@T:$_maildir@ n/-f/f/ n/*/u/ >+endif >+unset _maildir >+ >+if (! $?MANPATH) then >+ if (-r /usr/share/man) then >+ setenv MANPATH /usr/share/man: > else >- complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ >- "c@+@F:$HOME/Mail@" C@[./\$~]@f@ n/-s/x:'<subject>'/ \ >- n@-u@T:$_maildir@ n/-f/f/ n/*/u/ >+ setenv MANPATH /usr/man: > endif >- unset _maildir >+endif > >- if (! $?MANPATH) then >- if (-r /usr/share/man) then >- setenv MANPATH /usr/share/man: >- else >- setenv MANPATH /usr/man: >- endif >- endif >- >- if ($?traditional_complete) then >- # use of $MANPATH from Dan Nicolaescu <dann@ics.uci.edu> >- # use of 'find' adapted from Lubomir Host <host8@kepler.fmph.uniba.sk> >- complete man \ >- 'n@1@`set q = "$MANPATH:as%:%/man1 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.1.\*\$%%`@'\ >- 'n@2@`set q = "$MANPATH:as%:%/man2 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.2.\*\$%%`@'\ >- 'n@3@`set q = "$MANPATH:as%:%/man3 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.3.\*\$%%`@'\ >- 'n@4@`set q = "$MANPATH:as%:%/man4 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.4.\*\$%%`@'\ >- 'n@5@`set q = "$MANPATH:as%:%/man5 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.5.\*\$%%`@'\ >- 'n@6@`set q = "$MANPATH:as%:%/man6 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.6.\*\$%%`@'\ >- 'n@7@`set q = "$MANPATH:as%:%/man7 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.7.\*\$%%`@'\ >- 'n@8@`set q = "$MANPATH:as%:%/man8 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.8.\*\$%%`@'\ >- 'n@9@`set q = "$MANPATH:as%:%/man9 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.9.\*\$%%`@'\ >- 'n@0@`set q = "$MANPATH:as%:%/man0 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.0.\*\$%%`@'\ >- 'n@n@`set q = "$MANPATH:as%:%/mann %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.n.\*\$%%`@'\ >- 'n@o@`set q = "$MANPATH:as%:%/mano %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.o.\*\$%%`@'\ >- 'n@l@`set q = "$MANPATH:as%:%/manl %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.l.\*\$%%`@'\ >- 'n@p@`set q = "$MANPATH:as%:%/manp %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.p.\*\$%%`@'\ >- c@-@"(- f k M P s S t)"@ n@-f@c@ n@-k@x:'<keyword>'@ n@-[MP]@d@ \ >- 'N@-[MP]@`\ls -1 $:-1/man? |& sed -n s%\\..\\+\$%%p`@' \ >- 'n@-[sS]@`\ls -1 $MANPATH:as%:% % |& sed -n s%^man%%p | sort -u`@'\ >- 'n@*@`find $MANPATH:as%:% % \( -type f -o -type l \) -printf "%f " |& sed -e "s%find: .*: No such file or directory%%" -e "s%\([^\.]\+\)\.\([^ ]*\) %\1 %g"`@' >- #n@*@c@ # old way -- commands only >- else >- complete man n@1@'`\ls -1 /usr/man/man1 | sed s%\\.1.\*\$%%`'@ \ >- n@2@'`\ls -1 /usr/man/man2 | sed s%\\.2.\*\$%%`'@ \ >- n@3@'`\ls -1 /usr/man/man3 | sed s%\\.3.\*\$%%`'@ \ >- n@4@'`\ls -1 /usr/man/man4 | sed s%\\.4.\*\$%%`'@ \ >- n@5@'`\ls -1 /usr/man/man5 | sed s%\\.5.\*\$%%`'@ \ >- n@6@'`\ls -1 /usr/man/man6 | sed s%\\.6.\*\$%%`'@ \ >- n@7@'`\ls -1 /usr/man/man7 | sed s%\\.7.\*\$%%`'@ \ >- n@8@'`\ls -1 /usr/man/man8 | sed s%\\.8.\*\$%%`'@ \ >- n@9@'`[ -r /usr/man/man9 ] && \ls -1 /usr/man/man9 | sed s%\\.9.\*\$%%`'@ \ >- n@0@'`[ -r /usr/man/man0 ] && \ls -1 /usr/man/man0 | sed s%\\.0.\*\$%%`'@ \ >- n@new@'`[ -r /usr/man/mann ] && \ls -1 /usr/man/mann | sed s%\\.n.\*\$%%`'@ \ >- n@old@'`[ -r /usr/man/mano ] && \ls -1 /usr/man/mano | sed s%\\.o.\*\$%%`'@ \ >+if ($?traditional_complete) then >+ # use of $MANPATH from Dan Nicolaescu <dann@ics.uci.edu> >+ # use of 'find' adapted from Lubomir Host <host8@kepler.fmph.uniba.sk> >+ complete man \ >+ 'n@1@`set q = "$MANPATH:as%:%/man1 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.1.\*\$%%`@'\ >+ 'n@2@`set q = "$MANPATH:as%:%/man2 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.2.\*\$%%`@'\ >+ 'n@3@`set q = "$MANPATH:as%:%/man3 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.3.\*\$%%`@'\ >+ 'n@4@`set q = "$MANPATH:as%:%/man4 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.4.\*\$%%`@'\ >+ 'n@5@`set q = "$MANPATH:as%:%/man5 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.5.\*\$%%`@'\ >+ 'n@6@`set q = "$MANPATH:as%:%/man6 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.6.\*\$%%`@'\ >+ 'n@7@`set q = "$MANPATH:as%:%/man7 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.7.\*\$%%`@'\ >+ 'n@8@`set q = "$MANPATH:as%:%/man8 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.8.\*\$%%`@'\ >+ 'n@9@`set q = "$MANPATH:as%:%/man9 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.9.\*\$%%`@'\ >+ 'n@0@`set q = "$MANPATH:as%:%/man0 %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.0.\*\$%%`@'\ >+ 'n@n@`set q = "$MANPATH:as%:%/mann %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.n.\*\$%%`@'\ >+ 'n@o@`set q = "$MANPATH:as%:%/mano %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.o.\*\$%%`@'\ >+ 'n@l@`set q = "$MANPATH:as%:%/manl %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.l.\*\$%%`@'\ >+ 'n@p@`set q = "$MANPATH:as%:%/manp %" ; \ls -1 $q |& sed -e s%^.\*:.\*\$%% -e s%\\.p.\*\$%%`@'\ >+ c@-@"(- f k M P s S t)"@ n@-f@c@ n@-k@x:'<keyword>'@ n@-[MP]@d@ \ >+ 'N@-[MP]@`\ls -1 $:-1/man? |& sed -n s%\\..\\+\$%%p`@' \ >+ 'n@-[sS]@`\ls -1 $MANPATH:as%:% % |& sed -n s%^man%%p | sort -u`@'\ >+ 'n@*@`find $MANPATH:as%:% % \( -type f -o -type l \) -printf "%f " |& sed -e "s%find: .*: No such file or directory%%" -e "s%\([^\.]\+\)\.\([^ ]*\) %\1 %g"`@' >+ #n@*@c@ # old way -- commands only >+else >+ complete man n@1@'`\ls -1 /usr/man/man1 | sed s%\\.1.\*\$%%`'@ \ >+ n@2@'`\ls -1 /usr/man/man2 | sed s%\\.2.\*\$%%`'@ \ >+ n@3@'`\ls -1 /usr/man/man3 | sed s%\\.3.\*\$%%`'@ \ >+ n@4@'`\ls -1 /usr/man/man4 | sed s%\\.4.\*\$%%`'@ \ >+ n@5@'`\ls -1 /usr/man/man5 | sed s%\\.5.\*\$%%`'@ \ >+ n@6@'`\ls -1 /usr/man/man6 | sed s%\\.6.\*\$%%`'@ \ >+ n@7@'`\ls -1 /usr/man/man7 | sed s%\\.7.\*\$%%`'@ \ >+ n@8@'`\ls -1 /usr/man/man8 | sed s%\\.8.\*\$%%`'@ \ >+n@9@'`[ -r /usr/man/man9 ] && \ls -1 /usr/man/man9 | sed s%\\.9.\*\$%%`'@ \ >+n@0@'`[ -r /usr/man/man0 ] && \ls -1 /usr/man/man0 | sed s%\\.0.\*\$%%`'@ \ >+n@new@'`[ -r /usr/man/mann ] && \ls -1 /usr/man/mann | sed s%\\.n.\*\$%%`'@ \ >+n@old@'`[ -r /usr/man/mano ] && \ls -1 /usr/man/mano | sed s%\\.o.\*\$%%`'@ \ > n@local@'`[ -r /usr/man/manl ] && \ls -1 /usr/man/manl | sed s%\\.l.\*\$%%`'@ \ > n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \ >- c/-/"(- f k P s t)"/ n/-f/c/ n/-k/x:'<keyword>'/ n/-P/d/ \ >- N@-P@'`\ls -1 $:-1/man? | sed s%\\..\*\$%%`'@ n/*/c/ >- endif >+ c/-/"(- f k P s t)"/ n/-f/c/ n/-k/x:'<keyword>'/ n/-P/d/ \ >+ N@-P@'`\ls -1 $:-1/man? | sed s%\\..\*\$%%`'@ n/*/c/ >+endif > >- complete ps c/-t/x:'<tty>'/ c/-/"(a c C e g k l S t u v w x)"/ \ >- n/-k/x:'<kernel>'/ N/-k/x:'<core_file>'/ n/*/x:'<PID>'/ >- 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 ps c/-t/x:'<tty>'/ c/-/"(a c C e g k l S t u v w x)"/ \ >+ n/-k/x:'<kernel>'/ N/-k/x:'<core_file>'/ n/*/x:'<PID>'/ >+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 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/ >- complete xpdf c/-/"(z g remote raise quit cmap rgb papercolor \ >- eucjp t1lib freetype ps paperw paperh level1 \ >- upw fullscreen cmd q v h help)"/ \ >- n/-z/x:'<zoom (-5 .. +5) or "page" or "width">'/ \ >- n/-g/x:'<geometry>'/ n/-remote/x:'<name>'/ \ >- n/-rgb/x:'<number>'/ n/-papercolor/x:'<color>'/ \ >- n/-{t1lib,freetype}/x:'<font_type>'/ \ >- n/-ps/x:'<PS_file>'/ n/-paperw/x:'<width>'/ \ >- n/-paperh/x:'<height>'/ n/-upw/x:'<password>'/ \ >- n/-/f:*.{pdf,PDF}/ \ >- N/-{z,g,remote,rgb,papercolor,t1lib,freetype,ps,paperw,paperh,upw}/f:*.{pdf,PDF}/ \ >- N/-/x:'<page>'/ p/1/f:*.{pdf,PDF}/ p/2/x:'<page>'/ >+complete xhost c/[+-]/\$hosts/ n/*/\$hosts/ >+complete xpdf c/-/"(z g remote raise quit cmap rgb papercolor \ >+ eucjp t1lib freetype ps paperw paperh level1 \ >+ upw fullscreen cmd q v h help)"/ \ >+ n/-z/x:'<zoom (-5 .. +5) or "page" or "width">'/ \ >+ n/-g/x:'<geometry>'/ n/-remote/x:'<name>'/ \ >+ n/-rgb/x:'<number>'/ n/-papercolor/x:'<color>'/ \ >+ n/-{t1lib,freetype}/x:'<font_type>'/ \ >+ n/-ps/x:'<PS_file>'/ n/-paperw/x:'<width>'/ \ >+ n/-paperh/x:'<height>'/ n/-upw/x:'<password>'/ \ >+ n/-/f:*.{pdf,PDF}/ \ >+ N/-{z,g,remote,rgb,papercolor,t1lib,freetype,ps,paperw,paperh,upw}/f:*.{pdf,PDF}/ \ >+ N/-/x:'<page>'/ p/1/f:*.{pdf,PDF}/ p/2/x:'<page>'/ > >- complete tcsh c/-D*=/'x:<value>'/ c/-D/'x:<name>'/ \ >- c/-/"(b c d D e f F i l m n q s t v V x X -version)"/ \ >- n/-c/c/ n/{-l,--version}/n/ n/*/'f:*.{,t}csh'/ >+complete tcsh c/-D*=/'x:<value>'/ c/-D/'x:<name>'/ \ >+ c/-/"(b c d D e f F i l m n q s t v V x X -version)"/ \ >+ n/-c/c/ n/{-l,--version}/n/ n/*/'f:*.{,t}csh'/ > >- complete rpm c/--/"(query verify nodeps nofiles nomd5 noscripts \ >- nogpg nopgp install upgrade freshen erase allmatches \ >- notriggers repackage test rebuild recompile initdb \ >- rebuilddb addsign resign querytags showrc setperms \ >- setugids all file group package querybynumber qf \ >- triggeredby whatprovides whatrequires changelog \ >- configfiles docfiles dump filesbypkg info last list \ >- provides queryformat requires scripts state triggers \ >- triggerscripts allfiles badreloc excludepath checksig \ >- excludedocs force hash ignoresize ignorearch ignoreos \ >- includedocs justdb noorder oldpackage percent prefix \ >- relocate replace-files replacepkgs buildroot clean \ >- nobuild rmsource rmspec short-circuit sign target \ >- help version quiet rcfile pipe dbpath root specfile)"/\ >- c/-/"(q V K i U F e ba bb bp bc bi bl bs ta tb tp tc \ >- ti tl ts a f g p c d l R s h ? v vv -)"/ \ >- n/{-f,--file}/f/ n/{-g,--group}/g/ n/--pipe/c/ n/--dbpath/d/ \ >- n/--querybynumber/x:'<number>'/ n/--triggeredby/x:'<package>'/\ >- n/--what{provides,requires}/x:'<capability>'/ n/--root/d/ \ >- n/--{qf,queryformat}/x:'<format>'/ n/--buildroot/d/ \ >- n/--excludepath/x:'<oldpath>'/ n/--prefix/x:'<newpath>'/ \ >- n/--relocate/x:'<oldpath=newpath>'/ n/--target/x:'<platform>'/\ >- n/--rcfile/x:'<filelist>'/ n/--specfile/x:'<specfile>'/ \ >- n/{-[iUFep],--{install,upgrade,freshen,erase,package}}/f:*.rpm/ >+complete rpm c/--/"(query verify nodeps nofiles nomd5 noscripts \ >+ nogpg nopgp install upgrade freshen erase allmatches \ >+ notriggers repackage test rebuild recompile initdb \ >+ rebuilddb addsign resign querytags showrc setperms \ >+ setugids all file group package querybynumber qf \ >+ triggeredby whatprovides whatrequires changelog \ >+ configfiles docfiles dump filesbypkg info last list \ >+ provides queryformat requires scripts state triggers \ >+ triggerscripts allfiles badreloc excludepath checksig \ >+ excludedocs force hash ignoresize ignorearch ignoreos \ >+ includedocs justdb noorder oldpackage percent prefix \ >+ relocate replace-files replacepkgs buildroot clean \ >+ nobuild rmsource rmspec short-circuit sign target \ >+ help version quiet rcfile pipe dbpath root specfile)"/\ >+ c/-/"(q V K i U F e ba bb bp bc bi bl bs ta tb tp tc \ >+ ti tl ts a f g p c d l R s h ? v vv -)"/ \ >+ n/{-f,--file}/f/ n/{-g,--group}/g/ n/--pipe/c/ n/--dbpath/d/ \ >+ n/--querybynumber/x:'<number>'/ n/--triggeredby/x:'<package>'/\ >+ n/--what{provides,requires}/x:'<capability>'/ n/--root/d/ \ >+ n/--{qf,queryformat}/x:'<format>'/ n/--buildroot/d/ \ >+ n/--excludepath/x:'<oldpath>'/ n/--prefix/x:'<newpath>'/ \ >+ n/--relocate/x:'<oldpath=newpath>'/ n/--target/x:'<platform>'/\ >+ n/--rcfile/x:'<filelist>'/ n/--specfile/x:'<specfile>'/ \ >+ n/{-[iUFep],--{install,upgrade,freshen,erase,package}}/f:*.rpm/ > >- # these conform to the latest GNU versions available at press time ... >- # updates by John Gotts <jgotts@engin.umich.edu> >- if (-X emacs) then >- # TW note: if your version of GNU Emacs supports the "--version" option, >- # uncomment this line and comment the next to automatically >- # detect the version, else set "_emacs_ver" to your version. >- #set _emacs_ver=`emacs --version | sed -e 's%GNU Emacs %%' -e q | cut -d . -f1-2` >- set _emacs_ver=21.3 >- set _emacs_dir=`which emacs | sed s%/bin/emacs%%` >- complete emacs c/--/"(batch terminal display no-windows no-init-file \ >- user debug-init unibyte multibyte version help \ >- no-site-file funcall load eval insert kill)"/ \ >- c/-/"(t d nw q u f l -)"/ c/+/x:'<line_number>'/ \ >- n/{-t,--terminal}/x:'<terminal>'/ n/{-d,--display}/x:'<display>'/ \ >- n/{-u,--user}/u/ n/{-f,--funcall}/x:'<lisp_function>'/ \ >- n@{-l,--load}@F:$_emacs_dir/share/emacs/$_emacs_ver/lisp@ \ >- n/--eval/x:'<expression>'/ n/--insert/f/ n/*/f:^*[\#~]/ >- unset _emacs_ver _emacs_dir >- endif >+# these conform to the latest GNU versions available at press time ... >+# updates by John Gotts <jgotts@engin.umich.edu> >+if (-X emacs) then >+ # TW note: if your version of GNU Emacs supports the "--version" option, >+ # uncomment this line and comment the next to automatically >+ # detect the version, else set "_emacs_ver" to your version. >+ #set _emacs_ver=`emacs --version | sed -e 's%GNU Emacs %%' -e q | cut -d . -f1-2` >+ set _emacs_ver=21.3 >+ set _emacs_dir=`which emacs | sed s%/bin/emacs%%` >+ complete emacs c/--/"(batch terminal display no-windows no-init-file \ >+ user debug-init unibyte multibyte version help \ >+ no-site-file funcall load eval insert kill)"/ \ >+ c/-/"(t d nw q u f l -)"/ c/+/x:'<line_number>'/ \ >+ n/{-t,--terminal}/x:'<terminal>'/ n/{-d,--display}/x:'<display>'/ \ >+ n/{-u,--user}/u/ n/{-f,--funcall}/x:'<lisp_function>'/ \ >+ n@{-l,--load}@F:$_emacs_dir/share/emacs/$_emacs_ver/lisp@ \ >+ n/--eval/x:'<expression>'/ n/--insert/f/ n/*/f:^*[\#~]/ >+ unset _emacs_ver _emacs_dir >+endif > >- complete gzcat c/--/"(force help license quiet version)"/ \ >- c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ >- complete gzip c/--/"(stdout to-stdout decompress uncompress \ >- force help list license no-name quiet recurse \ >- suffix test verbose version fast best)"/ \ >- c/-/"(c d f h l L n q r S t v V 1 2 3 4 5 6 7 8 9 -)"/\ >- n/{-S,--suffix}/x:'<file_name_suffix>'/ \ >- n/{-d,--{de,un}compress}/f:*.{gz,Z,z,zip,taz,tgz}/ \ >- N/{-d,--{de,un}compress}/f:*.{gz,Z,z,zip,taz,tgz}/ \ >- n/*/f:^*.{gz,Z,z,zip,taz,tgz}/ >- complete {gunzip,ungzip} c/--/"(stdout to-stdout force help list license \ >- no-name quiet recurse suffix test verbose version)"/ \ >- c/-/"(c f h l L n q r S t v V -)"/ \ >- n/{-S,--suffix}/x:'<file_name_suffix>'/ \ >- n/*/f:*.{gz,Z,z,zip,taz,tgz}/ >- complete zgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >- c/-/"(A b B c C e f h i l n s v V w x)"/ \ >- p/1/x:'<limited_regular_expression>'/ N/-*e/f/ \ >- n/-*e/x:'<limited_regular_expression>'/ n/-*f/f/ n/*/f/ >- complete zegrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >- c/-/"(A b B c C e f h i l n s v V w x)"/ \ >- p/1/x:'<full_regular_expression>'/ N/-*e/f/ \ >- n/-*e/x:'<full_regular_expression>'/ n/-*f/f/ n/*/f/ >- complete zfgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >- c/-/"(A b B c C e f h i l n s v V w x)"/ \ >- p/1/x:'<fixed_string>'/ N/-*e/f/ \ >- n/-*e/x:'<fixed_string>'/ n/-*f/f/ n/*/f/ >- complete znew c/-/"(f t v 9 P K)"/ n/*/f:*.Z/ >- complete zmore n/*/f:*.{gz,Z,z,zip}/ >- complete zfile n/*/f:*.{gz,Z,z,zip,taz,tgz}/ >- complete ztouch n/*/f:*.{gz,Z,z,zip,taz,tgz}/ >- complete zforce n/*/f:^*.{gz,tgz}/ >+complete gzcat c/--/"(force help license quiet version)"/ \ >+ c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ >+complete gzip c/--/"(stdout to-stdout decompress uncompress \ >+ force help list license no-name quiet recurse \ >+ suffix test verbose version fast best)"/ \ >+ c/-/"(c d f h l L n q r S t v V 1 2 3 4 5 6 7 8 9 -)"/\ >+ n/{-S,--suffix}/x:'<file_name_suffix>'/ \ >+ n/{-d,--{de,un}compress}/f:*.{gz,Z,z,zip,taz,tgz}/ \ >+ N/{-d,--{de,un}compress}/f:*.{gz,Z,z,zip,taz,tgz}/ \ >+ n/*/f:^*.{gz,Z,z,zip,taz,tgz}/ >+complete {gunzip,ungzip} c/--/"(stdout to-stdout force help list license \ >+ no-name quiet recurse suffix test verbose version)"/ \ >+ c/-/"(c f h l L n q r S t v V -)"/ \ >+ n/{-S,--suffix}/x:'<file_name_suffix>'/ \ >+ n/*/f:*.{gz,Z,z,zip,taz,tgz}/ >+complete zgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >+ c/-/"(A b B c C e f h i l n s v V w x)"/ \ >+ p/1/x:'<limited_regular_expression>'/ N/-*e/f/ \ >+ n/-*e/x:'<limited_regular_expression>'/ n/-*f/f/ n/*/f/ >+complete zegrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >+ c/-/"(A b B c C e f h i l n s v V w x)"/ \ >+ p/1/x:'<full_regular_expression>'/ N/-*e/f/ \ >+ n/-*e/x:'<full_regular_expression>'/ n/-*f/f/ n/*/f/ >+complete zfgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >+ c/-/"(A b B c C e f h i l n s v V w x)"/ \ >+ p/1/x:'<fixed_string>'/ N/-*e/f/ \ >+ n/-*e/x:'<fixed_string>'/ n/-*f/f/ n/*/f/ >+complete znew c/-/"(f t v 9 P K)"/ n/*/f:*.Z/ >+complete zmore n/*/f:*.{gz,Z,z,zip}/ >+complete zfile n/*/f:*.{gz,Z,z,zip,taz,tgz}/ >+complete ztouch n/*/f:*.{gz,Z,z,zip,taz,tgz}/ >+complete zforce n/*/f:^*.{gz,tgz}/ > >- complete dcop 'p/1/`$:0`/ /' \ >- 'p/2/`$:0 $:1 | awk \{print\ \$1\}`/ /' \ >- 'p/3/`$:0 $:1 $:2 | sed "s%.* \(.*\)(.*%\1%"`/ /' >+complete dcop 'p/1/`$:0`/ /' \ >+ 'p/2/`$:0 $:1 | awk \{print\ \$1\}`/ /' \ >+ 'p/3/`$:0 $:1 $:2 | sed "s%.* \(.*\)(.*%\1%"`/ /' > > >- complete grep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >- c/--/"(extended-regexp fixed-regexp basic-regexp \ >- regexp file ignore-case word-regexp line-regexp \ >- no-messages revert-match version help byte-offset \ >- line-number with-filename no-filename quiet silent \ >- text directories recursive files-without-match \ >- files-with-matches count before-context after-context \ >- context binary unix-byte-offsets)"/ \ >- c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ >- v w x)"/ \ >- p/1/x:'<limited_regular_expression>'/ N/-*e/f/ \ >- n/-*e/x:'<limited_regular_expression>'/ n/-*f/f/ n/*/f/ >- complete egrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >- c/--/"(extended-regexp fixed-regexp basic-regexp \ >- regexp file ignore-case word-regexp line-regexp \ >- no-messages revert-match version help byte-offset \ >- line-number with-filename no-filename quiet silent \ >- text directories recursive files-without-match \ >- files-with-matches count before-context after-context \ >- context binary unix-byte-offsets)"/ \ >- c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ >- v w x)"/ \ >- p/1/x:'<full_regular_expression>'/ N/-*e/f/ \ >- n/-*e/x:'<full_regular_expression>'/ n/-*f/f/ n/*/f/ >- complete fgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >- c/--/"(extended-regexp fixed-regexp basic-regexp \ >- regexp file ignore-case word-regexp line-regexp \ >- no-messages revert-match version help byte-offset \ >- line-number with-filename no-filename quiet silent \ >- text directories recursive files-without-match \ >- files-with-matches count before-context after-context \ >- context binary unix-byte-offsets)"/ \ >- c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ >- v w x)"/ \ >- p/1/x:'<fixed_string>'/ N/-*e/f/ \ >- n/-*e/x:'<fixed_string>'/ n/-*f/f/ n/*/f/ >+complete grep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >+ c/--/"(extended-regexp fixed-regexp basic-regexp \ >+ regexp file ignore-case word-regexp line-regexp \ >+ no-messages revert-match version help byte-offset \ >+ line-number with-filename no-filename quiet silent \ >+ text directories recursive files-without-match \ >+ files-with-matches count before-context after-context \ >+ context binary unix-byte-offsets)"/ \ >+ c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ >+ v w x)"/ \ >+ p/1/x:'<limited_regular_expression>'/ N/-*e/f/ \ >+ n/-*e/x:'<limited_regular_expression>'/ n/-*f/f/ n/*/f/ >+complete egrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >+ c/--/"(extended-regexp fixed-regexp basic-regexp \ >+ regexp file ignore-case word-regexp line-regexp \ >+ no-messages revert-match version help byte-offset \ >+ line-number with-filename no-filename quiet silent \ >+ text directories recursive files-without-match \ >+ files-with-matches count before-context after-context \ >+ context binary unix-byte-offsets)"/ \ >+ c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ >+ v w x)"/ \ >+ p/1/x:'<full_regular_expression>'/ N/-*e/f/ \ >+ n/-*e/x:'<full_regular_expression>'/ n/-*f/f/ n/*/f/ >+complete fgrep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ >+ c/--/"(extended-regexp fixed-regexp basic-regexp \ >+ regexp file ignore-case word-regexp line-regexp \ >+ no-messages revert-match version help byte-offset \ >+ line-number with-filename no-filename quiet silent \ >+ text directories recursive files-without-match \ >+ files-with-matches count before-context after-context \ >+ context binary unix-byte-offsets)"/ \ >+ c/-/"(A a B b C c d E e F f G H h i L l n q r s U u V \ >+ v w x)"/ \ >+ p/1/x:'<fixed_string>'/ N/-*e/f/ \ >+ n/-*e/x:'<fixed_string>'/ n/-*f/f/ n/*/f/ > >- complete sed c/--/"(quiet silent version help expression file)"/ \ >- c/-/"(n V e f -)"/ n/{-e,--expression}/x:'<script>'/ \ >- n/{-f,--file}/f:*.sed/ N/-{e,f,-{file,expression}}/f/ \ >- n/-/x:'<script>'/ N/-/f/ p/1/x:'<script>'/ p/2/f/ >+complete sed c/--/"(quiet silent version help expression file)"/ \ >+ c/-/"(n V e f -)"/ n/{-e,--expression}/x:'<script>'/ \ >+ n/{-f,--file}/f:*.sed/ N/-{e,f,-{file,expression}}/f/ \ >+ n/-/x:'<script>'/ N/-/f/ p/1/x:'<script>'/ p/2/f/ > >- complete users c/--/"(help version)"/ p/1/x:'<accounting_file>'/ >- complete who c/--/"(heading idle count mesg message writable help \ >- version)"/ c/-/"(H i m q s T w u -)"/ \ >- p/1/x:'<accounting_file>'/ n/am/"(i)"/ n/are/"(you)"/ >+complete users c/--/"(help version)"/ p/1/x:'<accounting_file>'/ >+complete who c/--/"(heading idle count mesg message writable help \ >+ version)"/ c/-/"(H i m q s T w u -)"/ \ >+ p/1/x:'<accounting_file>'/ n/am/"(i)"/ n/are/"(you)"/ > >- 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/ >- 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/ >- complete chmod c/--/"(changes silent quiet verbose reference \ >- recursive help version)"/ c/-/"(c f R v)"/ >- complete df c/--/"(all block-size human-readable si inodes \ >- kilobytes local megabytes no-sync portability sync \ >- type print-type exclude-type help version)"/ \ >- c/-/"(a H h i k l m P T t v x)"/ >- complete du c/--/"(all block-size bytes total dereference-args \ >- human-readable si kilobytes count-links dereference \ >- megabytes separate-dirs summarize one-file-system \ >- exclude-from exclude max-depth help version"/ \ >- c/-/"(a b c D H h k L l m S s X x)"/ >+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/ >+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/ >+complete chmod c/--/"(changes silent quiet verbose reference \ >+ recursive help version)"/ c/-/"(c f R v)"/ >+complete df c/--/"(all block-size human-readable si inodes \ >+ kilobytes local megabytes no-sync portability sync \ >+ type print-type exclude-type help version)"/ \ >+ c/-/"(a H h i k l m P T t v x)"/ >+complete du c/--/"(all block-size bytes total dereference-args \ >+ human-readable si kilobytes count-links dereference \ >+ megabytes separate-dirs summarize one-file-system \ >+ exclude-from exclude max-depth help version"/ \ >+ c/-/"(a b c D H h k L l m S s X x)"/ > >- complete cat c/--/"(number-nonblank number squeeze-blank show-all \ >- show-nonprinting show-ends show-tabs help version)"/ \ >- c/-/"(A b E e n s T t u v -)"/ n/*/f/ >- complete mv c/--/"(backup force interactive update verbose suffix \ >- version-control help version)"/ \ >- c/-/"(b f i S u V v -)"/ \ >- n/{-S,--suffix}/x:'<suffix>'/ \ >- n/{-V,--version-control}/"(t numbered nil existing \ >- never simple)"/ n/-/f/ N/-/d/ p/1/f/ p/2/d/ n/*/f/ >- complete cp c/--/"(archive backup no-dereference force \ >- interactive link preserve parents sparse recursive \ >- symbolic-link suffix update verbose version-control \ >- one-file-system help version)"/ \ >- c/-/"(a b d f i l P p R r S s u V v x -)"/ \ >- n/-*r/d/ n/{-S,--suffix}/x:'<suffix>'/ \ >- n/{-V,--version-control}/"(t numbered nil existing \ >- never simple)"/ n/-/f/ N/-/d/ p/1/f/ p/2/d/ n/*/f/ >- complete ln c/--/"(backup directory force no-dereference \ >- interactive symbolic suffix verbose version-control \ >- help version)"/ \ >- c/-/"(b d F f i n S s V v -)"/ \ >- n/{-S,--suffix}/x:'<suffix>'/ \ >- n/{-V,--version-control}/"(t numbered nil existing \ >- never simple)"/ n/-/f/ N/-/x:'<link_name>'/ \ >- p/1/f/ p/2/x:'<link_name>'/ >- complete touch c/--/"(date reference time help version)"/ \ >- c/-/"(a c d f m r t -)"/ \ >- n/{-d,--date}/x:'<date_string>'/ \ >- c/--time/"(access atime mtime modify use)"/ \ >- n/{-r,--file}/f/ n/-t/x:'<time_stamp>'/ n/*/f/ >- complete mkdir c/--/"(mode parents verbose help version)"/ \ >- c/-/"(p m -)"/ \ >- n/{-m,--mode}/x:'<mode>'/ n/*/d/ >- complete rmdir c/--/"(ignore-fail-on-non-empty parents verbose help \ >- version)"/ c/-/"(p -)"/ n/*/d/ >- complete env 'c/*=/f/' 'p/1/e/=/' 'p/2/c/' >+complete cat c/--/"(number-nonblank number squeeze-blank show-all \ >+ show-nonprinting show-ends show-tabs help version)"/ \ >+ c/-/"(A b E e n s T t u v -)"/ n/*/f/ >+complete mv c/--/"(backup force interactive update verbose suffix \ >+ version-control help version)"/ \ >+ c/-/"(b f i S u V v -)"/ \ >+ n/{-S,--suffix}/x:'<suffix>'/ \ >+ n/{-V,--version-control}/"(t numbered nil existing \ >+ never simple)"/ n/-/f/ N/-/d/ p/1/f/ p/2/d/ n/*/f/ >+complete cp c/--/"(archive backup no-dereference force \ >+ interactive link preserve parents sparse recursive \ >+ symbolic-link suffix update verbose version-control \ >+ one-file-system help version)"/ \ >+ c/-/"(a b d f i l P p R r S s u V v x -)"/ \ >+ n/-*r/d/ n/{-S,--suffix}/x:'<suffix>'/ \ >+ n/{-V,--version-control}/"(t numbered nil existing \ >+ never simple)"/ n/-/f/ N/-/d/ p/1/f/ p/2/d/ n/*/f/ >+complete ln c/--/"(backup directory force no-dereference \ >+ interactive symbolic suffix verbose version-control \ >+ help version)"/ \ >+ c/-/"(b d F f i n S s V v -)"/ \ >+ n/{-S,--suffix}/x:'<suffix>'/ \ >+ n/{-V,--version-control}/"(t numbered nil existing \ >+ never simple)"/ n/-*/f/ N/-*/x:'<link_name>'/ \ >+ p/1/f/ p/2/x:'<link_name>'/ >+complete touch c/--/"(date reference time help version)"/ \ >+ c/-/"(a c d f m r t -)"/ \ >+ n/{-d,--date}/x:'<date_string>'/ \ >+ c/--time/"(access atime mtime modify use)"/ \ >+ n/{-r,--file}/f/ n/-t/x:'<time_stamp>'/ n/*/f/ >+complete mkdir c/--/"(mode parents verbose help version)"/ \ >+ c/-/"(p m -)"/ \ >+ n/{-m,--mode}/x:'<mode>'/ n/*/d/ >+complete rmdir c/--/"(ignore-fail-on-non-empty parents verbose help \ >+ version)"/ c/-/"(p -)"/ n/*/d/ >+complete env 'c/*=/f/' 'p/1/e/=/' 'p/2/c/' > >- complete tar c/-[Acru]*/"(b B C f F g G h i l L M N o P \ >- R S T v V w W X z Z)"/ \ >- c/-[dtx]*/"( B C f F g G i k K m M O p P \ >- R s S T v w x X z Z)"/ \ >- p/1/"(A c d r t u x -A -c -d -r -t -u -x \ >- --catenate --concatenate --create --diff --compare \ >- --delete --append --list --update --extract --get \ >- --help --version)"/ \ >- c/--/"(catenate concatenate create diff compare \ >- delete append list update extract get atime-preserve \ >- block-size read-full-blocks directory checkpoint file \ >- force-local info-script new-volume-script incremental \ >- listed-incremental dereference ignore-zeros \ >- ignore-failed-read keep-old-files starting-file \ >- one-file-system tape-length modification-time \ >- multi-volume after-date newer old-archive portability \ >- to-stdout same-permissions preserve-permissions \ >- absolute-paths preserve record-number remove-files \ >- same-order preserve-order same-owner sparse \ >- files-from null totals verbose label version \ >- interactive confirmation verify exclude exclude-from \ >- compress uncompress gzip ungzip use-compress-program \ >- 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]j*f,--file}/f:*.{tar.bz2,tbz}/ \ >- n/{-[Adrtux]z*f,--file}/f:*.{tar.gz,tgz}/ \ >- n/{-[Adrtux]Z*f,--file}/f:*.{tar.Z,taz}/ \ >- n/{-[Adrtux]*f,--file}/f:*.tar/ \ >- N/{-xj*f,--file}/'`tar -tjf $:-1`'/ \ >- N/{-xz*f,--file}/'`tar -tzf $:-1`'/ \ >- N/{-xZ*f,--file}/'`tar -tZf $:-1`'/ \ >- N/{-x*f,--file}/'`tar -tf $:-1`'/ \ >- n/--use-compress-program/c/ \ >- n/{-b,--block-size}/x:'<block_size>'/ \ >- n/{-V,--label}/x:'<volume_label>'/ \ >- n/{-N,--{after-date,newer}}/x:'<date>'/ \ >- n/{-L,--tape-length}/x:'<tape_length_in_kB>'/ \ >- n/{-C,--directory}/d/ \ >- N/{-C,--directory}/'`\ls $:-1`'/ \ >- n/-[0-7]/"(l m h)"/ >+complete tar c/-[Acru]*/"(b B C f F g G h i l L M N o P \ >+ R S T v V w W X z Z)"/ \ >+ c/-[dtx]*/"( B C f F g G i k K m M O p P \ >+ R s S T v w x X z Z)"/ \ >+ p/1/"(A c d r t u x -A -c -d -r -t -u -x \ >+ --catenate --concatenate --create --diff --compare \ >+ --delete --append --list --update --extract --get \ >+ --help --version)"/ \ >+ c/--/"(catenate concatenate create diff compare \ >+ delete append list update extract get atime-preserve \ >+ block-size read-full-blocks directory checkpoint file \ >+ force-local info-script new-volume-script incremental \ >+ listed-incremental dereference ignore-zeros \ >+ ignore-failed-read keep-old-files starting-file \ >+ one-file-system tape-length modification-time \ >+ multi-volume after-date newer old-archive portability \ >+ to-stdout same-permissions preserve-permissions \ >+ absolute-paths preserve record-number remove-files \ >+ same-order preserve-order same-owner sparse \ >+ files-from null totals verbose label version \ >+ interactive confirmation verify exclude exclude-from \ >+ compress uncompress gzip ungzip use-compress-program \ >+ 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]j*f,--file}/f:*.{tar.bz2,tbz}/ \ >+ n/{-[Adrtux]z*f,--file}/f:*.{tar.gz,tgz}/ \ >+ n/{-[Adrtux]Z*f,--file}/f:*.{tar.Z,taz}/ \ >+ n/{-[Adrtux]*f,--file}/f:*.tar/ \ >+ N/{-xj*f,--file}/'`tar -tjf $:-1`'/ \ >+ N/{-xz*f,--file}/'`tar -tzf $:-1`'/ \ >+ N/{-xZ*f,--file}/'`tar -tZf $:-1`'/ \ >+ N/{-x*f,--file}/'`tar -tf $:-1`'/ \ >+ n/--use-compress-program/c/ \ >+ n/{-b,--block-size}/x:'<block_size>'/ \ >+ n/{-V,--label}/x:'<volume_label>'/ \ >+ n/{-N,--{after-date,newer}}/x:'<date>'/ \ >+ n/{-L,--tape-length}/x:'<tape_length_in_kB>'/ \ >+ n/{-C,--directory}/d/ \ >+ N/{-C,--directory}/'`\ls $:-1`'/ \ >+ n/-[0-7]/"(l m h)"/ > >- switch ( "$OSTYPE" ) >- case "linux": >- # Linux filesystems >- complete mount c/-/"(a f F h l n o r s t U v V w)"/ n/-[hV]/n/ \ >- n/-o/x:'<options>'/ n/-t/x:'<vfstype>'/ \ >- n/-L/x:'<label>'/ n/-U/x:'<uuid>'/ \ >- n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@ >- complete umount c/-/"(a h n r t v V)"/ n/-t/x:'<vfstype>'/ \ >- n/*/'`mount | cut -d " " -f 3`'/ >- breaksw >- case "sunos*": >- case "solaris": >- # Solaris 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`'/ >- breaksw >- case "cygwin": >- # Cygwin mounts >- complete mount c/-/"(b c f h m o p s t u v x E X)"/ n/-[hmpv]/n/ \ >- n/-c/x:'/'/ \ >- n/-o/"(user system binary text exec notexec cygexec nosuid managed)"/ \ >- n@*@'`mount -p | tail -1 | cut -d " " -f 1 | xargs ls -1 | awk '"'"'{print $1":/"; } END{print "//";}'"'"'`'@ >- complete umount c/-/"(A c h s S u U v)"/ n/-[AhSUv]/n/ \ >- n@*@'`mount | grep -v noumount | cut -d " " -f 3`'@ >- breaksw >- default: >- breaksw >- endsw >+switch ( "$OSTYPE" ) >+case linux: >+ # Linux filesystems >+ complete mount c/-/"(a f F h l n o r s t U v V w)"/ n/-[hV]/n/ \ >+ n/-o/x:'<options>'/ n/-t/x:'<vfstype>'/ \ >+ n/-L/x:'<label>'/ n/-U/x:'<uuid>'/ \ >+ n@*@'`grep -v "^#" /etc/fstab | tr -s " " " " | cut -f 2`'@ >+ complete umount c/-/"(a h n r t v V)"/ n/-t/x:'<vfstype>'/ \ >+ n/*/'`mount | cut -d " " -f 3`'/ >+ breaksw >+case sunos*: >+case solaris: >+ # Solaris 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`'/ >+ breaksw >+case cygwin: >+ # Cygwin mounts >+ complete mount c/-/"(b c f h m o p s t u v x E X)"/ n/-[hmpv]/n/ \ >+ n/-c/x:'/'/ \ >+ n/-o/"(user system binary text exec notexec cygexec nosuid managed)"/ \ >+ n@*@'`mount -p | tail -1 | cut -d " " -f 1 | xargs ls -1 | awk '"'"'{print $1":/"; } END{print "//";}'"'"'`'@ >+ complete umount c/-/"(A c h s S u U v)"/ n/-[AhSUv]/n/ \ >+ n@*@'`mount | grep -v noumount | cut -d " " -f 3`'@ >+ breaksw >+endsw > >- # these deal with NIS (formerly YP); if it's not running you don't need 'em >- if (-X domainname) then >- set _domain = "`domainname`" >- set _ypdir = /var/yp # directory where NIS (YP) maps are kept >- if ("$_domain" != "" && "$_domain" != "noname") then >- complete domainname p@1@D:$_ypdir@" " n@*@n@ >- complete ypcat c@-@"(d k t x)"@ n@-x@n@ n@-d@D:$_ypdir@" " \ >- N@-d@\`\\ls\ -1\ $_ypdir/\$:-1\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ \ >- n@*@\`\\ls\ -1\ $_ypdir/$_domain\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ >- complete ypmatch c@-@"(d k t x)"@ n@-x@n@ n@-d@D:$_ypdir@" " \ >- N@-d@x:'<key ...>'@ n@-@x:'<key ...>'@ p@1@x:'<key ...>'@ \ >- n@*@\`\\ls\ -1\ $_ypdir/$_domain\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ >- complete ypwhich c@-@"(d m t x V1 V2)"@ n@-x@n@ n@-d@D:$_ypdir@" " \ >- n@-m@\`\\ls\ -1\ $_ypdir/$_domain\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ \ >- N@-m@n@ n@*@\$hosts@ >- endif >- unset _domain _ypdir >- endif >+# these deal with NIS (formerly YP); if it's not running you don't need 'em >+if (-X domainname) then >+ set _domain = "`domainname`" >+ set _ypdir = /var/yp # directory where NIS (YP) maps are kept >+ if ("$_domain" != "" && "$_domain" != "noname") then >+ complete domainname p@1@D:$_ypdir@" " n@*@n@ >+ complete ypcat c@-@"(d k t x)"@ n@-x@n@ n@-d@D:$_ypdir@" " \ >+ N@-d@\`\\ls\ -1\ $_ypdir/\$:-1\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ \ >+ n@*@\`\\ls\ -1\ $_ypdir/$_domain\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ >+ complete ypmatch c@-@"(d k t x)"@ n@-x@n@ n@-d@D:$_ypdir@" " \ >+ N@-d@x:'<key ...>'@ n@-@x:'<key ...>'@ p@1@x:'<key ...>'@ \ >+ n@*@\`\\ls\ -1\ $_ypdir/$_domain\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ >+ complete ypwhich c@-@"(d m t x V1 V2)"@ n@-x@n@ n@-d@D:$_ypdir@" " \ >+ n@-m@\`\\ls\ -1\ $_ypdir/$_domain\ \|\ sed\ -n\ s%\\\\.pag\\\$%%p\`@ \ >+ N@-m@n@ n@*@\$hosts@ >+ endif >+ unset _domain _ypdir >+endif > >- complete make \ >- 'n/-f/f/' \ >- 'c/*=/f/' \ >- 'n@*@`cat -s GNUmakefile Makefile makefile |& sed -n -e "/No such file/d" -e "/^[^ #].*:/s/:.*//p"`@' >+complete make \ >+ 'n/-f/f/' \ >+ 'c/*=/f/' \ >+ 'n@*@`cat -s GNUmakefile Makefile makefile |& sed -n -e "/No such file/d" -e "/^[^ #].*:/s/:.*//p"`@' > >- if ( -f /etc/printcap ) then >- set printers=(`sed -n -e "/^[^ #].*:/s/:.*//p" /etc/printcap`) >+if ( -f /etc/printcap ) then >+ set printers=(`sed -n -e "/^[^ #].*:/s/:.*//p" /etc/printcap`) > >- complete lpr 'c/-P/$printers/' >- complete lpq 'c/-P/$printers/' >- 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 >+ complete lpr 'c/-P/$printers/' >+ complete lpq 'c/-P/$printers/' >+ 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 > >- # From Alphonse Bendt >- complete ant \ >- 'n/-f/f:*.xml/' \ >- 'n@*@`cat build.xml | sed -n -e "s/[ \t]*<target[\t\n]*name=.\([a-zA-Z0-9_:]*\).*/\1/p"`@' >+# From Alphonse Bendt >+complete ant \ >+ 'n/-f/f:*.xml/' \ >+ 'n@*@`cat build.xml | sed -n -e "s/[ \t]*<target[\t\n]*name=.\([a-zA-Z0-9_:]*\).*/\1/p"`@' > >- if ($?P4CLIENT && -X perl) then >- # This is from Greg Allen. >- set p4cmds=(add branch branches commands change changes client clients \ >- counter counters delete depot depots describe diff diff2 \ >- edit filelog files fix fixes fstat group groups have help \ >- info integrate integrated job jobs jobspec label labels \ >- labelsync lock obliterate opened passwd print protect rename \ >- reopen resolve resolved revert review reviews set submit \ >- sync triggers unlock user users verify where) >- complete p4 'p/1/$p4cmds/' 'n/help/$p4cmds/' \ >- 'n%{-l,label}%`p4 labels | sed "s/Label \([^ ]*\) .*/\1/"`%' \ >- 'n%-t%`p4 $:1s | sed "s/[^ ]* \([^ ]*\) .*/\1/"`%' \ >- 'c%*@%`p4 labels | sed "s/Label \([^ ]*\) .*/\1/"`%' \ >- 'c@//*/*@`p4 files $:-0... |& perl -nle "m%\Q$:-0\E([^#][^/# ] \ >- *)%;print "\$"1 if \\\!/no such/&&\!"\$"h{"\$"1}++"`@@' \ >- 'c@//@`p4 depots | sed "s/Depot \([^ ]*\) .*/\1/"`@/@' >- endif >+if ($?P4CLIENT && -X perl) then >+ # This is from Greg Allen. >+ set p4cmds=(add branch branches commands change changes client clients \ >+ counter counters delete depot depots describe diff diff2 \ >+ edit filelog files fix fixes fstat group groups have help \ >+ info integrate integrated job jobs jobspec label labels \ >+ labelsync lock obliterate opened passwd print protect rename \ >+ reopen resolve resolved revert review reviews set submit \ >+ sync triggers unlock user users verify where) >+ complete p4 'p/1/$p4cmds/' 'n/help/$p4cmds/' \ >+ 'n%{-l,label}%`p4 labels | sed "s/Label \([^ ]*\) .*/\1/"`%' \ >+ 'n%-t%`p4 $:1s | sed "s/[^ ]* \([^ ]*\) .*/\1/"`%' \ >+ 'c%*@%`p4 labels | sed "s/Label \([^ ]*\) .*/\1/"`%' \ >+ 'c@//*/*@`p4 files $:-0... |& perl -nle "m%\Q$:-0\E([^#][^/# ] \ >+ *)%;print "\$"1 if \\\!/no such/&&\!"\$"h{"\$"1}++"`@@' \ >+ 'c@//@`p4 depots | sed "s/Depot \([^ ]*\) .*/\1/"`@/@' >+endif > > >- if (! $?traditional_complete) then >- uncomplete vi >- uncomplete vim >- complete {vi,vim,gvim,nvi,elvis} n/*/f:^*.{o,a,so,sa,aux,dvi,log,fig,bbl,blg,bst,idx,ilg,ind,toc}/ >- complete {ispell,spell,spellword} 'n@-d@`ls /usr/lib/ispell/*.aff | sed -e "s/\.aff//" `@' 'n/*/f:^*.{o,a,so,sa,aux,dvi,log,fig,bbl,blg,bst,idx,ilg,ind,toc}/' >- complete elm 'n/-[Ai]/f/' 'c@=@F:$HOME/Mail/@' 'n/-s/x:\<subject\>/' >- complete ncftp 'n@*@`sed -e '1,2d' $HOME/.ncftp/bookmarks | cut -f 1,2 -d "," | tr "," "\012" | sort | uniq ` '@ >- complete bibtex 'n@*@`ls *.aux | sed -e "s/\.aux//"`'@ >- complete dvi2tty n/*/f:*.dvi/ # Only files that match *.dvi >- uncomplete gv >- uncomplete ghostview >- complete {gv,ghostview} 'n/*/f:*.{ps,eps,epsi}/' >- complete enscript \ >- 'c/--/(columns= pages= header= no-header truncate-lines \ >- line-numbers setpagedevice= escapes font= \ >- header-font= fancy-header no-job-header \ >- highlight-bars indent= filter= borders page-prefeed \ >- no-page-prefeed lineprinter lines-per-page= mail \ >- media= copies= newline= output= missing-characters \ >- printer= quiet silent landscape portrait \ >- baselineskip= statusdict= title= tabsize= underlay= \ >- verbose version encoding pass-through download-font= \ >- filter-stdin= help highlight-bar-gray= list-media \ >- list-options non-printable-format= page-label-format= \ >- printer-options= ul-angle= ul-font= ul-gray= \ >- ul-position= ul-style= \ >- )/' >- endif >+if (! $?traditional_complete) then >+ uncomplete vi >+ uncomplete vim >+ complete {vi,vim,gvim,nvi,elvis} n/*/f:^*.{o,a,so,sa,aux,dvi,log,fig,bbl,blg,bst,idx,ilg,ind,toc}/ >+ complete {ispell,spell,spellword} 'n@-d@`ls /usr/lib/ispell/*.aff | sed -e "s/\.aff//" `@' 'n/*/f:^*.{o,a,so,sa,aux,dvi,log,fig,bbl,blg,bst,idx,ilg,ind,toc}/' >+ complete elm 'n/-[Ai]/f/' 'c@=@F:$HOME/Mail/@' 'n/-s/x:\<subject\>/' >+ complete ncftp 'n@*@`sed -e '1,2d' $HOME/.ncftp/bookmarks | cut -f 1,2 -d "," | tr "," "\012" | sort | uniq ` '@ >+ complete bibtex 'n@*@`ls *.aux | sed -e "s/\.aux//"`'@ >+ complete dvi2tty n/*/f:*.dvi/ # Only files that match *.dvi >+ uncomplete gv >+ uncomplete ghostview >+ complete {gv,ghostview} 'n/*/f:*.{ps,eps,epsi}/' >+ complete enscript \ >+ 'c/--/(columns= pages= header= no-header truncate-lines \ >+ line-numbers setpagedevice= escapes font= \ >+ header-font= fancy-header no-job-header \ >+ highlight-bars indent= filter= borders page-prefeed \ >+ no-page-prefeed lineprinter lines-per-page= mail \ >+ media= copies= newline= output= missing-characters \ >+ printer= quiet silent landscape portrait \ >+ baselineskip= statusdict= title= tabsize= underlay= \ >+ verbose version encoding pass-through download-font= \ >+ filter-stdin= help highlight-bar-gray= list-media \ >+ list-options non-printable-format= page-label-format= \ >+ printer-options= ul-angle= ul-font= ul-gray= \ >+ ul-position= ul-style= \ >+ )/' >+endif > >- complete dpkg \ >- 'c/--{admindir,instdir,root}=/d/' \ >- 'c/--debug=/n/' \ >- 'c/--{admindir,debug,instdir,root}/(=)//' \ >- 'c/--/(admindir= debug= instdir= root= \ >- assert-support-predepends assert-working-epoch \ >- audit auto-deconfigure clear-avail \ >- compare-versions configure contents control \ >- extract force-bad-path field \ >- force-configure-any force-conflicts \ >- force-depends force-depends-version force-help \ >- force-hold force-non-root \ >- force-overwrite-diverted \ >- force-remove-essential force-remove-reinstreq \ >- forget-old-unavail fsys-tarfile get-selections \ >- help ignore-depends info install largemem \ >- license list listfiles merge-avail no-act \ >- pending predep-package print-architecture \ >- print-gnu-build-architecture \ >- print-installation-architecture print-avail \ >- purge record-avail recursive refuse-downgrade \ >- remove search set-selections selected-only \ >- skip-same-version smallmem status unpack \ >- update-avail version vextract \ >- )//' \ >- 'n/{-l}/`dpkg -l|awk \{print\ \$2\}`/' \ >- 'n/*/f:*.deb'/ >- complete dpkg-deb 'c/--{build}=/d/' \ >- 'c/--/(build contents info field control extract \ >- vextract fsys-tarfile help version \ >- license)//' \ >- 'n/*/f:*.deb/' >- complete apt-get \ >- 'c/--/(build config-file diff-only download-only \ >- fix-broken fix-missing force-yes help ignore-hold no-download \ >- no-upgrade option print-uris purge reinstall quiet simulate \ >- show-upgraded target-release tar-only version yes )/' \ >- 'c/-/(b c= d f h m o= q qq s t x y )/' \ >- 'n/{source,build-dep}/x:<pkgname>/' \ >- 'n/{remove}/`dpkg -l|grep ^ii|awk \{print\ \$2\}`/' \ >- 'n/{install}/`apt-cache pkgnames | sort`/' \ >- 'C/*/(update upgrade dselect-upgrade source \ >- build-dep check clean autoclean install remove)/' >- complete apt-cache \ >- 'c/--/(all-versions config-file generate full help important \ >- names-only option pkg-cache quiet recurse src-cache version )/' \ >- 'c/-/(c= h i o= p= q s= v)/' \ >- 'n/{search}/x:<regex>/' \ >- 'n/{pkgnames,policy,show,showpkg,depends,dotty}/`apt-cache pkgnames | sort`/' \ >- 'C/*/(add gencaches showpkg stats dump dumpavail unmet show \ >- search depends pkgnames dotty policy )/' >+complete dpkg \ >+ 'c/--{admindir,instdir,root}=/d/' \ >+ 'c/--debug=/n/' \ >+ 'c/--{admindir,debug,instdir,root}/(=)//' \ >+ 'c/--/(admindir= debug= instdir= root= \ >+ assert-support-predepends assert-working-epoch \ >+ audit auto-deconfigure clear-avail \ >+ compare-versions configure contents control \ >+ extract force-bad-path field \ >+ force-configure-any force-conflicts \ >+ force-depends force-depends-version force-help \ >+ force-hold force-non-root \ >+ force-overwrite-diverted \ >+ force-remove-essential force-remove-reinstreq \ >+ forget-old-unavail fsys-tarfile get-selections \ >+ help ignore-depends info install largemem \ >+ license list listfiles merge-avail no-act \ >+ pending predep-package print-architecture \ >+ print-gnu-build-architecture \ >+ print-installation-architecture print-avail \ >+ purge record-avail recursive refuse-downgrade \ >+ remove search set-selections selected-only \ >+ skip-same-version smallmem status unpack \ >+ update-avail version vextract \ >+ )//' \ >+ 'n/{-l}/`dpkg -l|awk \{print\ \$2\}`/' \ >+ 'n/*/f:*.deb'/ >+complete dpkg-deb 'c/--{build}=/d/' \ >+ 'c/--/(build contents info field control extract \ >+ vextract fsys-tarfile help version \ >+ license)//' \ >+ 'n/*/f:*.deb/' >+complete apt-get \ >+ 'c/--/(build config-file diff-only download-only \ >+ fix-broken fix-missing force-yes help ignore-hold no-download \ >+ no-upgrade option print-uris purge reinstall quiet simulate \ >+ show-upgraded target-release tar-only version yes )/' \ >+ 'c/-/(b c= d f h m o= q qq s t x y )/' \ >+ 'n/{source,build-dep}/x:<pkgname>/' \ >+ 'n/{remove}/`dpkg -l|grep ^ii|awk \{print\ \$2\}`/' \ >+ 'n/{install}/`apt-cache pkgnames | sort`/' \ >+ 'C/*/(update upgrade dselect-upgrade source \ >+ build-dep check clean autoclean install remove)/' >+complete apt-cache \ >+ 'c/--/(all-versions config-file generate full help important \ >+ names-only option pkg-cache quiet recurse src-cache version )/' \ >+ 'c/-/(c= h i o= p= q s= v)/' \ >+ 'n/{search}/x:<regex>/' \ >+ 'n/{pkgnames,policy,show,showpkg,depends,dotty}/`apt-cache pkgnames | sort`/' \ >+ 'C/*/(add gencaches showpkg stats dump dumpavail unmet show \ >+ search depends pkgnames dotty policy )/' > >- unset noglob >- unset _complete >- unset traditional_complete >-endif >+switch ( "${OSTYPE}" ) >+case FreeBSD: >+ set commands=() >+ foreach p (fast force one quiet "") >+ foreach c (enabled poll rcvar reload restart start status stop) >+ set commands=($commands $p$c) >+ end >+ end >+ complete service \ >+ n/-R/n/ \ >+ n/-e/n/ \ >+ n/-l/n/ \ >+ n/-r/n/ \ >+ c/-/"(R e l r v)"/ \ >+ p/2/"($commands)"/ \ >+ p@1@'`service -l`'@ >+ unset commands c p >+ breaksw >+case linux: >+ if ( -d /etc/init.d ) then >+ set rcdir=/etc/init.d/ >+ else >+ set rcdir=/etc/rc.d/ >+ endif >+ complete service \ >+ p/2/"(--full-restart force-reload reload restart start stop status)"/ \ >+ c/--/"(help status-all version)"/ \ >+ c/-/"(- h)"/ \ >+ p@1@F:$rcdir@ >+ unset rcdir >+ breaksw >+endsw > >+if ( $?_unset_noglob ) unset noglob _unset_noglob >+ > end: >- onintr >+unset _has_complete >+onintr >Index: contrib/tcsh/config/bsd4.4 >=================================================================== >--- contrib/tcsh/config/bsd4.4 (revision 309109) >+++ contrib/tcsh/config/bsd4.4 (working copy) >@@ -98,6 +98,7 @@ > > #elif defined(__APPLE__) > # define SYSMALLOC >+# define BSD_STYLE_COLORLS > #endif > > #endif /* _h_config */ >Index: contrib/tcsh/config.guess >=================================================================== >--- contrib/tcsh/config.guess (revision 309109) >+++ contrib/tcsh/config.guess (working copy) >@@ -1,14 +1,12 @@ > #! /bin/sh > # Attempt to guess a canonical system name. >-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, >-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 >-# Free Software Foundation, Inc. >+# Copyright 1992-2015 Free Software Foundation, Inc. > >-timestamp='2009-12-30' >+timestamp='2015-03-04' > > # 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 >+# the Free Software Foundation; either version 3 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, but >@@ -17,27 +15,23 @@ > # 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., 51 Franklin Street - Fifth Floor, Boston, MA >-# 02110-1301, USA. >+# along with this program; if not, see <http://www.gnu.org/licenses/>. > # > # 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. >- >- >-# Originally written by Per Bothner. Please send patches (context >-# diff format) to <config-patches@gnu.org> and include a ChangeLog >-# entry. >+# the same distribution terms that you use for the rest of that >+# program. This Exception is an additional permission under section 7 >+# of the GNU General Public License, version 3 ("GPLv3"). > # >-# 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. >+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. > # > # You can get the latest version of this script from: > # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD >+# >+# Please send patches to <config-patches@gnu.org>. > >+ > me=`echo "$0" | sed -e 's,.*/,,'` > > usage="\ >@@ -56,9 +50,7 @@ > GNU config.guess ($timestamp) > > Originally written by Per Bothner. >-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, >-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free >-Software Foundation, Inc. >+Copyright 1992-2015 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." >@@ -140,12 +132,33 @@ > UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown > UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown > >+case "${UNAME_SYSTEM}" in >+Linux|GNU|GNU/*) >+ # If the system lacks a compiler, then just pick glibc. >+ # We could probably try harder. >+ LIBC=gnu >+ >+ eval $set_cc_for_build >+ cat <<-EOF > $dummy.c >+ #include <features.h> >+ #if defined(__UCLIBC__) >+ LIBC=uclibc >+ #elif defined(__dietlibc__) >+ LIBC=dietlibc >+ #else >+ LIBC=gnu >+ #endif >+ EOF >+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` >+ ;; >+esac >+ > # Note: order is significant - the case branches are not exclusive. > > case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in > *:NetBSD:*:*) > # NetBSD (nbsd) targets should (where applicable) match one or >- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, >+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, > # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently > # switched to ELF, *-*-netbsd* would select the old > # object file format. This provides both forward >@@ -155,8 +168,10 @@ > # Note: NetBSD doesn't particularly care about the vendor > # portion of the name. We always set it to "unknown". > sysctl="sysctl -n hw.machine_arch" >- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ >- /usr/sbin/$sysctl 2>/dev/null || echo unknown)` >+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ >+ /sbin/$sysctl 2>/dev/null || \ >+ /usr/sbin/$sysctl 2>/dev/null || \ >+ echo unknown)` > case "${UNAME_MACHINE_ARCH}" in > armeb) machine=armeb-unknown ;; > arm*) machine=arm-unknown ;; >@@ -163,12 +178,17 @@ > sh3el) machine=shl-unknown ;; > sh3eb) machine=sh-unknown ;; > sh5el) machine=sh5le-unknown ;; >+ earmv*) >+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` >+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` >+ machine=${arch}${endian}-unknown >+ ;; > *) machine=${UNAME_MACHINE_ARCH}-unknown ;; > esac > # The Operating System including object format, if it has switched > # to ELF recently, or will in the future. > case "${UNAME_MACHINE_ARCH}" in >- arm*|i386|m68k|ns32k|sh3*|sparc|vax) >+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) > eval $set_cc_for_build > if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ > | grep -q __ELF__ >@@ -181,9 +201,16 @@ > fi > ;; > *) >- os=netbsd >+ os=netbsd > ;; > esac >+ # Determine ABI tags. >+ case "${UNAME_MACHINE_ARCH}" in >+ earm*) >+ expr='s/^earmv[0-9]/-eabi/;s/eb$//' >+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` >+ ;; >+ esac > # The OS release > # Debian GNU/NetBSD machines have a different userland, and > # thus, need a distinct triplet. However, they do not need >@@ -200,8 +227,12 @@ > # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: > # contains redundant information, the shorter form: > # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. >- echo "${machine}-${os}${release}" >+ echo "${machine}-${os}${release}${abi}" > exit ;; >+ *:Bitrig:*:*) >+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` >+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} >+ exit ;; > *:OpenBSD:*:*) > UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` > echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} >@@ -224,7 +255,7 @@ > UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` > ;; > *5.*) >- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` >+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` > ;; > esac > # According to Compaq, /usr/sbin/psrinfo has been available on >@@ -270,7 +301,10 @@ > # A Xn.n version is an unreleased experimental baselevel. > # 1.2 uses "1.2" for uname -r. > echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` >- exit ;; >+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. >+ exitcode=$? >+ trap '' 0 >+ exit $exitcode ;; > Alpha\ *:Windows_NT*:*) > # How do we know it's Interix rather than the generic POSIX subsystem? > # Should we change UNAME_MACHINE based on the output of uname instead >@@ -296,12 +330,12 @@ > echo s390-ibm-zvmoe > exit ;; > *:OS400:*:*) >- echo powerpc-ibm-os400 >+ echo powerpc-ibm-os400 > exit ;; > arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) > echo arm-acorn-riscix${UNAME_RELEASE} > exit ;; >- arm:riscos:*:*|arm:RISCOS:*:*) >+ arm*:riscos:*:*|arm*:RISCOS:*:*) > echo arm-unknown-riscos > exit ;; > SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) >@@ -395,23 +429,23 @@ > # MiNT. But MiNT is downward compatible to TOS, so this should > # be no problem. > atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) >- echo m68k-atari-mint${UNAME_RELEASE} >+ echo m68k-atari-mint${UNAME_RELEASE} > exit ;; > atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) > echo m68k-atari-mint${UNAME_RELEASE} >- exit ;; >+ exit ;; > *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) >- echo m68k-atari-mint${UNAME_RELEASE} >+ echo m68k-atari-mint${UNAME_RELEASE} > exit ;; > milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) >- echo m68k-milan-mint${UNAME_RELEASE} >- exit ;; >+ echo m68k-milan-mint${UNAME_RELEASE} >+ exit ;; > hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) >- echo m68k-hades-mint${UNAME_RELEASE} >- exit ;; >+ echo m68k-hades-mint${UNAME_RELEASE} >+ exit ;; > *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) >- echo m68k-unknown-mint${UNAME_RELEASE} >- exit ;; >+ echo m68k-unknown-mint${UNAME_RELEASE} >+ exit ;; > m68k:machten:*:*) > echo m68k-apple-machten${UNAME_RELEASE} > exit ;; >@@ -481,8 +515,8 @@ > echo m88k-motorola-sysv3 > exit ;; > AViiON:dgux:*:*) >- # DG/UX returns AViiON for all architectures >- UNAME_PROCESSOR=`/usr/bin/uname -p` >+ # DG/UX returns AViiON for all architectures >+ UNAME_PROCESSOR=`/usr/bin/uname -p` > if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] > then > if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ >@@ -495,7 +529,7 @@ > else > echo i586-dg-dgux${UNAME_RELEASE} > fi >- exit ;; >+ exit ;; > M88*:DolphinOS:*:*) # DolphinOS (SVR3) > echo m88k-dolphin-sysv3 > exit ;; >@@ -552,7 +586,7 @@ > echo rs6000-ibm-aix3.2 > fi > exit ;; >- *:AIX:*:[456]) >+ *:AIX:*:[4567]) > IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` > if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then > IBM_ARCH=rs6000 >@@ -559,8 +593,9 @@ > else > IBM_ARCH=powerpc > fi >- if [ -x /usr/bin/oslevel ] ; then >- IBM_REV=`/usr/bin/oslevel` >+ if [ -x /usr/bin/lslpp ] ; then >+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | >+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` > else > IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} > fi >@@ -595,52 +630,52 @@ > 9000/[678][0-9][0-9]) > if [ -x /usr/bin/getconf ]; then > sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` >- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` >- case "${sc_cpu_version}" in >- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 >- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 >- 532) # CPU_PA_RISC2_0 >- case "${sc_kernel_bits}" in >- 32) HP_ARCH="hppa2.0n" ;; >- 64) HP_ARCH="hppa2.0w" ;; >+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` >+ case "${sc_cpu_version}" in >+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 >+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 >+ 532) # CPU_PA_RISC2_0 >+ case "${sc_kernel_bits}" in >+ 32) HP_ARCH="hppa2.0n" ;; >+ 64) HP_ARCH="hppa2.0w" ;; > '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 >- esac ;; >- esac >+ esac ;; >+ esac > fi > if [ "${HP_ARCH}" = "" ]; then > eval $set_cc_for_build >- sed 's/^ //' << EOF >$dummy.c >+ sed 's/^ //' << EOF >$dummy.c > >- #define _HPUX_SOURCE >- #include <stdlib.h> >- #include <unistd.h> >+ #define _HPUX_SOURCE >+ #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); >+ 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); >- } >+ 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 > (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` > test -z "$HP_ARCH" && HP_ARCH=hppa >@@ -731,22 +766,22 @@ > exit ;; > C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) > echo c1-convex-bsd >- exit ;; >+ exit ;; > C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) > if getsysinfo -f scalar_acc > then echo c32-convex-bsd > else echo c2-convex-bsd > fi >- exit ;; >+ exit ;; > C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) > echo c34-convex-bsd >- exit ;; >+ exit ;; > C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) > echo c38-convex-bsd >- exit ;; >+ exit ;; > C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) > echo c4-convex-bsd >- exit ;; >+ exit ;; > CRAY*Y-MP:*:*:*) > echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' > exit ;; >@@ -770,14 +805,14 @@ > exit ;; > F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) > FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` >- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` >- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` >- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" >- exit ;; >+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` >+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` >+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" >+ exit ;; > 5000:UNIX_System_V:4.*:*) >- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` >- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` >- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" >+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` >+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` >+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" > exit ;; > i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) > echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} >@@ -789,30 +824,35 @@ > echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} > exit ;; > *:FreeBSD:*:*) >- case ${UNAME_MACHINE} in >- pc98) >- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; >+ UNAME_PROCESSOR=`/usr/bin/uname -p` >+ case ${UNAME_PROCESSOR} in > amd64) > echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; > *) >- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; >+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; > esac > exit ;; > i*:CYGWIN*:*) > echo ${UNAME_MACHINE}-pc-cygwin > exit ;; >+ *:MINGW64*:*) >+ echo ${UNAME_MACHINE}-pc-mingw64 >+ exit ;; > *:MINGW*:*) > echo ${UNAME_MACHINE}-pc-mingw32 > exit ;; >+ *:MSYS*:*) >+ echo ${UNAME_MACHINE}-pc-msys >+ exit ;; > i*:windows32*:*) >- # uname -m includes "-pc" on this system. >- echo ${UNAME_MACHINE}-mingw32 >+ # uname -m includes "-pc" on this system. >+ echo ${UNAME_MACHINE}-mingw32 > exit ;; > i*:PW*:*) > echo ${UNAME_MACHINE}-pc-pw32 > exit ;; > *:Interix*:*) >- case ${UNAME_MACHINE} in >+ case ${UNAME_MACHINE} in > x86) > echo i586-pc-interix${UNAME_RELEASE} > exit ;; >@@ -849,15 +889,22 @@ > exit ;; > *:GNU:*:*) > # the GNU system >- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` >+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` > exit ;; > *:GNU/*:*:*) > # other systems with GNU libc and userland >- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu >+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} > exit ;; > i*86:Minix:*:*) > echo ${UNAME_MACHINE}-pc-minix > exit ;; >+ aarch64:Linux:*:*) >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; >+ aarch64_be:Linux:*:*) >+ UNAME_MACHINE=aarch64_be >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; > alpha:Linux:*:*) > case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in > EV5) UNAME_MACHINE=alphaev5 ;; >@@ -867,52 +914,59 @@ > EV6) UNAME_MACHINE=alphaev6 ;; > EV67) UNAME_MACHINE=alphaev67 ;; > EV68*) UNAME_MACHINE=alphaev68 ;; >- esac >+ esac > objdump --private-headers /bin/sh | grep -q ld.so.1 >- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi >- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} >+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; >+ arc:Linux:*:* | arceb:Linux:*:*) >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; > arm*:Linux:*:*) > eval $set_cc_for_build > if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ > | grep -q __ARM_EABI__ > then >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > else >- echo ${UNAME_MACHINE}-unknown-linux-gnueabi >+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ >+ | grep -q __ARM_PCS_VFP >+ then >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi >+ else >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf >+ fi > fi > exit ;; > avr32*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > cris:Linux:*:*) >- echo cris-axis-linux-gnu >+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} > exit ;; > crisv32:Linux:*:*) >- echo crisv32-axis-linux-gnu >+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} > exit ;; >+ e2k:Linux:*:*) >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; > frv:Linux:*:*) >- echo frv-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; >+ hexagon:Linux:*:*) >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; > i*86:Linux:*:*) >- LIBC=gnu >- eval $set_cc_for_build >- sed 's/^ //' << EOF >$dummy.c >- #ifdef __dietlibc__ >- LIBC=dietlibc >- #endif >-EOF >- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` >- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" >+ echo ${UNAME_MACHINE}-pc-linux-${LIBC} > exit ;; > ia64:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > m32r*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > m68*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > mips:Linux:*:* | mips64:Linux:*:*) > eval $set_cc_for_build >@@ -931,51 +985,63 @@ > #endif > EOF > eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` >- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } >+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } > ;; >- or32:Linux:*:*) >- echo or32-unknown-linux-gnu >+ openrisc*:Linux:*:*) >+ echo or1k-unknown-linux-${LIBC} > exit ;; >+ or32:Linux:*:* | or1k*:Linux:*:*) >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; > padre:Linux:*:*) >- echo sparc-unknown-linux-gnu >+ echo sparc-unknown-linux-${LIBC} > exit ;; > parisc64:Linux:*:* | hppa64:Linux:*:*) >- echo hppa64-unknown-linux-gnu >+ echo hppa64-unknown-linux-${LIBC} > exit ;; > parisc:Linux:*:* | hppa:Linux:*:*) > # Look for CPU level > case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in >- PA7*) echo hppa1.1-unknown-linux-gnu ;; >- PA8*) echo hppa2.0-unknown-linux-gnu ;; >- *) echo hppa-unknown-linux-gnu ;; >+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; >+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; >+ *) echo hppa-unknown-linux-${LIBC} ;; > esac > exit ;; > ppc64:Linux:*:*) >- echo powerpc64-unknown-linux-gnu >+ echo powerpc64-unknown-linux-${LIBC} > exit ;; > ppc:Linux:*:*) >- echo powerpc-unknown-linux-gnu >+ echo powerpc-unknown-linux-${LIBC} > exit ;; >+ ppc64le:Linux:*:*) >+ echo powerpc64le-unknown-linux-${LIBC} >+ exit ;; >+ ppcle:Linux:*:*) >+ echo powerpcle-unknown-linux-${LIBC} >+ exit ;; > s390:Linux:*:* | s390x:Linux:*:*) >- echo ${UNAME_MACHINE}-ibm-linux >+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} > exit ;; > sh64*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > sh*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > sparc:Linux:*:* | sparc64:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; >+ tile*:Linux:*:*) >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} >+ exit ;; > vax:Linux:*:*) >- echo ${UNAME_MACHINE}-dec-linux-gnu >+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} > exit ;; > x86_64:Linux:*:*) >- echo x86_64-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > xtensa*:Linux:*:*) >- echo ${UNAME_MACHINE}-unknown-linux-gnu >+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} > exit ;; > i*86:DYNIX/ptx:4*:*) > # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. >@@ -984,11 +1050,11 @@ > echo i386-sequent-sysv4 > exit ;; > 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, >+ # 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. >+ # Use sysv4.2uw... so that sysv4* matches it. > echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} > exit ;; > i*86:OS/2:*:*) >@@ -1020,7 +1086,7 @@ > fi > exit ;; > i*86:*:5:[678]*) >- # UnixWare 7.x, OpenUNIX and OpenServer 6. >+ # UnixWare 7.x, OpenUNIX and OpenServer 6. > case `/bin/uname -X | grep "^Machine"` in > *486*) UNAME_MACHINE=i486 ;; > *Pentium) UNAME_MACHINE=i586 ;; >@@ -1048,13 +1114,13 @@ > exit ;; > pc:*:*:*) > # Left here for compatibility: >- # uname -m prints for DJGPP always 'pc', but it prints nothing about >- # the processor, so we play safe by assuming i586. >+ # uname -m prints for DJGPP always 'pc', but it prints nothing about >+ # the processor, so we play safe by assuming i586. > # Note: whatever this is, it MUST be the same as what config.sub > # prints for the "djgpp" host, or else GDB configury will decide that > # this is a cross-build. > echo i586-pc-msdosdjgpp >- exit ;; >+ exit ;; > Intel:Mach:3*:*) > echo i386-pc-mach3 > exit ;; >@@ -1089,8 +1155,8 @@ > /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ > && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; > 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) >- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ >- && { echo i486-ncr-sysv4; exit; } ;; >+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ >+ && { echo i486-ncr-sysv4; exit; } ;; > NCR*:*:4.2:* | MPRAS*:*:4.2:*) > OS_REL='.3' > test -r /etc/.relid \ >@@ -1133,10 +1199,10 @@ > echo ns32k-sni-sysv > fi > exit ;; >- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort >- # says <Richard.M.Bartel@ccMail.Census.GOV> >- echo i586-unisys-sysv4 >- exit ;; >+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort >+ # says <Richard.M.Bartel@ccMail.Census.GOV> >+ echo i586-unisys-sysv4 >+ exit ;; > *:UNIX_System_V:4*:FTX*) > # From Gerald Hewes <hewes@openmarket.com>. > # How about differentiating between stratus architectures? -djm >@@ -1162,11 +1228,11 @@ > exit ;; > R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) > if [ -d /usr/nec ]; then >- echo mips-nec-sysv${UNAME_RELEASE} >+ echo mips-nec-sysv${UNAME_RELEASE} > else >- echo mips-unknown-sysv${UNAME_RELEASE} >+ echo mips-unknown-sysv${UNAME_RELEASE} > fi >- exit ;; >+ exit ;; > BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. > echo powerpc-be-beos > exit ;; >@@ -1179,6 +1245,9 @@ > BePC:Haiku:*:*) # Haiku running on Intel PC compatible. > echo i586-pc-haiku > exit ;; >+ x86_64:Haiku:*:*) >+ echo x86_64-unknown-haiku >+ exit ;; > SX-4:SUPER-UX:*:*) > echo sx4-nec-superux${UNAME_RELEASE} > exit ;; >@@ -1205,19 +1274,31 @@ > exit ;; > *:Darwin:*:*) > UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown >- case $UNAME_PROCESSOR in >- i386) >- eval $set_cc_for_build >- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then >- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ >- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ >- grep IS_64BIT_ARCH >/dev/null >- then >- UNAME_PROCESSOR="x86_64" >- fi >- fi ;; >- unknown) UNAME_PROCESSOR=powerpc ;; >- esac >+ eval $set_cc_for_build >+ if test "$UNAME_PROCESSOR" = unknown ; then >+ UNAME_PROCESSOR=powerpc >+ fi >+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then >+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then >+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ >+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ >+ grep IS_64BIT_ARCH >/dev/null >+ then >+ case $UNAME_PROCESSOR in >+ i386) UNAME_PROCESSOR=x86_64 ;; >+ powerpc) UNAME_PROCESSOR=powerpc64 ;; >+ esac >+ fi >+ fi >+ elif test "$UNAME_PROCESSOR" = i386 ; then >+ # Avoid executing cc on OS X 10.9, as it ships with a stub >+ # that puts up a graphical alert prompting to install >+ # developer tools. Any system running Mac OS X 10.7 or >+ # later (Darwin 11 and later) is required to have a 64-bit >+ # processor. This is not true of the ARM version of Darwin >+ # that Apple uses in portable devices. >+ UNAME_PROCESSOR=x86_64 >+ fi > echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} > exit ;; > *:procnto*:*:* | *:QNX:[0123456789]*:*) >@@ -1231,7 +1312,10 @@ > *:QNX:*:4*) > echo i386-pc-qnx > exit ;; >- NSE-?:NONSTOP_KERNEL:*:*) >+ NEO-?:NONSTOP_KERNEL:*:*) >+ echo neo-tandem-nsk${UNAME_RELEASE} >+ exit ;; >+ NSE-*:NONSTOP_KERNEL:*:*) > echo nse-tandem-nsk${UNAME_RELEASE} > exit ;; > NSR-?:NONSTOP_KERNEL:*:*) >@@ -1276,13 +1360,13 @@ > echo pdp10-unknown-its > exit ;; > SEI:*:*:SEIUX) >- echo mips-sei-seiux${UNAME_RELEASE} >+ echo mips-sei-seiux${UNAME_RELEASE} > exit ;; > *:DragonFly:*:*) > echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` > exit ;; > *:*VMS:*:*) >- UNAME_MACHINE=`(uname -p) 2>/dev/null` >+ UNAME_MACHINE=`(uname -p) 2>/dev/null` > case "${UNAME_MACHINE}" in > A*) echo alpha-dec-vms ; exit ;; > I*) echo ia64-dec-vms ; exit ;; >@@ -1300,159 +1384,11 @@ > i*86:AROS:*:*) > echo ${UNAME_MACHINE}-pc-aros > exit ;; >+ x86_64:VMkernel:*:*) >+ echo ${UNAME_MACHINE}-unknown-esx >+ exit ;; > esac > >-#echo '(No uname command or uname output not recognized.)' 1>&2 >-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 >- >-eval $set_cc_for_build >-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\n"); 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`; >- if (version < 4) >- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); >- else >- printf ("%s-next-openstep%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) >-# include <sys/param.h> >-# if defined (BSD) >-# if BSD == 43 >- printf ("vax-dec-bsd4.3\n"); exit (0); >-# else >-# if BSD == 199006 >- printf ("vax-dec-bsd4.3reno\n"); exit (0); >-# else >- printf ("vax-dec-bsd\n"); exit (0); >-# endif >-# endif >-# else >- printf ("vax-dec-bsd\n"); exit (0); >-# endif >-# 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_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && >- { echo "$SYSTEM_NAME"; exit; } >- >-# Apollos put the system type in the environment. >- >-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } >- >-# Convex versions that predate uname can use getsysinfo(1) >- >-if [ -x /usr/convex/getsysinfo ] >-then >- case `getsysinfo -f cpu_type` in >- c1*) >- echo c1-convex-bsd >- exit ;; >- c2*) >- if getsysinfo -f scalar_acc >- then echo c32-convex-bsd >- else echo c2-convex-bsd >- fi >- exit ;; >- c34*) >- echo c34-convex-bsd >- exit ;; >- c38*) >- echo c38-convex-bsd >- exit ;; >- c4*) >- echo c4-convex-bsd >- exit ;; >- esac >-fi >- > cat >&2 <<EOF > $0: unable to guess system type > >Index: contrib/tcsh/config.h.in >=================================================================== >--- contrib/tcsh/config.h.in (revision 309109) >+++ contrib/tcsh/config.h.in (working copy) >@@ -1,4 +1,4 @@ >-/* config.h.in. Generated from configure.in by autoheader. */ >+/* config.h.in. Generated from configure.ac by autoheader. */ > > /* Define to the type of elements in the array set by `getgroups'. Usually > this is either `int' or `gid_t'. */ >@@ -69,6 +69,9 @@ > /* Define to 1 if you have the `mallinfo' function. */ > #undef HAVE_MALLINFO > >+/* Define to 1 if you have the `mblen' function. */ >+#undef HAVE_MBLEN >+ > /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ > #undef HAVE_MBRTOWC > >Index: contrib/tcsh/config.sub >=================================================================== >--- contrib/tcsh/config.sub (revision 309109) >+++ contrib/tcsh/config.sub (working copy) >@@ -1,38 +1,31 @@ > #! /bin/sh > # Configuration validation subroutine script. >-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, >-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 >-# Free Software Foundation, Inc. >+# Copyright 1992-2013 Free Software Foundation, Inc. > >-timestamp='2009-12-31' >+timestamp='2013-04-24' > >-# 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 >+# 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 3 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. >+# 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., 51 Franklin Street - Fifth Floor, Boston, MA >-# 02110-1301, USA. >+# along with this program; if not, see <http://www.gnu.org/licenses/>. > # > # 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. >+# the same distribution terms that you use for the rest of that >+# program. This Exception is an additional permission under section 7 >+# of the GNU General Public License, version 3 ("GPLv3"). > > >-# Please send patches to <config-patches@gnu.org>. Submit a context >-# diff and a properly formatted GNU ChangeLog entry. >+# Please send patches with a ChangeLog entry to config-patches@gnu.org. > # > # Configuration subroutine to validate and canonicalize a configuration type. > # Supply the specified configuration type as an argument. >@@ -75,9 +68,7 @@ > version="\ > GNU config.sub ($timestamp) > >-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, >-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free >-Software Foundation, Inc. >+Copyright 1992-2013 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." >@@ -124,13 +115,18 @@ > # Here we must recognize all the valid KERNEL-OS combinations. > maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` > case $maybe_os in >- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ >- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ >+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ >+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ >+ knetbsd*-gnu* | netbsd*-gnu* | \ > kopensolaris*-gnu* | \ > storm-chaos* | os2-emx* | rtmk-nova*) > os=-$maybe_os > basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` > ;; >+ android-linux) >+ os=-linux-android >+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown >+ ;; > *) > basic_machine=`echo $1 | sed 's/-[^-]*$//'` > if [ $basic_machine != $1 ] >@@ -153,12 +149,12 @@ > -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ > -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ > -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ >- -apple | -axis | -knuth | -cray | -microblaze) >+ -apple | -axis | -knuth | -cray | -microblaze*) > os= > basic_machine=$1 > ;; >- -bluegene*) >- os=-cnk >+ -bluegene*) >+ os=-cnk > ;; > -sim | -cisco | -oki | -wec | -winbond) > os= >@@ -174,10 +170,10 @@ > os=-chorusos > basic_machine=$1 > ;; >- -chorusrdb) >- os=-chorusrdb >+ -chorusrdb) >+ os=-chorusrdb > basic_machine=$1 >- ;; >+ ;; > -hiux*) > os=-hiuxwe2 > ;; >@@ -222,6 +218,12 @@ > -isc*) > basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` > ;; >+ -lynx*178) >+ os=-lynxos178 >+ ;; >+ -lynx*5) >+ os=-lynxos5 >+ ;; > -lynx*) > os=-lynxos > ;; >@@ -246,20 +248,27 @@ > # Some are omitted here because they have special meanings below. > 1750a | 580 \ > | a29k \ >+ | aarch64 | aarch64_be \ > | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ > | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ > | am33_2.0 \ >- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ >+ | arc | arceb \ >+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ >+ | avr | avr32 \ >+ | be32 | be64 \ > | bfin \ > | c4x | clipper \ > | d10v | d30v | dlx | dsp16xx \ >+ | epiphany \ > | fido | fr30 | frv \ > | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ >+ | hexagon \ > | i370 | i860 | i960 | ia64 \ > | ip2k | iq2000 \ >+ | le32 | le64 \ > | lm32 \ > | m32c | m32r | m32rle | m68000 | m68k | m88k \ >- | maxq | mb | microblaze | mcore | mep | metag \ >+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ > | mips | mipsbe | mipseb | mipsel | mipsle \ > | mips16 \ > | mips64 | mips64el \ >@@ -277,34 +286,45 @@ > | mipsisa64r2 | mipsisa64r2el \ > | mipsisa64sb1 | mipsisa64sb1el \ > | mipsisa64sr71k | mipsisa64sr71kel \ >+ | mipsr5900 | mipsr5900el \ > | mipstx39 | mipstx39el \ > | mn10200 | mn10300 \ > | moxie \ > | mt \ > | msp430 \ >- | nios | nios2 \ >+ | nds32 | nds32le | nds32be \ >+ | nios | nios2 | nios2eb | nios2el \ > | ns16k | ns32k \ >- | or32 \ >+ | open8 \ >+ | or1k | or32 \ > | pdp10 | pdp11 | pj | pjl \ >- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ >+ | powerpc | powerpc64 | powerpc64le | powerpcle \ > | pyramid \ >- | rx \ >+ | rl78 | rx \ > | score \ > | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ > | sh64 | sh64le \ > | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ > | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ >- | spu | strongarm \ >- | tahoe | thumb | tic4x | tic80 | tron \ >+ | spu \ >+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ > | ubicom32 \ >- | v850 | v850e \ >+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ > | we32k \ >- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ >+ | x86 | xc16x | xstormy16 | xtensa \ > | z8k | z80) > basic_machine=$basic_machine-unknown > ;; >- m6811 | m68hc11 | m6812 | m68hc12 | picochip) >- # Motorola 68HC11/12. >+ c54x) >+ basic_machine=tic54x-unknown >+ ;; >+ c55x) >+ basic_machine=tic55x-unknown >+ ;; >+ c6x) >+ basic_machine=tic6x-unknown >+ ;; >+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) > basic_machine=$basic_machine-unknown > os=-none > ;; >@@ -314,6 +334,21 @@ > basic_machine=mt-unknown > ;; > >+ strongarm | thumb | xscale) >+ basic_machine=arm-unknown >+ ;; >+ xgate) >+ basic_machine=$basic_machine-unknown >+ os=-none >+ ;; >+ xscaleeb) >+ basic_machine=armeb-unknown >+ ;; >+ >+ xscaleel) >+ basic_machine=armel-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. >@@ -328,13 +363,15 @@ > # Recognize the basic CPU types with company name. > 580-* \ > | a29k-* \ >+ | aarch64-* | aarch64_be-* \ > | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ > | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ >- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ >+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ > | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ > | avr-* | avr32-* \ >+ | be32-* | be64-* \ > | bfin-* | bs2000-* \ >- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ >+ | c[123]* | c30-* | [cjt]90-* | c4x-* \ > | clipper-* | craynv-* | cydra-* \ > | d10v-* | d30v-* | dlx-* \ > | elxsi-* \ >@@ -341,12 +378,15 @@ > | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ > | h8300-* | h8500-* \ > | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ >+ | hexagon-* \ > | i*86-* | i860-* | i960-* | ia64-* \ > | ip2k-* | iq2000-* \ >+ | le32-* | le64-* \ > | lm32-* \ > | m32c-* | m32r-* | m32rle-* \ > | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ >- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ >+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ >+ | microblaze-* | microblazeel-* \ > | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ > | mips16-* \ > | mips64-* | mips64el-* \ >@@ -364,29 +404,34 @@ > | mipsisa64r2-* | mipsisa64r2el-* \ > | mipsisa64sb1-* | mipsisa64sb1el-* \ > | mipsisa64sr71k-* | mipsisa64sr71kel-* \ >+ | mipsr5900-* | mipsr5900el-* \ > | mipstx39-* | mipstx39el-* \ > | mmix-* \ > | mt-* \ > | msp430-* \ >- | nios-* | nios2-* \ >+ | nds32-* | nds32le-* | nds32be-* \ >+ | nios-* | nios2-* | nios2eb-* | nios2el-* \ > | none-* | np1-* | ns16k-* | ns32k-* \ >+ | open8-* \ > | orion-* \ > | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ >- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ >+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ > | pyramid-* \ >- | romp-* | rs6000-* | rx-* \ >+ | rl78-* | romp-* | rs6000-* | rx-* \ > | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ > | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ > | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ > | sparclite-* \ >- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ >- | tahoe-* | thumb-* \ >- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ >+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ >+ | tahoe-* \ >+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ >+ | tile*-* \ > | tron-* \ > | ubicom32-* \ >- | v850-* | v850e-* | vax-* \ >+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ >+ | vax-* \ > | we32k-* \ >- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ >+ | x86-* | x86_64-* | xc16x-* | xps100-* \ > | xstormy16-* | xtensa*-* \ > | ymp-* \ > | z8k-* | z80-*) >@@ -411,7 +456,7 @@ > basic_machine=a29k-amd > os=-udi > ;; >- abacus) >+ abacus) > basic_machine=abacus-unknown > ;; > adobe68k) >@@ -481,11 +526,20 @@ > basic_machine=powerpc-ibm > os=-cnk > ;; >+ c54x-*) >+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` >+ ;; >+ c55x-*) >+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` >+ ;; >+ c6x-*) >+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` >+ ;; > c90) > basic_machine=c90-cray > os=-unicos > ;; >- cegcc) >+ cegcc) > basic_machine=arm-unknown > os=-cegcc > ;; >@@ -517,7 +571,7 @@ > basic_machine=craynv-cray > os=-unicosmp > ;; >- cr16) >+ cr16 | cr16-*) > basic_machine=cr16-unknown > os=-elf > ;; >@@ -675,7 +729,6 @@ > i370-ibm* | ibm*) > basic_machine=i370-ibm > ;; >-# I'm not sure what "Sysv32" means. Should this be sysv3.2? > i*86v32) > basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` > os=-sysv32 >@@ -733,9 +786,13 @@ > basic_machine=ns32k-utek > os=-sysv > ;; >- microblaze) >+ microblaze*) > basic_machine=microblaze-xilinx > ;; >+ mingw64) >+ basic_machine=x86_64-pc >+ os=-mingw64 >+ ;; > mingw32) > basic_machine=i386-pc > os=-mingw32 >@@ -772,10 +829,18 @@ > ms1-*) > basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` > ;; >+ msys) >+ basic_machine=i386-pc >+ os=-msys >+ ;; > mvs) > basic_machine=i370-ibm > os=-mvs > ;; >+ nacl) >+ basic_machine=le32-unknown >+ os=-nacl >+ ;; > ncr3000) > basic_machine=i486-ncr > os=-sysv4 >@@ -840,6 +905,12 @@ > np1) > basic_machine=np1-gould > ;; >+ neo-tandem) >+ basic_machine=neo-tandem >+ ;; >+ nse-tandem) >+ basic_machine=nse-tandem >+ ;; > nsr-tandem) > basic_machine=nsr-tandem > ;; >@@ -922,9 +993,10 @@ > ;; > power) basic_machine=power-ibm > ;; >- ppc) basic_machine=powerpc-unknown >+ ppc | ppcbe) basic_machine=powerpc-unknown > ;; >- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` >+ ppc-* | ppcbe-*) >+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` > ;; > ppcle | powerpclittle | ppc-le | powerpc-little) > basic_machine=powerpcle-unknown >@@ -949,7 +1021,11 @@ > basic_machine=i586-unknown > os=-pw32 > ;; >- rdos) >+ rdos | rdos64) >+ basic_machine=x86_64-pc >+ os=-rdos >+ ;; >+ rdos32) > basic_machine=i386-pc > os=-rdos > ;; >@@ -1018,6 +1094,9 @@ > basic_machine=i860-stratus > os=-sysv4 > ;; >+ strongarm-* | thumb-*) >+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` >+ ;; > sun2) > basic_machine=m68000-sun > ;; >@@ -1074,20 +1153,8 @@ > basic_machine=t90-cray > os=-unicos > ;; >- tic54x | c54x*) >- basic_machine=tic54x-unknown >- os=-coff >- ;; >- tic55x | c55x*) >- basic_machine=tic55x-unknown >- os=-coff >- ;; >- tic6x | c6x*) >- basic_machine=tic6x-unknown >- os=-coff >- ;; > tile*) >- basic_machine=tile-unknown >+ basic_machine=$basic_machine-unknown > os=-linux-gnu > ;; > tx39) >@@ -1157,6 +1224,9 @@ > xps | xps100) > basic_machine=xps100-honeywell > ;; >+ xscale-* | xscalee[bl]-*) >+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` >+ ;; > ymp) > basic_machine=ymp-cray > os=-unicos >@@ -1254,11 +1324,11 @@ > if [ x"$os" != x"" ] > then > case $os in >- # First match some system type aliases >- # that might get confused with valid system types. >+ # First match some system type aliases >+ # that might get confused with valid system types. > # -solaris* is a basic system type, with this one exception. >- -auroraux) >- os=-auroraux >+ -auroraux) >+ os=-auroraux > ;; > -solaris1 | -solaris1.*) > os=`echo $os | sed -e 's|solaris1|sunos4|'` >@@ -1282,20 +1352,21 @@ > -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ > | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ > | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ >- | -sym* | -kopensolaris* \ >+ | -sym* | -kopensolaris* | -plan9* \ > | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ > | -aos* | -aros* \ > | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ > | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ > | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ >- | -openbsd* | -solidbsd* \ >+ | -bitrig* | -openbsd* | -solidbsd* \ > | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ > | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ > | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ > | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ > | -chorusos* | -chorusrdb* | -cegcc* \ >- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ >- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ >+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ >+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ >+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ > | -uxpv* | -beos* | -mpeix* | -udk* \ > | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ > | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ >@@ -1342,7 +1413,7 @@ > -opened*) > os=-openedition > ;; >- -os400*) >+ -os400*) > os=-os400 > ;; > -wince*) >@@ -1391,7 +1462,7 @@ > -sinix*) > os=-sysv4 > ;; >- -tpf*) >+ -tpf*) > os=-tpf > ;; > -triton*) >@@ -1427,9 +1498,6 @@ > -aros*) > os=-aros > ;; >- -kaos*) >- os=-kaos >- ;; > -zvmoe) > os=-zvmoe > ;; >@@ -1436,8 +1504,8 @@ > -dicos*) > os=-dicos > ;; >- -nacl*) >- ;; >+ -nacl*) >+ ;; > -none) > ;; > *) >@@ -1460,10 +1528,10 @@ > # system, and we'll never get to this point. > > case $basic_machine in >- score-*) >+ score-*) > os=-elf > ;; >- spu-*) >+ spu-*) > os=-elf > ;; > *-acorn) >@@ -1475,9 +1543,21 @@ > arm*-semi) > os=-aout > ;; >- c4x-* | tic4x-*) >- os=-coff >+ c4x-* | tic4x-*) >+ os=-coff > ;; >+ hexagon-*) >+ os=-elf >+ ;; >+ tic54x-*) >+ os=-coff >+ ;; >+ tic55x-*) >+ os=-coff >+ ;; >+ tic6x-*) >+ os=-coff >+ ;; > # This must come before the *-dec entry. > pdp10-*) > os=-tops20 >@@ -1496,14 +1576,11 @@ > ;; > m68000-sun) > os=-sunos3 >- # This also exists in the configure program, but was not the >- # default. >- # os=-sunos4 > ;; > m68*-cisco) > os=-aout > ;; >- mep-*) >+ mep-*) > os=-elf > ;; > mips*-cisco) >@@ -1512,6 +1589,9 @@ > mips*-*) > os=-elf > ;; >+ or1k-*) >+ os=-elf >+ ;; > or32-*) > os=-coff > ;; >@@ -1530,7 +1610,7 @@ > *-ibm) > os=-aix > ;; >- *-knuth) >+ *-knuth) > os=-mmixware > ;; > *-wec) >Index: contrib/tcsh/config_f.h >=================================================================== >--- contrib/tcsh/config_f.h (revision 309109) >+++ contrib/tcsh/config_f.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/config_f.h,v 3.47 2011/02/05 20:34:55 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/config_f.h,v 3.52 2016/04/16 15:44:18 christos Exp $ */ > /* > * config_f.h -- configure various defines for tcsh > * >@@ -38,6 +38,10 @@ > #ifndef _h_config_f > #define _h_config_f > >+#ifdef HAVE_FEATURES_H >+#include <features.h> /* for __GLIBC__ */ >+#endif >+ > /* > * SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars > * This fixes up quoting problems and eases implementation >@@ -50,7 +54,7 @@ > * WIDE_STRINGS Represent strings using wide characters > * Allows proper function in multibyte encodings like UTF-8 > */ >-#if defined (SHORT_STRINGS) && defined (NLS) && !defined (WINNT_NATIVE) && !defined(_OSD_POSIX) >+#if defined (SHORT_STRINGS) && defined (NLS) && !defined (WINNT_NATIVE) && !defined(_OSD_POSIX) && SIZEOF_WCHAR_T > 1 > # define WIDE_STRINGS > # if SIZEOF_WCHAR_T < 4 > # define UTF16_STRINGS >@@ -135,7 +139,7 @@ > * This can be much slower and no memory statistics will be > * provided. > */ >-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) >+#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__) > # define SYSMALLOC > #else > # undef SYSMALLOC >Index: contrib/tcsh/configure >=================================================================== >--- contrib/tcsh/configure (revision 309109) >+++ contrib/tcsh/configure (working copy) >@@ -1,13 +1,11 @@ > #! /bin/sh > # Guess values for system-dependent variables and create Makefiles. >-# Generated by GNU Autoconf 2.68 for tcsh 6.18.01. >+# Generated by GNU Autoconf 2.69 for tcsh 6.20.00. > # > # Report bugs to <http://bugs.gw.com/>. > # > # >-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, >-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software >-# Foundation, Inc. >+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. > # > # > # This configure script is free software; the Free Software Foundation >@@ -136,6 +134,31 @@ > # CDPATH. > (unset CDPATH) >/dev/null 2>&1 && unset CDPATH > >+# Use a proper internal environment variable to ensure we don't fall >+ # into an infinite loop, continuously re-executing ourselves. >+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then >+ _as_can_reexec=no; export _as_can_reexec; >+ # We cannot yet assume a decent shell, so we have to provide a >+# neutralization value for shells without unset; and this also >+# works around shells that cannot unset nonexistent variables. >+# Preserve -v and -x to the replacement shell. >+BASH_ENV=/dev/null >+ENV=/dev/null >+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV >+case $- in # (((( >+ *v*x* | *x*v* ) as_opts=-vx ;; >+ *v* ) as_opts=-v ;; >+ *x* ) as_opts=-x ;; >+ * ) as_opts= ;; >+esac >+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} >+# Admittedly, this is quite paranoid, since all the known shells bail >+# out after a failed `exec'. >+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 >+as_fn_exit 255 >+ fi >+ # We don't want this to propagate to other subprocesses. >+ { _as_can_reexec=; unset _as_can_reexec;} > if test "x$CONFIG_SHELL" = x; then > as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : > emulate sh >@@ -169,7 +192,8 @@ > else > exitcode=1; echo positional parameters were not saved. > fi >-test x\$exitcode = x0 || exit 1" >+test x\$exitcode = x0 || exit 1 >+test -x / || exit 1" > as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO > as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO > eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && >@@ -214,21 +238,25 @@ > > > if test "x$CONFIG_SHELL" != x; then : >- # We cannot yet assume a decent shell, so we have to provide a >- # neutralization value for shells without unset; and this also >- # works around shells that cannot unset nonexistent variables. >- # Preserve -v and -x to the replacement shell. >- BASH_ENV=/dev/null >- ENV=/dev/null >- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV >- export CONFIG_SHELL >- case $- in # (((( >- *v*x* | *x*v* ) as_opts=-vx ;; >- *v* ) as_opts=-v ;; >- *x* ) as_opts=-x ;; >- * ) as_opts= ;; >- esac >- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} >+ export CONFIG_SHELL >+ # We cannot yet assume a decent shell, so we have to provide a >+# neutralization value for shells without unset; and this also >+# works around shells that cannot unset nonexistent variables. >+# Preserve -v and -x to the replacement shell. >+BASH_ENV=/dev/null >+ENV=/dev/null >+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV >+case $- in # (((( >+ *v*x* | *x*v* ) as_opts=-vx ;; >+ *v* ) as_opts=-v ;; >+ *x* ) as_opts=-x ;; >+ * ) as_opts= ;; >+esac >+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} >+# Admittedly, this is quite paranoid, since all the known shells bail >+# out after a failed `exec'. >+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 >+exit 255 > fi > > if test x$as_have_required = xno; then : >@@ -331,6 +359,14 @@ > > > } # as_fn_mkdir_p >+ >+# as_fn_executable_p FILE >+# ----------------------- >+# Test if FILE is an executable regular file. >+as_fn_executable_p () >+{ >+ test -f "$1" && test -x "$1" >+} # as_fn_executable_p > # as_fn_append VAR VALUE > # ---------------------- > # Append the text in VALUE to the end of the definition contained in VAR. Take >@@ -452,6 +488,10 @@ > chmod +x "$as_me.lineno" || > { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } > >+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have >+ # already done that, so ensure we don't try to do so again and fall >+ # in an infinite loop. This has already happened in practice. >+ _as_can_reexec=no; export _as_can_reexec > # Don't try to exec as it changes $[0], causing all sort of problems > # (the dirname of $[0] is not the place where we might find the > # original and so on. Autoconf is especially sensitive to this). >@@ -486,16 +526,16 @@ > # ... but there are two gotchas: > # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. > # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. >- # In both cases, we have to default to `cp -p'. >+ # In both cases, we have to default to `cp -pR'. > ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || >- as_ln_s='cp -p' >+ as_ln_s='cp -pR' > elif ln conf$$.file conf$$ 2>/dev/null; then > as_ln_s=ln > else >- as_ln_s='cp -p' >+ as_ln_s='cp -pR' > fi > else >- as_ln_s='cp -p' >+ as_ln_s='cp -pR' > fi > rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file > rmdir conf$$.dir 2>/dev/null >@@ -507,28 +547,8 @@ > as_mkdir_p=false > fi > >-if test -x / >/dev/null 2>&1; then >- as_test_x='test -x' >-else >- if ls -dL / >/dev/null 2>&1; then >- as_ls_L_option=L >- else >- as_ls_L_option= >- fi >- as_test_x=' >- eval sh -c '\'' >- if test -d "$1"; then >- test -d "$1/."; >- else >- case $1 in #( >- -*)set "./$1";; >- esac; >- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( >- ???[sx]*):;;*)false;;esac;fi >- '\'' sh >- ' >-fi >-as_executable_p=$as_test_x >+as_test_x='test -x' >+as_executable_p=as_fn_executable_p > > # Sed expression to map a string onto a valid CPP name. > as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" >@@ -560,8 +580,8 @@ > # Identity of this package. > PACKAGE_NAME='tcsh' > PACKAGE_TARNAME='tcsh' >-PACKAGE_VERSION='6.18.01' >-PACKAGE_STRING='tcsh 6.18.01' >+PACKAGE_VERSION='6.20.00' >+PACKAGE_STRING='tcsh 6.20.00' > PACKAGE_BUGREPORT='http://bugs.gw.com/' > PACKAGE_URL='' > >@@ -1145,8 +1165,6 @@ > if test "x$host_alias" != x; then > if test "x$build_alias" = x; then > cross_compiling=maybe >- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. >- If a cross compiler is detected then cross compile mode will be used" >&2 > elif test "x$build_alias" != "x$host_alias"; then > cross_compiling=yes > fi >@@ -1232,7 +1250,7 @@ > # 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 <<_ACEOF >-\`configure' configures tcsh 6.18.01 to adapt to many kinds of systems. >+\`configure' configures tcsh 6.20.00 to adapt to many kinds of systems. > > Usage: $0 [OPTION]... [VAR=VALUE]... > >@@ -1297,7 +1315,7 @@ > > if test -n "$ac_init_help"; then > case $ac_init_help in >- short | recursive ) echo "Configuration of tcsh 6.18.01:";; >+ short | recursive ) echo "Configuration of tcsh 6.20.00:";; > esac > cat <<\_ACEOF > >@@ -1312,7 +1330,7 @@ > Optional Packages: > --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] > --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) >- --with-gnu-ld assume the C compiler uses GNU ld default=no >+ --with-gnu-ld assume the C compiler uses GNU ld [default=no] > --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib > --without-libiconv-prefix don't search for libiconv in includedir and libdir > --with-hesiod=PREFIX Use Hesiod lookup for ~ expansion >@@ -1393,10 +1411,10 @@ > test -n "$ac_init_help" && exit $ac_status > if $ac_init_version; then > cat <<\_ACEOF >-tcsh configure 6.18.01 >-generated by GNU Autoconf 2.68 >+tcsh configure 6.20.00 >+generated by GNU Autoconf 2.69 > >-Copyright (C) 2010 Free Software Foundation, Inc. >+Copyright (C) 2012 Free Software Foundation, Inc. > This configure script is free software; the Free Software Foundation > gives unlimited permission to copy, distribute and modify it. > _ACEOF >@@ -1509,7 +1527,7 @@ > test ! -s conftest.err > } && test -s conftest$ac_exeext && { > test "$cross_compiling" = yes || >- $as_test_x conftest$ac_exeext >+ test -x conftest$ac_exeext > }; then : > ac_retval=0 > else >@@ -1709,7 +1727,8 @@ > main () > { > static int test_array [1 - 2 * !(($2) >= 0)]; >-test_array [0] = 0 >+test_array [0] = 0; >+return test_array [0]; > > ; > return 0; >@@ -1725,7 +1744,8 @@ > main () > { > static int test_array [1 - 2 * !(($2) <= $ac_mid)]; >-test_array [0] = 0 >+test_array [0] = 0; >+return test_array [0]; > > ; > return 0; >@@ -1751,7 +1771,8 @@ > main () > { > static int test_array [1 - 2 * !(($2) < 0)]; >-test_array [0] = 0 >+test_array [0] = 0; >+return test_array [0]; > > ; > return 0; >@@ -1767,7 +1788,8 @@ > main () > { > static int test_array [1 - 2 * !(($2) >= $ac_mid)]; >-test_array [0] = 0 >+test_array [0] = 0; >+return test_array [0]; > > ; > return 0; >@@ -1801,7 +1823,8 @@ > main () > { > static int test_array [1 - 2 * !(($2) <= $ac_mid)]; >-test_array [0] = 0 >+test_array [0] = 0; >+return test_array [0]; > > ; > return 0; >@@ -1948,7 +1971,8 @@ > main () > { > static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; >-test_array [0] = 0 >+test_array [0] = 0; >+return test_array [0]; > > ; > return 0; >@@ -2150,8 +2174,8 @@ > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > >-It was created by tcsh $as_me 6.18.01, which was >-generated by GNU Autoconf 2.68. Invocation command line was >+It was created by tcsh $as_me 6.20.00, which was >+generated by GNU Autoconf 2.69. Invocation command line was > > $ $0 $@ > >@@ -2571,7 +2595,7 @@ > # by default. > for ac_prog in ginstall scoinst install; do > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then > if test $ac_prog = install && > grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then > # AIX install. It has an incompatible calling convention. >@@ -2781,6 +2805,11 @@ > tcsh_config_file=sysV88 > ;; > >+ ## Minix systems >+ *-*-minix*) >+ tcsh_config_file=minix >+ ;; >+ > ## NetBSD systems > *-*-netbsd*) > tcsh_config_file=bsd4.4 >@@ -2801,6 +2830,11 @@ > tcsh_config_file=bsd4.4 > ;; > >+ ## MirBSD systems >+ *-*-mirbsd*) >+ tcsh_config_file=bsd4.4 >+ ;; >+ > ## OpenBSD systems > *-*-openbsd*) > tcsh_config_file=bsd4.4 >@@ -2975,7 +3009,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > ac_cv_prog_CC="${ac_tool_prefix}gcc" > $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > break 2 >@@ -3015,7 +3049,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > ac_cv_prog_ac_ct_CC="gcc" > $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > break 2 >@@ -3068,7 +3102,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > ac_cv_prog_CC="${ac_tool_prefix}cc" > $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > break 2 >@@ -3109,7 +3143,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then > ac_prog_rejected=yes > continue >@@ -3167,7 +3201,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > ac_cv_prog_CC="$ac_tool_prefix$ac_prog" > $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > break 2 >@@ -3211,7 +3245,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > ac_cv_prog_ac_ct_CC="$ac_prog" > $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > break 2 >@@ -3657,8 +3691,7 @@ > /* end confdefs.h. */ > #include <stdarg.h> > #include <stdio.h> >-#include <sys/types.h> >-#include <sys/stat.h> >+struct stat; > /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ > struct buf { int x; }; > FILE * (*rcsopen) (struct buf *, struct stat *, int); >@@ -3898,7 +3931,7 @@ > for ac_prog in grep ggrep; do > for ac_exec_ext in '' $ac_executable_extensions; do > ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" >- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue >+ as_fn_executable_p "$ac_path_GREP" || continue > # Check for GNU ac_path_GREP and select it if it is found. > # Check for GNU $ac_path_GREP > case `"$ac_path_GREP" --version 2>&1` in >@@ -3964,7 +3997,7 @@ > for ac_prog in egrep; do > for ac_exec_ext in '' $ac_executable_extensions; do > ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" >- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue >+ as_fn_executable_p "$ac_path_EGREP" || continue > # Check for GNU ac_path_EGREP and select it if it is found. > # Check for GNU $ac_path_EGREP > case `"$ac_path_EGREP" --version 2>&1` in >@@ -4073,7 +4106,7 @@ > IFS=$as_save_IFS > test -z "$as_dir" && as_dir=. > for ac_exec_ext in '' $ac_executable_extensions; do >- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then >+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then > ac_cv_path_GENCAT="$as_dir/$ac_word$ac_exec_ext" > $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 > break 2 >@@ -4108,6 +4141,13 @@ > CFLAGS="$CFLAGS $NON_GNU_CFLAGS" > fi > >+case "${host}" in >+ *-*-android*) >+ CFLAGS="${CFLAGS} -fPIE" >+ LDFLAGS="${LDFLAGS} -pie" >+ ;; >+esac >+ > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 > $as_echo_n "checking for library containing crypt... " >&6; } > if ${ac_cv_search_crypt+:} false; then : >@@ -4274,6 +4314,10 @@ > if test "$ac_res" != no; then : > test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" > >+else >+ >+ as_fn_error $? "unable to find the tgetent() function" "$LINENO" 5 >+ > fi > > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 >@@ -4461,6 +4505,7 @@ > prefix="$acl_save_prefix" > > >+ > # Check whether --with-gnu-ld was given. > if test "${with_gnu_ld+set}" = set; then : > withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes >@@ -4471,21 +4516,21 @@ > # Prepare PATH_SEPARATOR. > # The user is always right. > if test "${PATH_SEPARATOR+set}" != set; then >- echo "#! /bin/sh" >conf$$.sh >- echo "exit 0" >>conf$$.sh >- chmod +x conf$$.sh >- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then >- PATH_SEPARATOR=';' >- else >- PATH_SEPARATOR=: >- fi >- rm -f conf$$.sh >+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which >+ # contains only /bin. Note that ksh looks also at the FPATH variable, >+ # so we have to set that as well for the test. >+ PATH_SEPARATOR=: >+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ >+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ >+ || PATH_SEPARATOR=';' >+ } > fi >+ > ac_prog=ld > if test "$GCC" = yes; then > # Check if gcc -print-prog-name=ld gives a path. >- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 >-$as_echo_n "checking for ld used by GCC... " >&6; } >+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 >+$as_echo_n "checking for ld used by $CC... " >&6; } > case $host in > *-*-mingw*) > # gcc leaves a trailing carriage return which upsets mingw >@@ -4495,11 +4540,11 @@ > esac > case $ac_prog in > # Accept absolute paths. >- [\\/]* | [A-Za-z]:[\\/]*) >+ [\\/]* | ?:[\\/]*) > re_direlt='/[^/][^/]*/\.\./' >- # Canonicalize the path of ld >- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` >- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do >+ # Canonicalize the pathname of ld >+ ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` >+ while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do > ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` > done > test -z "$LD" && LD="$ac_prog" >@@ -4524,23 +4569,26 @@ > $as_echo_n "(cached) " >&6 > else > if test -z "$LD"; then >- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" >+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR > for ac_dir in $PATH; do >+ IFS="$acl_save_ifs" > test -z "$ac_dir" && ac_dir=. > if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then > acl_cv_path_LD="$ac_dir/$ac_prog" > # Check to see if the program is GNU ld. I'd rather use --version, >- # but apparently some GNU ld's only accept -v. >+ # but apparently some variants of GNU ld only accept -v. > # Break only if it was the GNU/non-GNU ld that we prefer. >- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in >+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in > *GNU* | *'with BFD'*) >- test "$with_gnu_ld" != no && break ;; >+ test "$with_gnu_ld" != no && break >+ ;; > *) >- test "$with_gnu_ld" != yes && break ;; >+ test "$with_gnu_ld" != yes && break >+ ;; > esac > fi > done >- IFS="$ac_save_ifs" >+ IFS="$acl_save_ifs" > else > acl_cv_path_LD="$LD" # Let the user override the test with a path. > fi >@@ -4560,12 +4608,14 @@ > if ${acl_cv_prog_gnu_ld+:} false; then : > $as_echo_n "(cached) " >&6 > else >- # I'd rather use --version here, but apparently some GNU ld's only accept -v. >+ # I'd rather use --version here, but apparently some GNU lds only accept -v. > case `$LD -v 2>&1 </dev/null` in > *GNU* | *'with BFD'*) >- acl_cv_prog_gnu_ld=yes ;; >+ acl_cv_prog_gnu_ld=yes >+ ;; > *) >- acl_cv_prog_gnu_ld=no ;; >+ acl_cv_prog_gnu_ld=no >+ ;; > esac > fi > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 >@@ -4748,7 +4798,7 @@ > done > if test -z "$already_handled"; then > names_already_handled="$names_already_handled $name" >- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` >+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` > eval value=\"\$HAVE_LIB$uppername\" > if test -n "$value"; then > if test "$value" = yes; then >@@ -5176,14 +5226,16 @@ > am_cv_lib_iconv=no > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ >+ > #include <stdlib.h> > #include <iconv.h> >+ > int > main () > { > iconv_t cd = iconv_open("",""); >- iconv(cd,NULL,NULL,NULL,NULL); >- iconv_close(cd); >+ iconv(cd,NULL,NULL,NULL,NULL); >+ iconv_close(cd); > ; > return 0; > } >@@ -5198,14 +5250,16 @@ > LIBS="$LIBS $LIBICONV" > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ >+ > #include <stdlib.h> > #include <iconv.h> >+ > int > main () > { > iconv_t cd = iconv_open("",""); >- iconv(cd,NULL,NULL,NULL,NULL); >- iconv_close(cd); >+ iconv(cd,NULL,NULL,NULL,NULL); >+ iconv_close(cd); > ; > return 0; > } >@@ -5229,15 +5283,17 @@ > $as_echo_n "(cached) " >&6 > else > >- am_save_LIBS="$LIBS" >+ am_save_LIBS="$LIBS" > if test $am_cv_lib_iconv = yes; then > LIBS="$LIBS $LIBICONV" > fi >- if test "$cross_compiling" = yes; then : >+ am_cv_func_iconv_works=no >+ for ac_iconv_const in '' 'const'; do >+ if test "$cross_compiling" = yes; then : > case "$host_os" in >- aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; >- *) am_cv_func_iconv_works="guessing yes" ;; >- esac >+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; >+ *) am_cv_func_iconv_works="guessing yes" ;; >+ esac > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ >@@ -5244,8 +5300,15 @@ > > #include <iconv.h> > #include <string.h> >-int main () >+ >+#ifndef ICONV_CONST >+# define ICONV_CONST $ac_iconv_const >+#endif >+ >+int >+main () > { >+int result = 0; > /* Test against AIX 5.1 bug: Failures are not distinguishable from successful > returns. */ > { >@@ -5252,17 +5315,18 @@ > iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); > if (cd_utf8_to_88591 != (iconv_t)(-1)) > { >- static const char input[] = "\342\202\254"; /* EURO SIGN */ >+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ > char buf[10]; >- const char *inptr = input; >+ ICONV_CONST char *inptr = input; > size_t inbytesleft = strlen (input); > char *outptr = buf; > size_t outbytesleft = sizeof (buf); > size_t res = iconv (cd_utf8_to_88591, >- (char **) &inptr, &inbytesleft, >+ &inptr, &inbytesleft, > &outptr, &outbytesleft); > if (res == 0) >- return 1; >+ result |= 1; >+ iconv_close (cd_utf8_to_88591); > } > } > /* Test against Solaris 10 bug: Failures are not distinguishable from >@@ -5271,19 +5335,39 @@ > iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); > if (cd_ascii_to_88591 != (iconv_t)(-1)) > { >- static const char input[] = "\263"; >+ static ICONV_CONST char input[] = "\263"; > char buf[10]; >- const char *inptr = input; >+ ICONV_CONST char *inptr = input; > size_t inbytesleft = strlen (input); > char *outptr = buf; > size_t outbytesleft = sizeof (buf); > size_t res = iconv (cd_ascii_to_88591, >- (char **) &inptr, &inbytesleft, >+ &inptr, &inbytesleft, > &outptr, &outbytesleft); > if (res == 0) >- return 1; >+ result |= 2; >+ iconv_close (cd_ascii_to_88591); > } > } >+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ >+ { >+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); >+ if (cd_88591_to_utf8 != (iconv_t)(-1)) >+ { >+ static ICONV_CONST char input[] = "\304"; >+ static char buf[2] = { (char)0xDE, (char)0xAD }; >+ ICONV_CONST char *inptr = input; >+ size_t inbytesleft = 1; >+ char *outptr = buf; >+ size_t outbytesleft = 1; >+ size_t res = iconv (cd_88591_to_utf8, >+ &inptr, &inbytesleft, >+ &outptr, &outbytesleft); >+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) >+ result |= 4; >+ iconv_close (cd_88591_to_utf8); >+ } >+ } > #if 0 /* This bug could be worked around by the caller. */ > /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ > { >@@ -5290,17 +5374,18 @@ > iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); > if (cd_88591_to_utf8 != (iconv_t)(-1)) > { >- static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; >+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; > char buf[50]; >- const char *inptr = input; >+ ICONV_CONST char *inptr = input; > size_t inbytesleft = strlen (input); > char *outptr = buf; > size_t outbytesleft = sizeof (buf); > size_t res = iconv (cd_88591_to_utf8, >- (char **) &inptr, &inbytesleft, >+ &inptr, &inbytesleft, > &outptr, &outbytesleft); > if ((int)res > 0) >- return 1; >+ result |= 8; >+ iconv_close (cd_88591_to_utf8); > } > } > #endif >@@ -5314,19 +5399,22 @@ > && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) > /* Try HP-UX names. */ > && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) >- return 1; >+ result |= 16; >+ return result; >+ >+ ; > return 0; > } > _ACEOF > if ac_fn_c_try_run "$LINENO"; then : > am_cv_func_iconv_works=yes >-else >- am_cv_func_iconv_works=no > fi > rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > conftest.$ac_objext conftest.beam conftest.$ac_ext > fi > >+ test "$am_cv_func_iconv_works" = no || break >+ done > LIBS="$am_save_LIBS" > > fi >@@ -5373,7 +5461,7 @@ > #ifdef __cplusplus > "C" > #endif >-#if defined(__STDC__) || defined(__cplusplus) >+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) > size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); > #else > size_t iconv(); >@@ -5406,6 +5494,7 @@ > #define ICONV_CONST $am_cv_proto_iconv_arg1 > _ACEOF > >+ > fi > > >@@ -6303,11 +6392,11 @@ > int > main () > { >-/* FIXME: Include the comments suggested by Paul. */ >+ > #ifndef __cplusplus >- /* Ultrix mips cc rejects this. */ >+ /* Ultrix mips cc rejects this sort of thing. */ > typedef int charset[2]; >- const charset cs; >+ const charset cs = { 0, 0 }; > /* SunOS 4.1.1 cc rejects this. */ > char const *const *pcpcc; > char **ppc; >@@ -6324,8 +6413,9 @@ > ++pcpcc; > ppc = (char**) pcpcc; > pcpcc = (char const *const *) ppc; >- { /* SCO 3.2v4 cc rejects this. */ >- char *t; >+ { /* SCO 3.2v4 cc rejects this sort of thing. */ >+ char tx; >+ char *t = &tx; > char const *s = 0 ? (char *) 0 : (char const *) 0; > > *t++ = 0; >@@ -6341,10 +6431,10 @@ > iptr p = 0; > ++p; > } >- { /* AIX XL C 1.02.0.0 rejects this saying >+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying > "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ >- struct s { int j; const int *ap[3]; }; >- struct s *b; b->j = 5; >+ struct s { int j; const int *ap[3]; } bx; >+ struct s *b = &bx; b->j = 5; > } > { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ > const int foo = 10; >@@ -6486,7 +6576,7 @@ > have_catgets=no > fi > >-for ac_func in dup2 getauthid getcwd gethostname getpwent getutent getutxent mallinfo memmove memset mkstemp nice nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth >+for ac_func in dup2 getauthid getcwd gethostname getpwent getutent getutxent mallinfo mblen memmove memset mkstemp nice nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth > do : > as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` > ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" >@@ -7161,16 +7251,16 @@ > # ... but there are two gotchas: > # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. > # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. >- # In both cases, we have to default to `cp -p'. >+ # In both cases, we have to default to `cp -pR'. > ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || >- as_ln_s='cp -p' >+ as_ln_s='cp -pR' > elif ln conf$$.file conf$$ 2>/dev/null; then > as_ln_s=ln > else >- as_ln_s='cp -p' >+ as_ln_s='cp -pR' > fi > else >- as_ln_s='cp -p' >+ as_ln_s='cp -pR' > fi > rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file > rmdir conf$$.dir 2>/dev/null >@@ -7230,29 +7320,17 @@ > as_mkdir_p=false > fi > >-if test -x / >/dev/null 2>&1; then >- as_test_x='test -x' >-else >- if ls -dL / >/dev/null 2>&1; then >- as_ls_L_option=L >- else >- as_ls_L_option= >- fi >- as_test_x=' >- eval sh -c '\'' >- if test -d "$1"; then >- test -d "$1/."; >- else >- case $1 in #( >- -*)set "./$1";; >- esac; >- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( >- ???[sx]*):;;*)false;;esac;fi >- '\'' sh >- ' >-fi >-as_executable_p=$as_test_x > >+# as_fn_executable_p FILE >+# ----------------------- >+# Test if FILE is an executable regular file. >+as_fn_executable_p () >+{ >+ test -f "$1" && test -x "$1" >+} # as_fn_executable_p >+as_test_x='test -x' >+as_executable_p=as_fn_executable_p >+ > # Sed expression to map a string onto a valid CPP name. > as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" > >@@ -7272,8 +7350,8 @@ > # report actual input values of CONFIG_FILES etc. instead of their > # values after options handling. > ac_log=" >-This file was extended by tcsh $as_me 6.18.01, which was >-generated by GNU Autoconf 2.68. Invocation command line was >+This file was extended by tcsh $as_me 6.20.00, which was >+generated by GNU Autoconf 2.69. Invocation command line was > > CONFIG_FILES = $CONFIG_FILES > CONFIG_HEADERS = $CONFIG_HEADERS >@@ -7338,11 +7416,11 @@ > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 > ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" > ac_cs_version="\\ >-tcsh config.status 6.18.01 >-configured by $0, generated by GNU Autoconf 2.68, >+tcsh config.status 6.20.00 >+configured by $0, generated by GNU Autoconf 2.69, > with options \\"\$ac_cs_config\\" > >-Copyright (C) 2010 Free Software Foundation, Inc. >+Copyright (C) 2012 Free Software Foundation, Inc. > This config.status script is free software; the Free Software Foundation > gives unlimited permission to copy, distribute and modify it." > >@@ -7431,7 +7509,7 @@ > _ACEOF > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 > if \$ac_cs_recheck; then >- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion >+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion > shift > \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 > CONFIG_SHELL='$SHELL' >@@ -8027,7 +8105,7 @@ > "./atconfig":C) cat >./atconfig <<ATEOF > # Configurable variable values for building test suites. > # Generated by $0. >-# Copyright (C) 2010 Free Software Foundation, Inc. >+# Copyright (C) 2012 Free Software Foundation, Inc. > > # The test suite will define top_srcdir=$at_top_srcdir/../.. etc. > at_testdir='.' >Index: contrib/tcsh/configure.ac >=================================================================== >--- contrib/tcsh/configure.ac (nonexistent) >+++ contrib/tcsh/configure.ac (working copy) >@@ -0,0 +1,505 @@ >+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 >+dnl $tcsh: configure.ac,v 3.10 2016/11/24 15:04:52 christos Exp $ >+ >+AC_PREREQ([2.59])dnl Minimum Autoconf version required. >+AC_INIT([tcsh], [6.20.00], [http://bugs.gw.com/]) >+AC_CONFIG_MACRO_DIR([m4]) >+AC_CONFIG_SRCDIR([tc.vers.c]) >+AC_CONFIG_HEADERS([config.h]) >+AC_CONFIG_TESTDIR([.], [.]) >+ >+AC_PROG_INSTALL >+AC_CANONICAL_HOST >+ >+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=hpux11 >+ ;; >+ >+ ## 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 >+ ;; >+ >+ ## Android >+ *-*-android*) >+ tcsh_config_file=android >+ ;; >+ >+ ## Linux >+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu) >+ tcsh_config_file=linux >+ ;; >+ >+ ## Motorola systems >+ m68k-motorola-sysv* ) >+ tcsh_config_file=sysV68 >+ ;; >+ m88k-motorola-sysv3* ) >+ tcsh_config_file=sysV88 >+ ;; >+ >+ ## Minix systems >+ *-*-minix*) >+ tcsh_config_file=minix >+ ;; >+ >+ ## NetBSD systems >+ *-*-netbsd*) >+ tcsh_config_file=bsd4.4 >+ ;; >+ >+ ## FreeBSD systems >+ *-*-freebsd*) >+ tcsh_config_file=bsd4.4 >+ ;; >+ >+ ## MidnightBSD systems >+ *-*-midnightbsd*) >+ tcsh_config_file=bsd4.4 >+ ;; >+ >+ ## DragonFlyBSD systems >+ *-*-dragonfly*) >+ tcsh_config_file=bsd4.4 >+ ;; >+ >+ ## MirBSD systems >+ *-*-mirbsd*) >+ 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 >+ ;; >+ >+ ## Mac OS X Server >+ *-*-darwin* ) >+ tcsh_config_file=bsd4.4 >+ ;; >+ >+ ## DragonFly systems >+ *-*-dragonfly*) >+ 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.[678] ) # Should handle sparc, x86 and powerpc >+ tcsh_config_file=sol26 >+ ;; >+ *-*-solaris2.* ) # Should handle sparc, x86 and powerpc >+ tcsh_config_file=sol29 >+ ;; >+ >+ ## 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-*) >+ tcsh_config_file=bs2000 >+ ;; >+ >+ ## Convex >+ *-convex*) >+ tcsh_config_file=convex >+ ;; >+ >+ ## Cray >+ *-cray-unicos*) >+ tcsh_config_file=cray >+ ;; >+ >+ ## Red Hat Cygwin >+ *-cygwin) >+ tcsh_config_file=cygwin >+ ;; >+ >+ ## mips-compaq-nonstopux >+ *-*-nonstopux) >+ tcsh_config_file=sysv4 >+ ;; >+ >+ ## Apollo Domain/OS >+ *-apollo-*) >+ tcsh_config_file=apollo >+ ;; >+ >+ ## QNX6 >+ *-qnx6*) >+ tcsh_config_file=qnx6 >+ ;; >+ >+ * ) >+ 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 >+cp ${srcdir}/config/${tcsh_config_file} config_p.h >+AH_BOTTOM( >+[#include "config_p.h" >+#include "config_f.h"]) >+ >+dnl Checks for programs >+AC_PROG_CC >+AC_PROG_CPP >+AC_PROG_GCC_TRADITIONAL >+ >+AC_PATH_PROG([GENCAT], [gencat]) >+ >+dnl Require build CC to create gethost helper when cross building >+if test "x${cross_compiling}" = xyes ; then >+ CC_FOR_GETHOST="cc" >+else >+ CC_FOR_GETHOST="\$(CC)" >+fi >+AC_SUBST(CC_FOR_GETHOST) >+ >+if test "x$GCC" != xyes ; then >+ DFLAGS="$DFLAGS $NON_GNU_DFLAGS" >+ CFLAGS="$CFLAGS $NON_GNU_CFLAGS" >+fi >+ >+dnl More recent Android requires PIEs >+case "${host}" in >+ *-*-android*) >+ CFLAGS="${CFLAGS} -fPIE" >+ LDFLAGS="${LDFLAGS} -pie" >+ ;; >+esac >+ >+dnl Checks for libraries >+AC_SEARCH_LIBS(crypt, crypt) >+AC_SEARCH_LIBS(getspnam, sec) >+AC_SEARCH_LIBS([tgetent], [termlib termcap curses ncurses], [], [ >+ AC_MSG_ERROR([unable to find the tgetent() function]) >+]) >+AC_SEARCH_LIBS(gethostbyname, nsl) >+AC_SEARCH_LIBS(connect, socket) >+AC_SEARCH_LIBS(catgets, catgets) >+AM_ICONV >+ >+dnl Checks for header files >+AC_CHECK_HEADERS([auth.h crypt.h features.h inttypes.h paths.h] dnl >+ [shadow.h stdint.h utmp.h utmpx.h]) >+AC_CHECK_HEADERS([wchar.h], >+ [AC_CHECK_SIZEOF([wchar_t], [], [dnl >+#include <stdio.h> >+#include <wchar.h>]) >+ AC_CHECK_HEADERS([wctype.h])]) >+AC_HEADER_DIRENT >+AC_HEADER_STAT >+AC_HEADER_STDC >+ >+dnl Checks for types >+AC_CHECK_TYPES([long long]) >+AC_TYPE_GETGROUPS >+AC_TYPE_MODE_T >+AC_TYPE_SIZE_T >+AC_TYPE_UID_T >+AC_TYPE_UINT32_T >+ >+AC_DEFUN([AC_TYPE_SSIZE_T], [ >+AC_CHECK_TYPE(ssize_t,, >+AC_DEFINE(ssize_t, int, [Define to `int' not defined in <sys/types.h>.]), >+[ >+#include <sys/types.h> >+]) >+]) >+AC_TYPE_SSIZE_T >+ >+AC_DEFUN([AC_TYPE_SOCKLEN_T], [ >+AC_CHECK_TYPE(socklen_t,, >+AC_DEFINE(socklen_t, int, [Define to `int' if neither <sys/types.h> nor <sys/socket.h> define.]), >+[ >+#include <sys/types.h> >+#include <sys/socket.h> >+]) >+]) >+AC_TYPE_SOCKLEN_T >+ >+ >+dnl Checks for structures >+AC_CHECK_MEMBERS([struct dirent.d_ino], , , >+[#ifdef HAVE_DIRENT_H >+# include <dirent.h> >+#else >+# ifdef HAVE_NDIR_H >+# include <ndir.h> >+# else >+# include <sys/dir.h> >+# endif >+# define dirent direct >+#endif]) >+AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_user, struct utmp.ut_tv, >+ struct utmp.ut_xtime, struct utmpx.ut_host, >+ struct utmpx.ut_user, struct utmpx.ut_tv, >+ struct utmpx.ut_xtime], , , >+[#include <sys/types.h> >+#ifdef HAVE_UTMPX_H >+#include <utmpx.h> >+#define utmp utmpx >+#elif defined HAVE_UTMP_H >+#include <utmp.h> >+#endif]) >+AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], , , >+[#include <sys/types.h> >+#include <sys/socket.h>]) >+ >+dnl Checks for compiler characteristics >+AC_C_CONST >+AC_C_VOLATILE >+ >+dnl checks for library functions >+AC_CHECK_DECLS([crypt, environ, gethostname, getpgrp], , , >+[#include "config_p.h" >+AC_INCLUDES_DEFAULT([]) >+#ifdef HAVE_CRYPT_H >+#include <crypt.h> >+#endif >+]) >+AC_CHECK_FUNC([setlocale], [have_setlocale=yes], [have_setlocale=no]) >+AC_CHECK_FUNC([catgets], [have_catgets=yes], [have_catgets=no]) >+AC_CHECK_FUNCS([dup2 getauthid getcwd gethostname getpwent] dnl >+ [getutent getutxent mallinfo mblen memmove memset mkstemp nice] dnl >+ [nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth]) >+AC_FUNC_GETPGRP >+AC_FUNC_MBRTOWC >+if test "x${cross_compiling}" != xyes ; then >+ AC_FUNC_SETPGRP >+else >+ ac_cv_func_setpgrp_void=yes >+fi >+AC_FUNC_STRCOLL >+ >+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(getnameinfo, DFLAGS="$DFLAGS -DINET6") >+ >+AC_SUBST(DFLAGS) >+ >+dnl Checks for system services >+if test "$have_setlocale" != no; then >+ AC_ARG_ENABLE([nls], AS_HELP_STRING([--disable-nls], [Disable NLS support]), >+ [], [enable_nls=yes]) >+ if test "x$enable_nls" != xno; then >+ AC_DEFINE([NLS], [1], [Support NLS.]) >+ fi >+fi >+ >+if test "x$enable_nls" != xno -a "$have_catgets" != no -a -n "$GENCAT" ; then >+ AC_ARG_ENABLE([nls-catalogs], AS_HELP_STRING([--disable-nls-catalogs], [Disable NLS catalog support]), >+ [], [enable_nls_catalogs=yes]) >+ if test "x$enable_nls_catalogs" != xno; then >+ BUILD_CATALOGS="yes" >+ AC_DEFINE([NLS_CATALOGS], [1], [Support NLS catalogs.]) >+ fi >+fi >+ >+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_SUBST(BUILD_CATALOGS) >+ >+AC_CONFIG_FILES([Makefile nls/Makefile]) >+AC_OUTPUT >Index: contrib/tcsh/configure.in >=================================================================== >--- contrib/tcsh/configure.in (revision 309109) >+++ contrib/tcsh/configure.in (nonexistent) >@@ -1,485 +0,0 @@ >-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 >-dnl $tcsh: configure.in,v 3.99 2012/02/13 16:33:50 christos Exp $ >- >-AC_PREREQ([2.59])dnl Minimum Autoconf version required. >-AC_INIT([tcsh], [6.18.01], [http://bugs.gw.com/]) >-AC_CONFIG_MACRO_DIR([m4]) >-AC_CONFIG_SRCDIR([tc.vers.c]) >-AC_CONFIG_HEADERS([config.h]) >-AC_CONFIG_TESTDIR([.], [.]) >- >-AC_PROG_INSTALL >-AC_CANONICAL_HOST >- >-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=hpux11 >- ;; >- >- ## 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 >- ;; >- >- ## Android >- *-*-android*) >- tcsh_config_file=android >- ;; >- >- ## Linux >- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu) >- 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 >- ;; >- >- ## MidnightBSD systems >- *-*-midnightbsd*) >- tcsh_config_file=bsd4.4 >- ;; >- >- ## DragonFlyBSD systems >- *-*-dragonfly*) >- 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 >- ;; >- >- ## Mac OS X Server >- *-*-darwin* ) >- tcsh_config_file=bsd4.4 >- ;; >- >- ## DragonFly systems >- *-*-dragonfly*) >- 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.[678] ) # Should handle sparc, x86 and powerpc >- tcsh_config_file=sol26 >- ;; >- *-*-solaris2.* ) # Should handle sparc, x86 and powerpc >- tcsh_config_file=sol29 >- ;; >- >- ## 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-*) >- tcsh_config_file=bs2000 >- ;; >- >- ## Convex >- *-convex*) >- tcsh_config_file=convex >- ;; >- >- ## Cray >- *-cray-unicos*) >- tcsh_config_file=cray >- ;; >- >- ## Red Hat Cygwin >- *-cygwin) >- tcsh_config_file=cygwin >- ;; >- >- ## mips-compaq-nonstopux >- *-*-nonstopux) >- tcsh_config_file=sysv4 >- ;; >- >- ## Apollo Domain/OS >- *-apollo-*) >- tcsh_config_file=apollo >- ;; >- >- ## QNX6 >- *-qnx6*) >- tcsh_config_file=qnx6 >- ;; >- >- * ) >- 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 >-cp ${srcdir}/config/${tcsh_config_file} config_p.h >-AH_BOTTOM( >-[#include "config_p.h" >-#include "config_f.h"]) >- >-dnl Checks for programs >-AC_PROG_CC >-AC_PROG_CPP >-AC_PROG_GCC_TRADITIONAL >- >-AC_PATH_PROG([GENCAT], [gencat]) >- >-dnl Require build CC to create gethost helper when cross building >-if test "x${cross_compiling}" = xyes ; then >- CC_FOR_GETHOST="cc" >-else >- CC_FOR_GETHOST="\$(CC)" >-fi >-AC_SUBST(CC_FOR_GETHOST) >- >-if test "x$GCC" != xyes ; then >- DFLAGS="$DFLAGS $NON_GNU_DFLAGS" >- CFLAGS="$CFLAGS $NON_GNU_CFLAGS" >-fi >- >-dnl Checks for libraries >-AC_SEARCH_LIBS(crypt, crypt) >-AC_SEARCH_LIBS(getspnam, sec) >-AC_SEARCH_LIBS(tgetent, termlib termcap curses ncurses) >-AC_SEARCH_LIBS(gethostbyname, nsl) >-AC_SEARCH_LIBS(connect, socket) >-AC_SEARCH_LIBS(catgets, catgets) >-AM_ICONV >- >-dnl Checks for header files >-AC_CHECK_HEADERS([auth.h crypt.h features.h inttypes.h paths.h] dnl >- [shadow.h stdint.h utmp.h utmpx.h]) >-AC_CHECK_HEADERS([wchar.h], >- [AC_CHECK_SIZEOF([wchar_t], [], [dnl >-#include <stdio.h> >-#include <wchar.h>]) >- AC_CHECK_HEADERS([wctype.h])]) >-AC_HEADER_DIRENT >-AC_HEADER_STAT >-AC_HEADER_STDC >- >-dnl Checks for types >-AC_CHECK_TYPES([long long]) >-AC_TYPE_GETGROUPS >-AC_TYPE_MODE_T >-AC_TYPE_SIZE_T >-AC_TYPE_UID_T >-AC_TYPE_UINT32_T >- >-AC_DEFUN([AC_TYPE_SSIZE_T], [ >-AC_CHECK_TYPE(ssize_t,, >-AC_DEFINE(ssize_t, int, [Define to `int' not defined in <sys/types.h>.]), >-[ >-#include <sys/types.h> >-]) >-]) >-AC_TYPE_SSIZE_T >- >-AC_DEFUN([AC_TYPE_SOCKLEN_T], [ >-AC_CHECK_TYPE(socklen_t,, >-AC_DEFINE(socklen_t, int, [Define to `int' if neither <sys/types.h> nor <sys/socket.h> define.]), >-[ >-#include <sys/types.h> >-#include <sys/socket.h> >-]) >-]) >-AC_TYPE_SOCKLEN_T >- >- >-dnl Checks for structures >-AC_CHECK_MEMBERS([struct dirent.d_ino], , , >-[#ifdef HAVE_DIRENT_H >-# include <dirent.h> >-#else >-# ifdef HAVE_NDIR_H >-# include <ndir.h> >-# else >-# include <sys/dir.h> >-# endif >-# define dirent direct >-#endif]) >-AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_user, struct utmp.ut_tv, >- struct utmp.ut_xtime, struct utmpx.ut_host, >- struct utmpx.ut_user, struct utmpx.ut_tv, >- struct utmpx.ut_xtime], , , >-[#include <sys/types.h> >-#ifdef HAVE_UTMPX_H >-#include <utmpx.h> >-#define utmp utmpx >-#elif defined HAVE_UTMP_H >-#include <utmp.h> >-#endif]) >-AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], , , >-[#include <sys/types.h> >-#include <sys/socket.h>]) >- >-dnl Checks for compiler characteristics >-AC_C_CONST >-AC_C_VOLATILE >- >-dnl checks for library functions >-AC_CHECK_DECLS([crypt, environ, gethostname, getpgrp], , , >-[#include "config_p.h" >-AC_INCLUDES_DEFAULT([]) >-#ifdef HAVE_CRYPT_H >-#include <crypt.h> >-#endif >-]) >-AC_CHECK_FUNC([setlocale], [have_setlocale=yes], [have_setlocale=no]) >-AC_CHECK_FUNC([catgets], [have_catgets=yes], [have_catgets=no]) >-AC_CHECK_FUNCS([dup2 getauthid getcwd gethostname getpwent] dnl >- [getutent getutxent mallinfo memmove memset mkstemp nice] dnl >- [nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth]) >-AC_FUNC_GETPGRP >-AC_FUNC_MBRTOWC >-if test "x${cross_compiling}" != xyes ; then >- AC_FUNC_SETPGRP >-else >- ac_cv_func_setpgrp_void=yes >-fi >-AC_FUNC_STRCOLL >- >-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(getnameinfo, DFLAGS="$DFLAGS -DINET6") >- >-AC_SUBST(DFLAGS) >- >-dnl Checks for system services >-if test "$have_setlocale" != no; then >- AC_ARG_ENABLE([nls], AS_HELP_STRING([--disable-nls], [Disable NLS support]), >- [], [enable_nls=yes]) >- if test "x$enable_nls" != xno; then >- AC_DEFINE([NLS], [1], [Support NLS.]) >- fi >-fi >- >-if test "x$enable_nls" != xno -a "$have_catgets" != no -a -n "$GENCAT" ; then >- AC_ARG_ENABLE([nls-catalogs], AS_HELP_STRING([--disable-nls-catalogs], [Disable NLS catalog support]), >- [], [enable_nls_catalogs=yes]) >- if test "x$enable_nls_catalogs" != xno; then >- BUILD_CATALOGS="yes" >- AC_DEFINE([NLS_CATALOGS], [1], [Support NLS catalogs.]) >- fi >-fi >- >-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_SUBST(BUILD_CATALOGS) >- >-AC_CONFIG_FILES([Makefile nls/Makefile]) >-AC_OUTPUT > >Property changes on: contrib/tcsh/configure.in >___________________________________________________________________ >Deleted: svn:keywords >## -1 +0,0 ## >-FreeBSD=%H >\ No newline at end of property >Index: contrib/tcsh/dotlock.c >=================================================================== >--- contrib/tcsh/dotlock.c (nonexistent) >+++ contrib/tcsh/dotlock.c (working copy) >@@ -0,0 +1,180 @@ >+/* $NetBSD: dotlock.c,v 1.11 2009/10/21 01:07:46 snj Exp $ */ >+ >+/* >+ * Copyright (c) 1996 Christos Zoulas. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR >+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES >+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. >+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT >+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+#include "sh.h" >+RCSID("$tcsh: dotlock.c,v 3.4 2015/11/03 21:04:13 christos Exp $") >+ >+#include <stdio.h> >+#ifndef O_SYNC >+#define O_SYNC 0 >+#endif >+ >+#include "dotlock.h" >+ >+static int create_exclusive(const char *); >+/* >+ * Create a unique file. O_EXCL does not really work over NFS so we follow >+ * the following trick: [Inspired by S.R. van den Berg] >+ * >+ * - make a mostly unique filename and try to create it. >+ * - link the unique filename to our target >+ * - get the link count of the target >+ * - unlink the mostly unique filename >+ * - if the link count was 2, then we are ok; else we've failed. >+ */ >+static int >+create_exclusive(const char *fname) >+{ >+ char path[MAXPATHLEN], hostname[MAXHOSTNAMELEN + 1]; >+ const char *ptr; >+ struct timeval tv; >+ pid_t pid; >+ size_t ntries, cookie; >+ int fd, serrno; >+ struct stat st; >+ >+ (void)gettimeofday(&tv, NULL); >+ (void)gethostname(hostname, sizeof(hostname)); >+ hostname[sizeof(hostname) - 1] = '\0'; >+ pid = getpid(); >+ >+ cookie = pid ^ tv.tv_usec; >+ >+ /* >+ * We generate a semi-unique filename, from hostname.(pid ^ usec) >+ */ >+ if ((ptr = strrchr(fname, '/')) == NULL) >+ ptr = fname; >+ else >+ ptr++; >+ >+ (void)snprintf(path, sizeof(path), "%.*s.%s.%lx", >+ (int)(ptr - fname), fname, hostname, (u_long)cookie); >+ >+ /* >+ * We try to create the unique filename. >+ */ >+ for (ntries = 0; ntries < 5; ntries++) { >+ fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC, 0); >+ if (fd != -1) { >+ (void)close(fd); >+ break; >+ } >+ else if (errno == EEXIST) >+ continue; >+ else >+ return -1; >+ } >+ >+ /* >+ * We link the path to the name >+ */ >+ if (link(path, fname) == -1) >+ goto bad; >+ >+ /* >+ * Note that we stat our own exclusively created name, not the >+ * destination, since the destination can be affected by others. >+ */ >+ if (stat(path, &st) == -1) >+ goto bad; >+ >+ (void)unlink(path); >+ >+ /* >+ * If the number of links was two (one for the unique file and one >+ * for the lock), we've won the race >+ */ >+ if (st.st_nlink != 2) { >+ errno = EEXIST; >+ return -1; >+ } >+ return 0; >+ >+bad: >+ serrno = errno; >+ (void)unlink(path); >+ errno = serrno; >+ return -1; >+} >+ >+/* >+ * fname -- Pathname to lock >+ * pollinterval -- Interval (miliseconds) to check for lock, -1 return >+ */ >+int >+dot_lock(const char *fname, int pollinterval) >+{ >+ char path[MAXPATHLEN]; >+ sigset_t nset, oset; >+ int retval; >+ >+ (void)sigemptyset(&nset); >+ (void)sigaddset(&nset, SIGHUP); >+ (void)sigaddset(&nset, SIGINT); >+ (void)sigaddset(&nset, SIGQUIT); >+ (void)sigaddset(&nset, SIGTERM); >+ (void)sigaddset(&nset, SIGTTIN); >+ (void)sigaddset(&nset, SIGTTOU); >+ (void)sigaddset(&nset, SIGTSTP); >+ (void)sigaddset(&nset, SIGCHLD); >+ >+ (void)snprintf(path, sizeof(path), "%s.lock", fname); >+ >+ retval = -1; >+ for (;;) { >+ handle_pending_signals(); >+ (void)sigprocmask(SIG_BLOCK, &nset, &oset); >+ if (create_exclusive(path) != -1) { >+ (void)sigprocmask(SIG_SETMASK, &oset, NULL); >+ retval = 0; >+ break; >+ } >+ else >+ (void)sigprocmask(SIG_SETMASK, &oset, NULL); >+ >+ if (errno != EEXIST) >+ break; >+ >+ if (pollinterval) { >+ if (pollinterval == -1) { >+ errno = EEXIST; >+ break; >+ } >+ (void)usleep((unsigned int)pollinterval * 1000); >+ } >+ } >+ handle_pending_signals(); >+ return retval; >+} >+ >+void >+dot_unlock(const char *fname) >+{ >+ char path[MAXPATHLEN]; >+ >+ (void)snprintf(path, sizeof(path), "%s.lock", fname); >+ (void)unlink(path); >+} > >Property changes on: contrib/tcsh/dotlock.c >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: contrib/tcsh/dotlock.h >=================================================================== >--- contrib/tcsh/dotlock.h (nonexistent) >+++ contrib/tcsh/dotlock.h (working copy) >@@ -0,0 +1,35 @@ >+/* >+ * Copyright (c) 1996 Christos Zoulas. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR >+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES >+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. >+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT >+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef _DOTLOCK_H_ >+#define _DOTLOCK_H_ 1 >+ >+/* >+ * fname -- Pathname to lock >+ * pollinterval -- Interval (miliseconds) to check for lock, -1 return >+ */ >+int dot_lock(const char *fname, int pollinterval); >+void dot_unlock(const char *fname); >+ >+#endif /* #ifndef _DOTLOCK_H_ */ > >Property changes on: contrib/tcsh/dotlock.h >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: contrib/tcsh/ed.chared.c >=================================================================== >--- contrib/tcsh/ed.chared.c (revision 309109) >+++ contrib/tcsh/ed.chared.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.chared.c,v 3.98 2010/05/08 00:37:39 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.chared.c,v 3.103 2015/08/19 14:29:55 christos Exp $ */ > /* > * ed.chared.c: Character editing functions. > */ >@@ -72,7 +72,7 @@ > > #include "sh.h" > >-RCSID("$tcsh: ed.chared.c,v 3.98 2010/05/08 00:37:39 christos Exp $") >+RCSID("$tcsh: ed.chared.c,v 3.103 2015/08/19 14:29:55 christos Exp $") > > #include "ed.h" > #include "tw.h" >@@ -93,7 +93,7 @@ > * from: Gert-Jan Vons <vons@cesar.crbca1.sinet.slb.com> > */ > #define C_CLASS_WHITE 1 >-#define C_CLASS_ALNUM 2 >+#define C_CLASS_WORD 2 > #define C_CLASS_OTHER 3 > > static Char *InsertPos = InputBuf; /* Where insertion starts */ >@@ -290,7 +290,7 @@ > /* > * c_to_class() returns the class of the given character. > * >- * This is used to make the c_prev_word() and c_next_word() functions >+ * This is used to make the c_prev_word(), c_next_word() and c_eword() functions > * work like vi's, which classify characters. A word is a sequence of > * characters belonging to the same class, classes being defined as > * follows: >@@ -305,8 +305,8 @@ > if (Isspace(ch)) > return C_CLASS_WHITE; > >- if (Isdigit(ch) || Isalpha(ch) || ch == '_') >- return C_CLASS_ALNUM; >+ if (isword(ch)) >+ return C_CLASS_WORD; > > return C_CLASS_OTHER; > } >@@ -828,15 +828,24 @@ > p++; > > while (n--) { >- while ((p < high) && Isspace(*p)) >- p++; >+ int c_class; > >- if (isword(*p)) >- while ((p < high) && isword(*p)) >- p++; >- else >- while ((p < high) && !(Isspace(*p) || isword(*p))) >- p++; >+ if (p >= high) >+ break; >+ >+ /* scan until end of current word (may be all whitespace!) */ >+ c_class = c_to_class(*p); >+ while ((p < high) && c_class == c_to_class(*p)) >+ p++; >+ >+ /* if this was a non_whitespace word, we're ready */ >+ if (c_class != C_CLASS_WHITE) >+ continue; >+ >+ /* otherwise, move to the end of the word just found */ >+ c_class = c_to_class(*p); >+ while ((p < high) && c_class == c_to_class(*p)) >+ p++; > } > > p--; >@@ -941,7 +950,7 @@ > > /* Save InputBuf etc in SavedBuf etc for restore after cmd exec */ > static void >-c_save_inputbuf() >+c_save_inputbuf(void) > { > SavedBuf.len = 0; > Strbuf_append(&SavedBuf, InputBuf); >@@ -953,7 +962,7 @@ > } > > CCRETVAL >-GetHistLine() >+GetHistLine(void) > { > struct Hist *hp; > int h; >@@ -3025,7 +3034,7 @@ > > /*ARGSUSED*/ > CCRETVAL >-e_capitolcase(Char c) >+e_capitalcase(Char c) > { > Char *cp, *end; > >@@ -3387,7 +3396,7 @@ > (void) Cookedmode(); > > (void) xwrite(SHIN, "\n", 1); >- len = one_wctomb(buf, c & CHAR); >+ len = one_wctomb(buf, c); > for (i = 0; i < len; i++) > (void) ioctl(SHIN, TIOCSTI, (ioctl_t) &buf[i]); > >Index: contrib/tcsh/ed.decls.h >=================================================================== >--- contrib/tcsh/ed.decls.h (revision 309109) >+++ contrib/tcsh/ed.decls.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.decls.h,v 3.45 2008/10/17 20:25:00 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.decls.h,v 3.46 2015/08/19 14:29:55 christos Exp $ */ > /* > * ed.decls.h: Editor external definitions > */ >@@ -142,7 +142,7 @@ > extern CCRETVAL v_wordbegnext (Char); > extern CCRETVAL e_uppercase (Char); > extern CCRETVAL e_lowercase (Char); >-extern CCRETVAL e_capitolcase (Char); >+extern CCRETVAL e_capitalcase (Char); > extern CCRETVAL e_cleardisp (Char); > extern CCRETVAL e_complete (Char); > extern CCRETVAL e_correct (Char); >Index: contrib/tcsh/ed.defns.c >=================================================================== >--- contrib/tcsh/ed.defns.c (revision 309109) >+++ contrib/tcsh/ed.defns.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.defns.c,v 3.46 2006/03/02 18:46:44 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.defns.c,v 3.51 2016/02/14 15:44:18 christos Exp $ */ > /* > * ed.defns.c: Editor function definitions and initialization > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: ed.defns.c,v 3.46 2006/03/02 18:46:44 christos Exp $") >+RCSID("$tcsh: ed.defns.c,v 3.51 2016/02/14 15:44:18 christos Exp $") > > #include "ed.h" > >@@ -151,7 +151,7 @@ > #define F_CASEUPPER 54 > e_lowercase, > #define F_CASELOWER 55 >- e_capitolcase, >+ e_capitalcase, > #define F_CASECAPITAL 56 > v_zero, > #define V_ZERO 57 >@@ -1801,27 +1801,27 @@ > void > CheckMaps(void) > { /* check the size of the key maps */ >- int c1 = (NT_NUM_KEYS * sizeof(KEYCMD)); >+ size_t c1 = NT_NUM_KEYS * sizeof(KEYCMD); > >- if ((sizeof(CcKeyMap)) != c1) >- xprintf("CcKeyMap should be %d entries, but is %d.\r\n", >- NT_NUM_KEYS, sizeof(CcKeyMap) / sizeof(KEYCMD))); >+ if (sizeof(CcKeyMap) != c1) >+ xprintf("CcKeyMap should be %u entries, but is %zu.\r\n", >+ NT_NUM_KEYS, sizeof(CcKeyMap) / sizeof(KEYCMD)); > >- if ((sizeof(CcAltMap)) != c1) >- xprintf("CcAltMap should be %d entries, but is %d.\r\n", >- NT_NUM_KEYS, (sizeof(CcAltMap) / sizeof(KEYCMD))); >+ if (sizeof(CcAltMap) != c1) >+ xprintf("CcAltMap should be %u entries, but is %zu.\r\n", >+ NT_NUM_KEYS, sizeof(CcAltMap) / sizeof(KEYCMD)); > >- if ((sizeof(CcEmacsMap)) != c1) >- xprintf("CcEmacsMap should be %d entries, but is %d.\r\n", >- NT_NUM_KEYS, (sizeof(CcEmacsMap) / sizeof(KEYCMD))); >+ if (sizeof(CcEmacsMap) != c1) >+ xprintf("CcEmacsMap should be %u entries, but is %zu.\r\n", >+ NT_NUM_KEYS, sizeof(CcEmacsMap) / sizeof(KEYCMD)); > >- if ((sizeof(CcViMap)) != c1) >- xprintf("CcViMap should be %d entries, but is %d.\r\n", >- NT_NUM_KEYS, (sizeof(CcViMap) / sizeof(KEYCMD))); >+ if (sizeof(CcViMap) != c1) >+ xprintf("CcViMap should be %u entries, but is %zu.\r\n", >+ NT_NUM_KEYS, sizeof(CcViMap) / sizeof(KEYCMD)); > >- if ((sizeof(CcViCmdMap)) != c1) >- xprintf("CcViCmdMap should be %d entries, but is %d.\r\n", >- NT_NUM_KEYS, (sizeof(CcViCmdMap) / sizeof(KEYCMD))); >+ if (sizeof(CcViCmdMap) != c1) >+ xprintf("CcViCmdMap should be %u entries, but is %zu.\r\n", >+ NT_NUM_KEYS, sizeof(CcViCmdMap) / sizeof(KEYCMD)); > } > > #endif >@@ -1889,6 +1889,9 @@ > int i; > > VImode = 1; >+ setNS(STRvimode); >+ update_wordchars(); >+ > ResetXmap(); > for (i = 0; i < NT_NUM_KEYS; i++) { > CcKeyMap[i] = CcViMap[i]; >@@ -1910,6 +1913,10 @@ > cstr.len = 2; > > VImode = 0; >+ if (adrof(STRvimode)) >+ unsetv(STRvimode); >+ update_wordchars(); >+ > ResetXmap(); > for (i = 0; i < NT_NUM_KEYS; i++) { > CcKeyMap[i] = CcEmacsMap[i]; >Index: contrib/tcsh/ed.inputl.c >=================================================================== >--- contrib/tcsh/ed.inputl.c (revision 309109) >+++ contrib/tcsh/ed.inputl.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.inputl.c,v 3.71 2010/12/22 17:26:04 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.inputl.c,v 3.73 2012/10/19 15:23:32 christos Exp $ */ > /* > * ed.inputl.c: Input line handling. > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: ed.inputl.c,v 3.71 2010/12/22 17:26:04 christos Exp $") >+RCSID("$tcsh: ed.inputl.c,v 3.73 2012/10/19 15:23:32 christos Exp $") > > #include "ed.h" > #include "ed.defns.h" /* for the function names */ >@@ -683,7 +683,7 @@ > #ifdef DSPMBYTE > _enable_mbdisp && > #else >- MB_CUR_MAX == 1 && >+ MB_LEN_MAX == 1 && > #endif > !adrof(STRnokanji) && (*ch & META)) { > MetaNext = 0; >@@ -800,17 +800,13 @@ > return -1; > } > } >- if (AsciiOnly) { >- *cp = (unsigned char)*cbuf; >- } else { >- cbp++; >- if (normal_mbtowc(cp, cbuf, cbp) == -1) { >- reset_mbtowc(); >- if (cbp < MB_CUR_MAX) >- continue; /* Maybe a partial character */ >- /* And drop the following bytes, if any */ >- *cp = (unsigned char)*cbuf | INVALID_BYTE; >- } >+ cbp++; >+ if (normal_mbtowc(cp, cbuf, cbp) == -1) { >+ reset_mbtowc(); >+ if (cbp < MB_CUR_MAX) >+ continue; /* Maybe a partial character */ >+ /* And drop the following bytes, if any */ >+ *cp = (unsigned char)*cbuf | INVALID_BYTE; > } > break; > } >Index: contrib/tcsh/ed.refresh.c >=================================================================== >--- contrib/tcsh/ed.refresh.c (revision 309109) >+++ contrib/tcsh/ed.refresh.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.refresh.c,v 3.47 2011/02/27 00:14:51 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.refresh.c,v 3.51 2015/06/06 21:19:07 christos Exp $ */ > /* > * ed.refresh.c: Lower level screen refreshing functions > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: ed.refresh.c,v 3.47 2011/02/27 00:14:51 christos Exp $") >+RCSID("$tcsh: ed.refresh.c,v 3.51 2015/06/06 21:19:07 christos Exp $") > > #include "ed.h" > /* #define DEBUG_UPDATE */ >@@ -46,7 +46,7 @@ > static int rprompt_h, rprompt_v; > > static int MakeLiteral (Char *, int, Char); >-static int Draw (Char *, int); >+static int Draw (Char *, int, int); > static void Vdraw (Char, int); > static void RefreshPromptpart (Char *); > static void update_line (Char *, Char *, int); >@@ -159,15 +159,44 @@ > return i | LITERAL; > } > >+/* draw char at cp, expand tabs, ctl chars */ > static int >-Draw(Char *cp, int nocomb) /* draw char at cp, expand tabs, ctl chars */ >+Draw(Char *cp, int nocomb, int drawPrompt) > { > int w, i, lv, lh; > Char c, attr; > >+#ifdef WIDE_STRINGS >+ if (!drawPrompt) { /* draw command-line */ >+ attr = 0; >+ c = *cp; >+ } else { /* draw prompt */ >+ /* prompt with attributes(UNDER,BOLD,STANDOUT) */ >+ if (*cp & (UNDER | BOLD | STANDOUT)) { /* *cp >= STANDOUT */ >+ >+ /* example) >+ * We can't distinguish whether (*cp=)0x02ffffff is >+ * U+02FFFFFF or U+00FFFFFF|STANDOUT. >+ * We handle as U+00FFFFFF|STANDOUT, only when drawing prompt. */ >+ attr = (*cp & ATTRIBUTES); >+ /* ~(UNDER | BOLD | STANDOUT) = 0xf1ffffff */ >+ c = *cp & ~(UNDER | BOLD | STANDOUT); >+ >+ /* if c is ctrl code, we handle *cp as havnig no attributes */ >+ if ((c < 0x20 && c >= 0) || c == 0x7f) { >+ attr = 0; >+ c = *cp; >+ } >+ } else { /* prompt without attributes */ >+ attr = 0; >+ c = *cp; >+ } >+ } >+#else > attr = *cp & ~CHAR; > c = *cp & CHAR; >- w = NLSClassify(c, nocomb); >+#endif >+ w = NLSClassify(c, nocomb, drawPrompt); > switch (w) { > case NLSCLASS_NL: > Vdraw('\0', 0); /* assure end of line */ >@@ -201,10 +230,11 @@ > case NLSCLASS_ILLEGAL2: > case NLSCLASS_ILLEGAL3: > case NLSCLASS_ILLEGAL4: >- Vdraw('\\' | attr, 1); >- Vdraw('U' | attr, 1); >- Vdraw('+' | attr, 1); >- for (i = 8 * NLSCLASS_ILLEGAL_SIZE(w) - 4; i >= 0; i -= 4) >+ case NLSCLASS_ILLEGAL5: >+ Vdraw('\\', 1); >+ Vdraw('U', 1); >+ Vdraw('+', 1); >+ for (i = 16 + 4 * (-w-5); i >= 0; i -= 4) > Vdraw("0123456789ABCDEF"[(c >> i) & 15] | attr, 1); > break; > case 0: >@@ -302,7 +332,7 @@ > } > } > else >- cp += Draw(cp, cp == buf); >+ cp += Draw(cp, cp == buf, 1); > } > } > >@@ -354,7 +384,7 @@ > cur_v = vcursor_v; > Cursor = cp; > } >- cp += Draw(cp, cp == InputBuf); >+ cp += Draw(cp, cp == InputBuf, 0); > } > > if (cur_h == -1) { /* if I haven't been set yet, I'm at the end */ >@@ -1126,7 +1156,7 @@ > cp++; > continue; > } >- w = NLSClassify(*cp & CHAR, cp == Prompt); >+ w = NLSClassify(*cp & CHAR, cp == Prompt, 0); > cp++; > switch(w) { > case NLSCLASS_NL: >@@ -1158,7 +1188,7 @@ > } > > for (cp = InputBuf; cp < Cursor;) { /* do input buffer to Cursor */ >- w = NLSClassify(*cp & CHAR, cp == InputBuf); >+ w = NLSClassify(*cp & CHAR, cp == InputBuf, 0); > cp++; > switch(w) { > case NLSCLASS_NL: >@@ -1251,7 +1281,7 @@ > } > cp = Cursor - l; > c = *cp & CHAR; >- w = NLSClassify(c, cp == InputBuf); >+ w = NLSClassify(c, cp == InputBuf, 0); > switch(w) { > case NLSCLASS_CTRL: > PutPlusOne('^', 1); >@@ -1299,7 +1329,7 @@ > CursorV = 0; /* clear the display buffer */ > CursorH = 0; > for (i = 0; i < TermV; i++) >- (void) memset(Display[i], 0, TermH * sizeof(Display[0][0])); >+ (void) memset(Display[i], 0, (TermH + 1) * sizeof(Display[0][0])); > OldvcV = 0; > litlen = 0; > } >Index: contrib/tcsh/ed.screen.c >=================================================================== >--- contrib/tcsh/ed.screen.c (revision 309109) >+++ contrib/tcsh/ed.screen.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.screen.c,v 3.78 2011/02/27 00:14:38 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.screen.c,v 3.82 2016/11/24 15:04:14 christos Exp $ */ > /* > * ed.screen.c: Editor/termcap-curses interface > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: ed.screen.c,v 3.78 2011/02/27 00:14:38 christos Exp $") >+RCSID("$tcsh: ed.screen.c,v 3.82 2016/11/24 15:04:14 christos Exp $") > > #include "ed.h" > #include "tc.h" >@@ -994,7 +994,7 @@ > int highlighting = 0; > > void >-StartHighlight() >+StartHighlight(void) > { > (void) tputs(Str(T_mr), 1, PUTPURE); > highlighting = 1; >@@ -1001,7 +1001,7 @@ > } > > void >-StopHighlight() >+StopHighlight(void) > { > (void) tputs(Str(T_me), 1, PUTPURE); > highlighting = 0; >@@ -1437,7 +1437,8 @@ > if (i <= 0) { > if (i == -1) { > #if (SYSVREL == 0) || defined(IRIS3D) >- xprintf(CGETS(7, 20, "%s: Cannot open /etc/termcap.\n"), progname); >+ xprintf(CGETS(7, 20, >+ "%s: The terminal database could not be opened.\n"), progname); > } > else if (i == 0) { > #endif /* SYSVREL */ >@@ -1563,13 +1564,13 @@ > #endif /* SIG_WINDOW */ > > #ifdef KNOWsize >-static void >+static int > UpdateVal(const Char *tag, int value, Char *termcap, Char *backup) > { > Char *ptr, *p; > if ((ptr = Strstr(termcap, tag)) == NULL) { > (void)Strcpy(backup, termcap); >- return; >+ return 0; > } else { > size_t len = (ptr - termcap) + Strlen(tag); > (void)Strncpy(backup, termcap, len); >@@ -1580,6 +1581,7 @@ > ptr = Strchr(ptr, ':'); > if (ptr) > (void) Strcat(backup, ptr); >+ return 1; > } > } > #endif >@@ -1625,21 +1627,23 @@ > if ((tptr = getenv("TERMCAP")) != NULL) { > /* Leave 64 characters slop in case we enlarge the termcap string */ > Char termcap[TC_BUFSIZE+64], backup[TC_BUFSIZE+64], *ptr; >- Char buf[4]; >+ int changed; > > ptr = str2short(tptr); > (void) Strncpy(termcap, ptr, TC_BUFSIZE); > termcap[TC_BUFSIZE-1] = '\0'; > >- UpdateVal(STRco, Val(T_co), termcap, backup); >- UpdateVal(STRli, Val(T_li), termcap, backup); >+ changed = UpdateVal(STRco, Val(T_co), termcap, backup); >+ changed |= UpdateVal(STRli, Val(T_li), termcap, backup); > >- /* >- * Chop the termcap string at TC_BUFSIZE-1 characters to avoid >- * core-dumps in the termcap routines >- */ >- termcap[TC_BUFSIZE - 1] = '\0'; >- tsetenv(STRTERMCAP, termcap); >+ if (changed) { >+ /* >+ * Chop the termcap string at TC_BUFSIZE-1 characters to avoid >+ * core-dumps in the termcap routines >+ */ >+ termcap[TC_BUFSIZE - 1] = '\0'; >+ tsetenv(STRTERMCAP, termcap); >+ } > } > } > #endif /* KNOWsize */ >Index: contrib/tcsh/ed.term.h >=================================================================== >--- contrib/tcsh/ed.term.h (revision 309109) >+++ contrib/tcsh/ed.term.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.term.h,v 1.18 2007/07/05 14:13:06 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.term.h,v 1.19 2015/03/25 19:53:16 christos Exp $ */ > /* > * ed.term.h: Local terminal header > */ >@@ -300,10 +300,18 @@ > # endif /* masscomp */ > #endif /* CBRK */ > #ifndef CMIN >-# define CMIN CEOF >+# if VMIN == VEOF >+# define CMIN CEOF >+# else >+# define CMIN 1 >+# endif > #endif /* CMIN */ > #ifndef CTIME >-# define CTIME CEOL >+# if VTIME == VEOL >+# define CTIME CEOL >+# else >+# define CTIME 0 >+# endif > #endif /* CTIME */ > > /* >Index: contrib/tcsh/ed.xmap.c >=================================================================== >--- contrib/tcsh/ed.xmap.c (revision 309109) >+++ contrib/tcsh/ed.xmap.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/ed.xmap.c,v 3.37 2009/06/25 21:15:37 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/ed.xmap.c,v 3.38 2015/06/06 21:19:07 christos Exp $ */ > /* > * ed.xmap.c: This module contains the procedures for maintaining > * the extended-key map. >@@ -88,7 +88,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: ed.xmap.c,v 3.37 2009/06/25 21:15:37 christos Exp $") >+RCSID("$tcsh: ed.xmap.c,v 3.38 2015/06/06 21:19:07 christos Exp $") > > #include "ed.h" > #include "ed.defns.h" >@@ -743,7 +743,7 @@ > *b++ = (unsigned char) p; > } > else if (p == ' ' || (Isprint(p) && !Isspace(p))) >- b += one_wctomb((char *)b, p & CHAR); >+ b += one_wctomb((char *)b, p); > else { > *b++ = '\\'; > *b++ = ((p >> 6) & 7) + '0'; >Index: contrib/tcsh/gethost.c >=================================================================== >--- contrib/tcsh/gethost.c (revision 309109) >+++ contrib/tcsh/gethost.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/gethost.c,v 1.15 2012/01/15 17:14:54 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/gethost.c,v 1.19 2014/03/09 00:11:54 christos Exp $ */ > /* > * gethost.c: Create version file from prototype > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: gethost.c,v 1.15 2012/01/15 17:14:54 christos Exp $") >+RCSID("$tcsh: gethost.c,v 1.19 2014/03/09 00:11:54 christos Exp $") > > #ifdef SCO > # define perror __perror >@@ -150,11 +150,17 @@ > char *r; > > if (len == 0) >- len = strlen(b); >- l = strlen(a) + len + 1; >+ len = strlen(b) + 1; >+ if (a) >+ l = strlen(a) + len; >+ else >+ l = len; > if ((r = malloc(l)) == NULL) > abort(); >- snprintf(r, l, "%s%.*s", a, (int)len, b); >+ if (a) >+ snprintf(r, l, "%s%.*s", a, (int)len, b); >+ else >+ snprintf(r, l, "%.*s", (int)len, b); > return r; > } > >@@ -165,19 +171,22 @@ > static char *buf; > size_t len; > const char *ptr, *bptr, *eptr = NULL, *name; >- size_t buflen = 0; > > if (strstr(defs, "#machine(" /* ) */)) > return defs; >+ if (!strstr(defs, def)) >+ return defs; > > free(buf); >- buf = strdup("("); /* ) */ >+ buf = NULL; > for (ptr = defs; (bptr = strstr(ptr, def)) != NULL; ptr = eptr + 1) { > if (ptr != bptr) >- buf = cat(buf, ptr, bptr - ptr); >+ buf = cat(buf, ptr, bptr - ptr + 1); >+ buf = cat(buf, "(", 0); /* ) */ > if ((eptr = strchr(ptr + sizeof(def) - 1, ')')) == NULL) { > (void) fprintf(stderr, "%s: missing close paren `%s'\n", > pname, defs); >+ free(buf); > return defs; > } > buf = cat(buf, bptr, eptr - bptr + 1); >@@ -186,19 +195,23 @@ > if (len < 1) { > (void) fprintf(stderr, "%s: empty define `%s'\n", > pname, defs); >+ free(buf); > return defs; > } >- if (*name != '_') { >+ if (*name != '_' && (*name != 'M' && name[1] != '_')) { > char *undername = malloc(len + 10); >- buf = cat(buf, " || defined(", 0); >+ if (undername == NULL) >+ abort(); >+ buf = cat(buf, ") || defined(", 0); > snprintf(undername, len + 10, "__%.*s__)", (int)len, > name); > buf = cat(buf, undername, len + 5); >- buf = cat(buf, " || defined(", 0); >+ buf = cat(buf, ") || defined(", 0); > snprintf(undername, len + 10, "__%.*s)", (int)len, > name); > buf = cat(buf, undername, len + 3); > } >+ buf = cat(buf, "))", 0); > } > if (!eptr) { > (void) fprintf(stderr, "%s: invalid input `%s'\n", pname, defs); >@@ -205,7 +218,6 @@ > return defs; > } > buf = cat(buf, eptr + 1, 0); >- buf = cat(buf, ")", 0); > return buf; > } > >@@ -292,8 +304,8 @@ > pname, fname, lineno); > break; > } >- (void) fprintf(stdout, "\n#if %s\n# define %s\n#endif\n\n", stmt, >- defs); >+ (void) fprintf(stdout, "\n#if %s\n# define %s\n#endif\n\n", >+ explode(stmt), defs); > break; > > case T_NONE: >@@ -340,7 +352,7 @@ > #ifdef LINEDIRECTIVE > (void) fprintf(stdout, "# %d \"%s\"\n", lineno + 1, fname); > #endif /* LINEDIRECTIVE */ >- (void) fprintf(stdout, "#if %s\n", defs); >+ (void) fprintf(stdout, "#if (%s)\n", explode(defs)); > inprocess = 1; > } > else { >Index: contrib/tcsh/glob.c >=================================================================== >--- contrib/tcsh/glob.c (revision 309109) >+++ contrib/tcsh/glob.c (working copy) >@@ -59,6 +59,11 @@ > #include "sh.h" > #include "glob.h" > >+#ifndef HAVE_MBLEN >+#undef mblen >+#define mblen(_s,_n) mbrlen((_s),(_n),NULL) >+#endif >+ > #undef Char > #undef QUOTE > #undef TILDE >@@ -435,6 +440,7 @@ > dest = copy; > src = pattern; > while (*src != EOS) { >+ /* Don't interpret quotes. The spec does not say we should do */ > if (*src == QUOTE) { > if (*++src == EOS) > --src; >Index: contrib/tcsh/host.defs >=================================================================== >--- contrib/tcsh/host.defs (revision 309109) >+++ contrib/tcsh/host.defs (working copy) >@@ -1,5 +1,5 @@ > newcode : >-/* $Header: /p/tcsh/cvsroot/tcsh/host.defs,v 1.55 2012/01/11 20:20:15 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/host.defs,v 1.61 2015/05/26 18:56:19 christos Exp $ */ > /* > * host.defs: Hosttype/Machtype etc. > */ >@@ -33,18 +33,19 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: host.defs,v 1.55 2012/01/11 20:20:15 christos Exp $") >+RCSID("$tcsh: host.defs,v 1.61 2015/05/26 18:56:19 christos Exp $") > > endcode : > >-macro : M_mips64el : (defined(mips64) || defined(__mips64)) && (defined(MIPSEL) || defined(__MIPSEL)) >-macro : M_mips64eb : (defined(mips64) || defined(__mips64)) && (defined(MIPSEB) || defined(__MIPSEB)) >-macro : M_mipsel : (!defined(M_mips64el)) && (defined(mips) || defined(__mips)) && (defined(MIPSEL) || defined(__MIPSEL)) >-macro : M_mipseb : (!defined(M_mips64eb)) && (defined(mips) || defined(__mips)) && (defined(MIPSEB) || defined(__MIPSEB)) >-macro : M_i386 : (defined(i386) || defined(__i386__)) >-macro : M_i486 : (defined(i486) || defined(__i486__)) >-macro : M_i586 : (defined(i586) || defined(__i586__)) >-macro : M_i686 : (defined(i686) || defined(__i686__)) >+macro : M_mips64el : (defined(mips64) && defined(MIPSEL)) >+macro : M_mips64eb : (defined(mips64) && defined(MIPSEB)) >+macro : M_mipsel : (!defined(M_mips64el) && defined(mips) && defined(MIPSEL)) >+macro : M_mipseb : (!defined(M_mips64eb) && defined(mips) && defined(MIPSEB)) >+macro : M_amd64: (defined(amd64) || defined(x86_64)) >+macro : M_i386 : defined(i386) >+macro : M_i486 : defined(i486) >+macro : M_i586 : defined(i586) >+macro : M_i686 : defined(i686) > macro : M_intel : (defined(M_i386) || defined(M_i486) || defined(M_i586)) > > newdef : defined(ns32000) >@@ -169,7 +170,7 @@ > endcode : > enddef : > >-newdef : defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || defined(__GLIBC__) >+newdef : defined(linux) || defined(CYGWIN) || defined(GNU) || defined(GLIBC) > newcode : > # include "tw.h" > #include <sys/utsname.h> >@@ -240,7 +241,7 @@ > enddef : > > >-newdef : defined(__PARAGON__) >+newdef : defined(PARAGON) > comment : Intel Paragon running OSF/1 > vendor : : "intel" > hosttype: : "paragon" >@@ -277,7 +278,7 @@ > enddef : > > >-newdef : defined(__hp_osf) >+newdef : defined(hp_osf) > comment : Hewlett Packard running OSF/1 > vendor : : "hp" > hosttype: defined(pa_risc) : "hp9000s700-osf1" >@@ -300,7 +301,7 @@ > enddef : > > >-newdef : defined(hpux) || defined(__hpux) >+newdef : defined(hpux) > comment : Hewlett Packard running HP/UX > vendor : : "hp" > hosttype: defined(hp9000s800) : "hp9000s800" >@@ -325,14 +326,15 @@ > enddef : > > >-newdef : defined(sun) || defined(__sun__) >+newdef : defined(sun) > comment : Sun Microsystems series 2 workstation (68010 based) > comment : Sun Microsystems series 3 workstation (68020 based) > comment : Sun Microsystems 386i workstation (386 based) > comment : Sun Microsystems series 4 workstation (SPARC based) > vendor : : "sun" >-hosttype: defined(M_i386) && !defined(__SVR4) : "sun386i" >-hosttype: defined(M_i386) && defined(__SVR4) : "i86pc" >+hosttype: defined(M_i386) && !defined(SVR4) : "sun386i" >+hosttype: defined(M_i386) && defined(SVR4) : "i86pc" >+hosttype: defined(M_amd64) : "i86pc" > hosttype: defined(mc68010) : "sun2" > hosttype: defined(mc68020) : "sun3" > hosttype: defined(sparc) : "sun4" >@@ -345,6 +347,7 @@ > machtype: defined(sparcv9) : "sparcv9" > machtype: defined(sparc) : "sparc" > machtype: defined(M_i386) : "i386" >+machtype: defined(M_amd64) : "amd64" > enddef : > > >@@ -488,7 +491,7 @@ > enddef : > > >-newdef : defined(__gnu_hurd__) >+newdef : defined(gnu_hurd) > comment : GNU/HURD > vendor : defined(M_intel) : "intel" > hosttype: defined(M_i686) : "i686" >@@ -503,19 +506,19 @@ > enddef : > > >-newdef : defined(linux) || defined(__GNU__) || defined(__GLIBC__) >+newdef : defined(linux) || defined(GNU) || defined(GLIBC) > comment : Linus Torvalds's linux > vendor : defined(M_intel) : "intel" > hosttype: : gethost() > ostype : : getostype() > machtype: : getmach() >-vendor : defined(__ANDROID__) : "linux" >+vendor : defined(ANDROID) : "linux" > vendor : defined(alpha) : "dec" > vendor : defined(PPC) : "apple" > enddef : > > >-newdef : defined(__EMX__) >+newdef : defined(EMX) > comment : OS/2 EMX [unix emulation under OS/2] > vendor : defined(M_intel) : "intel" > hosttype: defined(M_i386) : "i386-emx" >@@ -524,10 +527,10 @@ > enddef : > > >-newdef : defined(__NetBSD__) >+newdef : defined(NetBSD) > comment : NetBSD > vendor : defined(algor) : "algoritmics" >-vendor : defined(arm32) || defined(__arm__) : "acorn" >+vendor : defined(arm32) || defined(arm) : "acorn" > vendor : defined(alpha) : "digital" > vendor : defined(amiga) : "commodore" > vendor : defined(atari) : "atari" >@@ -543,13 +546,13 @@ > vendor : defined(sparc64) : "sun" > vendor : defined(sun3) : "sun" > vendor : defined(vax) : "digital" >-vendor : defined(x86_64) : "amd" >+vendor : defined(M_amd64) : "amd" > hosttype: : "NetBSD" > ostype : : "NetBSD" > machtype: defined(alpha) : "alpha" > machtype: defined(algor) : "algor" >-machtype: defined(arm32) || defined(__APCS_32__) : "arm32" >-machtype: defined(arm26) || defined(__APCS_26__) : "arm26" >+machtype: defined(arm32) || defined(APCS_32) : "arm32" >+machtype: defined(arm26) || defined(APCS_26) : "arm26" > machtype: defined(arm) : "arm" > machtype: defined(sparc) : "sparc" > machtype: defined(sparc64) : "sparc64" >@@ -561,14 +564,46 @@ > machtype: defined(pc532) : "pc532" > machtype: defined(powerpc) : "powerpc" > machtype: defined(vax) : "vax" >-machtype: defined(x86_64) : "x86_64" >+machtype: defined(M_amd64) : "x86_64" > enddef : > >+newdef : defined(OpenBSD) >+comment : OpenBSD >+vendor : defined(alpha) : "digital" >+vendor : defined(M_amd64) : "amd" >+vendor : defined(arm) : "arm" >+vendor : defined(hppa) || defined(hppa64) : "hp" >+vendor : defined(M_intel) : "intel" >+vendor : defined(m68k) : "motorola" >+vendor : defined(m88k) : "motorola" >+vendor : defined(mips) && defined(sgi) : "sgi" >+vendor : defined(powerpc) : "motorola" >+vendor : defined(sh) : "io-data" >+vendor : defined(sparc) || defined(sparc64) : "sun" >+vendor : defined(vax) : "digital" >+hosttype: : "OpenBSD" >+ostype : : "OpenBSD" >+machtype: defined(alpha) : "alpha" >+machtype: defined(M_amd64) : "amd64" >+machtype: defined(arm) : "arm" >+machtype: defined(hppa) : "hppa" >+machtype: defined(hppa64) : "hppa64" >+machtype: defined(M_i386) : "i386" >+machtype: defined(m68k) : "m68k" >+machtype: defined(m88k) : "m88k" >+machtype: defined(mips) : "mips" >+machtype: defined(sh) : "sh" >+machtype: defined(sparc64) : "sparc64" >+machtype: defined(sparc) : "sparc" >+machtype: defined(powerpc) : "powerpc" >+machtype: defined(vax) : "vax" >+enddef : > >-newdef : defined(__FreeBSD__) >+ >+newdef : defined(FreeBSD) > comment : FreeBSD > vendor : defined(alpha) : "digital" >-vendor : defined(arm32) || defined(__arm__) : "acorn" >+vendor : defined(arm32) || defined(arm) : "acorn" > vendor : defined(M_intel) : "intel" > vendor : defined(ia64) : "intel" > vendor : defined(mips) : "mips" >@@ -575,11 +610,11 @@ > vendor : defined(powerpc) : "motorola" > vendor : defined(sparc) : "sun" > vendor : defined(sparc64) : "sun" >-vendor : defined(x86_64) : "amd" >+vendor : defined(M_amd64) : "amd" > hosttype: : "FreeBSD" > ostype : : "FreeBSD" > machtype: defined(alpha) : "alpha" >-machtype: defined(arm32) || defined(__APCS_32__) : "arm32" >+machtype: defined(arm32) || defined(APCS_32) : "arm32" > machtype: defined(arm) : "arm" > machtype: defined(ia64) : "ia64" > machtype: defined(M_i386) : "i386" >@@ -587,11 +622,11 @@ > machtype: defined(powerpc) : "powerpc" > machtype: defined(sparc) : "sparc" > machtype: defined(sparc64) : "sparc64" >-machtype: defined(x86_64) : "x86_64" >+machtype: defined(M_amd64) : "x86_64" > enddef : > > >-newdef : defined(__MidnightBSD__) >+newdef : defined(MidnightBSD) > comment : MidnightBSD > vendor : defined(M_intel) : "intel" > hosttype: : "MidnightBSD" >@@ -819,13 +854,15 @@ > enddef : > > >-newdef : defined(__APPLE__) && defined(__MACH__) >+newdef : defined(APPLE) && defined(MACH) > comment : OS X > vendor : : "apple" > hosttype: defined(i386) : "intel-pc" > hosttype: defined(ppc) : "powermac" >+hosttype: defined(M_amd64) : "amd" > ostype : : "darwin" > machtype: defined(i386) : "i386" >+machtype: defined(M_amd64) : "x86_64" > machtype: defined(ppc) : "powerpc" > enddef : > >@@ -855,7 +892,7 @@ > enddef : > > >-newdef : defined(ultrix) || defined(__ultrix) >+newdef : defined(ultrix) > comment : Digital's Ultrix > vendor : : "dec" > hosttype: defined(M_mipsel) : "decstation" >@@ -917,7 +954,7 @@ > ostype : : "masscomp" > enddef : > >-newdef : defined(__MACHTEN__) >+newdef : defined(MACHTEN) > comment : Machintosh > vendor : : "Tenon" > hosttype: : "Macintosh" >@@ -1040,7 +1077,7 @@ > enddef : > > >-newdef : defined(__DGUX__) >+newdef : defined(DGUX) > comment : Data-General AViiON running DGUX > hosttype: : "aviion" > ostype : : "dgux" >@@ -1074,7 +1111,7 @@ > enddef : > > >-newdef : defined(__clipper__) >+newdef : defined(clipper) > comment : Clipper Chipset (Intergraph) > vendor : : "intergraph" > hosttype: : "clipper" >@@ -1081,7 +1118,7 @@ > machtype: : "clipper" > enddef : > >-newdef : defined(__QNX__) >+newdef : defined(QNX) > ostype : : "qnx" > enddef : > >@@ -1110,7 +1147,7 @@ > machtype: : "bs2000" > enddef : > >-newdef : defined(__MVS__) >+newdef : defined(MVS) > comment : ibm uss s/390 (mainframe, EBCDIC) > vendor : : "ibm" > hosttype: : "s390" >@@ -1134,7 +1171,7 @@ > machtype: defined(M_i386) : "i386" > enddef : > >-newdef : defined(__uxp__) || defined(__uxps__) >+newdef : defined(uxp) || defined(uxps) > comment : FUJITSU DS/90 7000 > vendor : : "fujitsu" > hosttype: : "ds90" >@@ -1142,9 +1179,9 @@ > machtype: : "sparc" > enddef : > >-newdef : defined(__CYGWIN__) >+newdef : defined(CYGWIN) > comment : Cygwin >-vendor : : "intel" >+vendor : defined(M_intel) : "intel" > hosttype: : gethost() > ostype : : getostype() > machtype: : getmach() >Index: contrib/tcsh/nls/C/set1 >=================================================================== >--- contrib/tcsh/nls/C/set1 (revision 309109) >+++ contrib/tcsh/nls/C/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.6 2006/03/02 18:46:45 christos Exp $ >+$ $tcsh: set1,v 1.7 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 Syntax Error >@@ -8,7 +8,7 @@ > 5 No file for $0 > 6 Incomplete [] modifier > 7 $ expansion must end before ] >-8 Bad : modifier in $ (%c) >+8 Bad : modifier in $ '%c' > 9 Subscript error > 10 Badly formed number > 11 No more words >@@ -51,8 +51,8 @@ > 48 Not in while/foreach > 49 No more processes > 50 No match >-51 Missing %c >-52 Unmatched %c >+51 Missing '%c' >+52 Unmatched '%c' > 53 Out of memory > 54 Can't make pipe > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Bad substitute > 91 No previous left hand side > 92 Right hand side too long >-93 Bad ! modifier: %c >+93 Bad ! modifier: '%c' > 94 Modifier failed > 95 Substitution buffer overflow > 96 Bad ! arg selector >@@ -118,7 +118,7 @@ > 115 Out of termcap string space > 116 Usage: settc %s [yes|no] > 117 Unknown capability `%s' >-118 Unknown termcap parameter `%%%c' >+118 Unknown termcap parameter '%%%c' > 119 Too many arguments for `%s' (%d) > 120 `%s' requires %d arguments > 121 Usage: echotc [-v|-s] [<capability> [<args>]] >@@ -137,4 +137,4 @@ > 134 Usage: unlimit [-fh] [limits] > 135 $%S is read-only > 136 No such job >-137 Unknown colorls variable `%c%c' >+137 Unknown colorls variable '%c%c' >Index: contrib/tcsh/nls/C/set20 >=================================================================== >--- contrib/tcsh/nls/C/set20 (revision 309109) >+++ contrib/tcsh/nls/C/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.3 2006/03/02 18:46:45 christos Exp $ >+$ $tcsh: set20,v 1.4 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Invalid key name `%S'\n >@@ -19,7 +19,7 @@ > 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 >+19 -d bind all keys to default editor's bindings (%s)\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 >Index: contrib/tcsh/nls/C/set9 >=================================================================== >--- contrib/tcsh/nls/C/set9 (revision 309109) >+++ contrib/tcsh/nls/C/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.3 2006/03/02 18:46:45 christos Exp $ >+$ $tcsh: set9,v 1.4 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: Null extended-key not allowed.\n >@@ -8,5 +8,5 @@ > 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 >+8 Something must follow: '%c'\n > 9 Octal constant does not fit in a char.\n >Index: contrib/tcsh/nls/Makefile.in >=================================================================== >--- contrib/tcsh/nls/Makefile.in (revision 309109) >+++ contrib/tcsh/nls/Makefile.in (working copy) >@@ -1,4 +1,4 @@ >-# $tcsh: Makefile.in,v 1.13 2012/01/05 16:54:25 christos Exp $ >+# $tcsh: Makefile.in,v 1.16 2014/07/23 18:18:07 christos Exp $ > > CATALOGS= C.cat et.cat finnish.cat french.cat german.cat greek.cat \ > italian.cat ja.cat pl.cat russian.cat spanish.cat ukrainian.cat >@@ -19,7 +19,7 @@ > INSTALLED+=${localedir}/C/LC_MESSAGES/tcsh.cat > ${localedir}/C/LC_MESSAGES/tcsh.cat: C.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > C.cat: ${srcdir}/C/charset ${srcdir}/C/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -27,7 +27,7 @@ > INSTALLED+=${localedir}/et/LC_MESSAGES/tcsh.cat > ${localedir}/et/LC_MESSAGES/tcsh.cat: et.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > et.cat: ${srcdir}/et/charset ${srcdir}/et/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -35,7 +35,7 @@ > INSTALLED+=${localedir}/fi/LC_MESSAGES/tcsh.cat > ${localedir}/fi/LC_MESSAGES/tcsh.cat: finnish.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > finnish.cat: ${srcdir}/finnish/charset ${srcdir}/finnish/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -43,7 +43,7 @@ > INSTALLED+=${localedir}/fr/LC_MESSAGES/tcsh.cat > ${localedir}/fr/LC_MESSAGES/tcsh.cat: french.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > french.cat: ${srcdir}/french/charset ${srcdir}/french/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -51,7 +51,7 @@ > INSTALLED+=${localedir}/de/LC_MESSAGES/tcsh.cat > ${localedir}/de/LC_MESSAGES/tcsh.cat: german.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > german.cat: ${srcdir}/german/charset ${srcdir}/german/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -59,7 +59,7 @@ > INSTALLED+=${localedir}/gr/LC_MESSAGES/tcsh.cat > ${localedir}/gr/LC_MESSAGES/tcsh.cat: greek.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > greek.cat: ${srcdir}/greek/charset ${srcdir}/greek/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -67,7 +67,7 @@ > INSTALLED+=${localedir}/it/LC_MESSAGES/tcsh.cat > ${localedir}/it/LC_MESSAGES/tcsh.cat: italian.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > italian.cat: ${srcdir}/italian/charset ${srcdir}/italian/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -75,7 +75,7 @@ > INSTALLED+=${localedir}/ja/LC_MESSAGES/tcsh.cat > ${localedir}/ja/LC_MESSAGES/tcsh.cat: ja.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > ja.cat: ${srcdir}/ja/charset ${srcdir}/ja/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -83,7 +83,7 @@ > INSTALLED+=${localedir}/pl/LC_MESSAGES/tcsh.cat > ${localedir}/pl/LC_MESSAGES/tcsh.cat: pl.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > pl.cat: ${srcdir}/pl/charset ${srcdir}/pl/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -91,7 +91,7 @@ > INSTALLED+=${localedir}/ru/LC_MESSAGES/tcsh.cat > ${localedir}/ru/LC_MESSAGES/tcsh.cat: russian.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > russian.cat: ${srcdir}/russian/charset ${srcdir}/russian/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >@@ -99,15 +99,15 @@ > INSTALLED+=${localedir}/es/LC_MESSAGES/tcsh.cat > ${localedir}/es/LC_MESSAGES/tcsh.cat: spanish.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > spanish.cat: ${srcdir}/spanish/charset ${srcdir}/spanish/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> > >-INSTALLED+=${localedir}/ru_UA.koi8u/LC_MESSAGES/tcsh.cat >-${localedir}/ru_UA.koi8u/LC_MESSAGES/tcsh.cat: ukrainian.cat >+INSTALLED+=${localedir}/ru_UA/LC_MESSAGES/tcsh.cat >+${localedir}/ru_UA/LC_MESSAGES/tcsh.cat: ukrainian.cat > mkdir -p $(@D) >- $(INSTALL) $< $@ >+ $(INSTALL) $> $^ $@ > > ukrainian.cat: ${srcdir}/ukrainian/charset ${srcdir}/ukrainian/*set[0-9]* > @${CATGEN} $(GENCAT) $@ $^ $> >Index: contrib/tcsh/nls/catgen >=================================================================== >--- contrib/tcsh/nls/catgen (revision 309109) >+++ contrib/tcsh/nls/catgen (working copy) >@@ -3,10 +3,18 @@ > TMP=/tmp/catgen.$$ > trap "rm -f $TMP" 0 1 2 3 15 > >+sortit() { >+ awk '/^\$set/ {print $2, FILENAME}' "$@" | sort -n | cut -d ' ' -f 2 >+} >+ > GENCAT="$1" > shift > OUT="$1" > shift >-cat "$@" > "$TMP" >+CHARSET="$1" >+shift >+cat "${CHARSET}" $(sortit "$@") > "$TMP" >+ > echo "$(basename "$OUT" .cat)" > "${GENCAT}" "$OUT" "$TMP" >+exit 0 >Index: contrib/tcsh/nls/et/set1 >=================================================================== >--- contrib/tcsh/nls/et/set1 (revision 309109) >+++ contrib/tcsh/nls/et/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.4 2011/02/04 18:19:33 christos Exp $ >+$ $tcsh: set1,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 Süntaksi viga >@@ -8,7 +8,7 @@ > 5 $0 jaoks pole faili > 6 Mittetäielik [] muutja > 7 $ laiendus peab lõppema enne ] >-8 Halb : täiendaja $ (%c) >+8 Halb : täiendaja $ '%c' > 9 Viga indeksis > 10 Vigane number > 11 Sõnad on otsas >@@ -51,8 +51,8 @@ > 48 Pole while/foreach sees > 49 Protsessid on otsas > 50 Ei leia >-51 Puuduv %c >-52 Ei leia sümbolit %c >+51 Puuduv '%c' >+52 Ei leia sümbolit '%c' > 53 Mälu on otsas > 54 Toru ei saa luua > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Vigane asendamine > 91 Eelmist vasakut poolt pole > 92 Parem pool on liiga pikk >-93 Vigane ! modifikaator: %c >+93 Vigane ! modifikaator: '%c' > 94 Modifikaator ebaõnnestus > 95 Asenduse puhvri ületäitumine > 96 Vigane ! argumendi valik >@@ -118,7 +118,7 @@ > 115 Termcap sõne on liiga pikk > 116 Kasuta: settc %s [yes|no] > 117 Tundmatu omadus `%s' >-118 Tundmatu termcap parameeter `%%%c' >+118 Tundmatu termcap parameeter '%%%c' > 119 `%s' jaoks on liiga palju argumente (%d) > 120 `%s' nõuab %d argumenti > 121 Kasuta: echotc [-v|-s] [<omadus> [<argumendid>]] >@@ -137,4 +137,4 @@ > 134 Kasuta: unlimit [-fh] [limiidid] > 135 $%S on ainult lugemiseks > 136 Pole sellist tööd >-137 Tundmatu colorls muutuja `%c%c' >+137 Tundmatu colorls muutuja '%c%c' >Index: contrib/tcsh/nls/et/set20 >=================================================================== >--- contrib/tcsh/nls/et/set20 (revision 309109) >+++ contrib/tcsh/nls/et/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.3 2011/02/04 18:19:33 christos Exp $ >+$ $tcsh: set20,v 1.4 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Vigane klahvi nimi `%S'\n >@@ -19,7 +19,7 @@ > 16 -c käsitle COMMAND kui sisemist või välist käsku\n > 17 -v seo kõik klahvid vi seostega\n > 18 -e seo kõik klahvid emacsi seostega\n >-19 -d seo kõik klahvid vaikimisi toimeti seostega\n >+19 -d seo kõik klahvid vaikimisi toimeti seostega (%s)\n > 20 -l esita toimeti käsud koos kirjeldustega\n > 21 -r kustuta KLAHVILT seos\n > 22 -k kasuta KLAHVI kui noole-klahvi sümbolnime\n >Index: contrib/tcsh/nls/et/set9 >=================================================================== >--- contrib/tcsh/nls/et/set9 (revision 309109) >+++ contrib/tcsh/nls/et/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.3 2011/02/04 18:19:34 christos Exp $ >+$ $tcsh: set9,v 1.4 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: Null pikkusega laiend-klahv ei ole lubatud.\n >@@ -8,5 +8,5 @@ > 5 Mõned laiendatud klahvid on sisemise trükipuhvri jaoks liiga pikad > 6 Enumerate: BUG!! Null viit anti\n! > 7 sisendit pole >-8 Midagi peab järgnema: %c\n >+8 Midagi peab järgnema: '%c'\n > 9 kaheksand-konstant ei mahu sümbolisse.\n >Index: contrib/tcsh/nls/finnish/set1 >=================================================================== >--- contrib/tcsh/nls/finnish/set1 (revision 309109) >+++ contrib/tcsh/nls/finnish/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.4 2011/02/04 18:19:34 christos Exp $ >+$ $tcsh: set1,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 Kielioppivirhe >@@ -8,7 +8,7 @@ > 5 Puuttuva tiedosto $0 > 6 Vajavainen [] muunnos > 7 $ -laajennuksen on päätyttävä ennen ']'-merkkiä >-8 Virheellinen : -muunnos $ (%c) >+8 Virheellinen : -muunnos $ '%c' > 9 Indeksivirhe > 10 Virheellinen numero > 11 Liian vähän sanoja >@@ -51,8 +51,8 @@ > 48 Silmukan (while/foreach) ulkopuolella > 49 Lisää prosesseja ei voida luoda > 50 Ei vastaavuuksia (match) >-51 Puuttuva %c >-52 Ylimääräinen/pariton %c >+51 Puuttuva '%c' >+52 Ylimääräinen/pariton '%c' > 53 Muisti loppu > 54 Putkea ei voida luoda > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Virheellinen korvaava merkkijono > 91 Edellistä vasemmanpuolista merkkijonoa ei ole > 92 Oikeanpuolinen merkkijono on liian pitkä >-93 Virheellinen ! -muunnos: %c >+93 Virheellinen ! -muunnos: '%c' > 94 Muunnos epäonnistui > 95 Korvauspuskurin ylivuoto > 96 Virheellinen ! argumenttivalitsin >@@ -118,7 +118,7 @@ > 115 Päätetyypin kuvaukselle (termcap) ei ole tarpeeksi tilaa > 116 Käyttö: settc %s [yes|no] > 117 Tuntematon toiminne `%s' >-118 Tuntematon päätetyypin (termcap) parameteri `%%%c' >+118 Tuntematon päätetyypin (termcap) parameteri '%%%c' > 119 Liian paljon argumentteja käskylle `%s' (%d) > 120 `%s' edellyttää %d argumenttia > 121 Käyttö: echotc [-v|-s] [<toiminne> [<argumentit>]] >@@ -137,4 +137,4 @@ > 134 Käyttö: unlimit [-fh] [rajoitteet (limits)] > 135 Muuttujalle $%S ei voida asettaa arvoa > 136 Viitattua työtä ei ole >-137 Tuntematon colorls-muuttuja `%c%c' >+137 Tuntematon colorls-muuttuja '%c%c' >Index: contrib/tcsh/nls/finnish/set20 >=================================================================== >--- contrib/tcsh/nls/finnish/set20 (revision 309109) >+++ contrib/tcsh/nls/finnish/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.4 2011/02/04 18:19:34 christos Exp $ >+$ $tcsh: set20,v 1.5 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Invalid key name `%S'\n >@@ -19,7 +19,7 @@ > 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 >+19 -d bind all keys to default editor's bindings (%s)\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 >Index: contrib/tcsh/nls/finnish/set3 >=================================================================== >--- contrib/tcsh/nls/finnish/set3 (revision 309109) >+++ contrib/tcsh/nls/finnish/set3 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set3,v 1.4 2011/02/04 18:19:34 christos Exp $ >+$ $tcsh: set3,v 1.5 2015/09/01 14:08:28 kim Exp $ > $ Editor function descriptions > $set 3 > 1 Siirry taaksepäin yksi merkki >@@ -114,11 +114,11 @@ > 111 Vi: peruuta muutos > 112 Vi: siirry rivin alkuun > 113 Suorita 'which' tälle komennolle >-114 Liimaa/lisää leikkauspuskurin sisältö kursorin paikalle >+114 Liitä leikkauspuskurin sisältö kursorin paikalle > 115 Korvaa viimeksi liimattu teksti aikaisemmalla leikkauksella >-116 (WIN32 only) Copy cut buffer to system clipboard >-117 (WIN32 only) Paste clipboard buffer at cursor position >-118 (WIN32 only) Convert each '/' in next word to '\\\\' >-119 (WIN32 only) Convert each '/' in previous word to '\\\\' >-120 (WIN32 only) Page visible console window up >-121 (WIN32 only) Page visible console window down >+116 (Vain WIN32) Kopioi leikkauspuskuri leikepöydälle >+117 (Vain WIN32) Liitä leikepöydän sisältö kursorin paikalle >+118 (Vain WIN32) Muuta jokainen '/' seuraavassa sanassa merkkijonoksi '\\\\' >+119 (Vain WIN32) Muuta jokainen '/' edellisessä sanassa merkkijonoksi '\\\\' >+120 (Vain WIN32) Näytä konsoli-ikkunan edellinen sivu >+121 (Vain WIN32) Näytä konsoli-ikkunan seuraava sivu >Index: contrib/tcsh/nls/finnish/set9 >=================================================================== >--- contrib/tcsh/nls/finnish/set9 (revision 309109) >+++ contrib/tcsh/nls/finnish/set9 (working copy) >@@ -1,12 +1,12 @@ >-$ $tcsh: set9,v 1.3 2011/02/04 18:19:34 christos Exp $ >+$ $tcsh: set9,v 1.5 2015/09/01 14:08:28 kim Exp $ > $ ed.xmap.c > $set 9 >-1 AddXkey: Null extended-key not allowed.\n >+1 AddXkey: Tyhjää laajennettua näppäintä ei sallita.\n > 2 AddXkey: sequence-lead-in command not allowed\n >-3 DeleteXkey: Null extended-key not allowed.\n >+3 DeleteXkey: Tyhjää laajennettua näppäintä ei sallita.\n > 4 Sitomaton laajennettu näppäin "%S"\n >-5 Jotkin laajennetut näppäimet ovat liian pitkiä sisäiseen tulostuspuskurille >+5 Jotkin laajennetut näppäimet ovat liian pitkiä sisäiselle tulostuspuskurille > 6 Enumerate: VIKA!! Välitetty null-osoitin\n! > 7 ei syötettä >-8 Jotain on seurattava: %c\n >+8 Jotain on seurattava: '%c'\n > 9 Oktaalivakio ei mahdu char-tyypin muuttujaan.\n >Index: contrib/tcsh/nls/french/set1 >=================================================================== >--- contrib/tcsh/nls/french/set1 (revision 309109) >+++ contrib/tcsh/nls/french/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.5 2011/02/04 18:19:35 christos Exp $ >+$ $tcsh: set1,v 1.6 2015/05/26 17:38:25 christos Exp $ > $ Messages d 'erreur > $set 1 > 1 Erreur de syntaxe >@@ -8,7 +8,7 @@ > 5 Pas de fichier pour $0 > 6 Modificateur [] incomplet > 7 $ l'expansion doit se terminer avant ] >-8 Mauvais : modificateur dans $ (%c) >+8 Mauvais : modificateur dans $ '%c' > 9 Erreur d'indice > 10 Numéro mal formé > 11 Plus de mots >@@ -51,8 +51,8 @@ > 48 Vous n'êtes pas dans une boucle while ou foreach > 49 Plus de processus > 50 Pas de correspondance >-51 %c manquant >-52 %c sans correspondance >+51 '%c' manquant >+52 '%c' sans correspondance > 53 Mémoire insuffisante > 54 Impossible de créer un tube > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Remplacement incorrect > 91 Pas de partie gauche précédente > 92 Partie droite trop longue >-93 Modificateur ! incorrect: %c >+93 Modificateur ! incorrect: '%c' > 94 Echec du modificateur > 95 Dépassement de capacité de la mémoire tampon de substitution > 96 Sélecteur d'argument ! incorrect >@@ -118,7 +118,7 @@ > 115 Pas assez de place pour la chaine termcap > 116 Syntaxe: settc %s [yes|no] > 117 Capacité `%s' inconnue >-118 Paramètre termcap inconnu `%%%c' >+118 Paramètre termcap inconnu '%%%c' > 119 Trop d'arguments pour `%s' (%d) > 120 `%s' nécessite %d arguments > 121 Syntaxe: echotc [-v|-s] [<capacité> [<args>]] >@@ -137,4 +137,4 @@ > 134 Syntaxe: unlimit [-fh] [limites] > 135 $%S est en lecture seule > 136 Pas de travail de ce type >-137 Unknown colorls variable `%c%c' >+137 Unknown colorls variable '%c%c' >Index: contrib/tcsh/nls/french/set20 >=================================================================== >--- contrib/tcsh/nls/french/set20 (revision 309109) >+++ contrib/tcsh/nls/french/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.3 2011/02/04 18:19:35 christos Exp $ >+$ $tcsh: set20,v 1.4 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Nom de touche incorrect `%S'\n >@@ -19,7 +19,7 @@ > 16 -c interprète COMMANDE comme une commande intégrée ou externe\n > 17 -v redéfinit toutes les touches pour vi\n > 18 -e redéfinit toutes les touches pour emacs\n >-19 -d redéfinit toutes les touches pour de l'éditeur par defaut\n >+19 -d redéfinit toutes les touches pour de l'éditeur par defaut (%s)\n > 20 -l liste les commandes de l'éditeur avec descriptions\n > 21 -r enlève la correspondance pour la TOUCHE\n > 22 -k interprète TOUCHE comme un nom de touche de direction symbolique\n >Index: contrib/tcsh/nls/french/set9 >=================================================================== >--- contrib/tcsh/nls/french/set9 (revision 309109) >+++ contrib/tcsh/nls/french/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.3 2011/02/04 18:19:36 christos Exp $ >+$ $tcsh: set9,v 1.4 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: touche d'extension nulle pas autorisé.\n >@@ -8,5 +8,5 @@ > 5 Certaines touches d'extension trop longues pour tampon d'impression interne > 6 Enumerate: BUG!! Pointeur Null passé!\n > 7 pas d'entrée >-8 Quelque chose doit suivre: %c\n >+8 Quelque chose doit suivre: '%c'\n > 9 Une constante Octale ne peut pas tenir dans un caractère.\n >Index: contrib/tcsh/nls/german/set1 >=================================================================== >--- contrib/tcsh/nls/german/set1 (revision 309109) >+++ contrib/tcsh/nls/german/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.7 2011/02/04 18:19:36 christos Exp $ >+$ $tcsh: set1,v 1.8 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 Syntaxfehler >@@ -8,7 +8,7 @@ > 5 Keine Datei für $0 > 6 Unvollständiger [] Modifizierer > 7 $ Ausweitung muà vor ] enden >-8 Falscher : Modifizierer in $ (%c) >+8 Falscher : Modifizierer in $ '%c' > 9 Indexfehler > 10 Falsche Nummer > 11 Keine Worte mehr >@@ -51,8 +51,8 @@ > 48 Nicht in while/foreach > 49 Keine Prozesse mehr > 50 Kein Treffer >-51 Fehlendes %c >-52 Ãberflüssiges %c >+51 Fehlendes '%c' >+52 Ãberflüssiges '%c' > 53 Kein Speicher mehr > 54 Kann keine Pipe erzeugen > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Falsche Ersetzung > 91 Keine vorhergehende linke Seite > 92 Rechte Seite zu lang >-93 Falscher ! Modifizierer: %c >+93 Falscher ! Modifizierer: '%c' > 94 Modifizierer fehlgeschlagen > 95 Ãberlauf des Ersetzungspuffers > 96 Falscher ! Argumentbezeichner >@@ -118,7 +118,7 @@ > 115 Kein Platz mehr für Termcap-Eintrag > 116 Benutzung: settc %s [yes|no] > 117 Unbekannte Fähigkeit `%s' >-118 Unbekannter Termcap-Parameter `%%%c' >+118 Unbekannter Termcap-Parameter '%%%c' > 119 Zu viele Argumente für `%s' (%d) > 120 `%s' erfordert %d Argumente > 121 Benutzung: echotc [-v|-s] [<Fähigkeit> [<Argumente>]] >@@ -137,4 +137,4 @@ > 134 Benutzung: unlimit [-fh] [Grenzen] > 135 $%S ist nur lesbar > 136 Kein solcher Job >-137 Unknown colorls variable `%c%c' >+137 Unknown colorls variable '%c%c' >Index: contrib/tcsh/nls/german/set20 >=================================================================== >--- contrib/tcsh/nls/german/set20 (revision 309109) >+++ contrib/tcsh/nls/german/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.4 2011/02/04 18:19:36 christos Exp $ >+$ $tcsh: set20,v 1.5 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Ungültiger Tastenname `%S'\n >@@ -19,7 +19,7 @@ > 16 -c belege einen Unix-Befehl anstelle eines Befehls\n > 17 -v initialisiere Belegungen mit Standard-Vi-Belegungen\n > 18 -e initialisiere Belegungen mit Standard-Emacs-Belegungen\n >-19 -d initialisiere Belegungen mit Standard-Belegungen\n >+19 -d initialisiere Belegungen mit Standard-Belegungen (%s)\n > 20 -l zeige verfügbare Funktionen mit Beschreibungen an\n > 21 -r entferne Belegung eines Tastes\n > 22 -k belege Pfeiltaste mit Namen in In-String\n >Index: contrib/tcsh/nls/german/set9 >=================================================================== >--- contrib/tcsh/nls/german/set9 (revision 309109) >+++ contrib/tcsh/nls/german/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.5 2011/02/04 18:19:37 christos Exp $ >+$ $tcsh: set9,v 1.6 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: Null extended-key not allowed.\n >@@ -8,5 +8,5 @@ > 5 Some extended keys too long for internal print buffer > 6 Enumerate: BUG!! Null ptr passed\n! > 7 keine Eingabe >-8 Es muà noch etwas folgen: %c\n >+8 Es muà noch etwas folgen: '%c'\n > 9 Oktal-Konstante paÃt nicht in ein Zeichen.\n >Index: contrib/tcsh/nls/greek/set1 >=================================================================== >--- contrib/tcsh/nls/greek/set1 (revision 309109) >+++ contrib/tcsh/nls/greek/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.5 2011/02/04 18:19:37 christos Exp $ >+$ $tcsh: set1,v 1.6 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 ÎÎ¬Î¸Î¿Ï ÏÏνÏαξη >@@ -8,7 +8,7 @@ > 5 Îεν Ï ÏάÏÏει αÏÏείο γιά Ïο $0 > 6 ÎλλιÏÎ®Ï Î¼ÎµÏαÏÏοÏÎÎ±Ï [] > 7 ΠανάÏÏÏ Î¾Î· ÏÎ¿Ï $ ÏÏÎÏει να ÏελειÏνει ÏÏιν Ïο ] >-8 ÎÎ¬Î¸Î¿Ï Î¼ÎµÏαÏÏοÏÎÎ±Ï : ÏÏο $ (%c) >+8 ÎÎ¬Î¸Î¿Ï Î¼ÎµÏαÏÏοÏÎÎ±Ï : ÏÏο $ '%c' > 9 ÎÎ¬Î¸Î¿Ï ÏÏιÏμα > 10 ÎακοÏÏημαÏιÏμÎÎ½Î¿Ï Î±ÏιθμÏÏ > 11 Îεν Ï ÏάÏÏÎ¿Ï Î½ Î¬Î»Î»ÎµÏ Î»ÎÎ¾ÎµÎ¹Ï >@@ -51,8 +51,8 @@ > 48 ÎκÏÏÏ while/foreach > 49 Îεν Ï ÏάÏÏÎ¿Ï Î½ Î¬Î»Î»ÎµÏ Î´Î¹ÎµÏγαÏÎ¯ÎµÏ > 50 Îεν Ï ÏάÏÏει ÏαίÏιαÏμα >-51 ÎÏÏν %c >-52 Îη ÏαιÏιαÏμÎνο %c >+51 ÎÏÏν '%c' >+52 Îη ÏαιÏιαÏμÎνο '%c' > 53 Îεν Ï ÏάÏÏει άλλη μνήμη > 54 Îεν μÏοÏÏ Î½Î± Î´Î·Î¼Î¹Î¿Ï ÏγήÏÏ pipe > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 ÎÎ¬Î¸Î¿Ï Î±Î½ÏικαÏάÏÏαÏη > 91 Îεν Ï ÏάÏÏει ÏÏοηγοÏμενο αÏιÏÏεÏÏ Î¼ÎÏÎ¿Ï > 92 Tο δεξί μÎÏÎ¿Ï ÎµÎ¯Î½Î±Î¹ ÏÎ¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿ >-93 ÎακÏÏ Î¼ÎµÏαÏÏοÏÎÎ±Ï !: %c >+93 ÎακÏÏ Î¼ÎµÏαÏÏοÏÎÎ±Ï !: '%c' > 94 ΠμεÏαÏÏοÏÎÎ±Ï Î±ÏÎÏÏ Ïε > 95 Î¥ÏεÏÏείλιÏη ÏÎ¿Ï buffer ανÏικαÏαÏÏάÏεÏν > 96 ÎÎ¬Î¸Î¿Ï ÎµÏιλογÎÎ±Ï Î¿ÏίÏμαÏÎ¿Ï ! >@@ -118,7 +118,7 @@ > 115 Îεν Ï ÏάÏÏει ÏÏÏÎ¿Ï Î³Î¹Î¬ Ïο termcap string > 116 ΧÏήÏη: settc %s [yes|no] > 117 ÎγνÏÏÏη ικανÏÏηÏα `%s' >-118 ÎγνÏÏÏη ÏαÏάμεÏÏÎ¿Ï ÏÎ¿Ï termcap `%%%c' >+118 ÎγνÏÏÏη ÏαÏάμεÏÏÎ¿Ï ÏÎ¿Ï termcap '%%%c' > 119 Î¥ÏεÏβολικά Ïολλά οÏίÏμαÏα γιά Ïο `%s' (%d) > 120 Tο `%s' αÏαιÏεί %d οÏίÏμαÏα > 121 ΧÏήÏη: echotc [-v|-s] [<ικανÏÏηÏα> [<οÏίÏμαÏα>]] >@@ -137,4 +137,4 @@ > 134 ΧÏήÏη: unlimit [-fh] [ÏÏια] > 135 Tο $%S είναι μÏνο γιά διάβαÏμα > 136 Îεν Ï ÏάÏÏει ÏÎÏοια εÏγαÏία >-137 Unknown colorls variable `%c%c' >+137 Unknown colorls variable '%c%c' >Index: contrib/tcsh/nls/greek/set20 >=================================================================== >--- contrib/tcsh/nls/greek/set20 (revision 309109) >+++ contrib/tcsh/nls/greek/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.5 2011/02/04 18:19:37 christos Exp $ >+$ $tcsh: set20,v 1.6 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 ÎÎºÏ Ïο Ïνομα ÏλήκÏÏÎ¿Ï `%S'\n >@@ -19,7 +19,7 @@ > 16 -c εÏμηνεία ÎÎΤÎÎÎÏ ÏÏ ÎµÏÏÏεÏÎ¹ÎºÎ®Ï Î® εξÏÏεÏÎ¹ÎºÎ®Ï ÎµÎ½ÏολήÏ\n > 17 -v ÏÏ ÏÏÎÏιÏη ÏλÏν ÏÏν ÏλήκÏÏÏν Ïε ανÏιÏÏοιÏία vi\n > 18 -e ÏÏ ÏÏÎÏιÏη ÏλÏν ÏÏν ÏλήκÏÏÏν Ïε ανÏιÏÏοιÏία emacs\n >-19 -d ÏÏ ÏÏÎÏιÏη ÏλÏν ÏÏν ÏλήκÏÏÏν ÏÏην default ÏÎ¿Ï editor\n >+19 -d ÏÏ ÏÏÎÏιÏη ÏλÏν ÏÏν ÏλήκÏÏÏν ÏÏην default ÏÎ¿Ï editor (%s)\n > 20 -l εμÏάνιÏη ÏÏν ενÏολÏν ÏÎ¿Ï editor με ÏεÏιγÏαÏÎÏ\n > 21 -r καÏάÏγηÏη ÏÏ ÏÏÎÏιÏÎ·Ï ÏÎ¿Ï Î ÎÎÎΤΡÎÏ \n > 22 -k εÏμηνεία Î ÎÎÎΤΡÎÏ ÏÏ ÏÏ Î¼Î²Î¿Î»Î¹ÎºÏ Ïνομα ÏλήκÏÏÎ¿Ï Î²ÎÎ»Î¿Ï Ï\n >Index: contrib/tcsh/nls/greek/set9 >=================================================================== >--- contrib/tcsh/nls/greek/set9 (revision 309109) >+++ contrib/tcsh/nls/greek/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.4 2011/02/04 18:19:38 christos Exp $ >+$ $tcsh: set9,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: δεν εÏιÏÏÎÏεÏαι Î¼Î·Î´ÎµÎ½Î¹ÎºÏ extended-key.\n >@@ -8,5 +8,5 @@ > 5 ÎεÏικά extended keys είναι ÏÎ¿Î»Ï Î¼ÎµÎ³Î¬Î»Î± γιά Ïον εÏÏÏεÏÎ¹ÎºÏ print buffer > 6 Enumerate: BUG!! Î ÎÏαÏμα Î¼Î·Î´ÎµÎ½Î¹ÎºÎ¿Ï pointer!\n > 7 δεν Ï ÏάÏÏει είÏÎ¿Î´Î¿Ï >-8 ÎάÏι ÏÏÎÏει να Î±ÎºÎ¿Î»Î¿Ï Î¸ÎµÎ¯: %c\n >+8 ÎάÏι ÏÏÎÏει να Î±ÎºÎ¿Î»Î¿Ï Î¸ÎµÎ¯: '%c'\n > 9 ΠοκÏαδική ÏÏαθεÏά δε ÏÏÏάει ÏÏο μÎÎ³ÎµÎ¸Î¿Ï ÎµÎ½ÏÏ char.\n >Index: contrib/tcsh/nls/italian/set1 >=================================================================== >--- contrib/tcsh/nls/italian/set1 (revision 309109) >+++ contrib/tcsh/nls/italian/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.3 2011/02/04 18:19:38 christos Exp $ >+$ $tcsh: set1,v 1.4 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 Errore di Sintassi >@@ -8,7 +8,7 @@ > 5 Nessun file per $0 > 6 Modificatore [] incompleto > 7 L'espansione $ deve terminare prima di ] >-8 Modificatore sbagliato in $ (%c) >+8 Modificatore sbagliato in $ '%c' > 9 Errore di indice > 10 Numero non corretto > 11 Sono senza parole >@@ -51,8 +51,8 @@ > 48 Non in un while/foreach > 49 Ho finito i processi > 50 Corrispondenza non esistente >-51 %c mancante >-52 %c non corrispondente >+51 '%c' mancante >+52 '%c' non corrispondente > 53 Memoria esaurita > 54 Non posso creare una pipe > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Sostituzione sbagliata > 91 Non esiste il precedente lato sinistro > 92 Lato destro troppo lungo >-93 Modificatore ! errato: %c >+93 Modificatore ! errato: '%c' > 94 Il modificatore non ha funzionato > 95 Overflow di buffer nella sostituzione > 96 Errato selettore ! di argomento >@@ -118,7 +118,7 @@ > 115 Al di fuori dello spazio stringa del termcap > 116 Utilizzo: settc %s [yes|no] > 117 Capacità `%s' sconosciuta >-118 Parametro del termcap `%%%c' sconosciuto >+118 Parametro del termcap '%%%c' sconosciuto > 119 Troppi argomenti per `%s' (%d) > 120 `%s' richiede %d argomenti > 121 Utilizzo: echotc [-v|-s] [<capacità > [<argomenti>]] >@@ -137,4 +137,4 @@ > 134 Utilizzo: unlimit [-fh] [limiti] > 135 $%S è a sola lettura > 136 Non esiste il lavoro >-137 Variabile `%c%c colorls' sconosciuta >+137 Variabile '%c%c colorls' sconosciuta >Index: contrib/tcsh/nls/italian/set20 >=================================================================== >--- contrib/tcsh/nls/italian/set20 (revision 309109) >+++ contrib/tcsh/nls/italian/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.3 2011/02/04 18:19:39 christos Exp $ >+$ $tcsh: set20,v 1.4 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Nome di tasto non corretto `%S'\n >@@ -19,7 +19,7 @@ > 16 -c interpreta COMANDO come un comando interno o esterno\n > 17 -v definisce tutti i tasti alla 'vi'\n > 18 -e definisce tutti i tasti alla 'emacs'\n >-19 -d definisce tutti i tasti in base all'editor di default\n >+19 -d definisce tutti i tasti in base all'editor di default (%s)\n > 20 -l elenca i comandi di modifica testo con relativa descrizione\n > 21 -r rimuove la definizione per TASTO\n > 22 -k interpreta TASTO come un nome simbolico di tasto freccia\n >Index: contrib/tcsh/nls/italian/set9 >=================================================================== >--- contrib/tcsh/nls/italian/set9 (revision 309109) >+++ contrib/tcsh/nls/italian/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.2 2006/03/02 18:46:47 christos Exp $ >+$ $tcsh: set9,v 1.3 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: tasto esteso nullo non ammesso.\n >@@ -8,5 +8,5 @@ > 5 Alcuni tasti estesi sono troppo grandi per il buffer interno di stampa > 6 Enumerate: BACO!! ho ricevuto un puntatore nullo\n! > 7 niente in ingresso >-8 Qualcosa deve seguire: %c\n >+8 Qualcosa deve seguire: '%c'\n > 9 Costante ottale non adeguata per un char.\n >Index: contrib/tcsh/nls/ja/set1 >=================================================================== >--- contrib/tcsh/nls/ja/set1 (revision 309109) >+++ contrib/tcsh/nls/ja/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.6 2011/02/04 18:19:39 christos Exp $ >+$ $tcsh: set1,v 1.7 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 ææ³ãééã£ã¦ãã¾ã >@@ -8,7 +8,7 @@ > 5 $0 ç¨ã®ãã¡ã¤ã«ãããã¾ãã > 6 [] 修飾åãä¸å®å ¨ã§ã > 7 $ å±é㯠] ã®åã«çµããå¿ è¦ãããã¾ã >-8 $ å ã® : 修飾åãééã£ã¦ãã¾ã (%c) >+8 $ å ã® : 修飾åãééã£ã¦ãã¾ã '%c' > 9 é åã®æ·»ãåãééã£ã¦ãã¾ã > 10 çªå·ãæ£ããæ¸å¼ã«ãªã£ã¦ãã¾ãã > 11 æååã¯ããããã¾ãã >@@ -51,8 +51,8 @@ > 48 while/foreachã®ä¸ã§ã¯ããã¾ãã > 49 ããã»ã¹ãçæã§ãã¾ãã > 50 ç §åãã¿ã¼ã³ã«åãã¾ãã >-51 %c ãæ¬ ãã¦ããç®æãããã¾ã >-52 %c ã対å¿ãã¾ãã >+51 '%c' ãæ¬ ãã¦ããç®æãããã¾ã >+52 '%c' ã対å¿ãã¾ãã > 53 ã¡ã¢ãªãä¸è¶³ãã¦ãã¾ã > 54 ãã¤ããä½ãã¾ãã > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 䏿£ãªç½®æã§ã > 91 ç´åã®å·¦ãµã¤ããããã¾ãã > 92 å³ãµã¤ããé·éãã¾ã >-93 ééã£ã ! 修飾åã§ã: %c >+93 ééã£ã ! 修飾åã§ã: '%c' > 94 修飾åã®å¤±æã§ã > 95 ç½®æãããã¡ããªã¼ãã¼ããã¼ãã¾ãã > 96 ééã£ã ! 弿°ã®ã»ã¬ã¯ã¿ã¼ã§ã >@@ -118,7 +118,7 @@ > 115 termcapã®æååé åä¸è¶³ã§ã > 116 å½¢å¼: settc %s [yes|no] > 117 ç¥ããªãcapability `%s' >-118 ç¥ããªãtermcapãã©ã¡ã¿ `%%%c' >+118 ç¥ããªãtermcapãã©ã¡ã¿ '%%%c' > 119 `%s' ã«å¯¾ãã弿°ãå¤éãã¾ã (%d) > 120 `%s' ã«ã¯ %d 弿°ãå¿ è¦ã§ã > 121 å½¢å¼: echotc [-v|-s] [<capability> [<args>]] >@@ -137,4 +137,4 @@ > 134 å½¢å¼: unlimit [-fh] [limits] > 135 $%S ã¯èªåå°ç¨ã§ã > 136 jobãè¦ã¤ããã¾ãã >-137 䏿ã®colorls夿°ã§ã `%c%c' >+137 䏿ã®colorls夿°ã§ã '%c%c' >Index: contrib/tcsh/nls/pl/README >=================================================================== >--- contrib/tcsh/nls/pl/README (nonexistent) >+++ contrib/tcsh/nls/pl/README (working copy) >@@ -0,0 +1,3 @@ >+T³umaczenia dokona³ Pawe³ Niewiadomski <new@linuxpl.org>. >+Licencja GPL. Wszelkie informacje o b³êdach proszê kierowaæ do mnie >+(chcia³bym aby t³umaczenie to by³o jak najlepsze) >\ No newline at end of file >Index: contrib/tcsh/nls/pl/charset >=================================================================== >--- contrib/tcsh/nls/pl/charset (nonexistent) >+++ contrib/tcsh/nls/pl/charset (working copy) >@@ -0,0 +1,3 @@ >+$ codeset=UTF-8 >+$set 255 >+1 UTF-8 >Index: contrib/tcsh/nls/pl/set1 >=================================================================== >--- contrib/tcsh/nls/pl/set1 (nonexistent) >+++ contrib/tcsh/nls/pl/set1 (working copy) >@@ -0,0 +1,140 @@ >+$ $tcsh: set1,v 1.5 1998/06/27 12:27:55 christos Exp $ >+$ Error messages >+$set 1 >+1 BÅÄ d skÅadni >+2 %s jest niedozwolone >+3 Zbyt dÅugie sÅowo >+4 $< zbyt dÅuga linia >+5 Brak pliku dla $0 >+6 Niekompletny modyfikator [] >+7 ekspansja $ musi zakoÅczyÄ siÄ przed ] >+8 BÅÄ d : modyfikator w $ '%c' >+9 BÅÄ d subskrypcji >+10 Źle stworzona liczba >+11 Brak sÅów >+12 Brakuje nazwy pliku >+13 WewnÄtrzny bÅÄ d podczas dopasowywania >+14 Nie znaleziono polecenia >+15 Zbyt maÅo argumentów >+16 Zbyt dużo argumentów >+17 Zbyt niebezpiecznie aliasowaÄ >+18 Pusty if >+19 NieprawidÅowy then >+20 SÅowa nie sÄ w nawiasach >+21 %s nie zostaÅ znaleziony >+22 NieprawidÅowa maska >+23 Nie ma takiego limitu >+24 Zbyt duży argument >+25 NieprawidÅowy, lub nieznany wspóÅczynnik skali >+26 Niezdefiniowana zmienna >+27 Stos katalogów nie jest aż tak gÅÄboki >+28 ZÅy numer sygnaÅu >+29 Nieznany sygnaÅ; kill -l pokaże znane sygnaÅy >+30 Nazwa zmiennej musi zaczynaÄ siÄ od litery >+31 Nazwa zmiennej jest zbyt dÅuga >+32 Nazwa zmiennej musi zawieraÄ znaki alfanumeryczne >+33 Brak kontroli pracami w tej powÅoce >+34 BÅÄ d skÅadni wyrażenia >+35 Brak katalogu domowego >+36 Nie mogÄ przejÅÄ do katalogu domowego >+37 NieprawidÅowe puste polecenie >+38 Wyrażenie pozbawione przyporzÄ dkowania >+39 Nieznany operator >+40 Niejasne >+41 %s: Plik istnieje >+42 Argument dla -c zakoÅczony jest backslashem >+43 Przerwano >+44 Za duża wartoÅÄ przyporzÄ dkowania >+45 PrzepeÅnienie linii >+46 Brak takiej pracy >+47 Z terminala nie mogÄ >+48 Nie w while/foreach >+49 Brak innych procesów >+50 Brak pasujÄ cych >+51 Brakuje '%c' >+52 Niedopasowany '%c' >+53 Brak pamiÄci >+54 Nie mogÄ stworzyÄ potoku >+55 %s: %s >+56 %s >+57 Użycie: jobs [ -l ] >+58 Argumentami powinny byÄ identyfikatory prac lub procesów >+59 Nie ma aktualnej pracy >+60 Brak poprzednich prac >+61 Brak prac pasujÄ cych do wzorca >+62 Zagnieżdżenie fork > %d; prawdopodobnie pÄtla `...` >+63 Brak kontroli pracami w podpowÅokach >+64 BÅÄ d synchronizacji: Proces %d nie zostaÅ znaleziony >+65 %sIstniejÄ uÅpione prace >+66 %sIstniejÄ zatrzymane prace >+67 Brak innych katalogów >+68 Stos katalogów jest pusty >+69 ZÅy katalog >+70 Użycie: %s [-%s]%s >+71 Brak operandu dla flagi -h >+72 To nie jest powÅoka logowania >+73 Dzielenie przez 0 >+74 Modula przez 0 >+75 ZÅa skala; czy myÅlaÅeÅ o "%s"? >+76 Nie można zatrzymaÄ powÅoki logowania (na razie) >+77 Nieznany użytkownik: %s >+78 Zmienna $home nie jest ustawiona >+79 Użycie: history [-%s] [# liczba zdarzeÅ] >+80 $, ! i < sÄ niedozwolone z $#, lub $? >+81 Znak nowej linii w nazwie zmiennej >+82 * jest zabronione z $# i $? >+83 $?<cyfra> lub $#<cyfra> sÄ zabronione >+84 Nielegalna nazwa zmiennej >+85 Znak nowej linii w indeksie zmiennych >+86 PrzepeÅnienie bufora ekspansji >+87 SÅadnia zmiennej >+88 ZÅa forma ! >+89 Brak poprzedniego dopasowania >+90 ZÅe dopasowanie >+91 No previous left hand side >+92 Right hand side too long >+93 ZÅy modyfikator ! : '%c' >+94 Modyfikator zawiódÅ >+95 PrzepeÅnienie bufora dopasowania >+96 ZÅy ! selektor argumentów >+97 Brak poprzedniego wyszukiwania >+98 %s: Zdarzenie nie zostaÅo znalezione >+99 Zbyt wiele ) >+100 Zbyt wiele ( >+101 Źle wstawiony ( >+102 Brakuje nazwy dla przekierowania >+103 Niejasne przekierowanie wyjÅcia >+104 Nie można << wewnÄ trz () >+105 Niejasne przekierowanie wejÅcia >+106 Źle wstawione () >+107 ZapÄtlenie siÄ aliasów >+108 Zmienna $watch nie zostaÅa ustawiona >+109 Brak zaplanowanych prac >+110 Użycie: sched -<item#>.\nUżycie: sched [+]hh:mm <polecenie> >+111 Nie ma aż tylu zaplanowanych prac >+112 Brak programu do uruchomienia >+113 NieprawidÅowy czas dla pracy >+114 Czas relatywny jest sprzeczny z am/pm >+115 Brak miejsc w ÅaÅcuchu termcap >+116 Użycie: settc %s [yes|no] >+117 Nieznana zdolnoÅÄ `%s' >+118 Nieznany parametr termcap '%%%c' >+119 Zbyt wiele argumentów dla `%s' (%d) >+120 `%s' requires %d arguments >+121 Użycie: echotc [-v|-s] [<zdolnoÅÄ> [<argumenty>]] >+122 %s: %s. NieprawidÅowa architektura >+123 !# ZapÄtlenie siÄ historii >+124 ZnieksztaÅcony zapytanie na temat pliku >+125 PrzepeÅnienie selektora >+126 Nieznana opcja: `-%s'\nUżycie: %s [ -bcdefilmnqstvVxX -Dnazwa[=wartoÅÄ] ] [ argument ... ] >+127 Nieznana opcja: `-%s'\nUżycie: %s [ -bcdefFilmnqstvVxX ] [ argument ... ] >+128 Nieznana opcja: `-%s'\nUżycie: %s [ -bcdefilmnqstvVxX ] [ argument ... ] >+129 \nNieprawidÅowe dopeÅnienie: "%s" >+130 \nNieprawidÅowe %s: '%c' >+131 \nBrakuje separatora '%c' po %s "%s" >+132 \nNiekompletne %s: "%s" >+133 Brak operandu dla flagi -m >+134 Użycie: unlimit [-fh] [limity] >+135 $%S jest tylko-do-odczytu >+136 Brak takiej pracy >+137 Nieznana zmienna colorls '%c%c' >Index: contrib/tcsh/nls/pl/set10 >=================================================================== >--- contrib/tcsh/nls/pl/set10 (nonexistent) >+++ contrib/tcsh/nls/pl/set10 (working copy) >@@ -0,0 +1,8 @@ >+$ $tcsh: set10,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ ma.setp.c >+$set 10 >+1 setpath: nieprawidÅowe polecenie '%s'.\n >+2 setpath: za maÅo argumentów dla polecenia '%s'.\n >+3 setpath: brakuje wartoÅci w Åcieżce '%s'\n >+4 setpath: %s nie zostaÅ znaleziony w %s\n >+5 setpath: %d nie jest prawidÅowÄ pozycjÄ w %s\n >Index: contrib/tcsh/nls/pl/set11 >=================================================================== >--- contrib/tcsh/nls/pl/set11 (nonexistent) >+++ contrib/tcsh/nls/pl/set11 (working copy) >@@ -0,0 +1,10 @@ >+$ $tcsh: set11,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ sh.c >+$set 11 >+1 Uwaga: brak dostÄpu do tty (%s).\n >+2 Innymi sÅowy brak zarzÄ dzania pracami w tej powÅoce.\n >+3 Masz %d wiadomoÅci.\n >+4 Masz %d wiadomoÅci w %s.\n >+5 Masz %spocztÄ.\n >+6 nowÄ >+7 Masz %spocztÄ w %s.\n >Index: contrib/tcsh/nls/pl/set12 >=================================================================== >--- contrib/tcsh/nls/pl/set12 (nonexistent) >+++ contrib/tcsh/nls/pl/set12 (working copy) >@@ -0,0 +1,4 @@ >+$ $tcsh: set12,v 1.3 1996/04/26 20:31:52 christos Exp $ >+$ sh.dir.c >+$set 12 >+1 %s: PróbujÄ wystartowaÄ z "%s"\n >Index: contrib/tcsh/nls/pl/set13 >=================================================================== >--- contrib/tcsh/nls/pl/set13 (nonexistent) >+++ contrib/tcsh/nls/pl/set13 (working copy) >@@ -0,0 +1,13 @@ >+$ $tcsh: set13,v 1.2 1995/03/19 18:07:15 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 maska odpluskwiania = 0x%08x\n >+4 %d trafieÅ, %d chybieÅ, %d%%\n >+5 %S: polecenie wbudowane w powÅokÄ.\n >+6 %S: Nie znaleziono polecenia.\n >+7 gdzie: / w poleceniu nie ma sensu\n >+8 %S jest aliasem do >+9 %S jest wbudowane w powÅokÄ\n >+10 chybieÅ hash: >Index: contrib/tcsh/nls/pl/set14 >=================================================================== >--- contrib/tcsh/nls/pl/set14 (nonexistent) >+++ contrib/tcsh/nls/pl/set14 (working copy) >@@ -0,0 +1,6 @@ >+$ $tcsh: set14,v 1.3 1998/11/24 18:18:06 christos Exp $ >+$ sh.file.c >+$set 14 >+1 \nKurcze!! Zbyt wiele %s!!\n >+2 nazw w pliku haseÅ >+3 pliki >Index: contrib/tcsh/nls/pl/set15 >=================================================================== >--- contrib/tcsh/nls/pl/set15 (nonexistent) >+++ contrib/tcsh/nls/pl/set15 (working copy) >@@ -0,0 +1,7 @@ >+$ $tcsh: set15,v 1.3 1996/10/19 17:52:32 christos Exp $ >+$ sh.func.c >+$set 15 >+1 %s: %s: Nie mogÄ limitowaÄ %s%s\n >+2 usuÅ >+3 ustaw >+4 \040twardy >Index: contrib/tcsh/nls/pl/set16 >=================================================================== >--- contrib/tcsh/nls/pl/set16 (nonexistent) >+++ contrib/tcsh/nls/pl/set16 (working copy) >@@ -0,0 +1,13 @@ >+$ $tcsh: set16,v 1.3 1996/04/26 20:31:55 christos Exp $ >+$ sh.lex.c >+$set 16 >+1 Reset tty pgrp from %d to %d\n >+2 \nAby wylogowaÄ siÄ użyj "logout".\n >+3 \nAby opuÅciÄ %s użyj "exit".\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 >Index: contrib/tcsh/nls/pl/set17 >=================================================================== >--- contrib/tcsh/nls/pl/set17 (nonexistent) >+++ contrib/tcsh/nls/pl/set17 (working copy) >@@ -0,0 +1,17 @@ >+$ $tcsh: set17,v 1.3 1996/10/19 17:52:33 christos Exp $ >+$ sh.proc.c >+$set 17 >+1 PLUSKWA: czekam na zadanie pracujÄ ce w tle!\n >+2 ZakoÅczono %d\n >+3 PLUSKWA: proces wywoÅany drugi raz >+4 Running >+5 SygnaÅ >+6 Zwrócono %-25d >+7 ZakoÅczony >+8 PLUSKWA: status=%-9o >+9 \040(zrzucono core) >+10 \040(KR: >+11 (KR jest: >+12 %S: Już jest zawieszony\n >+13 %S: Już jest zatrzymany\n >+14 %S: Badly formed number\n >Index: contrib/tcsh/nls/pl/set18 >=================================================================== >--- contrib/tcsh/nls/pl/set18 (nonexistent) >+++ contrib/tcsh/nls/pl/set18 (working copy) >@@ -0,0 +1,4 @@ >+$ $tcsh: set18,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ sh.set.c >+$set 18 >+1 Uwaga: Åmiesznie dÅuga PATH zostaÅa obciÄta\n >Index: contrib/tcsh/nls/pl/set19 >=================================================================== >--- contrib/tcsh/nls/pl/set19 (nonexistent) >+++ contrib/tcsh/nls/pl/set19 (working copy) >@@ -0,0 +1,23 @@ >+$ $tcsh: set19,v 1.3 1996/04/26 20:31:58 christos Exp $ >+$ tc.alloc.c >+$set 19 >+1 n-bajtów=%d: Brak pamiÄci\n >+2 free(%lx) wywoÅany przez jakÄ kolwiek allokacjÄ . >+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 aktualnie allokowana pamiÄÄ:\nwolna:\t >+9 używane >+10 \n\tAktualnie w użyciu: %d, wolnych: %d\n >+11 \tZaallokowano pamiÄÄ od 0x%lx do 0x%lx. WierzchoÅek 0x%lx\n >+12 Zaallokowano pamiÄÄ od 0x%lx do 0x%lx (%ld).\n >+13 %s current memory allocation:\n >+14 Total space allocated from system: %d\n >+15 Number of non-inuse chunks: %d\n >+16 Number of mmapped regions: %d\n >+17 Total space in mmapped regions: %d\n >+18 Total allocated space: %d\n >+19 Total non-inuse space: %d\n >+20 Top-most, releasable space: %d\n >Index: contrib/tcsh/nls/pl/set2 >=================================================================== >--- contrib/tcsh/nls/pl/set2 (nonexistent) >+++ contrib/tcsh/nls/pl/set2 (working copy) >@@ -0,0 +1,111 @@ >+$ $tcsh: set2,v 1.4 1998/10/25 15:12:38 christos Exp $ >+$ Signal names >+$set 2 >+1 Pusty sygnaÅ >+2 Hangup >+3 Przerwij >+4 Quit >+5 NieprawdiÅowa instrukcja >+6 Trace/BPT trap >+7 Abort >+8 IOT trap >+9 System Crash Imminent >+10 Error exit >+11 EMT trap >+12 Floating exception >+13 Zabity >+14 User signal 1 >+15 User signal 2 >+16 Naruszenie ochrony pamiÄci >+17 BÅÄ d szyny >+18 Program range error >+19 Operand range error >+20 NieprawidÅowe wywoÅanie systemowe >+21 Broken pipe >+22 Alarm clock >+23 ZakoÅczono >+24 Child status change >+25 ÅmierÄ potomka >+26 Apollo-specific fault >+27 Potomek zakoÅczyÅ dziaÅanie, lub zostaÅ wyÅÄ czony >+28 Potomek zakoÅczyÅ dziaÅanie >+29 Brak zasilania >+30 Resource Lost >+31 Przerwanie (Ctrl-Break) >+32 Input/output possible signal >+33 Asynchroniczne We/Wy (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 Limit czasu CPU przekroczony >+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 Zawieszony (sygnaÅ) >+47 Zatrzymany (sygnaÅ) >+48 Zawieszony >+49 Zatrzymany >+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 >Index: contrib/tcsh/nls/pl/set20 >=================================================================== >--- contrib/tcsh/nls/pl/set20 (nonexistent) >+++ contrib/tcsh/nls/pl/set20 (working copy) >@@ -0,0 +1,41 @@ >+$ $tcsh: set20,v 1.2 1995/03/19 18:07:15 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 (%s)\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 >Index: contrib/tcsh/nls/pl/set21 >=================================================================== >--- contrib/tcsh/nls/pl/set21 (nonexistent) >+++ contrib/tcsh/nls/pl/set21 (working copy) >@@ -0,0 +1,5 @@ >+$ $tcsh: set21,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ tc.disc.c >+$set 21 >+1 Couldn't get local chars.\n >+2 Couldn't set local chars.\n >Index: contrib/tcsh/nls/pl/set22 >=================================================================== >--- contrib/tcsh/nls/pl/set22 (nonexistent) >+++ contrib/tcsh/nls/pl/set22 (working copy) >@@ -0,0 +1,17 @@ >+$ $tcsh: set22,v 1.2 1995/03/19 18:07:15 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 >Index: contrib/tcsh/nls/pl/set23 >=================================================================== >--- contrib/tcsh/nls/pl/set23 (nonexistent) >+++ contrib/tcsh/nls/pl/set23 (working copy) >@@ -0,0 +1,34 @@ >+$ $tcsh: set23,v 1.3 1996/04/26 20:32:00 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: Nie znaleziono komputera\n >+6 setlocal: %s: %s\n >+7 Komputer nie zostaÅ znaleziony >+8 You're trapped in a universe you never made >+9 Getwarp failed >+10 Invalid warp >+11 Setwarp failed >+12 Illegal universe >+13 Nieznany bÅÄ d: %d >+14 sysname: %s\n >+15 nodename: %s\n >+16 release: %s\n >+17 version: %s\n >+18 machine: %s\n >+19 getwd: Nie mogÄ otworzyÄ ".." (%s) >+20 getwd: Nie mogÄ przejÅÄ do ".." (%s) >+21 getwd: BÅÄ d odczytu w ".." (%s) >+22 getwd: Nie mogÄ przejÅÄ do "." (%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 NieprawidÅowy typ systemu >+29 Typ systemu nie zostaÅ ustawiony >+30 Zbyt dużo argumentów >+31 NieprawidÅowy argument >Index: contrib/tcsh/nls/pl/set24 >=================================================================== >--- contrib/tcsh/nls/pl/set24 (nonexistent) >+++ contrib/tcsh/nls/pl/set24 (working copy) >@@ -0,0 +1,4 @@ >+$ $tcsh: set24,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ tc.sched.c >+$set 24 >+1 kludge >Index: contrib/tcsh/nls/pl/set25 >=================================================================== >--- contrib/tcsh/nls/pl/set25 (nonexistent) >+++ contrib/tcsh/nls/pl/set25 (working copy) >@@ -0,0 +1,6 @@ >+$ $tcsh: set25,v 1.2 1995/03/19 18:07:15 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 >Index: contrib/tcsh/nls/pl/set26 >=================================================================== >--- contrib/tcsh/nls/pl/set26 (nonexistent) >+++ contrib/tcsh/nls/pl/set26 (working copy) >@@ -0,0 +1,15 @@ >+$ $tcsh: set26,v 1.2 1995/03/19 18:07:15 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 >Index: contrib/tcsh/nls/pl/set27 >=================================================================== >--- contrib/tcsh/nls/pl/set27 (nonexistent) >+++ contrib/tcsh/nls/pl/set27 (working copy) >@@ -0,0 +1,8 @@ >+$ $tcsh: set27,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ tw.comp.c >+$set 27 >+1 polecenie >+2 separator >+3 pattern >+4 zasiÄg >+5 completion >Index: contrib/tcsh/nls/pl/set29 >=================================================================== >--- contrib/tcsh/nls/pl/set29 (nonexistent) >+++ contrib/tcsh/nls/pl/set29 (working copy) >@@ -0,0 +1,4 @@ >+$ $tcsh: set29,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ tw.help.c >+$set 29 >+1 Brak pliku pomocy dla %S\n >Index: contrib/tcsh/nls/pl/set3 >=================================================================== >--- contrib/tcsh/nls/pl/set3 (nonexistent) >+++ contrib/tcsh/nls/pl/set3 (working copy) >@@ -0,0 +1,117 @@ >+$ $tcsh: set3,v 1.3 1995/04/24 14:12:51 christos Exp $ >+$ Editor function descriptions >+$set 3 >+1 Przejdź znak wstecz >+2 UsuÅ znak za kursorem >+3 Obetnij od poczÄ tku sÅowa do kursora, zachowaj w buforze wyciÄÄ >+4 Obetnij od poczÄ tku linii do kursora, zachowaj w buforze wyciÄÄ >+5 Przejdź do poczÄ tku aktualnego sÅowa >+6 Przejdź do poczÄ tku linii >+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 >Index: contrib/tcsh/nls/pl/set30 >=================================================================== >--- contrib/tcsh/nls/pl/set30 (nonexistent) >+++ contrib/tcsh/nls/pl/set30 (working copy) >@@ -0,0 +1,16 @@ >+$ $tcsh: set30,v 1.4 1996/10/19 17:52:34 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 elementów >+6 wierszy >+7 Jest %d %s, pokazaÄ je? [n/y] >+8 looking = %d\n >+9 \ntcsh internal error: I don't know what I'm looking for!\n >+10 nie jest katalogiem >+11 nie zostaÅ znaleziony >+12 jest nieczytelny >+13 yY >Index: contrib/tcsh/nls/pl/set31 >=================================================================== >--- contrib/tcsh/nls/pl/set31 (nonexistent) >+++ contrib/tcsh/nls/pl/set31 (working copy) >@@ -0,0 +1,7 @@ >+$ $tcsh: set31,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ vms.termcap.c >+$set 31 >+1 Nie mogÄ otworzyÄ TERMCAP: [%s]\n >+2 Nie mogÄ otworzyÄ %s.\n >+3 Znaleziono %s w %s.\n >+4 Nie znaleziono %s w pliku %s\n >Index: contrib/tcsh/nls/pl/set4 >=================================================================== >--- contrib/tcsh/nls/pl/set4 (nonexistent) >+++ contrib/tcsh/nls/pl/set4 (working copy) >@@ -0,0 +1,45 @@ >+$ $tcsh: set4,v 1.2 1995/03/19 18:07:15 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 >Index: contrib/tcsh/nls/pl/set5 >=================================================================== >--- contrib/tcsh/nls/pl/set5 (nonexistent) >+++ contrib/tcsh/nls/pl/set5 (working copy) >@@ -0,0 +1,4 @@ >+$ $tcsh: set5,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ ed.chared.c >+$set 5 >+1 Årednie obciÄ Å¼enie niedostÄpne\n >Index: contrib/tcsh/nls/pl/set6 >=================================================================== >--- contrib/tcsh/nls/pl/set6 (nonexistent) >+++ contrib/tcsh/nls/pl/set6 (working copy) >@@ -0,0 +1,11 @@ >+$ $tcsh: set6,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ ed.inputl.c >+$set 6 >+1 ERROR: illegal command from key 0%o\r\n >+2 tak\n >+3 edytuj\n >+4 przerwij\n >+5 nie\n >+6 Brak pasujÄ cego polecenia\n >+7 Niejasne polecenie\n >+8 *** BÅÄD fatalny edytora ***\r\n\n >Index: contrib/tcsh/nls/pl/set7 >=================================================================== >--- contrib/tcsh/nls/pl/set7 (nonexistent) >+++ contrib/tcsh/nls/pl/set7 (working copy) >@@ -0,0 +1,30 @@ >+$ $tcsh: set7,v 1.3 1996/04/26 20:32:04 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: using dumb terminal settings.\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 >Index: contrib/tcsh/nls/pl/set8 >=================================================================== >--- contrib/tcsh/nls/pl/set8 (nonexistent) >+++ contrib/tcsh/nls/pl/set8 (working copy) >@@ -0,0 +1,5 @@ >+$ $tcsh: set8,v 1.2 1995/03/19 18:07:15 christos Exp $ >+$ ed.term.c >+$set 8 >+1 NieprawidÅowy przeÅÄ cznik >+2 NieprawidÅowy argument >Index: contrib/tcsh/nls/pl/set9 >=================================================================== >--- contrib/tcsh/nls/pl/set9 (nonexistent) >+++ contrib/tcsh/nls/pl/set9 (working copy) >@@ -0,0 +1,12 @@ >+$ $tcsh: set9,v 1.2 1995/03/19 18:07:15 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 >Index: contrib/tcsh/nls/russian/set1 >=================================================================== >--- contrib/tcsh/nls/russian/set1 (revision 309109) >+++ contrib/tcsh/nls/russian/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.5 2011/02/04 18:19:41 christos Exp $ >+$ $tcsh: set1,v 1.6 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 СинÑакÑиÑеÑÐºÐ°Ñ Ð¾Ñибка >@@ -8,7 +8,7 @@ > 5 ÐÐµÑ Ñайла Ð´Ð»Ñ $0 > 6 ÐезавеÑÑÑннÑй модиÑикаÑÐ¾Ñ [] > 7 $ ÑаÑÑиÑение должно оканÑиваÑÑÑÑ Ð¿ÐµÑед ] >-8 ÐÐ»Ð¾Ñ Ð¾Ð¹ модиÑикаÑÐ¾Ñ Ð² $ (%c) >+8 ÐÐ»Ð¾Ñ Ð¾Ð¹ модиÑикаÑÐ¾Ñ Ð² $ '%c' > 9 ÐÑибка подпÑогÑÐ°Ð¼Ð¼Ñ > 10 ÐепÑавилÑно ÑÑоÑмиÑованное ÑиÑло > 11 ÐÐµÑ Ð±Ð¾Ð»ÑÑе Ñлов >@@ -51,8 +51,8 @@ > 48 Ðе внÑÑÑи while/foreach > 49 ÐÐµÑ Ð±Ð¾Ð»ÑÑе пÑоÑеÑÑов > 50 ÐÐµÑ ÑооÑвеÑÑÑвий >-51 ÐÑÑÑÑÑÑвÑÐµÑ %c >-52 ÐÐµÑ ÑооÑвеÑÑÑÐ²Ð¸Ñ Ð´Ð»Ñ %c >+51 ÐÑÑÑÑÑÑвÑÐµÑ '%c' >+52 ÐÐµÑ ÑооÑвеÑÑÑÐ²Ð¸Ñ Ð´Ð»Ñ '%c' > 53 ÐÐµÑ Ð¿Ð°Ð¼ÑÑи > 54 Ðе Ð¼Ð¾Ð³Ñ ÑоздаÑÑ Ð½ÐµÐ¸Ð¼ÐµÐ½Ð¾Ð²Ð°Ð½Ð½Ñй канал > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 ÐÐ»Ð¾Ñ Ð°Ñ Ð¿Ð¾Ð´ÑÑановка > 91 ÐÑÑÑÑÑÑвÑÐµÑ Ð¿ÑедÑдÑÑÐ°Ñ Ð»ÐµÐ²Ð°Ñ ÑÑоÑона > 92 ÐÑÐ°Ð²Ð°Ñ ÑÑоÑона ÑлиÑком Ð´Ð»Ð¸Ð½Ð½Ð°Ñ >-93 ÐÐ»Ð¾Ñ Ð¾Ð¹ модиÑикаÑÐ¾Ñ !: %c >+93 ÐÐ»Ð¾Ñ Ð¾Ð¹ модиÑикаÑÐ¾Ñ !: '%c' > 94 ÐÑибка модиÑикаÑоÑа > 95 ÐеÑеполнение бÑÑеÑа подÑÑановки > 96 ÐÐ»Ð¾Ñ Ð¾Ð¹ ÑелекÑÐ¾Ñ Ð´Ð»Ñ Ð°ÑгÑменÑа ! >@@ -118,7 +118,7 @@ > 115 ÐеÑеполнение ÑÑÑоки termcap > 116 ÐÑполÑзование: settc %s [yes|no] > 117 ÐеизвеÑÑÐ½Ð°Ñ capability `%s' >-118 ÐеизвеÑÑнÑй паÑамеÑÑ termcap `%%%c' >+118 ÐеизвеÑÑнÑй паÑамеÑÑ termcap '%%%c' > 119 СлиÑком много аÑгÑменÑов Ð´Ð»Ñ `%s' (%d) > 120 `%s' ÑÑебÑÐµÑ %d аÑгÑменÑов > 121 ÐÑполÑзование: echotc [-v|-s] [<capability> [<аÑгÑменÑÑ>]] >@@ -137,4 +137,4 @@ > 134 ÐÑполÑзование: unlimit [-fh] [пÑеделÑ] > 135 $%S ÑолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ > 136 ÐÐµÑ Ñакого Ð·Ð°Ð´Ð°Ð½Ð¸Ñ >-137 ÐеизвеÑÑное знаÑение `%c%c' пеÑеменной colorls >+137 ÐеизвеÑÑное знаÑение '%c%c' пеÑеменной colorls >Index: contrib/tcsh/nls/russian/set20 >=================================================================== >--- contrib/tcsh/nls/russian/set20 (revision 309109) >+++ contrib/tcsh/nls/russian/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.6 2011/02/04 18:19:42 christos Exp $ >+$ $tcsh: set20,v 1.7 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 ÐевеÑное Ð¸Ð¼Ñ ÐºÐ»Ð°Ð²Ð¸Ñи `%S'\n >@@ -19,7 +19,7 @@ > 16 -c воÑпÑинимаÑÑ ÐÐÐÐÐÐÑ ÐºÐ°Ðº вÑÑÑоеннÑÑ Ð¸Ð»Ð¸ внеÑнÑÑ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ\n > 17 -v пÑивÑзаÑÑ Ð²Ñе клавиÑи в ÑооÑвеÑÑÑвии Ñ ÑедакÑоÑом vi\n > 18 -e пÑивÑзаÑÑ Ð²Ñе клавиÑи в ÑооÑвеÑÑÑвии Ñ ÑедакÑоÑом emacs\n >-19 -d пÑивÑзаÑÑ Ð²Ñе клавиÑи в ÑооÑвеÑÑÑвии Ñ ÑедакÑоÑом по ÑмолÑаниÑ\n >+19 -d пÑивÑзаÑÑ Ð²Ñе клавиÑи в ÑооÑвеÑÑÑвии Ñ ÑедакÑоÑом по ÑмолÑÐ°Ð½Ð¸Ñ (%s)\n > 20 -l вÑвеÑÑи ÑпиÑок команд ÑедакÑоÑа и Ð¸Ñ Ð¾Ð¿Ð¸ÑаниÑ\n > 21 -r ÑдалиÑÑ Ð¿ÑивÑÐ·ÐºÑ ÐÐÐÐÐШи\n > 22 -k воÑпÑинимаÑÑ ÐÐÐÐÐÐ¨Ñ ÐºÐ°Ðº Ñвное название ÑпÑавлÑÑÑей клавиÑи\n >Index: contrib/tcsh/nls/russian/set9 >=================================================================== >--- contrib/tcsh/nls/russian/set9 (revision 309109) >+++ contrib/tcsh/nls/russian/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.4 2011/02/04 18:19:42 christos Exp $ >+$ $tcsh: set9,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: Null extended-key not allowed.\n >@@ -8,5 +8,5 @@ > 5 Some extended keys too long for internal print buffer > 6 Enumerate: BUG!! ÐеÑедан нÑлевой ÑказаÑелÑ!\n > 7 Ð½ÐµÑ Ð²Ð²Ð¾Ð´Ð¸Ð¼ÑÑ Ð´Ð°Ð½Ð½ÑÑ >-8 Something must follow: %c\n >+8 Something must follow: '%c'\n > 9 ÐоÑÑмеÑиÑÐ½Ð°Ñ ÐºÐ¾Ð½ÑÑанÑа не ÑмеÑаеÑÑÑ Ð² char.\n >Index: contrib/tcsh/nls/spanish/set1 >=================================================================== >--- contrib/tcsh/nls/spanish/set1 (revision 309109) >+++ contrib/tcsh/nls/spanish/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.4 2011/02/04 18:19:42 christos Exp $ >+$ $tcsh: set1,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ Mensajes de Error > $set 1 > 1 Error de sintaxis >@@ -8,7 +8,7 @@ > 5 No hay fichero para $0 > 6 Modificador [] incompleto > 7 $ expansión debe terminar antes de ] >-8 Modificador erróneo : en $ (%c) >+8 Modificador erróneo : en $ '%c' > 9 Error de Ãndice > 10 Número erróneamente formado > 11 No hay más palabras >@@ -51,8 +51,8 @@ > 48 No se encuentra en bucle while/foreach > 49 No hay más procesos > 50 No existe correspondencia >-51 Falta %c >-52 No se ha hallado correspondencia con %c >+51 Falta '%c' >+52 No se ha hallado correspondencia con '%c' > 53 Memoria insuficiente > 54 No se puede crear la tuberÃa > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Sustituto erróneo > 91 No existe `lado izquierdo' previo > 92 Valor de asignación demasiado largo >-93 Modificador de ! incorrecto: %c >+93 Modificador de ! incorrecto: '%c' > 94 Error de modificador > 95 Desborde el el buffer de sustitución > 96 Selector de argumento de ! erróneo >@@ -118,7 +118,7 @@ > 115 Se ha agotado el espacio para cadenas termcap > 116 Uso: settc %s [yes|no] > 117 CaracterÃstica `%s' desconocida >-118 Parámetro termcap `%%%c' desconocido >+118 Parámetro termcap '%%%c' desconocido > 119 Demasiados argumentos para `%s' (%d) > 120 `%s' requiere %d argumentos > 121 Uso: echotc [-v|-s] [<caracterÃstica> [<args>]] >@@ -137,4 +137,4 @@ > 134 Uso: unlimit [-fh] [lÃmites] > 135 $%S es de sólo-lectura > 136 No existe ese trabajo >-137 Unknown colorls variable `%c%c' >+137 Unknown colorls variable '%c%c' >Index: contrib/tcsh/nls/spanish/set20 >=================================================================== >--- contrib/tcsh/nls/spanish/set20 (revision 309109) >+++ contrib/tcsh/nls/spanish/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.4 2011/02/04 18:19:43 christos Exp $ >+$ $tcsh: set20,v 1.5 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Nombre de tecla no válido `%S'\n >@@ -19,7 +19,7 @@ > 16 -c interpreta COMANDO como comando interno o externo\n > 17 -v usa las definiciones del editor vi\n > 18 -e usa las definiciones del editor vi\n >-19 -d usa las definiciones del editor por defecto\n >+19 -d usa las definiciones del editor por defecto (%s)\n > 20 -l lista los comandos del editor y sus descripciones\n > 21 -r elimina la definición asociada a TECLA\n > 22 -k interpreta TECLA como nombre simbólico de tecla de flecha\n >Index: contrib/tcsh/nls/spanish/set9 >=================================================================== >--- contrib/tcsh/nls/spanish/set9 (revision 309109) >+++ contrib/tcsh/nls/spanish/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.3 2011/02/04 18:19:43 christos Exp $ >+$ $tcsh: set9,v 1.4 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: No se permite una tecla extendida nula.\n >@@ -8,5 +8,5 @@ > 5 Algunas teclas extendidas son demasiado grandes para el buffer de impresión interno > 6 Enumerate: ¡¡BUG!! Se ha pasado un puntero nulo!\n > 7 no hay entrada >-8 Falta algo a continuación: %c\n >+8 Falta algo a continuación: '%c'\n > 9 Una constante octal no cabe en un carácter.\n >Index: contrib/tcsh/nls/ukrainian/set1 >=================================================================== >--- contrib/tcsh/nls/ukrainian/set1 (revision 309109) >+++ contrib/tcsh/nls/ukrainian/set1 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set1,v 1.4 2011/02/04 18:19:44 christos Exp $ >+$ $tcsh: set1,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ Error messages > $set 1 > 1 СинÑакÑиÑна помилка >@@ -8,7 +8,7 @@ > 5 ÐÐµÐ¼Ð°Ñ ÑÐ°Ð¹Ð»Ñ Ð´Ð»Ñ $0 > 6 Ðеповний модиÑÑкаÑÐ¾Ñ [] > 7 РозÑиÑÐµÐ½Ð½Ñ $ Ð¼Ð°Ñ Ð±ÑÑи пеÑед ] >-8 Ðоганий модиÑÑкаÑÐ¾Ñ : в $ (%c) >+8 Ðоганий модиÑÑкаÑÐ¾Ñ : в $ '%c' > 9 Ðомилковий ÑÐ½Ð´ÐµÐºÑ > 10 ЧиÑло погано ÑÑоÑмоване > 11 Ðе можна бÑлÑÑе ÑлÑв >@@ -51,8 +51,8 @@ > 48 Ðе Ñ while/foreach > 49 Ðе можна бÑлÑÑе пÑоÑеÑÑв > 50 ÐÐµÐ¼Ð°Ñ ÑпÑÐ²Ð¿Ð°Ð´Ð°Ð½Ñ >-51 ÐÑопÑÑено %c >-52 ÐÑдÑÑÑнÑй вÑдповÑдник до %c >+51 ÐÑопÑÑено '%c' >+52 ÐÑдÑÑÑнÑй вÑдповÑдник до '%c' > 53 Ðало пам'ÑÑÑ > 54 Ðе Ð¼Ð¾Ð¶Ñ ÑÑвоÑиÑи канал > 55 %s: %s >@@ -93,7 +93,7 @@ > 90 Ðогана пÑдÑÑановка > 91 No previous left hand side > 92 Right hand side too long >-93 Ðоганий модиÑÑкаÑÐ¾Ñ !: %c >+93 Ðоганий модиÑÑкаÑÐ¾Ñ !: '%c' > 94 ÐевдаÑа модиÑÑкаÑоÑа > 95 ÐеÑÐµÐ¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ð±ÑÑеÑÑ Ð¿ÑдÑÑановки > 96 Bad ! arg selector >@@ -118,7 +118,7 @@ > 115 Out of termcap string space > 116 ÐикоÑиÑÑаннÑ: settc %s [yes|no] > 117 Unknown capability `%s' >-118 ÐевÑдомий паÑамеÑÑ termcap `%%%c' >+118 ÐевÑдомий паÑамеÑÑ termcap '%%%c' > 119 ÐабагаÑо аÑгÑменÑÑв Ð´Ð»Ñ `%s' (%d) > 120 `%s' Ð²Ð¸Ð¼Ð°Ð³Ð°Ñ %d аÑгÑменÑ(Ñв) > 121 ÐикоÑиÑÑаннÑ: echotc [-v|-s] [<capability> [<args>]] >@@ -137,4 +137,4 @@ > 134 ÐикоÑиÑÑаннÑ: unlimit [-fh] [лÑмÑÑи] > 135 $%S лиÑе Ð´Ð»Ñ ÑиÑÐ°Ð½Ð½Ñ > 136 ÐÐµÐ¼Ð°Ñ ÑÐ°ÐºÐ¾Ñ Ð·Ð°Ð´Ð°ÑÑ >-137 ÐевÑдоме знаÑÐµÐ½Ð½Ñ Ð·Ð¼ÑÐ½Ð½Ð¾Ñ colorls: `%c%c' >+137 ÐевÑдоме знаÑÐµÐ½Ð½Ñ Ð·Ð¼ÑÐ½Ð½Ð¾Ñ colorls: '%c%c' >Index: contrib/tcsh/nls/ukrainian/set20 >=================================================================== >--- contrib/tcsh/nls/ukrainian/set20 (revision 309109) >+++ contrib/tcsh/nls/ukrainian/set20 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set20,v 1.4 2011/02/04 18:19:44 christos Exp $ >+$ $tcsh: set20,v 1.5 2015/08/13 08:54:04 christos Exp $ > $ tc.bind.c > $set 20 > 1 Invalid key name `%S'\n >@@ -19,7 +19,7 @@ > 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 >+19 -d bind all keys to default editor's bindings (%s)\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 >Index: contrib/tcsh/nls/ukrainian/set9 >=================================================================== >--- contrib/tcsh/nls/ukrainian/set9 (revision 309109) >+++ contrib/tcsh/nls/ukrainian/set9 (working copy) >@@ -1,4 +1,4 @@ >-$ $tcsh: set9,v 1.4 2011/02/04 18:19:45 christos Exp $ >+$ $tcsh: set9,v 1.5 2015/05/26 17:38:25 christos Exp $ > $ ed.xmap.c > $set 9 > 1 AddXkey: Null extended-key not allowed.\n >@@ -8,5 +8,5 @@ > 5 Some extended keys too long for internal print buffer > 6 Enumerate: ÐÐÐÐÐÐÐ!! Null ptr passed\n! > 7 no input >-8 Something must follow: %c\n >+8 Something must follow: '%c'\n > 9 Octal constant does not fit in a char.\n >Index: contrib/tcsh/patchlevel.h >=================================================================== >--- contrib/tcsh/patchlevel.h (revision 309109) >+++ contrib/tcsh/patchlevel.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/patchlevel.h,v 3.180 2012/02/13 16:33:50 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/patchlevel.h,v 3.187 2016/11/24 15:04:52 christos Exp $ */ > /* > * patchlevel.h: Our life story. > */ >@@ -7,8 +7,8 @@ > > #define ORIGIN "Astron" > #define REV 6 >-#define VERS 18 >-#define PATCHLEVEL 1 >-#define DATE "2012-02-14" >+#define VERS 20 >+#define PATCHLEVEL 00 >+#define DATE "2016-11-24" > > #endif /* _h_patchlevel */ >Index: contrib/tcsh/sh.c >=================================================================== >--- contrib/tcsh/sh.c (revision 309109) >+++ contrib/tcsh/sh.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.c,v 3.174 2011/11/29 18:38:54 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.c,v 3.189 2016/09/12 16:33:54 christos Exp $ */ > /* > * sh.c: Main shell routines > */ >@@ -39,7 +39,7 @@ > All rights reserved.\n"; > #endif /* not lint */ > >-RCSID("$tcsh: sh.c,v 3.174 2011/11/29 18:38:54 christos Exp $") >+RCSID("$tcsh: sh.c,v 3.189 2016/09/12 16:33:54 christos Exp $") > > #include "tc.h" > #include "ed.h" >@@ -78,7 +78,8 @@ > * ported to Apple Unix (TM) (OREO) 26 -- 29 Jun 1987 > */ > >-jmp_buf_t reslab; >+jmp_buf_t reslab IZERO_STRUCT; >+struct wordent paraml IZERO_STRUCT; > > static const char tcshstr[] = "tcsh"; > >@@ -250,10 +251,11 @@ > int osetintr; > struct sigaction oparintr; > >- (void)memset(&reslab, 0, sizeof(reslab)); > #ifdef WINNT_NATIVE > nt_init(); > #endif /* WINNT_NATIVE */ >+ >+ (void)memset(&reslab, 0, sizeof(reslab)); > #if defined(NLS_CATALOGS) && defined(LC_MESSAGES) > (void) setlocale(LC_MESSAGES, ""); > #endif /* NLS_CATALOGS && LC_MESSAGES */ >@@ -272,6 +274,7 @@ > #endif > > nlsinit(); >+ initlex(¶ml); > > #ifdef MALLOC_TRACE > mal_setstatsfile(fdopen(dmove(xopen("/tmp/tcsh.trace", >@@ -343,6 +346,7 @@ > # endif > #endif > STR_WORD_CHARS = SAVE(WORD_CHARS); >+ STR_WORD_CHARS_VI = SAVE(WORD_CHARS_VI); > > HIST = '!'; > HISTSUB = '^'; >@@ -355,6 +359,7 @@ > > /* Default history size to 100 */ > setcopy(STRhistory, str2short("100"), VAR_READWRITE); >+ sethistory(100); > > tempv = argv; > ffile = SAVE(tempv[0]); >@@ -477,6 +482,9 @@ > */ > initdesc(); > >+ cdtohome = 1; >+ setv(STRcdtohome, SAVE(""), VAR_READWRITE); >+ > /* > * Get and set the tty now > */ >@@ -493,6 +501,7 @@ > } > else > setv(STRtty, cp = SAVE(""), VAR_READWRITE); >+ > /* > * Initialize the shell variables. ARGV and PROMPT are initialized later. > * STATUS is also munged in several places. CHILD is munged when >@@ -588,19 +597,22 @@ > */ > shlvl(1); > >- if ((tcp = getenv("HOME")) != NULL) >- cp = quote(SAVE(tcp)); >- else > #ifdef __ANDROID__ >- /* On Android, $HOME usually isn't set, so we can't load user RC files. >- Check for the environment variable EXTERNAL_STORAGE, which contains >- the mount point of the external storage (SD card, mostly). If >- EXTERNAL_STORAGE isn't set fall back to "/sdcard". */ >- if ((tcp = getenv("EXTERNAL_STORAGE")) != NULL) >+ /* On Android, $HOME either isn't set or set to /data, a R/O location. >+ Check for the environment variable EXTERNAL_STORAGE, which contains >+ the mount point of the external storage (SD card, mostly). If >+ EXTERNAL_STORAGE isn't set fall back to "/sdcard". Eventually >+ override $HOME so the environment is on the same page. */ >+ if (((tcp = getenv("HOME")) != NULL && strcmp (tcp, "/data") != 0) >+ || (tcp = getenv("EXTERNAL_STORAGE")) != NULL) { > cp = quote(SAVE(tcp)); >- else >+ } else > cp = quote(SAVE("/sdcard")); >+ tsetenv(STRKHOME, cp); > #else >+ if ((tcp = getenv("HOME")) != NULL) >+ cp = quote(SAVE(tcp)); >+ else > cp = NULL; > #endif > >@@ -797,9 +809,12 @@ > #ifdef COLOR_LS_F > if ((tcp = getenv("LS_COLORS")) != NULL) > parseLS_COLORS(str2short(tcp)); >+ if ((tcp = getenv("LSCOLORS")) != NULL) >+ parseLSCOLORS(str2short(tcp)); > #endif /* COLOR_LS_F */ > >- doldol = putn((tcsh_number_t)getpid()); /* For $$ */ >+ mainpid = getpid(); >+ doldol = putn((tcsh_number_t)mainpid); /* For $$ */ > #ifdef WINNT_NATIVE > { > char *tmp; >@@ -818,7 +833,7 @@ > #else /* !WINNT_NATIVE */ > #ifdef HAVE_MKSTEMP > { >- char *tmpdir = getenv ("TMPDIR"); >+ const char *tmpdir = getenv ("TMPDIR"); > if (!tmpdir) > tmpdir = "/tmp"; > shtemp = Strspl(SAVE(tmpdir), SAVE("/sh" TMP_TEMPLATE)); /* For << */ >@@ -1215,7 +1230,7 @@ > > #ifdef NeXT > /* NeXT 2.0 /usr/etc/rlogind, does not set our process group! */ >- if (shpgrp == 0) { >+ if (f != -1 && shpgrp == 0) { > shpgrp = getpid(); > (void) setpgid(0, shpgrp); > (void) tcsetpgrp(f, shpgrp); >@@ -1222,7 +1237,7 @@ > } > #endif /* NeXT */ > #ifdef BSDJOBS /* if we have tty job control */ >- if (grabpgrp(f, shpgrp) != -1) { >+ if (f != -1 && grabpgrp(f, shpgrp) != -1) { > /* > * Thanks to Matt Day for the POSIX references, and to > * Paul Close for the SGI clarification. >@@ -1904,6 +1919,8 @@ > { > (void) Cookedmode(); > GettingInput = 0; >+ if (evalvec) >+ doneinp = 1; > } > drainoline(); > #ifdef HAVE_GETPWENT >@@ -2037,6 +2054,7 @@ > */ > if (setintr) > pintr_push_enable(&old_pintr_disabled); >+ freelex(¶ml); > hadhist = lex(¶ml); > if (setintr) > cleanup_until(&old_pintr_disabled); >@@ -2178,6 +2196,7 @@ > cleanup_push(file, xfree); > xfree(f); > t = glob_all_or_error(t); >+ cleanup_push(t, blk_cleanup); > if ((!srcfile(file, 0, hflg, t)) && (!hflg) && (!bequiet)) > stderror(ERR_SYSTEM, file, strerror(errno)); > cleanup_until(file); >Index: contrib/tcsh/sh.char.h >=================================================================== >--- contrib/tcsh/sh.char.h (revision 309109) >+++ contrib/tcsh/sh.char.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.char.h,v 3.36 2010/05/08 00:36:02 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.char.h,v 3.37 2014/05/09 19:22:49 christos Exp $ */ > /* > * sh.char.h: Table for spotting special characters quickly > * Makes for very obscure but efficient coding. >@@ -167,15 +167,15 @@ > #define iscmdmeta(c) cmap((c), _CMD) > #ifdef WIDE_STRINGS > #define letter(c) (((c) & QUOTE) ? 0 : \ >- (iswalpha((tcshuc) (c)) || (c) == '_')) >+ (iswalpha((c)) || (c) == '_')) > #define alnum(c) (((c) & QUOTE) ? 0 : \ >- (iswalnum((tcshuc) (c)) || (c) == '_')) >+ (iswalnum((c)) || (c) == '_')) > #else > #define letter(c) (((Char)(c) & QUOTE) ? 0 : \ >- ((isalpha((tcshuc) (c)) && !(cmap((c), _PUN))) \ >+ ((isalpha((c)) && !(cmap((c), _PUN))) \ > || (c) == '_')) > #define alnum(c) (((Char)(c) & QUOTE) ? 0 : \ >- ((isalnum((tcshuc) (c)) && !(cmap((c), _PUN))) \ >+ ((isalnum((c)) && !(cmap((c), _PUN))) \ > || (c) == '_')) > > #endif >Index: contrib/tcsh/sh.decls.h >=================================================================== >--- contrib/tcsh/sh.decls.h (revision 309109) >+++ contrib/tcsh/sh.decls.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.decls.h,v 3.62 2011/02/25 23:58:34 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.decls.h,v 3.68 2016/08/01 16:21:09 christos Exp $ */ > /* > * sh.decls.h External declarations from sh*.c > */ >@@ -78,6 +78,7 @@ > extern void Dfix (struct command *); > extern Char *Dfix1 (Char *); > extern void heredoc (Char *); >+extern Char *randsuf (void); > > /* > * sh.err.c >@@ -184,6 +185,7 @@ > extern void wfree (void); > extern void dobuiltins (Char **, struct command *); > extern void reexecute (struct command *); >+extern int getYN (const char *); > > /* > * sh.glob.c >@@ -221,6 +223,7 @@ > extern void rechist (Char *, int); > extern void loadhist (Char *, int); > extern void displayHistStats(const char *); >+extern void sethistory (int); > > /* > * sh.init.c >@@ -236,6 +239,7 @@ > extern void btoeof (void); > extern void copylex (struct wordent *, struct wordent *); > extern Char *domod (Char *, Char); >+extern void initlex (struct wordent *); > extern void freelex (struct wordent *); > extern int lex (struct wordent *); > extern void lex_cleanup (void *); >@@ -243,6 +247,7 @@ > extern eChar readc (int); > extern void settell (void); > extern void unreadc (Char); >+extern ssize_t wide_read (int, Char *, size_t, int); > > > /* >@@ -397,6 +402,7 @@ > #if defined(AUTOSET_KANJI) > extern void autoset_kanji (void); > #endif >+extern void update_wordchars (void); > > /* > * sh.time.c >Index: contrib/tcsh/sh.dir.c >=================================================================== >--- contrib/tcsh/sh.dir.c (revision 309109) >+++ contrib/tcsh/sh.dir.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.dir.c,v 3.82 2011/10/16 16:25:05 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.dir.c,v 3.85 2016/04/08 16:10:52 christos Exp $ */ > /* > * sh.dir.c: Directory manipulation functions > */ >@@ -33,7 +33,7 @@ > #include "sh.h" > #include "ed.h" > >-RCSID("$tcsh: sh.dir.c,v 3.82 2011/10/16 16:25:05 christos Exp $") >+RCSID("$tcsh: sh.dir.c,v 3.85 2016/04/08 16:10:52 christos Exp $") > > /* > * C Shell - directory management >@@ -501,7 +501,9 @@ > cp = (dflag & DIR_OLD) ? varval(STRowd) : *v; > > if (cp == NULL) { >- if ((cp = varval(STRhome)) == STRNULL || *cp == 0) >+ if (!cdtohome) >+ stderror(ERR_NAME | ERR_TOOFEW); >+ else if ((cp = varval(STRhome)) == STRNULL || *cp == 0) > stderror(ERR_NAME | ERR_NOHOMEDIR); > if (chdir(short2str(cp)) < 0) > stderror(ERR_NAME | ERR_CANTCHANGE); >@@ -674,6 +676,7 @@ > cleanup_until(cp); > return dgoto(cp); > } >+ xfree(dp); > } > xfree(buf.s); > } >Index: contrib/tcsh/sh.dol.c >=================================================================== >--- contrib/tcsh/sh.dol.c (revision 309109) >+++ contrib/tcsh/sh.dol.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.dol.c,v 3.83 2011/01/25 20:10:46 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.dol.c,v 3.87 2014/08/13 23:39:34 amold Exp $ */ > /* > * sh.dol.c: Variable substitutions > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.dol.c,v 3.83 2011/01/25 20:10:46 christos Exp $") >+RCSID("$tcsh: sh.dol.c,v 3.87 2014/08/13 23:39:34 amold Exp $") > > /* > * C shell >@@ -825,9 +825,8 @@ > (void) Strcpy(np + diff, rhsub); > (void) Strcpy(np + diff + rhlen, dp + lhlen); > >- dp = np + diff + 1; > xfree(cp); >- cp = np; >+ dp = cp = np; > cp[--len] = '\0'; > didmod = 1; > if (diff >= (ssize_t)len) >@@ -920,6 +919,19 @@ > inheredoc = 0; > } > >+Char * >+randsuf(void) { >+#ifndef WINNT_NATIVE >+ struct timeval tv; >+ (void) gettimeofday(&tv, NULL); >+ return putn((((tcsh_number_t)tv.tv_sec) ^ >+ ((tcsh_number_t)tv.tv_usec) ^ >+ ((tcsh_number_t)getpid())) & 0x00ffffff); >+#else >+ return putn(getpid()); >+#endif >+} >+ > /* > * Form a shell temporary file (in unit 0) from the words > * of the shell input up to EOF or a line the same as "term". >@@ -950,7 +962,6 @@ > #else /* !HAVE_MKSTEMP */ > char *tmp; > # ifndef WINNT_NATIVE >- struct timeval tv; > > again: > # endif /* WINNT_NATIVE */ >@@ -966,11 +977,8 @@ > # ifndef WINNT_NATIVE > if (errno == EEXIST) { > if (unlink(tmp) == -1) { >- (void) gettimeofday(&tv, NULL); > xfree(shtemp); >- mbp = putn((((tcsh_number_t)tv.tv_sec) ^ >- ((tcsh_number_t)tv.tv_usec) ^ >- ((tcsh_number_t)getpid())) & 0x00ffffff); >+ mbp = randsuf(); > shtemp = Strspl(STRtmpsh, mbp); > xfree(mbp); > } >Index: contrib/tcsh/sh.err.c >=================================================================== >--- contrib/tcsh/sh.err.c (revision 309109) >+++ contrib/tcsh/sh.err.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.err.c,v 3.55 2011/02/25 23:58:34 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.err.c,v 3.57 2015/05/26 17:32:45 christos Exp $ */ > /* > * sh.err.c: Error printing routines. > */ >@@ -34,7 +34,7 @@ > #include "sh.h" > #include <assert.h> > >-RCSID("$tcsh: sh.err.c,v 3.55 2011/02/25 23:58:34 christos Exp $") >+RCSID("$tcsh: sh.err.c,v 3.57 2015/05/26 17:32:45 christos Exp $") > > /* > * C Shell >@@ -218,7 +218,7 @@ > elst[ERR_DOLZERO] = CSAVS(1, 5, "No file for $0"); > elst[ERR_INCBR] = CSAVS(1, 6, "Incomplete [] modifier"); > elst[ERR_EXPORD] = CSAVS(1, 7, "$ expansion must end before ]"); >- elst[ERR_BADMOD] = CSAVS(1, 8, "Bad : modifier in $ (%c)"); >+ elst[ERR_BADMOD] = CSAVS(1, 8, "Bad : modifier in $ '%c'"); > elst[ERR_SUBSCRIPT] = CSAVS(1, 9, "Subscript error"); > elst[ERR_BADNUM] = CSAVS(1, 10, "Badly formed number"); > elst[ERR_NOMORE] = CSAVS(1, 11, "No more words"); >@@ -262,8 +262,8 @@ > elst[ERR_NOTWHILE] = CSAVS(1, 48, "Not in while/foreach"); > elst[ERR_NOPROC] = CSAVS(1, 49, "No more processes"); > elst[ERR_NOMATCH] = CSAVS(1, 50, "No match"); >- elst[ERR_MISSING] = CSAVS(1, 51, "Missing %c"); >- elst[ERR_UNMATCHED] = CSAVS(1, 52, "Unmatched %c"); >+ elst[ERR_MISSING] = CSAVS(1, 51, "Missing '%c'"); >+ elst[ERR_UNMATCHED] = CSAVS(1, 52, "Unmatched '%c'"); > elst[ERR_NOMEM] = CSAVS(1, 53, "Out of memory"); > elst[ERR_PIPE] = CSAVS(1, 54, "Can't make pipe"); > elst[ERR_SYSTEM] = CSAVS(1, 55, "%s: %s"); >@@ -309,7 +309,7 @@ > elst[ERR_BADSUBST] = CSAVS(1, 90, "Bad substitute"); > elst[ERR_LHS] = CSAVS(1, 91, "No previous left hand side"); > elst[ERR_RHSLONG] = CSAVS(1, 92, "Right hand side too long"); >- elst[ERR_BADBANGMOD] = CSAVS(1, 93, "Bad ! modifier: %c"); >+ elst[ERR_BADBANGMOD] = CSAVS(1, 93, "Bad ! modifier: '%c'"); > elst[ERR_MODFAIL] = CSAVS(1, 94, "Modifier failed"); > elst[ERR_SUBOVFL] = CSAVS(1, 95, "Substitution buffer overflow"); > elst[ERR_BADBANGARG] = CSAVS(1, 96, "Bad ! arg selector"); >@@ -335,7 +335,7 @@ > elst[ERR_TCNOSTR] = CSAVS(1, 115, "Out of termcap string space"); > elst[ERR_SETTCUS] = CSAVS(1, 116, "Usage: settc %s [yes|no]"); > elst[ERR_TCCAP] = CSAVS(1, 117, "Unknown capability `%s'"); >- elst[ERR_TCPARM] = CSAVS(1, 118, "Unknown termcap parameter `%%%c'"); >+ elst[ERR_TCPARM] = CSAVS(1, 118, "Unknown termcap parameter '%%%c'"); > elst[ERR_TCARGS] = CSAVS(1, 119, "Too many arguments for `%s' (%d)"); > elst[ERR_TCNARGS] = CSAVS(1, 120, "`%s' requires %d arguments"); > elst[ERR_TCUSAGE] = CSAVS(1, 121, >@@ -365,7 +365,7 @@ > elst[ERR_ULIMUS] = CSAVS(1, 134, "Usage: unlimit [-fh] [limits]"); > elst[ERR_READONLY] = CSAVS(1, 135, "$%S is read-only"); > elst[ERR_BADJOB] = CSAVS(1, 136, "No such job (badjob)"); >- elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown colorls variable `%c%c'"); >+ elst[ERR_BADCOLORVAR] = CSAVS(1, 137, "Unknown colorls variable '%c%c'"); > elst[ERR_EOF] = CSAVS(1, 138, "Unexpected end of file"); > } > >@@ -380,10 +380,10 @@ > #endif > }; > >-static struct cleanup_entry *cleanup_stack; /* = NULL; */ >-static size_t cleanup_sp; /* = 0; Next free entry */ >-static size_t cleanup_mark; /* = 0; Last entry to handle before unwinding */ >-static size_t cleanup_stack_size; /* = 0 */ >+static struct cleanup_entry *cleanup_stack INIT_ZERO; /* = NULL; */ >+static size_t cleanup_sp INIT_ZERO; /* = 0; Next free entry */ >+static size_t cleanup_mark INIT_ZERO; /* = 0; Last entry to handle before unwinding */ >+static size_t cleanup_stack_size INIT_ZERO; /* = 0 */ > > /* fn() will be run with all signals blocked, so it should not do anything > risky. */ >Index: contrib/tcsh/sh.exec.c >=================================================================== >--- contrib/tcsh/sh.exec.c (revision 309109) >+++ contrib/tcsh/sh.exec.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.exec.c,v 3.79 2011/02/25 23:58:34 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.exec.c,v 3.81 2016/09/12 16:33:54 christos Exp $ */ > /* > * sh.exec.c: Search, find, and execute a command! > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.exec.c,v 3.79 2011/02/25 23:58:34 christos Exp $") >+RCSID("$tcsh: sh.exec.c,v 3.81 2016/09/12 16:33:54 christos Exp $") > > #include "tc.h" > #include "tw.h" >@@ -606,9 +606,10 @@ > cleanup_push(&state, execash_cleanup); > > /* >- * Decrement the shell level >+ * Decrement the shell level, if not in a subshell > */ >- shlvl(-1); >+ if (mainpid == getpid()) >+ shlvl(-1); > #ifdef WINNT_NATIVE > __nt_really_exec=1; > #endif /* WINNT_NATIVE */ >@@ -1070,6 +1071,9 @@ > { > int found = 1; > USE(c); >+ >+ if (adrof(STRautorehash)) >+ dohash(NULL, NULL); > for (v++; *v; v++) > found &= find_cmd(*v, 1); > /* Make status nonzero if any command is not found. */ >@@ -1166,7 +1170,11 @@ > return rval; > } > } >- if (adrof(STRautorehash) && !rehashed && havhash) { >+ /* >+ * If we are printing, we are being called from dowhere() which it >+ * has rehashed already >+ */ >+ if (!prt && adrof(STRautorehash) && !rehashed && havhash) { > dohash(NULL, NULL); > rehashed = 1; > goto retry; >Index: contrib/tcsh/sh.exp.c >=================================================================== >--- contrib/tcsh/sh.exp.c (revision 309109) >+++ contrib/tcsh/sh.exp.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.exp.c,v 3.58 2011/12/25 15:21:50 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.exp.c,v 3.63 2015/12/09 17:17:43 christos Exp $ */ > /* > * sh.exp.c: Expression evaluations > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.exp.c,v 3.58 2011/12/25 15:21:50 christos Exp $") >+RCSID("$tcsh: sh.exp.c,v 3.63 2015/12/09 17:17:43 christos Exp $") > > #include "tw.h" > >@@ -172,6 +172,7 @@ > mode <<= 3; > break; > } >+ xfree(groups); > } > } > # endif /* NGROUPS_MAX */ >@@ -322,7 +323,7 @@ > cleanup_push(p2, xfree); > etracc("exp2c p2", p2, vp); > if (!(ignore & TEXP_IGNORE)) >- switch (i) { >+ switch ((int)i) { > > case EQEQ: > i = eq(p1, p2); >@@ -367,7 +368,7 @@ > cleanup_push(p2, xfree); > etracc("exp3 p2", p2, vp); > if (!(ignore & TEXP_IGNORE)) >- switch (i) { >+ switch ((int)i) { > > case GTR: > i = egetn(p1) > egetn(p2); >@@ -632,7 +633,7 @@ > int altout = 0; > Char *ft = cp, *dp, *ep, *strdev, *strino, *strF, *str, valtest = '\0', > *errval = STR0; >- char *string, string0[22 + MB_LEN_MAX + 1]; // space for 64 bit octal >+ char *string, string0[22 + MB_LEN_MAX + 1]; /* space for 64 bit octal */ > time_t footime; > struct passwd *pw; > struct group *gr; >@@ -954,8 +955,7 @@ > struct wordent *wdp = hp; > > setcopy(STRstatus, STR0, VAR_READWRITE); >- hp->prev = hp->next = hp; >- hp->word = STRNULL; >+ initlex(hp); > while (*v) { > struct wordent *new = xcalloc(1, sizeof *wdp); > >Index: contrib/tcsh/sh.file.c >=================================================================== >--- contrib/tcsh/sh.file.c (revision 309109) >+++ contrib/tcsh/sh.file.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.file.c,v 3.37 2010/02/09 20:21:49 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.file.c,v 3.40 2016/04/16 14:08:14 christos Exp $ */ > /* > * sh.file.c: File completion for csh. This file is not used in tcsh. > */ >@@ -33,7 +33,7 @@ > #include "sh.h" > #include "ed.h" > >-RCSID("$tcsh: sh.file.c,v 3.37 2010/02/09 20:21:49 christos Exp $") >+RCSID("$tcsh: sh.file.c,v 3.40 2016/04/16 14:08:14 christos Exp $") > > #if defined(FILEC) && defined(TIOCSTI) > >@@ -231,7 +231,7 @@ > # ifdef POSIX > (void) tcgetattr(SHOUT, &tty); > # else >- (void) ioctl(SHOUT, TCSETAW, (ioctl_t) &tty); >+ (void) ioctl(SHOUT, TCGETA, (ioctl_t) &tty); > # endif /* POSIX */ > tty_normal = tty; > tty.c_lflag &= ~(ECHOKE | ECHO | ECHOE | ECHOK | ECHONL | >@@ -249,7 +249,7 @@ > char buf[MB_LEN_MAX]; > size_t i, len; > >- len = one_wctomb(buf, *p & CHAR); >+ len = one_wctomb(buf, *p); > for (i = 0; i < len; i++) > (void) ioctl(SHOUT, TIOCSTI, (ioctl_t) &buf[i]); > } >@@ -564,7 +564,7 @@ > } > > if (looking_for_lognames) { >-#ifndef HAVE_GETPWENT >+#ifdef HAVE_GETPWENT > (void) endpwent(); > #endif > } else >Index: contrib/tcsh/sh.func.c >=================================================================== >--- contrib/tcsh/sh.func.c (revision 309109) >+++ contrib/tcsh/sh.func.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.func.c,v 3.162 2011/02/26 00:07:06 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.func.c,v 3.176 2016/10/18 17:26:42 christos Exp $ */ > /* > * sh.func.c: csh builtin functions > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.func.c,v 3.162 2011/02/26 00:07:06 christos Exp $") >+RCSID("$tcsh: sh.func.c,v 3.176 2016/10/18 17:26:42 christos Exp $") > > #include "ed.h" > #include "tw.h" >@@ -799,8 +799,16 @@ > break; > > case TC_IF: >- while (getword(&word)) >+ while (getword(&word)) { >+ if (intty) { >+ histent->word = Strsave(word.s); >+ histent->next = xmalloc(sizeof(*histent)); >+ histent->next->prev = histent; >+ histent = histent->next; >+ } > continue; >+ } >+ > if ((type == TC_IF || type == TC_ELSE) && > eq(word.s, STRthen)) > level++; >@@ -893,7 +901,7 @@ > static struct wordent * > histgetword(struct wordent *histent) > { >- int found = 0, first; >+ int first; > eChar c, d; > int e; > struct Strbuf *tmp; >@@ -917,7 +925,6 @@ > if (c == '\n') > goto nl; > unreadc(c); >- found = 1; > first = 1; > do { > e = (c == '\\'); >@@ -1038,6 +1045,17 @@ > goto past; > if (wp) > Strbuf_append1(wp, (Char) c); >+ if (!d && c == ')') { >+ if (!first && wp) { >+ goto past_word_end; >+ } else { >+ if (wp) { >+ wp->len = 1; >+ Strbuf_terminate(wp); >+ } >+ return found; >+ } >+ } > if (!first && !d && c == '(') { > if (wp) > goto past_word_end; >@@ -1381,7 +1399,7 @@ > stderror(ERR_NAME | ERR_VARBEGIN); > do { > lp++; >- } while (alnum(*lp)); >+ } while (alnum(*lp) || *lp == '.'); > if (*lp != '\0') > stderror(ERR_NAME | ERR_VARALNUM); > >@@ -1543,6 +1561,11 @@ > cleanup_until(lp); > return; > } >+ if (eq(vp, STRLSCOLORS)) { >+ parseLSCOLORS(lp); >+ cleanup_until(lp); >+ return; >+ } > #endif /* COLOR_LS_F */ > > #ifdef SIG_WINDOW >@@ -1670,6 +1693,8 @@ > #ifdef COLOR_LS_F > else if (eq(name, STRLS_COLORS)) > parseLS_COLORS(n); >+ else if (eq(name, STRLSCOLORS)) >+ parseLSCOLORS(n); > #endif /* COLOR_LS_F */ > #ifdef NLS_CATALOGS > else if (eq(name, STRNLSPATH)) { >@@ -1927,6 +1952,14 @@ > { RLIMIT_NOFILE, "descriptors", 1, "" }, > # endif /* RLIMIT_NOFILE */ > >+# ifdef RLIMIT_NPTS >+ { RLIMIT_NPTS, "pseudoterminals", 1, "" }, >+# endif /* RLIMIT_NPTS */ >+ >+# ifdef RLIMIT_KQUEUES >+ { RLIMIT_KQUEUES, "kqueues", 1, "" }, >+# endif /* RLIMIT_KQUEUES */ >+ > # ifdef RLIMIT_CONCUR > { RLIMIT_CONCUR, "concurrency", 1, "thread(s)" }, > # endif /* RLIMIT_CONCUR */ >@@ -1939,6 +1972,10 @@ > { RLIMIT_NPROC, "maxproc", 1, "" }, > # endif /* RLIMIT_NPROC */ > >+# ifdef RLIMIT_NTHR >+ { RLIMIT_NTHR, "maxthread", 1, "" }, >+# endif /* RLIMIT_NTHR */ >+ > # if defined(RLIMIT_OFILE) && !defined(RLIMIT_NOFILE) > { RLIMIT_OFILE, "openfiles", 1, "" }, > # endif /* RLIMIT_OFILE && !defined(RLIMIT_NOFILE) */ >@@ -1955,6 +1992,10 @@ > { RLIMIT_LOCKS, "maxlocks", 1, "" }, > # endif /* RLIMIT_LOCKS */ > >+# ifdef RLIMIT_POSIXLOCKS >+ { RLIMIT_POSIXLOCKS,"posixlocks", 1, "" }, >+# endif /* RLIMIT_POSIXLOCKS */ >+ > # ifdef RLIMIT_SIGPENDING > { RLIMIT_SIGPENDING,"maxsignal", 1, "" }, > # endif /* RLIMIT_SIGPENDING */ >@@ -2407,12 +2448,20 @@ > didcch = state->didcch; > #endif /* CLOSE_ON_EXEC */ > didfds = state->didfds; >- xclose(SHIN); >- xclose(SHOUT); >- xclose(SHDIAG); >+ if (state->saveIN != SHIN) >+ xclose(SHIN); >+ if (state->saveOUT != SHOUT) >+ xclose(SHOUT); >+ if (state->saveDIAG != SHDIAG) >+ xclose(SHDIAG); > close_on_exec(SHIN = dmove(state->saveIN, state->SHIN), 1); > close_on_exec(SHOUT = dmove(state->saveOUT, state->SHOUT), 1); > close_on_exec(SHDIAG = dmove(state->saveDIAG, state->SHDIAG), 1); >+ if (didfds) { >+ close_on_exec(dcopy(SHIN, 0), 1); >+ close_on_exec(dcopy(SHOUT, 1), 1); >+ close_on_exec(dcopy(SHDIAG, 2), 1); >+ } > } > > static Char **Ggv; >@@ -2681,3 +2730,20 @@ > } > #endif /* NLS_CATALOGS */ > } >+ >+int >+getYN(const char *prompt) >+{ >+ int doit, c; >+ xprintf("%s", prompt); >+ flush(); >+ (void) force_read(SHIN, &c, 1); >+ /* >+ * Perhaps we should use the yesexpr from the >+ * actual locale >+ */ >+ doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL); >+ while (c != '\n' && force_read(SHIN, &c, 1) == 1) >+ continue; >+ return doit; >+} >Index: contrib/tcsh/sh.glob.c >=================================================================== >--- contrib/tcsh/sh.glob.c (revision 309109) >+++ contrib/tcsh/sh.glob.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.glob.c,v 3.82 2011/02/27 00:15:17 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.glob.c,v 3.95 2016/08/01 16:21:09 christos Exp $ */ > /* > * sh.glob.c: Regular expression expansion > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.glob.c,v 3.82 2011/02/27 00:15:17 christos Exp $") >+RCSID("$tcsh: sh.glob.c,v 3.95 2016/08/01 16:21:09 christos Exp $") > > #include "tc.h" > #include "tw.h" >@@ -594,8 +594,13 @@ > Char *p; > > while ((p = *t++) != '\0') >- while (*p) >- *p++ &= TRIM; >+ while (*p) { >+#if INVALID_BYTE != 0 >+ if ((*p & INVALID_BYTE) != INVALID_BYTE) /* *p < INVALID_BYTE */ >+#endif >+ *p &= TRIM; >+ p++; >+ } > } > > int >@@ -699,11 +704,15 @@ > int hadnl; > int pvec[2], quoted; > Char *fakecom[2], ibuf[BUFSIZE]; >- char tibuf[BUFSIZE]; > > hadnl = 0; > icnt = 0; >- quoted = (literal || (cp[0] & QUOTE)) ? QUOTE : 0; >+ if (!literal) { >+ for (ip = cp; (*ip & QUOTE) != 0; ip++) >+ continue; >+ quoted = *ip == '\0'; >+ } else >+ quoted = literal; > faket.t_dtyp = NODE_COMMAND; > faket.t_dflg = F_BACKQ; > faket.t_dlef = 0; >@@ -760,6 +769,9 @@ > omark = cleanup_push_mark(); > getexit(osetexit); > for (;;) { >+ struct wordent paraml1; >+ initlex(¶ml1); >+ > (void) setexit(); > justpr = 0; > >@@ -775,19 +787,19 @@ > seterr = NULL; > } > >- (void) lex(¶ml); >- cleanup_push(¶ml, lex_cleanup); >+ freelex(¶ml1); >+ (void) lex(¶ml1); >+ cleanup_push(¶ml1, lex_cleanup); > if (seterr) > stderror(ERR_OLD); >- alias(¶ml); >- t = syntax(paraml.next, ¶ml, 0); >- if (t == NULL) >- return; >+ alias(¶ml1); >+ t = syntax(paraml1.next, ¶ml1, 0); > cleanup_push(t, syntax_cleanup); > /* The F_BACKQ flag must set so the job output is correct if > * printexitvalue is set. If it's not set, the job output > * will have "Exit N" appended where N is the exit status. */ >- t->t_dflg = F_BACKQ|F_NOFORK; >+ if (t) >+ t->t_dflg = F_BACKQ|F_NOFORK; > if (seterr) > stderror(ERR_OLD); > #ifdef SIGTSTP >@@ -801,7 +813,7 @@ > #endif > execute(t, -1, NULL, NULL, TRUE); > >- cleanup_until(¶ml); >+ cleanup_until(¶ml1); > } > } > cleanup_until(&pvec[1]); >@@ -809,45 +821,13 @@ > ip = NULL; > do { > ssize_t cnt = 0; >- char *tmp; > >- tmp = tibuf; > for (;;) { >- while (icnt == 0) { >- int i, eof; >- >+ if (icnt == 0) { > ip = ibuf; >- icnt = xread(pvec[0], tmp, tibuf + BUFSIZE - tmp); >- eof = 0; >- if (icnt <= 0) { >- if (tmp == tibuf) >- goto eof; >- icnt = 0; >- eof = 1; >- } >- icnt += tmp - tibuf; >- i = 0; >- tmp = tibuf; >- while (tmp < tibuf + icnt) { >- int len; >- >- len = normal_mbtowc(&ip[i], tmp, tibuf + icnt - tmp); >- if (len == -1) { >- reset_mbtowc(); >- if (!eof && (size_t)(tibuf + icnt - tmp) < MB_CUR_MAX) { >- break; /* Maybe a partial character */ >- } >- ip[i] = (unsigned char) *tmp | INVALID_BYTE; /* Error */ >- } >- if (len <= 0) >- len = 1; >- i++; >- tmp += len; >- } >- if (tmp != tibuf) >- memmove (tibuf, tmp, tibuf + icnt - tmp); >- tmp = tibuf + (tibuf + icnt - tmp); >- icnt = i; >+ icnt = wide_read(pvec[0], ibuf, BUFSIZE, 0); >+ if (icnt <= 0) >+ goto eof; > } > if (hadnl) > break; >@@ -870,7 +850,9 @@ > if (!quoted && (c == ' ' || c == '\t')) > break; > cnt++; >- Strbuf_append1(word, c | quoted); >+ if (c == '\\' || quoted) >+ c |= QUOTE; >+ Strbuf_append1(word, c); > } > /* > * Unless at end-of-file, we will form a new word here if there were >Index: contrib/tcsh/sh.h >=================================================================== >--- contrib/tcsh/sh.h (revision 309109) >+++ contrib/tcsh/sh.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.h,v 3.165 2011/04/14 18:25:25 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.h,v 3.178 2016/09/12 16:33:54 christos Exp $ */ > /* > * sh.h: Catch it all globals and includes file! > */ >@@ -127,6 +127,11 @@ > #if !defined(__inline) && !defined(__GNUC__) && !defined(_MSC_VER) > #define __inline > #endif >+#ifdef _MSC_VER >+#define TCSH_PTRDIFF_T_FMT "I" >+#else >+#define TCSH_PTRDIFF_T_FMT "t" >+#endif > /* Elide unused argument warnings */ > #define USE(a) (void) (a) > #define TCSH_IGNORE(a) tcsh_ignore((intptr_t)a) >@@ -188,6 +193,11 @@ > # endif /* SYSVREL */ > #endif /* ECHO_STYLE */ > >+/* values for noclobber */ >+#define NOCLOBBER_DEFAULT 1 >+#define NOCLOBBER_NOTEMPTY 2 >+#define NOCLOBBER_ASK 4 >+ > /* > * The shell moves std in/out/diag and the old std input away from units > * 0, 1, and 2 so that it is easy to set up these standards for invoked >@@ -428,9 +438,7 @@ > # if (defined(_SS_SIZE) || defined(_SS_MAXSIZE)) && defined(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) > # if !defined(__APPLE__) /* Damnit, where is getnameinfo() folks? */ > # if !defined(sgi) >-# if !defined(__CYGWIN__) >-# define INET6 >-# endif /* __CYGWIN__ */ >+# define INET6 > # endif /* sgi */ > # endif /* __APPLE__ */ > # endif >@@ -440,21 +448,7 @@ > #ifdef PURIFY > /* exit normally, allowing purify to trace leaks */ > # define _exit exit >-typedef int pret_t; >-#else /* !PURIFY */ >-/* >- * If your compiler complains, then you can either >- * throw it away and get gcc or, use the following define >- * and get rid of the typedef. >- * [The 4.2/3BSD vax compiler does not like that] >- * Both MULTIFLOW and PCC compilers exhbit this bug. -- sterling@netcom.com >- */ >-# if (defined(vax) || defined(uts) || defined(MULTIFLOW) || defined(PCC)) && !defined(__GNUC__) >-# define pret_t void >-# else /* !((vax || uts || MULTIFLOW || PCC) && !__GNUC__) */ >-typedef void pret_t; >-# endif /* (vax || uts || MULTIFLOW || PCC) && !__GNUC__ */ >-#endif /* PURIFY */ >+#endif /* !PURIFY */ > > /* > * ASCII vs. EBCDIC >@@ -573,7 +567,7 @@ > EXTERN int noexec IZERO; /* Don't execute, just syntax check */ > EXTERN int pjobs IZERO; /* want to print jobs if interrupted */ > EXTERN int setintr IZERO; /* Set interrupts on/off -> Wait intr... */ >-EXTERN int handle_intr IZERO;/* Are we currently handling an interrupt? */ >+EXTERN int handle_interrupt IZERO;/* Are we currently handling an interrupt? */ > EXTERN int havhash IZERO; /* path hashing is available */ > EXTERN int editing IZERO; /* doing filename expansion and line editing */ > EXTERN int noediting IZERO; /* initial $term defaulted to noedit */ >@@ -585,8 +579,10 @@ > EXTERN int is1atty IZERO; /* is file descriptor 1 a tty (didfds mode) */ > EXTERN int is2atty IZERO; /* is file descriptor 2 a tty (didfds mode) */ > EXTERN int arun IZERO; /* Currently running multi-line-aliases */ >-EXTERN int implicit_cd IZERO;/* implicit cd enabled?(1=enabled,2=verbose) */ >+EXTERN int implicit_cd IZERO;/* implicit cd enabled?(1=enabled,2=verbose) */ >+EXTERN int cdtohome IZERO; /* cd without args goes home */ > EXTERN int inheredoc IZERO; /* Currently parsing a heredoc */ >+EXTERN int no_clobber IZERO; /* no clobber enabled? 1=yes 2=notempty, 4=ask*/ > /* We received a window change event */ > EXTERN volatile sig_atomic_t windowchg IZERO; > #if defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE) >@@ -635,9 +631,11 @@ > /* > * Miscellany > */ >+EXTERN pid_t mainpid; /* pid of the main shell ($$) */ > EXTERN Char *doldol; /* Character pid for $$ */ > EXTERN pid_t backpid; /* pid of the last background job */ > >+ > /* > * Ideally these should be uid_t, gid_t, pid_t. I cannot do that right now > * cause pid's could be unsigned and that would break our -1 flag, and >@@ -717,14 +715,21 @@ > #define ASCII 0177 > #ifdef WIDE_STRINGS /* Implies SHORT_STRINGS */ > /* 31st char bit used for 'ing (not 32nd, we want all values nonnegative) */ >-# define QUOTE 0x40000000 >-# define TRIM 0x3FFFFFFF /* Mask to strip quote bit */ >+/* >+ * Notice >+ * >+ * By fix for handling unicode name file, 32nd bit is used. >+ * We need use '&' instead of '> or <' when comparing with INVALID_BYTE etc.. >+ * Cast to uChar is not recommended, >+ * becase Char is 4bytes but uChar is 8bytes on I32LP64. */ >+# define QUOTE 0x80000000 >+# define TRIM 0x7FFFFFFF /* Mask to strip quote bit */ > # define UNDER 0x08000000 /* Underline flag */ > # define BOLD 0x04000000 /* Bold flag */ > # define STANDOUT 0x02000000 /* Standout flag */ > # define LITERAL 0x01000000 /* Literal character flag */ > # define ATTRIBUTES 0x0F000000 /* The bits used for attributes */ >-# define INVALID_BYTE 0x00800000 /* Invalid character on input */ >+# define INVALID_BYTE 0xF0000000 /* Invalid character on input */ > # ifdef SOLARIS2 > # define CHAR 0x30FFFFFF /* Mask to mask out the character */ > # else >@@ -753,6 +758,8 @@ > #endif > #define CHAR_DBWIDTH (LITERAL|(LITERAL-1)) > >+# define MAX_UTF32 0x7FFFFFFF /* max UTF32 is U+7FFFFFFF */ >+ > EXTERN int AsciiOnly; /* If set only 7 bits expected in characters */ > > /* >@@ -1020,10 +1027,6 @@ > * Filename/command name expansion variables > */ > >-#ifdef __CYGWIN__ >-# undef MAXPATHLEN >-#endif /* __CYGWIN__ */ >- > #ifndef MAXPATHLEN > # ifdef PATH_MAX > # define MAXPATHLEN PATH_MAX >@@ -1065,7 +1068,7 @@ > unsigned Hhash; /* hash value of command line */ > } Histlist IZERO_STRUCT; > >-EXTERN struct wordent paraml; /* Current lexical word list */ >+extern struct wordent paraml; /* Current lexical word list */ > EXTERN int eventno; /* Next events number */ > EXTERN int lastev; /* Last event reference (default) */ > >@@ -1166,12 +1169,14 @@ > const char *pname; /* print name */ > } mesg[]; > >-/* word_chars is set by default to WORD_CHARS but can be overridden by >- the worchars variable--if unset, reverts to WORD_CHARS */ >+/* word_chars is set by default to WORD_CHARS (or WORD_CHARS_VI) but can >+ be overridden by the wordchars variable--if unset, reverts to >+ WORD_CHARS (or WORD_CHARS_VI) */ > > EXTERN Char *word_chars; > > #define WORD_CHARS "*?_-.[]~=" /* default chars besides alnums in words */ >+#define WORD_CHARS_VI "_" /* default chars besides alnums in words */ > > EXTERN Char *STR_SHELLPATH; > >@@ -1179,6 +1184,7 @@ > EXTERN Char *STR_BSHELL; > #endif > EXTERN Char *STR_WORD_CHARS; >+EXTERN Char *STR_WORD_CHARS_VI; > EXTERN Char **STR_environ IZERO; > > extern int dont_free; /* Tell free that we are in danger if we free */ >Index: contrib/tcsh/sh.hist.c >=================================================================== >--- contrib/tcsh/sh.hist.c (revision 309109) >+++ contrib/tcsh/sh.hist.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.hist.c,v 3.53 2011/01/24 18:10:26 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.hist.c,v 3.61 2015/06/06 21:19:08 christos Exp $ */ > /* > * sh.hist.c: Shell history expansions and substitutions > */ >@@ -32,10 +32,12 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.hist.c,v 3.53 2011/01/24 18:10:26 christos Exp $") >+RCSID("$tcsh: sh.hist.c,v 3.61 2015/06/06 21:19:08 christos Exp $") > >+#include <stdio.h> /* for rename(2), grr. */ > #include <assert.h> > #include "tc.h" >+#include "dotlock.h" > > extern int histvalid; > extern struct Strbuf histline; >@@ -68,12 +70,12 @@ > > static const int fastMergeErase = 1; > static unsigned histCount = 0; /* number elements on history list */ >+static int histlen = 0; > static struct Hist *histTail = NULL; /* last element on history list */ > static struct Hist *histMerg = NULL; /* last element merged by Htime */ > > static void insertHistHashTable(struct Hist *, unsigned); > >- > /* Insert new element (hp) in history list after specified predecessor (pp). */ > static void > hinsert(struct Hist *hp, struct Hist *pp) >@@ -107,7 +109,7 @@ > > /* Prune length of history list to specified size by history variable. */ > PG_STATIC void >-discardExcess(int histlen) >+discardExcess(int hlen) > { > struct Hist *hp, *np; > if (histTail == NULL) { >@@ -117,23 +119,23 @@ > /* Prune dummy entries from the front, then old entries from the back. If > * the list is still too long scan the whole list as before. But only do a > * full scan if the list is more than 6% (1/16th) too long. */ >- while (histCount > (unsigned)histlen && (np = Histlist.Hnext)) { >- if (eventno - np->Href >= histlen || histlen == 0) >+ while (histCount > (unsigned)hlen && (np = Histlist.Hnext)) { >+ if (eventno - np->Href >= hlen || hlen == 0) > hremove(np), hfree(np); > else > break; > } >- while (histCount > (unsigned)histlen && (np = histTail) != &Histlist) { >- if (eventno - np->Href >= histlen || histlen == 0) >+ while (histCount > (unsigned)hlen && (np = histTail) != &Histlist) { >+ if (eventno - np->Href >= hlen || hlen == 0) > hremove(np), hfree(np); > else > break; > } >- if (histCount - (histlen >> 4) <= (unsigned)histlen) >+ if (histCount - (hlen >> 4) <= (unsigned)hlen) > return; /* don't bother doing the full scan */ >- for (hp = &Histlist; histCount > (unsigned)histlen && >+ for (hp = &Histlist; histCount > (unsigned)hlen && > (np = hp->Hnext) != NULL;) >- if (eventno - np->Href >= histlen || histlen == 0) >+ if (eventno - np->Href >= hlen || hlen == 0) > hremove(np), hfree(np); > else > hp = np; >@@ -145,20 +147,9 @@ > struct wordent *sp, > int mflg) /* true if -m (merge) specified */ > { >- int histlen = 0; >- Char *cp; >- > /* throw away null lines */ > if (sp && sp->next->word[0] == '\n') > return; >- cp = varval(STRhistory); >- while (*cp) { >- if (!Isdigit(*cp)) { >- histlen = 0; >- break; >- } >- histlen = histlen * 10 + *cp++ - '0'; >- } > if (sp) > (void) enthist(++eventno, sp, 1, mflg, histlen); > discardExcess(histlen); >@@ -711,9 +702,9 @@ > > /* Computes a new hash table size, when the current one is too small. */ > static unsigned >-getHashTableSize(int histlen) >+getHashTableSize(int hlen) > { >- unsigned target = histlen * 2; >+ unsigned target = hlen * 2; > unsigned e = 5; > unsigned size; > while ((size = 1<<e) < target) >@@ -729,17 +720,16 @@ > > /* Create the hash table or resize, if necessary. */ > static void >-createHistHashTable(int histlen) >+createHistHashTable(int hlen) > { >- if (histlen == 0) { >+ if (hlen == 0) { > discardHistHashTable(); > return; > } >- if (histlen < 0) { >- histlen = getn(varval(STRhistory)); >- if (histlen == 0) >+ if (hlen < 0) { >+ if (histlen <= 0) > return; /* no need for hash table */ >- assert(histlen > 0); >+ hlen = histlen; > } > if (histHashTable != NULL) { > if (histCount < histHashTableLength * 3 / 4) >@@ -747,7 +737,7 @@ > discardHistHashTable(); /* too small */ > } > histHashTableLength = getHashTableSize( >- histlen > (int)histCount ? histlen : (int)histCount); >+ hlen > (int)histCount ? hlen : (int)histCount); > histHashTable = xmalloc(histHashTableLength * sizeof(struct Hist *)); > memset(histHashTable, 0, histHashTableLength * sizeof(struct Hist *)); > assert(histHashTable[0] == emptyHTE); >@@ -934,7 +924,7 @@ > struct wordent *lp, > int docopy, > int mflg, /* true if merge requested */ >- int histlen) /* -1 if unknown */ >+ int hlen) /* -1 if unknown */ > { > struct Hist *p = NULL, *pp = &Histlist, *pTime = NULL; > struct Hist *np; >@@ -944,7 +934,7 @@ > if ((dp = varval(STRhistdup)) != STRNULL) { > if (eq(dp, STRerase)) { > /* masaoki@akebono.tky.hp.com (Kobayashi Masaoki) */ >- createHistHashTable(histlen); >+ createHistHashTable(hlen); > lpHash = hashhist(lp); > assert(lpHash != 0); > p = findHistHashTable(lp, lpHash); >@@ -963,7 +953,7 @@ > } > } > else if (eq(dp, STRall)) { >- createHistHashTable(histlen); >+ createHistHashTable(hlen); > lpHash = hashhist(lp); > assert(lpHash != 0); > p = findHistHashTable(lp, lpHash); >@@ -1031,7 +1021,7 @@ > else > pp = &Histlist; /* insert at beginning of history */ > hinsert(np, pp); >- if (lpHash && histlen != 0) /* erase & all modes use hash table */ >+ if (lpHash && hlen != 0) /* erase & all modes use hash table */ > insertHistHashTable(np, lpHash); > else > discardHistHashTable(); >@@ -1053,6 +1043,8 @@ > PG_STATIC void > phist(struct Hist *hp, int hflg) > { >+ if (hp->Href < 0) >+ return; > if (hflg & HIST_ONLY) { > int old_output_raw; > >@@ -1207,7 +1199,7 @@ > buf = xmalloc(Strlen(istr) * MB_LEN_MAX + 1); > > for (p = buf, ip = istr; *ip != '\0'; ip++) >- p += one_wctomb(p, CHAR & *ip); >+ p += one_wctomb(p, *ip); > > *p = '\0'; > xfree(istr); >@@ -1220,13 +1212,21 @@ > } > } > >+static void >+dotlock_cleanup(void* lockpath) >+{ >+ dot_unlock((char*)lockpath); >+} >+ > /* Save history before exiting the shell. */ > void > rechist(Char *fname, int ref) > { >- Char *snum; >+ Char *snum, *rs; > int fp, ftmp, oldidfds; > struct varent *shist; >+ char path[MAXPATHLEN]; >+ struct stat st; > static Char *dumphist[] = {STRhistory, STRmhT, 0, 0}; > > if (fname == NULL && !ref) >@@ -1255,12 +1255,14 @@ > * with numerous shells being in simultaneous use. Imagine > * any kind of window system. All these shells 'share' the same > * ~/.history file for recording their command line history. >- * Currently the automatic merge can only succeed when the shells >- * nicely quit one after another. >+ * We try to handle the case of multiple shells trying to merge >+ * histories at the same time, by creating semi-unique filenames >+ * and saving the history there first and then trying to rename >+ * them in the proper history file. > * > * Users that like to nuke their environment require here an atomic >- * loadhist-creat-dohist(dumphist)-close >- * sequence. >+ * loadhist-creat-dohist(dumphist)-close sequence which is given >+ * by optional lock parameter to savehist. > * > * jw. > */ >@@ -1271,16 +1273,49 @@ > */ > oldidfds = didfds; > didfds = 0; >- if ((shist = adrof(STRsavehist)) != NULL && shist->vec != NULL) >- if (shist->vec[1] && eq(shist->vec[1], STRmerge)) >+ if ((shist = adrof(STRsavehist)) != NULL && shist->vec != NULL) { >+ size_t i; >+ int merge = 0, lock = 0; >+ >+ for (i = 1; shist->vec[i]; i++) { >+ if (eq(shist->vec[i], STRmerge)) >+ merge++; >+ if (eq(shist->vec[i], STRlock)) >+ lock++; >+ } >+ >+ if (merge) { >+ if (lock) { >+#ifndef WINNT_NATIVE >+ char *lockpath = strsave(short2str(fname)); >+ cleanup_push(lockpath, xfree); >+ /* Poll in 100 miliseconds interval to obtain the lock. */ >+ if ((dot_lock(lockpath, 100) == 0)) >+ cleanup_push(lockpath, dotlock_cleanup); >+#endif >+ } > loadhist(fname, 1); >+ } >+ } >+ rs = randsuf(); >+ xsnprintf(path, sizeof(path), "%S.%S", fname, rs); >+ xfree(rs); > >- fp = xcreat(short2str(fname), 0600); >- cleanup_until(fname); >+ fp = xcreat(path, 0600); > if (fp == -1) { > didfds = oldidfds; >+ cleanup_until(fname); > return; > } >+ /* Try to preserve ownership and permissions of the original history file */ >+#ifndef WINNT_NATIVE >+ if (stat(short2str(fname), &st) != -1) { >+ TCSH_IGNORE(fchown(fp, st.st_uid, st.st_gid)); >+ TCSH_IGNORE(fchmod(fp, st.st_mode)); >+ } >+#else >+ UNREFERENCED_PARAMETER(st); >+#endif > ftmp = SHOUT; > SHOUT = fp; > dumphist[2] = snum; >@@ -1288,6 +1323,8 @@ > xclose(fp); > SHOUT = ftmp; > didfds = oldidfds; >+ (void)rename(path, short2str(fname)); >+ cleanup_until(fname); > } > > >@@ -1317,3 +1354,10 @@ > hp->Hnum = hp->Href = n--; > } > } >+ >+void >+sethistory(int n) >+{ >+ histlen = n; >+ discardExcess(histlen); >+} >Index: contrib/tcsh/sh.init.c >=================================================================== >--- contrib/tcsh/sh.init.c (revision 309109) >+++ contrib/tcsh/sh.init.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.init.c,v 3.63 2006/08/23 01:49:32 mitr Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.init.c,v 3.64 2013/02/11 13:51:16 christos Exp $ */ > /* > * sh.init.c: Function and signal tables > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.init.c,v 3.63 2006/08/23 01:49:32 mitr Exp $") >+RCSID("$tcsh: sh.init.c,v 3.64 2013/02/11 13:51:16 christos Exp $") > > #include "ed.h" > #include "tw.h" >@@ -214,7 +214,7 @@ > */ > > /* We define NUMSIG to avoid changing NSIG or MAXSIG */ >-#if defined(POSIX) && !defined(__CYGWIN__) >+#if defined(POSIX) && (!defined(__CYGWIN__) || defined (__x86_64__)) > # define NUMSIG 65 > #else /* !POSIX */ > # define NUMSIG 33 >Index: contrib/tcsh/sh.lex.c >=================================================================== >--- contrib/tcsh/sh.lex.c (revision 309109) >+++ contrib/tcsh/sh.lex.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.lex.c,v 3.87 2011/01/24 17:48:15 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.lex.c,v 3.91 2016/08/01 16:21:09 christos Exp $ */ > /* > * sh.lex.c: Lexical analysis into tokens > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.lex.c,v 3.87 2011/01/24 17:48:15 christos Exp $") >+RCSID("$tcsh: sh.lex.c,v 3.91 2016/08/01 16:21:09 christos Exp $") > > #include "ed.h" > >@@ -66,7 +66,6 @@ > static struct wordent *getsub (struct wordent *); > static Char *subword (Char *, Char, int *, size_t *); > static struct wordent *dosub (Char, struct wordent *, int); >-static ssize_t wide_read (int, Char *, size_t, int); > > /* > * Peekc is a peek character for getC, peekread for readc. >@@ -258,6 +257,14 @@ > } > > void >+initlex(struct wordent *vp) >+{ >+ vp->word = STRNULL; >+ vp->prev = vp; >+ vp->next = vp; >+} >+ >+void > freelex(struct wordent *vp) > { > struct wordent *fp; >@@ -378,7 +385,7 @@ > */ > c |= QUOTE; > ungetC(c); >- c = '\\'; >+ c = '\\' | QUOTE; > } > } > } >@@ -1539,7 +1546,7 @@ > } > } > >-static ssize_t >+ssize_t > wide_read(int fildes, Char *buf, size_t nchars, int use_fclens) > { > char cbuf[BUFSIZE + 1]; >Index: contrib/tcsh/sh.misc.c >=================================================================== >--- contrib/tcsh/sh.misc.c (revision 309109) >+++ contrib/tcsh/sh.misc.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.misc.c,v 3.46 2010/05/08 00:41:58 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.misc.c,v 3.50 2015/06/06 21:19:08 christos Exp $ */ > /* > * sh.misc.c: Miscelaneous functions > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.misc.c,v 3.46 2010/05/08 00:41:58 christos Exp $") >+RCSID("$tcsh: sh.misc.c,v 3.50 2015/06/06 21:19:08 christos Exp $") > > static int renum (int, int); > static Char **blkend (Char **); >@@ -450,8 +450,13 @@ > > if (!cp) > return (cp); >- while ((*dp++ &= TRIM) != '\0') >- continue; >+ while (*dp != '\0') { >+#if INVALID_BYTE != 0 >+ if ((*dp & INVALID_BYTE) != INVALID_BYTE) /* *dp < INVALID_BYTE */ >+#endif >+ *dp &= TRIM; >+ dp++; >+ } > return (cp); > } > >@@ -462,8 +467,17 @@ > > if (!cp) > return (cp); >- while (*dp != '\0') >- *dp++ |= QUOTE; >+ while (*dp != '\0') { >+#ifdef WIDE_STRINGS >+ if ((*dp & 0xffffff80) == 0) /* *dp < 0x80 */ >+#elif defined SHORT_STRINGS >+ if ((*dp & 0xff80) == 0) /* *dp < 0x80 */ >+#else >+ if ((*dp & 0x80) == 0) /* *dp < 0x80 */ >+#endif >+ *dp |= QUOTE; >+ dp++; >+ } > return (cp); > } > >@@ -533,7 +547,8 @@ > if (fildes < 0) > return; > while (close(fildes) == -1 && errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > } > > void >@@ -540,7 +555,8 @@ > xclosedir(DIR *dirp) > { > while (closedir(dirp) == -1 && errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > } > > int >@@ -549,7 +565,8 @@ > int res; > > while ((res = creat(path, mode)) == -1 && errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > return res; > } > >@@ -560,7 +577,8 @@ > int res; > > while ((res = dup2(fildes, fildes2)) == -1 && errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > return res; > } > #endif >@@ -572,7 +590,8 @@ > > errno = 0; > while ((res = getgrgid(xgid)) == NULL && errno == EINTR) { >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > errno = 0; > } > return res; >@@ -585,7 +604,8 @@ > > errno = 0; > while ((res = getpwnam(name)) == NULL && errno == EINTR) { >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > errno = 0; > } > return res; >@@ -598,7 +618,8 @@ > > errno = 0; > while ((res = getpwuid(xuid)) == NULL && errno == EINTR) { >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > errno = 0; > } > return res; >@@ -611,7 +632,8 @@ > > if ((oflag & O_CREAT) == 0) { > while ((res = open(path, oflag)) == -1 && errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > } else { > va_list ap; > mode_t mode; >@@ -623,7 +645,8 @@ > mode = va_arg(ap, int); > va_end(ap); > while ((res = open(path, oflag, mode)) == -1 && errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > } > return res; > } >@@ -636,7 +659,8 @@ > /* This is where we will be blocked most of the time, so handle signals > that didn't interrupt any system call. */ > do >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > while ((res = read(fildes, buf, nbyte)) == -1 && errno == EINTR); > return res; > } >@@ -649,7 +673,8 @@ > > while ((res = tcsetattr(fildes, optional_actions, termios_p)) == -1 && > errno == EINTR) >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > return res; > } > #endif >@@ -662,7 +687,8 @@ > /* This is where we will be blocked most of the time, so handle signals > that didn't interrupt any system call. */ > do >- handle_pending_signals(); >+ if (handle_pending_signals()) >+ break; > while ((res = write(fildes, buf, nbyte)) == -1 && errno == EINTR); > return res; > } >Index: contrib/tcsh/sh.print.c >=================================================================== >--- contrib/tcsh/sh.print.c (revision 309109) >+++ contrib/tcsh/sh.print.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.print.c,v 3.36 2011/05/25 20:17:20 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.print.c,v 3.37 2015/05/10 13:29:28 christos Exp $ */ > /* > * sh.print.c: Primitive Output routines. > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.print.c,v 3.36 2011/05/25 20:17:20 christos Exp $") >+RCSID("$tcsh: sh.print.c,v 3.37 2015/05/10 13:29:28 christos Exp $") > > #include "ed.h" > >@@ -231,13 +231,13 @@ > return; > if (GettingInput && !Tty_raw_mode && linp < &linbuf[sizeof linbuf - 10]) > return; >- if (handle_intr) >- exitset = 1; >+ if (handle_interrupt) >+ exitset = 1; > > if (interrupted) { > interrupted = 0; > linp = linbuf; /* avoid recursion as stderror calls flush */ >- if (handle_intr) >+ if (handle_interrupt) > fixerror(); > else > stderror(ERR_SILENT); >@@ -298,11 +298,11 @@ > case EDQUOT: > #endif > /* Nothing to do, but die */ >- if (handle_intr == 0) >+ if (handle_interrupt == 0) > xexit(1); > /*FALLTHROUGH*/ > default: >- if (handle_intr) >+ if (handle_interrupt) > fixerror(); > else > stderror(ERR_SILENT); >Index: contrib/tcsh/sh.proc.c >=================================================================== >--- contrib/tcsh/sh.proc.c (revision 309109) >+++ contrib/tcsh/sh.proc.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.proc.c,v 3.121 2012/01/25 15:34:41 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.proc.c,v 3.134 2016/09/23 19:17:28 christos Exp $ */ > /* > * sh.proc.c: Job manipulations > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.proc.c,v 3.121 2012/01/25 15:34:41 christos Exp $") >+RCSID("$tcsh: sh.proc.c,v 3.134 2016/09/23 19:17:28 christos Exp $") > > #include "ed.h" > #include "tc.h" >@@ -47,11 +47,9 @@ > # define HZ 16 > #endif /* aiws */ > >-#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) >-# if !defined(__ANDROID__) >-# define BSDWAIT >-# endif >-#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */ >+#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) >+# define BSDWAIT >+#endif /* _BSD || (IRIS4D && __STDC__) || __lucid */ > #ifndef WTERMSIG > # define WTERMSIG(w) (((union wait *) &(w))->w_termsig) > # ifndef BSDWAIT >@@ -191,8 +189,13 @@ > # else > /* both a wait3 and rusage */ > # if !defined(BSDWAIT) || defined(NeXT) || defined(MACH) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || (defined(IRIS4D) && SYSVREL <= 3) || defined(__lucid) || defined(__osf__) >+#ifdef __ANDROID__ /* no wait3, only wait4 */ >+ pid = wait4(-1, &w, >+ (setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG), &ru); >+#else > pid = wait3(&w, > (setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG), &ru); >+#endif /* __ANDROID__ */ > # else /* BSDWAIT */ > pid = wait3(&w.w_status, > (setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG), &ru); >@@ -507,6 +510,7 @@ > cleanup_push(&oset, sigprocmask_cleanup); > pause_mask = oset; > sigdelset(&pause_mask, SIGCHLD); >+ sigaddset(&pause_mask, SIGINT); > for (;;) { > (void)handle_pending_signals(); > jobflags = 0; >@@ -593,22 +597,44 @@ > dowait(Char **v, struct command *c) > { > struct process *pp; >+ >+ /* the current block mask to be able to restore */ >+ sigset_t old_mask; >+ >+ /* block mask for critical section: OLD_MASK U {SIGCHLD} */ >+ sigset_t block_mask; >+ >+ /* ignore those during blocking sigsuspend: >+ OLD_MASK / {SIGCHLD, possibly(SIGINT)} */ > sigset_t pause_mask; >+ > int opintr_disabled, gotsig; > > USE(c); > USE(v); > pjobs++; >+ > sigprocmask(SIG_BLOCK, NULL, &pause_mask); > sigdelset(&pause_mask, SIGCHLD); > if (setintr) > sigdelset(&pause_mask, SIGINT); >+ >+ /* critical section, block also SIGCHLD */ >+ sigprocmask(SIG_BLOCK, NULL, &block_mask); >+ sigaddset(&block_mask, SIGCHLD); >+ sigprocmask(SIG_BLOCK, &block_mask, &old_mask); >+ >+ /* detect older SIGCHLDs and remove PRUNNING flag from proclist */ >+ (void)handle_pending_signals(); >+ > loop: > for (pp = proclist.p_next; pp; pp = pp->p_next) > if (pp->p_procid && /* pp->p_procid == pp->p_jobid && */ > pp->p_flags & PRUNNING) { >- (void)handle_pending_signals(); >+ /* wait for (or pick up alredy blocked) SIGCHLD */ > sigsuspend(&pause_mask); >+ >+ /* make the 'wait' interuptable by CTRL-C */ > opintr_disabled = pintr_disabled; > pintr_disabled = 0; > gotsig = handle_pending_signals(); >@@ -618,6 +644,8 @@ > goto loop; > } > pjobs = 0; >+ >+ sigprocmask(SIG_SETMASK, &old_mask, NULL); > } > > /* >@@ -963,6 +991,7 @@ > struct process *tp; > int jobflags, pstatus, pcond; > const char *format; >+ int ohaderr; > > #ifdef BACKPIPE > struct process *pipehead = NULL, *pipetail = NULL, *pmarker = NULL; >@@ -978,6 +1007,9 @@ > tp = pp; > status = reason = -1; > jobflags = 0; >+ ohaderr = haderr; >+ /* Print status to stderr, except for jobs built-in */ >+ haderr = !(flag & JOBLIST); > do { > #ifdef BACKPIPE > /* >@@ -1186,6 +1218,7 @@ > xprintf(" "); > ptprint(tp); > } >+ haderr = ohaderr; > return (jobflags); > } > >@@ -1284,7 +1317,7 @@ > dojobs(Char **v, struct command *c) > { > struct process *pp; >- int flag = NUMBER | NAME | REASON; >+ int flag = NUMBER | NAME | REASON | JOBLIST; > int i; > > USE(c); >@@ -1833,12 +1866,12 @@ > (void) signal(SIGHUP, SIG_IGN); > if (t->t_dflg & F_NICE) { > int nval = SIGN_EXTEND_CHAR(t->t_nice); >-#ifdef HAVE_SETPRIORITY >+#if defined(HAVE_SETPRIORITY) && defined(PRIO_PROCESS) > if (setpriority(PRIO_PROCESS, 0, nval) == -1 && errno) > stderror(ERR_SYSTEM, "setpriority", strerror(errno)); >-#else /* !HAVE_SETPRIORITY */ >+#else /* !HAVE_SETPRIORITY || !PRIO_PROCESS */ > (void) nice(nval); >-#endif /* !HAVE_SETPRIORITY */ >+#endif /* HAVE_SETPRIORITY && PRIO_PROCESS */ > } > #ifdef F_VER > if (t->t_dflg & F_VER) { >Index: contrib/tcsh/sh.proc.h >=================================================================== >--- contrib/tcsh/sh.proc.h (revision 309109) >+++ contrib/tcsh/sh.proc.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.proc.h,v 3.15 2011/04/14 18:25:25 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.proc.h,v 3.16 2016/05/24 17:41:12 christos Exp $ */ > /* > * sh.proc.h: Process data structures and variables > */ >@@ -106,14 +106,15 @@ > #define PBRACE (1<<18) /* Process is {} evaluation */ > > /* defines for arguments to pprint */ >-#define NUMBER 01 >-#define NAME 02 >-#define REASON 04 >-#define AMPERSAND 010 >-#define FANCY 020 >-#define SHELLDIR 040 /* print shell's dir if not the same */ >-#define JOBDIR 0100 /* print job's dir if not the same */ >-#define AREASON 0200 >+#define NUMBER 0x001 >+#define NAME 0x002 >+#define REASON 0x004 >+#define AMPERSAND 0x008 >+#define FANCY 0x010 >+#define SHELLDIR 0x020 /* print shell's dir if not the same */ >+#define JOBDIR 0x040 /* print job's dir if not the same */ >+#define AREASON 0x080 >+#define JOBLIST 0x100 > > EXTERN struct process proclist IZERO_STRUCT;/* list head of all processes */ > >Index: contrib/tcsh/sh.sem.c >=================================================================== >--- contrib/tcsh/sh.sem.c (revision 309109) >+++ contrib/tcsh/sh.sem.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.sem.c,v 3.86 2011/02/25 23:24:19 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.sem.c,v 3.90 2015/10/31 18:54:42 christos Exp $ */ > /* > * sh.sem.c: I/O redirections and job forking. A touchy issue! > * Most stuff with builtins is incorrect >@@ -33,7 +33,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.sem.c,v 3.86 2011/02/25 23:24:19 christos Exp $") >+RCSID("$tcsh: sh.sem.c,v 3.90 2015/10/31 18:54:42 christos Exp $") > > #include "tc.h" > #include "tw.h" >@@ -212,8 +212,14 @@ > * If noexec then this is all we do. > */ > if (t->t_dflg & F_READ) { >+ int old_pintr_disabled; >+ > xclose(0); >+ if (setintr) >+ pintr_push_enable(&old_pintr_disabled); > heredoc(t->t_dlef); >+ if (setintr) >+ cleanup_until(&old_pintr_disabled); > if (noexec) > xclose(0); > } >@@ -346,10 +352,6 @@ > * not pipedout, niced, nohupped, or &'d. It would be nice(?) to not > * fork in some of these cases. > */ >- /* >- * Prevent forking cd, pushd, popd, chdir cause this will cause the >- * shell not to change dir! >- */ > #ifdef BACKPIPE > /* > * Can't have NOFORK for the tail of a pipe - because it is not the >@@ -358,11 +360,26 @@ > */ > if (t->t_dflg & F_PIPEIN) > t->t_dflg &= ~(F_NOFORK); >+#else >+ /* >+ * "command | builtin" may cause major misbehaviour as noted in >+ * in the BUGS file entry >+ * Subject: Redirected input to built-in functions misbehaves badly >+ * forking when the builtin is the end of the pipe corrects the >+ * problem. >+ */ >+ if (bifunc && (t->t_dflg & F_PIPEIN)) >+ t->t_dflg &= ~(F_NOFORK); > #endif /* BACKPIPE */ >+ /* >+ * Prevent forking cd, pushd, popd, chdir cause this will cause the >+ * shell not to change dir! (XXX: but only for nice?) >+ */ > if (bifunc && (bifunc->bfunct == (bfunc_t)dochngd || > bifunc->bfunct == (bfunc_t)dopushd || > bifunc->bfunct == (bfunc_t)dopopd)) > t->t_dflg &= ~(F_NICE); >+ > if (((t->t_dflg & F_TIME) || ((t->t_dflg & F_NOFORK) == 0 && > (!bifunc || t->t_dflg & > (F_PIPEOUT | F_AMPERSAND | F_NICE | F_NOHUP | F_HUP)))) || >@@ -560,13 +577,13 @@ > (void) signal(SIGHUP, SIG_DFL); > if (t->t_dflg & F_NICE) { > int nval = SIGN_EXTEND_CHAR(t->t_nice); >-# ifdef HAVE_SETPRIORITY >+# if defined(HAVE_SETPRIORITY) && defined(PRIO_PROCESS) > if (setpriority(PRIO_PROCESS, 0, nval) == -1 && errno) > stderror(ERR_SYSTEM, "setpriority", > strerror(errno)); >-# else /* !HAVE_SETPRIORITY */ >+# else /* !HAVE_SETPRIORITY || !PRIO_PROCESS */ > (void) nice(nval); >-# endif /* HAVE_SETPRIORITY */ >+# endif /* HAVE_SETPRIORITY && PRIO_PROCESS */ > } > # ifdef F_VER > if (t->t_dflg & F_VER) { >@@ -898,7 +915,7 @@ > else > fd = 0; > if ((flags & F_APPEND) == 0 || fd == -1) { >- if (!(flags & F_OVERWRITE) && adrof(STRnoclobber)) { >+ if (!(flags & F_OVERWRITE) && no_clobber) { > if (flags & F_APPEND) > stderror(ERR_SYSTEM, tmp, strerror(errno)); > chkclob(tmp); >@@ -970,5 +987,13 @@ > return; > if (S_ISCHR(stb.st_mode)) > return; >+ if (no_clobber & NOCLOBBER_NOTEMPTY && stb.st_size == 0) >+ return; >+ if (no_clobber & NOCLOBBER_ASK) { >+ if (getYN(CGETS(22, 15, >+ "Do you really want to overwrite an existing file? [N/y] "))) >+ return; >+ } >+ > stderror(ERR_EXISTS, cp); > } >Index: contrib/tcsh/sh.set.c >=================================================================== >--- contrib/tcsh/sh.set.c (revision 309109) >+++ contrib/tcsh/sh.set.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.set.c,v 3.83 2012/01/15 17:15:28 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.set.c,v 3.89 2015/09/08 15:49:53 christos Exp $ */ > /* > * sh.set.c: Setting and Clearing of variables > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.set.c,v 3.83 2012/01/15 17:15:28 christos Exp $") >+RCSID("$tcsh: sh.set.c,v 3.89 2015/09/08 15:49:53 christos Exp $") > > #include "ed.h" > #include "tw.h" >@@ -55,6 +55,7 @@ > static void unsetv1 (struct varent *); > static void exportpath (Char **); > static void balance (struct varent *, int, int); >+static int set_noclobber (Char **); > > /* > * C Shell >@@ -72,6 +73,13 @@ > dohash(NULL, NULL); > } > } >+ else if (eq(vp, STRnoclobber)) { >+ struct varent *p = adrof(STRnoclobber); >+ if (p == NULL) >+ stderror(ERR_NAME | ERR_UNDVAR); >+ else >+ no_clobber = set_noclobber(p->vec); >+ } > else if (eq(vp, STRhistchars)) { > Char *pn = varval(vp); > >@@ -165,6 +173,10 @@ > noediting = 0; > /* PWP: add more stuff in here later */ > } >+ else if (eq(vp, STRvimode)) { >+ VImode = 1; >+ update_wordchars(); >+ } > else if (eq(vp, STRshlvl)) { > tsetenv(STRKSHLVL, varval(vp)); > } >@@ -195,6 +207,9 @@ > else if (eq(vp, STRkillring)) { > SetKillRing((int)getn(varval(vp))); > } >+ else if (eq(vp, STRhistory)) { >+ sethistory((int)getn(varval(vp))); >+ } > #ifndef HAVENOUTMP > else if (eq(vp, STRwatch)) { > resetwatch(); >@@ -203,6 +218,9 @@ > else if (eq(vp, STRimplicitcd)) { > implicit_cd = ((eq(varval(vp), STRverbose)) ? 2 : 1); > } >+ else if (eq(vp, STRcdtohome)) { >+ cdtohome = 1; >+ } > #ifdef COLOR_LS_F > else if (eq(vp, STRcolor)) { > set_color_context(); >@@ -762,6 +780,8 @@ > PRCH = tcsh ? '>' : '%'; > PRCHROOT = '#'; > } >+ if (adrof(STRnoclobber) == 0) >+ no_clobber = 0; > if (adrof(STRhistlit) == 0) > HistLit = 0; > if (adrof(STRloginsh) == 0) >@@ -780,12 +800,18 @@ > symlinks = 0; > if (adrof(STRimplicitcd) == 0) > implicit_cd = 0; >+ if (adrof(STRcdtohome) == 0) >+ cdtohome = 0; > if (adrof(STRkillring) == 0) > SetKillRing(0); > if (did_edit && noediting && adrof(STRedit) == 0) > noediting = 0; >+ if (adrof(STRvimode) == 0) >+ VImode = 0; > if (did_roe && adrof(STRrecognize_only_executables) == 0) > tw_cmd_free(); >+ if (adrof(STRhistory) == 0) >+ sethistory(0); > #ifdef COLOR_LS_F > if (adrof(STRcolor) == 0) > set_color_context(); >@@ -793,6 +819,7 @@ > #if defined(KANJI) && defined(SHORT_STRINGS) && defined(DSPMBYTE) > update_dspmbyte_vars(); > #endif >+ update_wordchars(); > #ifdef NLS_CATALOGS > nlsclose(); > nlsinit(); >@@ -920,6 +947,28 @@ > cleanup_until(exppath); > } > >+static int >+set_noclobber(Char **val) >+{ >+ Char *option; >+ int nc = NOCLOBBER_DEFAULT; >+ >+ if (val == NULL) >+ return nc; >+ while (*val) { >+ if (*val == 0 || eq(*val, STRRparen)) >+ return nc; >+ >+ option = *val++; >+ >+ if (eq(option, STRnotempty)) >+ nc |= NOCLOBBER_NOTEMPTY; >+ else if (eq(option, STRask)) >+ nc |= NOCLOBBER_ASK; >+ } >+ return nc; >+} >+ > #ifndef lint > /* > * Lint thinks these have null effect >@@ -1301,3 +1350,11 @@ > } > #endif > #endif >+ >+void >+update_wordchars(void) >+{ >+ if ((word_chars == STR_WORD_CHARS) || (word_chars == STR_WORD_CHARS_VI)) { >+ word_chars = (VImode ? STR_WORD_CHARS_VI : STR_WORD_CHARS); >+ } >+} >Index: contrib/tcsh/sh.time.c >=================================================================== >--- contrib/tcsh/sh.time.c (revision 309109) >+++ contrib/tcsh/sh.time.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/sh.time.c,v 3.35 2010/12/09 15:39:29 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/sh.time.c,v 3.37 2016/07/09 00:45:29 christos Exp $ */ > /* > * sh.time.c: Shell time keeping and printing. > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: sh.time.c,v 3.35 2010/12/09 15:39:29 christos Exp $") >+RCSID("$tcsh: sh.time.c,v 3.37 2016/07/09 00:45:29 christos Exp $") > > #ifdef SUNOS4 > # include <machine/param.h> >@@ -158,12 +158,12 @@ > nval = 4; > else if (*v == 0 && any("+-", cp[0])) > nval = getn(cp); >-#ifdef HAVE_SETPRIORITY >+#if defined(HAVE_SETPRIORITY) && defined(PRIO_PROCESS) > if (setpriority(PRIO_PROCESS, 0, nval) == -1 && errno) > stderror(ERR_SYSTEM, "setpriority", strerror(errno)); >-#else /* !HAVE_SETPRIORITY */ >+#else /* !HAVE_SETPRIORITY || !PRIO_PROCESS */ > (void) nice(nval); >-#endif /* HAVE_SETPRIORITY */ >+#endif /* HAVE_SETPRIORITY && PRIO_PROCESS */ > } > > #ifdef BSDTIMES >@@ -293,6 +293,7 @@ > # endif /* _SEQUENT_ */ > #endif /* BSDTIMES */ > { >+ int ohaderr = haderr; > #ifdef BSDTIMES > time_t t = > (r1->ru_utime.tv_sec - r0->ru_utime.tv_sec) * 100 + >@@ -334,6 +335,7 @@ > ((e->tv_sec - b->tv_sec) * 100 + (e->tv_usec - b->tv_usec) / 10000); > > cp = "%Uu %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww"; >+ haderr = 0; > #else /* !BSDTIMES */ > # ifdef _SEQUENT_ > int ms = (int) >@@ -340,6 +342,7 @@ > ((e->tv_sec - b->tv_sec) * 100 + (e->tv_usec - b->tv_usec) / 10000); > > cp = "%Uu %Ss %E %P %I+%Oio %Fpf+%Ww"; >+ haderr = 0; > # else /* !_SEQUENT_ */ > # ifndef POSIX > time_t ms = ((time_t)((e - b) / HZ) * 100) + >@@ -350,6 +353,7 @@ > # endif /* POSIX */ > > cp = "%Uu %Ss %E %P"; >+ haderr = 0; > > /* > * the tms stuff is not very precise, so we fudge it. >@@ -678,6 +682,7 @@ > break; > } > xputchar('\n'); >+ haderr = ohaderr; > } > > #if defined(BSDTIMES) || defined(_SEQUENT_) >Index: contrib/tcsh/tc.alloc.c >=================================================================== >--- contrib/tcsh/tc.alloc.c (revision 309109) >+++ contrib/tcsh/tc.alloc.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.alloc.c,v 3.50 2011/12/30 20:55:24 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.alloc.c,v 3.56 2016/03/08 12:47:43 christos Exp $ */ > /* > * tc.alloc.c (Caltech) 2/21/82 > * Chris Kingsley, kingsley@cit-20. >@@ -42,8 +42,11 @@ > #ifdef HAVE_MALLINFO > #include <malloc.h> > #endif >+#if defined(HAVE_SBRK) && !defined(__APPLE__) >+#define USE_SBRK >+#endif > >-RCSID("$tcsh: tc.alloc.c,v 3.50 2011/12/30 20:55:24 christos Exp $") >+RCSID("$tcsh: tc.alloc.c,v 3.56 2016/03/08 12:47:43 christos Exp $") > > #define RCHECK > #define DEBUG >@@ -66,7 +69,7 @@ > { > static const char msg[] = "Out of memory\n"; > >- write(didfds ? 2 : SHDIAG, msg, strlen(msg)); >+ TCSH_IGNORE(write(didfds ? 2 : SHDIAG, msg, strlen(msg))); > _exit(1); > } > #endif >@@ -131,7 +134,11 @@ > #endif > > >+#ifdef _LP64 >+#define ROUNDUP 15 >+#else > #define ROUNDUP 7 >+#endif > > /* > * nextf[i] is the pointer to the next free block of size 2^(i+3). The >@@ -345,10 +352,13 @@ > { > #ifndef lint > char *cp; >+ volatile size_t k; > > i *= j; > cp = xmalloc(i); >- memset(cp, 0, i); >+ /* Stop gcc 5.x from optimizing malloc+memset = calloc */ >+ k = i; >+ memset(cp, 0, k); > > return ((memalign_t) cp); > #else >@@ -459,7 +469,7 @@ > const union overhead *op = (const union overhead *) > (((const char *) ptr) - MEMALIGN(sizeof(*op))); > if (op->ov_magic == MAGIC) >- return 1 << (op->ov_index + 2); >+ return 1 << (op->ov_index + 3); > else > return 0; > } >@@ -513,19 +523,19 @@ > > n = n ? n : 1; > >-#ifdef HAVE_SBRK >+#ifdef USE_SBRK > if (membot == NULL) > membot = sbrk(0); >-#endif /* HAVE_SBRK */ >+#endif /* USE_SBRK */ > > if ((ptr = malloc(n)) == NULL) > out_of_memory(); >-#ifndef HAVE_SBRK >+#ifndef USE_SBRK > if (memtop < ((char *) ptr) + n) > memtop = ((char *) ptr) + n; > if (membot == NULL) > membot = ptr; >-#endif /* !HAVE_SBRK */ >+#endif /* !USE_SBRK */ > return ((memalign_t) ptr); > } > >@@ -536,19 +546,19 @@ > > n = n ? n : 1; > >-#ifdef HAVE_SBRK >+#ifdef USE_SBRK > if (membot == NULL) > membot = sbrk(0); >-#endif /* HAVE_SBRK */ >+#endif /* USE_SBRK */ > > if ((ptr = (p ? realloc(p, n) : malloc(n))) == NULL) > out_of_memory(); >-#ifndef HAVE_SBRK >+#ifndef USE_SBRK > if (memtop < ((char *) ptr) + n) > memtop = ((char *) ptr) + n; > if (membot == NULL) > membot = ptr; >-#endif /* !HAVE_SBRK */ >+#endif /* !USE_SBRK */ > return ((memalign_t) ptr); > } > >@@ -560,10 +570,10 @@ > n *= s; > n = n ? n : 1; > >-#ifdef HAVE_SBRK >+#ifdef USE_SBRK > if (membot == NULL) > membot = sbrk(0); >-#endif /* HAVE_SBRK */ >+#endif /* USE_SBRK */ > > if ((ptr = malloc(n)) == NULL) > out_of_memory(); >@@ -570,12 +580,12 @@ > > memset (ptr, 0, n); > >-#ifndef HAVE_SBRK >+#ifndef USE_SBRK > if (memtop < ((char *) ptr) + n) > memtop = ((char *) ptr) + n; > if (membot == NULL) > membot = ptr; >-#endif /* !HAVE_SBRK */ >+#endif /* !USE_SBRK */ > > return ((memalign_t) ptr); > } >@@ -625,9 +635,9 @@ > (unsigned long) sbrk(0)); > #else /* SYSMALLOC */ > #ifndef HAVE_MALLINFO >-#ifdef HAVE_SBRK >+#ifdef USE_SBRK > memtop = sbrk(0); >-#endif /* HAVE_SBRK */ >+#endif /* USE_SBRK */ > xprintf(CGETS(19, 12, "Allocated memory from 0x%lx to 0x%lx (%ld).\n"), > (unsigned long) membot, (unsigned long) memtop, > (unsigned long) (memtop - membot)); >Index: contrib/tcsh/tc.bind.c >=================================================================== >--- contrib/tcsh/tc.bind.c (revision 309109) >+++ contrib/tcsh/tc.bind.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.bind.c,v 3.45 2009/06/25 21:15:37 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.bind.c,v 3.46 2015/08/13 08:54:04 christos Exp $ */ > /* > * tc.bind.c: Key binding functions > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.bind.c,v 3.45 2009/06/25 21:15:37 christos Exp $") >+RCSID("$tcsh: tc.bind.c,v 3.46 2015/08/13 08:54:04 christos Exp $") > > #include "ed.h" > #include "ed.defns.h" >@@ -506,8 +506,14 @@ > " -v bind all keys to vi bindings\n")); > xprintf("%s", CGETS(20, 18, > " -e bind all keys to emacs bindings\n")); >- xprintf("%s", CGETS(20, 19, >- " -d bind all keys to default editor's bindings\n")); >+ xprintf(CGETS(20, 19, >+ " -d bind all keys to default editor's bindings (%s)\n"), >+#ifdef VIDEFAULT >+ "vi" >+#else /* EMACSDEFAULT */ >+ "emacs" >+#endif /* VIDEFAULT */ >+ ); > xprintf("%s", CGETS(20, 20, > " -l list editor commands with descriptions\n")); > xprintf("%s", CGETS(20, 21, >Index: contrib/tcsh/tc.const.c >=================================================================== >--- contrib/tcsh/tc.const.c (revision 309109) >+++ contrib/tcsh/tc.const.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.const.c,v 3.98 2011/04/14 18:25:26 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.const.c,v 3.107 2015/09/08 15:49:53 christos Exp $ */ > /* > * sh.const.c: String constants for tcsh. > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.const.c,v 3.98 2011/04/14 18:25:26 christos Exp $") >+RCSID("$tcsh: tc.const.c,v 3.107 2015/09/08 15:49:53 christos Exp $") > > Char STRlogout[] = { 'l', 'o', 'g', 'o', 'u', 't', '\0' }; > Char STRautologout[] = { 'a', 'u', 't', 'o', 'l', 'o', 'g', 'o', 'u', 't', >@@ -85,6 +85,8 @@ > Char STRMACHTYPE[] = { 'M', 'A', 'C', 'H', 'T', 'Y', 'P', 'E', '\0' }; > Char STROSTYPE[] = { 'O', 'S', 'T', 'Y', 'P', 'E', '\0' }; > Char STRedit[] = { 'e', 'd', 'i', 't', '\0' }; >+Char STReditors[] = { 'e', 'd', 'i', 't', 'o', 'r', 's', '\0' }; >+Char STRvimode[] = { 'v', 'i', 'm', 'o', 'd', 'e', '\0' }; > Char STRaddsuffix[] = { 'a', 'd', 'd', 's', 'u', 'f', 'f', 'i', 'x', > '\0' }; > Char STRcsubstnonl[] = { 'c', 's', 'u', 'b', 's', 't', 'n', 'o', 'n', 'l', >@@ -113,6 +115,7 @@ > Char STRmm[] = { '-', 'm', '\0' }; > Char STRmr[] = { '-', 'r', '\0' }; > Char STRmerge[] = { 'm', 'e', 'r', 'g', 'e', '\0' }; >+Char STRlock[] = { 'l', 'o', 'c', 'k', '\0' }; > Char STRtildothist[] = { '~', '/', '.', 'h', 'i', 's', 't', 'o', 'r', > 'y', '\0' }; > >@@ -369,6 +372,8 @@ > Char STRsldotlogin[] = { '/', '.', 'l', 'o', 'g', 'i', 'n', '\0' }; > Char STRignoreeof[] = { 'i', 'g', 'n', 'o', 'r', 'e', 'e', 'o', 'f', '\0' }; > Char STRnoclobber[] = { 'n', 'o', 'c', 'l', 'o', 'b', 'b', 'e', 'r', '\0' }; >+Char STRnotempty[] = { 'n', 'o', 't', 'e', 'm', 'p', 't', 'y', '\0' }; >+Char STRask[] = { 'a', 's', 'k', '\0' }; > Char STRhelpcommand[] = { 'h', 'e', 'l', 'p', 'c', 'o', 'm', 'm', 'a', 'n', > 'd', '\0' }; > Char STRfignore[] = { 'f', 'i', 'g', 'n', 'o', 'r', 'e', '\0' }; >@@ -430,8 +435,9 @@ > Char STRrm[] = { 'r', 'm', '\0' }; > Char STRhighlight[] = { 'h', 'i', 'g', 'h', 'l', 'i', 'g', 'h', 't', '\0' }; > >-Char STRimplicitcd[] = { 'i', 'm', 'p', 'l', 'i', 'c', 'i', 't', >- 'c', 'd', '\0' }; >+Char STRimplicitcd[] = { 'i', 'm', 'p', 'l', 'i', 'c', 'i', 't', >+ 'c', 'd', '\0' }; >+Char STRcdtohome[] = { 'c', 'd', 't', 'o', 'h', 'o', 'm', 'e', '\0' }; > Char STRkillring[] = { 'k', 'i', 'l', 'l', 'r', 'i', 'n', 'g', '\0' }; > Char STRkilldup[] = { 'k', 'i', 'l', 'l', 'd', 'u', 'p', '\0' }; > Char STRshlvl[] = { 's', 'h', 'l', 'v', 'l', '\0' }; >@@ -450,12 +456,12 @@ > 'R', 'Y', '\0' }; > Char STRNOREBIND[] = { 'N', 'O', 'R', 'E', 'B', 'I', 'N', 'D', '\0' }; > >-#if defined(SIG_WINDOW) || defined (_VMS_POSIX) >+#if defined(SIG_WINDOW) || defined(SIGWINCH) || defined(SIGWINDOW) || defined (_VMS_POSIX) || defined(_SIGWINCH) > /* atp - problem with declaration of str{lines,columns} in sh.func.c (1277) */ > Char STRLINES[] = { 'L', 'I', 'N', 'E', 'S', '\0'}; > Char STRCOLUMNS[] = { 'C', 'O', 'L', 'U', 'M', 'N', 'S', '\0'}; > Char STRTERMCAP[] = { 'T', 'E', 'R', 'M', 'C', 'A', 'P', '\0'}; >-#endif /* SIG_WINDOW || _VMS_POSIX */ >+#endif /* SIG_WINDOW || SIGWINCH || SIGWINDOW || _VMS_POSIX */ > > #if defined (_OSD_POSIX) /* BS2000 needs this variable set to "SHELL" */ > Char STRPROGRAM_ENVIRONMENT[] = { 'P', 'R', 'O', 'G', 'R', 'A', 'M', >@@ -491,6 +497,7 @@ > Char STRmmcolormauto[] = { '-', '-', 'c', 'o', 'l', 'o', 'r', '=', 'a', 'u', 't', 'o', '\0' }; > #endif /* BSD_STYLE_COLORLS */ > Char STRLS_COLORS[] = { 'L', 'S', '_', 'C', 'O', 'L', 'O', 'R', 'S', '\0' }; >+Char STRLSCOLORS[] = { 'L', 'S', 'C', 'O', 'L', 'O', 'R', 'S', '\0' }; > #endif /* COLOR_LS_F */ > > Char STRls[] = { 'l', 's', '\0' }; >Index: contrib/tcsh/tc.decls.h >=================================================================== >--- contrib/tcsh/tc.decls.h (revision 309109) >+++ contrib/tcsh/tc.decls.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.decls.h,v 3.65 2010/02/09 20:26:13 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.decls.h,v 3.66 2012/06/21 18:49:11 christos Exp $ */ > /* > * tc.decls.h: Function declarations from all the tcsh modules > */ >@@ -226,15 +226,15 @@ > #ifndef __GNUC__ > #define __attribute__(a) > #endif >-extern pret_t xprintf (const char *, ...) >+extern int xprintf (const char *, ...) > __attribute__((__format__(__printf__, 1, 2))); >-extern pret_t xsnprintf (char *, size_t, const char *, ...) >+extern int xsnprintf (char *, size_t, const char *, ...) > __attribute__((__format__(__printf__, 3, 4))); > extern char *xasprintf (const char *, ...) > __attribute__((__format__(__printf__, 1, 2))); >-extern pret_t xvprintf (const char *, va_list) >+extern int xvprintf (const char *, va_list) > __attribute__((__format__(__printf__, 1, 0))); >-extern pret_t xvsnprintf (char *, size_t, const char *, va_list) >+extern int xvsnprintf (char *, size_t, const char *, va_list) > __attribute__((__format__(__printf__, 3, 0))); > extern char *xvasprintf (const char *, va_list) > __attribute__((__format__(__printf__, 1, 0))); >Index: contrib/tcsh/tc.func.c >=================================================================== >--- contrib/tcsh/tc.func.c (revision 309109) >+++ contrib/tcsh/tc.func.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.func.c,v 3.148 2011/12/14 16:36:44 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.func.c,v 3.158 2016/05/13 15:08:12 christos Exp $ */ > /* > * tc.func.c: New tcsh builtins. > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.func.c,v 3.148 2011/12/14 16:36:44 christos Exp $") >+RCSID("$tcsh: tc.func.c,v 3.158 2016/05/13 15:08:12 christos Exp $") > > #include "ed.h" > #include "ed.defns.h" /* for the function names */ >@@ -120,11 +120,17 @@ > if ((*s & QUOTE) > && (((*s & TRIM) == HIST && HIST != '\0') || > (((*s & TRIM) == '\'') && (prev_c != '\\')) || >- (((*s & TRIM) == '\"') && (prev_c != '\\')) || >- (((*s & TRIM) == '\\') && (prev_c != '\\')))) { >+ (((*s & TRIM) == '\"') && (prev_c != '\\')))) { > Strbuf_append1(&buf, '\\'); > } >+#if INVALID_BYTE != 0 >+ if ((*s & INVALID_BYTE) != INVALID_BYTE) /* *s < INVALID_BYTE */ >+ Strbuf_append1(&buf, *s & TRIM); >+ else >+ Strbuf_append1(&buf, *s); >+#else > Strbuf_append1(&buf, *s & TRIM); >+#endif > prev_c = *s; > } > Strbuf_append1(&buf, ' '); >@@ -193,7 +199,7 @@ > dolist(Char **v, struct command *c) > { > Char **globbed; >- int i, k; >+ int i, k, ret = 0; > struct stat st; > > USE(c); >@@ -333,8 +339,11 @@ > xputchar('\n'); > print_by_column(STRNULL, &v[i], k - i, FALSE); > } >+ haderr = 1; > xprintf("%S: %s.\n", tmp, strerror(err)); >+ haderr = 0; > i = k + 1; >+ ret = 1; > } > else if (S_ISDIR(st.st_mode)) { > Char *cp; >@@ -372,6 +381,8 @@ > xputchar('\n'); > print_by_column(STRNULL, &v[i], k - i, FALSE); > } >+ if (ret) >+ stderror(ERR_SILENT); > } > > cleanup_until(globbed); >@@ -481,6 +492,19 @@ > setcopy(STRstatus, STR1, VAR_READWRITE); > } > >+static int >+findvv(Char **vv, const char *cp) >+{ >+ for (; vv && *vv; vv++) { >+ size_t i; >+ for (i = 0; (*vv)[i] && (*vv)[i] == cp[i]; i++) >+ continue; >+ if ((*vv)[i] == '\0' && cp[i] == '\0') >+ return 1; >+ } >+ return 0; >+} >+ > /* PWP: a hack to start up your stopped editor on a single keystroke */ > /* jbs - fixed hack so it worked :-) 3/28/89 */ > >@@ -488,33 +512,42 @@ > find_stop_ed(void) > { > struct process *pp, *retp; >- const char *ep, *vp; >+ const char *ep = NULL, *vp = NULL; > char *cp, *p; >- size_t epl, vpl; >+ size_t epl = 0, vpl = 0; > int pstatus; >+ struct varent *varp; >+ Char **vv; > >- if ((ep = getenv("EDITOR")) != NULL) { /* if we have a value */ >- if ((p = strrchr(ep, '/')) != NULL) /* if it has a path */ >- ep = p + 1; /* then we want only the last part */ >- } >- else >- ep = "ed"; >+ if (pcurrent == NULL) /* see if we have any jobs */ >+ return NULL; /* nope */ > >- if ((vp = getenv("VISUAL")) != NULL) { /* if we have a value */ >- if ((p = strrchr(vp, '/')) != NULL) /* and it has a path */ >- vp = p + 1; /* then we want only the last part */ >- } >- else >- vp = "vi"; >+ if ((varp = adrof(STReditors)) != NULL) >+ vv = varp->vec; >+ else >+ vv = NULL; > >- for (vpl = 0; vp[vpl] && !isspace((unsigned char)vp[vpl]); vpl++) >- continue; >- for (epl = 0; ep[epl] && !isspace((unsigned char)ep[epl]); epl++) >- continue; >+ if (! vv) { >+ if ((ep = getenv("EDITOR")) != NULL) { /* if we have a value */ >+ if ((p = strrchr(ep, '/')) != NULL) /* if it has a path */ >+ ep = p + 1; /* then we want only the last part */ >+ } >+ else >+ ep = "ed"; > >- if (pcurrent == NULL) /* see if we have any jobs */ >- return NULL; /* nope */ >+ if ((vp = getenv("VISUAL")) != NULL) { /* if we have a value */ >+ if ((p = strrchr(vp, '/')) != NULL) /* and it has a path */ >+ vp = p + 1; /* then we want only the last part */ >+ } >+ else >+ vp = "vi"; > >+ for (vpl = 0; vp[vpl] && !isspace((unsigned char)vp[vpl]); vpl++) >+ continue; >+ for (epl = 0; ep[epl] && !isspace((unsigned char)ep[epl]); epl++) >+ continue; >+ } >+ > retp = NULL; > for (pp = proclist.p_next; pp; pp = pp->p_next) > if (pp->p_procid == pp->p_jobid) { >@@ -540,10 +573,13 @@ > else > cp = p; /* else we get all of it */ > >- /* if we find either in the current name, fg it */ >- if (strncmp(ep, cp, epl) == 0 || >- strncmp(vp, cp, vpl) == 0) { >- >+ /* >+ * If we find the current name in the $editors array (if set) >+ * or as $EDITOR or $VISUAL (if $editors not set), fg it. >+ */ >+ if ((vv && findvv(vv, cp)) || >+ (epl && strncmp(ep, cp, epl) == 0 && cp[epl] == '\0') || >+ (vpl && strncmp(vp, cp, vpl) == 0 && cp[vpl] == '\0')) { > /* > * If there is a choice, then choose the current process if > * available, or the previous process otherwise, or else >@@ -733,7 +769,7 @@ > pp = xgetpass("Password:"); > > crpp = XCRYPT(pw, pp, srpp); >- if ((strcmp(crpp, srpp) == 0) >+ if ((crpp && strcmp(crpp, srpp) == 0) > #ifdef AFS > || (ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION, > afsname, /* name */ >@@ -1108,8 +1144,7 @@ > Char *tag; > #endif /* RMDEBUG */ > Char *charac; >- char c; >- int ask, doit, star = 0, silent = 0; >+ int ask, doit, star = 0, silent = 0, opintr_disabled; > > if (!adrof(STRrmstar)) > return; >@@ -1119,6 +1154,8 @@ > we = cp->next; > while (*we->word == ';' && we != cp) > we = we->next; >+ opintr_disabled = pintr_disabled; >+ pintr_disabled = 0; > while (we != cp) { > #ifdef RMDEBUG > if (*tag) >@@ -1139,17 +1176,8 @@ > if (!Strcmp(args->word, STRstar)) > star = 1; > if (ask && star) { >- xprintf("%s", CGETS(22, 8, >- "Do you really want to delete all files? [n/y] ")); >- flush(); >- (void) force_read(SHIN, &c, 1); >- /* >- * Perhaps we should use the yesexpr from the >- * actual locale >- */ >- doit = (strchr(CGETS(22, 14, "Yy"), c) != NULL); >- while (c != '\n' && force_read(SHIN, &c, 1) == 1) >- continue; >+ doit = getYN(CGETS(22, 8, >+ "Do you really want to delete all files? [N/y] ")); > if (!doit) { > /* remove the command instead */ > #ifdef RMDEBUG >@@ -1195,6 +1223,7 @@ > xprintf("%S ", we->word); > } > #endif /* RMDEBUG */ >+ pintr_disabled = opintr_disabled; > return; > } > >Index: contrib/tcsh/tc.nls.c >=================================================================== >--- contrib/tcsh/tc.nls.c (revision 309109) >+++ contrib/tcsh/tc.nls.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.nls.c,v 3.23 2010/02/12 22:17:20 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.nls.c,v 3.27 2016/07/17 15:02:44 christos Exp $ */ > /* > * tc.nls.c: NLS handling > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.nls.c,v 3.23 2010/02/12 22:17:20 christos Exp $") >+RCSID("$tcsh: tc.nls.c,v 3.27 2016/07/17 15:02:44 christos Exp $") > > > #ifdef WIDE_STRINGS >@@ -64,7 +64,11 @@ > { > # ifdef HAVE_WCWIDTH > int l; >+#if INVALID_BYTE != 0 >+ if ((c & INVALID_BYTE) == INVALID_BYTE) /* c >= INVALID_BYTE */ >+#else > if (c & INVALID_BYTE) >+#endif > return 1; > l = xwcwidth((wchar_t) c); > return l >= 0 ? l : 0; >@@ -116,14 +120,29 @@ > } > > int >-NLSClassify(Char c, int nocomb) >+NLSClassify(Char c, int nocomb, int drawPrompt) > { > int w; >- if (c & INVALID_BYTE) >+#ifndef SHORT_STRINGS >+ if ((c & 0x80) != 0) /* c >= 0x80 */ > return NLSCLASS_ILLEGAL; >- w = NLSWidth(c); >- if ((w > 0 && !(Iscntrl(c) && (c & CHAR) < 0x100)) || (Isprint(c) && !nocomb)) >- return w; >+#endif >+ if (!drawPrompt) { /* draw command-line */ >+#if INVALID_BYTE != 0 >+ if ((c & INVALID_BYTE) == INVALID_BYTE) /* c >= INVALID_BYTE */ >+ return NLSCLASS_ILLEGAL; >+ if ((c & INVALID_BYTE) == QUOTE && (c & 0x80) == 0) /* c >= QUOTE */ >+ return 1; >+ if (c >= 0x10000000) /* U+10000000 = FC 90 80 80 80 80 */ >+ return NLSCLASS_ILLEGAL5; >+ if (c >= 0x1000000) /* U+1000000 = F9 80 80 80 80 */ >+ return NLSCLASS_ILLEGAL4; >+ if (c >= 0x100000) /* U+100000 = F4 80 80 80 */ >+ return NLSCLASS_ILLEGAL3; >+#endif >+ if (c >= 0x10000) /* U+10000 = F0 90 80 80 */ >+ return NLSCLASS_ILLEGAL2; >+ } > if (Iscntrl(c) && (c & CHAR) < 0x100) { > if (c == '\n') > return NLSCLASS_NL; >@@ -131,13 +150,14 @@ > return NLSCLASS_TAB; > return NLSCLASS_CTRL; > } >-#ifdef WIDE_STRINGS >- if (c >= 0x1000000) >- return NLSCLASS_ILLEGAL4; >- if (c >= 0x10000) >- return NLSCLASS_ILLEGAL3; >-#endif >- if (c >= 0x100) >- return NLSCLASS_ILLEGAL2; >+ w = NLSWidth(c); >+ if (drawPrompt) { /* draw prompt */ >+ if (w > 0) >+ return w; >+ if (w == 0) >+ return 1; >+ } >+ if ((w > 0 && !(Iscntrl(c) && (c & CHAR) < 0x100)) || (Isprint(c) && !nocomb)) >+ return w; > return NLSCLASS_ILLEGAL; > } >Index: contrib/tcsh/tc.nls.h >=================================================================== >--- contrib/tcsh/tc.nls.h (revision 309109) >+++ contrib/tcsh/tc.nls.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.nls.h,v 3.14 2011/02/25 23:57:21 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.nls.h,v 3.17 2015/06/06 21:19:08 christos Exp $ */ > /* > * tc.nls.h: NLS support > * >@@ -43,7 +43,7 @@ > #endif > > extern Char *NLSChangeCase (const Char *, int); >-extern int NLSClassify (Char, int); >+extern int NLSClassify (Char, int, int); > > #define NLSCLASS_CTRL (-1) > #define NLSCLASS_TAB (-2) >@@ -52,6 +52,7 @@ > #define NLSCLASS_ILLEGAL2 (-5) > #define NLSCLASS_ILLEGAL3 (-6) > #define NLSCLASS_ILLEGAL4 (-7) >+#define NLSCLASS_ILLEGAL5 (-8) > > #define NLSCLASS_ILLEGAL_SIZE(x) (-(x) - (-(NLSCLASS_ILLEGAL) - 1)) > >Index: contrib/tcsh/tc.os.c >=================================================================== >--- contrib/tcsh/tc.os.c (revision 309109) >+++ contrib/tcsh/tc.os.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.os.c,v 3.72 2011/01/25 13:58:19 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.os.c,v 3.73 2016/04/16 15:44:18 christos Exp $ */ > /* > * tc.os.c: OS Dependent builtin functions > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.os.c,v 3.72 2011/01/25 13:58:19 christos Exp $") >+RCSID("$tcsh: tc.os.c,v 3.73 2016/04/16 15:44:18 christos Exp $") > > #include "tw.h" > #include "ed.h" >@@ -1585,28 +1585,6 @@ > } > #endif > >-#ifdef __ANDROID__ >-#include <stdio.h> >-/* Android (<= 2.1?) has an incomplete ttyname implementation. */ >-char * >-ttyname(int fd) >-{ >- char path[64]; >- ssize_t siz; >- static char ttyname[32]; >- >- if (!isatty(fd)) >- return NULL; >- >- (void)snprintf(path, sizeof(path), "/proc/self/fd/%d", fd); >- siz = readlink(path, ttyname, sizeof(ttyname)); >- if (siz < 0 || siz == sizeof(ttyname)) >- return NULL; >- ttyname[siz] = '\0'; >- return ttyname; >-} >-#endif /* __ANDROID__ */ >- > #if defined(__CYGWIN__) && !defined(NO_CRYPT) > #undef CHAR /* Collides with Win32 API */ > #define WIN32_LEAN_AND_MEAN >Index: contrib/tcsh/tc.printf.c >=================================================================== >--- contrib/tcsh/tc.printf.c (revision 309109) >+++ contrib/tcsh/tc.printf.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.printf.c,v 3.35 2006/03/02 18:46:45 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.printf.c,v 3.38 2015/06/06 21:19:08 christos Exp $ */ > /* > * tc.printf.c: A public-domain, minimal printf/sprintf routine that prints > * through the putchar() routine. Feel free to use for >@@ -34,7 +34,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.printf.c,v 3.35 2006/03/02 18:46:45 christos Exp $") >+RCSID("$tcsh: tc.printf.c,v 3.38 2015/06/06 21:19:08 christos Exp $") > > #ifdef lint > #undef va_arg >@@ -46,9 +46,9 @@ > static char snil[] = "(nil)"; > > static void xaddchar (int); >-static void doprnt (void (*) (int), const char *, va_list); >+static int doprnt (void (*) (int), const char *, va_list); > >-static void >+static int > doprnt(void (*addchar) (int), const char *sfmt, va_list ap) > { > char *bp; >@@ -68,8 +68,8 @@ > int fmt; > unsigned char pad = ' '; > int flush_left = 0, f_width = 0, prec = INF, hash = 0; >- int do_long = 0, do_size_t = 0; >- int sign = 0; >+ int do_long = 0, do_size_t = 0, do_ptrdiff_t = 0; >+ int sign = 0, count = 0; > int attributes = 0; > > >@@ -77,6 +77,7 @@ > for (; *f; f++) { > if (*f != '%') { /* then just out the char */ > (*addchar) (((unsigned char)*f) | attributes); >+ count++; > } > else { > f++; /* skip the % */ >@@ -131,6 +132,10 @@ > do_size_t++; > f++; > } >+ if (*f == 't') { /* ptrdiff_t format */ >+ do_ptrdiff_t++; >+ f++; >+ } > > fmt = (unsigned char) *f; > if (fmt != 'S' && fmt != 'Q' && isupper(fmt)) { >@@ -171,13 +176,19 @@ > *bp++ = '-'; > f_width = f_width - (int) (bp - buf); > if (!flush_left) >- while (f_width-- > 0) >+ while (f_width-- > 0) { > (*addchar) (pad | attributes); >- for (bp--; bp >= buf; bp--) >+ count++; >+ } >+ for (bp--; bp >= buf; bp--) { > (*addchar) (((unsigned char) *bp) | attributes); >+ count++; >+ } > if (flush_left) >- while (f_width-- > 0) >+ while (f_width-- > 0) { > (*addchar) (' ' | attributes); >+ count++; >+ } > break; > > case 'p': >@@ -192,6 +203,8 @@ > case 0: > if (do_size_t) > u = va_arg(ap, size_t); >+ else if (do_ptrdiff_t) >+ u = va_arg(ap, ptrdiff_t); > else > u = va_arg(ap, unsigned int); > break; >@@ -234,13 +247,17 @@ > } > i = f_width - (int) (bp - buf); > if (!flush_left) >- while (i-- > 0) >+ while (i-- > 0) { > (*addchar) (pad | attributes); >+ count++; >+ } > for (bp--; bp >= buf; bp--) > (*addchar) (((unsigned char) *bp) | attributes); > if (flush_left) >- while (i-- > 0) >+ while (i-- > 0) { > (*addchar) (' ' | attributes); >+ count++; >+ } > break; > > >@@ -247,6 +264,7 @@ > case 'c': > i = va_arg(ap, int); > (*addchar) (i | attributes); >+ count++; > break; > > case 'S': >@@ -259,23 +277,31 @@ > } > f_width = f_width - Strlen(Bp); > if (!flush_left) >- while (f_width-- > 0) >+ while (f_width-- > 0) { > (*addchar) ((int) (pad | attributes)); >+ count++; >+ } > for (i = 0; *Bp && i < prec; i++) { > char cbuf[MB_LEN_MAX]; > size_t pos, len; > >- if (fmt == 'Q' && *Bp & QUOTE) >+ if (fmt == 'Q' && *Bp & QUOTE) { > (*addchar) ('\\' | attributes); >- len = one_wctomb(cbuf, *Bp & CHAR); >- for (pos = 0; pos < len; pos++) >+ count++; >+ } >+ len = one_wctomb(cbuf, *Bp); >+ for (pos = 0; pos < len; pos++) { > (*addchar) ((unsigned char)cbuf[pos] | attributes > | (*Bp & ATTRIBUTES)); >+ count++; >+ } > Bp++; > } > if (flush_left) >- while (f_width-- > 0) >+ while (f_width-- > 0) { > (*addchar) (' ' | attributes); >+ count++; >+ } > break; > #endif /* SHORT_STRINGS */ > >@@ -287,17 +313,24 @@ > bp = snil; > f_width = f_width - strlen(bp); > if (!flush_left) >- while (f_width-- > 0) >+ while (f_width-- > 0) { > (*addchar) (pad | attributes); >+ count++; >+ } > for (i = 0; *bp && i < prec; i++) { >- if (fmt == 'q' && *bp & QUOTE) >+ if (fmt == 'q' && *bp & QUOTE) { > (*addchar) ('\\' | attributes); >+ count++; >+ } > (*addchar) (((unsigned char) *bp & TRIM) | attributes); >+ count++; > bp++; > } > if (flush_left) >- while (f_width-- > 0) >+ while (f_width-- > 0) { > (*addchar) (' ' | attributes); >+ count++; >+ } > break; > > case 'a': >@@ -306,6 +339,7 @@ > > case '%': > (*addchar) ('%' | attributes); >+ count++; > break; > > default: >@@ -312,11 +346,12 @@ > break; > } > flush_left = 0, f_width = 0, prec = INF, hash = 0; >- do_size_t = 0, do_long = 0; >+ do_ptrdiff_t = 0, do_size_t = 0, do_long = 0; > sign = 0; > pad = ' '; > } > } >+ return count; > } > > >@@ -331,56 +366,49 @@ > } > > >-pret_t >+int > /*VARARGS*/ > xsnprintf(char *str, size_t size, const char *fmt, ...) > { >+ int count; > va_list va; > va_start(va, fmt); > > xstring = str; > xestring = str + size - 1; >- doprnt(xaddchar, fmt, va); >+ count = doprnt(xaddchar, fmt, va); > va_end(va); > *xstring++ = '\0'; >-#ifdef PURIFY >- return 1; >-#endif >+ return count; > } > >-pret_t >+int > /*VARARGS*/ > xprintf(const char *fmt, ...) > { >+ int count; > va_list va; > va_start(va, fmt); >- doprnt(xputchar, fmt, va); >+ count = doprnt(xputchar, fmt, va); > va_end(va); >-#ifdef PURIFY >- return 1; >-#endif >+ return count; > } > >- >-pret_t >+int > xvprintf(const char *fmt, va_list va) > { >- doprnt(xputchar, fmt, va); >-#ifdef PURIFY >- return 1; >-#endif >+ return doprnt(xputchar, fmt, va); > } > >-pret_t >+int > xvsnprintf(char *str, size_t size, const char *fmt, va_list va) > { >+ int count; > xstring = str; > xestring = str + size - 1; >- doprnt(xaddchar, fmt, va); >+ count = doprnt(xaddchar, fmt, va); > *xstring++ = '\0'; >-#ifdef PURIFY >- return 1; >-#endif >+ return count; > } > > char * >@@ -435,18 +463,18 @@ > int > fprintf(FILE *fp, const char* fmt, ...) > { >+ int count; > va_list va; > va_start(va, fmt); >- doprnt(xputchar, fmt, va); >+ count = doprnt(xputchar, fmt, va); > va_end(va); >- return 1; >+ return count; > } > > int > vfprintf(FILE *fp, const char *fmt, va_list va) > { >- doprnt(xputchar, fmt, va); >- return 1; >+ return doprnt(xputchar, fmt, va); > } > > #endif /* PURIFY */ >Index: contrib/tcsh/tc.prompt.c >=================================================================== >--- contrib/tcsh/tc.prompt.c (revision 309109) >+++ contrib/tcsh/tc.prompt.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.prompt.c,v 3.70 2011/10/27 22:41:06 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.prompt.c,v 3.71 2014/08/23 09:07:57 christos Exp $ */ > /* > * tc.prompt.c: Prompt printing stuff > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.prompt.c,v 3.70 2011/10/27 22:41:06 christos Exp $") >+RCSID("$tcsh: tc.prompt.c,v 3.71 2014/08/23 09:07:57 christos Exp $") > > #include "ed.h" > #include "tw.h" >@@ -213,7 +213,22 @@ > } > break; > case '#': >+#ifdef __CYGWIN__ >+ /* Check for being member of the Administrators group */ >+ { >+ gid_t grps[NGROUPS_MAX]; >+ int grp, gcnt; >+ >+ gcnt = getgroups(NGROUPS_MAX, grps); >+# define DOMAIN_GROUP_RID_ADMINS 544 >+ for (grp = 0; grp < gcnt; ++grp) >+ if (grps[grp] == DOMAIN_GROUP_RID_ADMINS) >+ break; >+ Scp = (grp < gcnt) ? PRCHROOT : PRCH; >+ } >+#else > Scp = (uid == 0 || euid == 0) ? PRCHROOT : PRCH; >+#endif > if (Scp != '\0') > Strbuf_append1(&buf, attributes | Scp); > break; >Index: contrib/tcsh/tc.str.c >=================================================================== >--- contrib/tcsh/tc.str.c (revision 309109) >+++ contrib/tcsh/tc.str.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.str.c,v 3.42 2012/01/10 21:34:31 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.str.c,v 3.47 2015/06/06 21:19:08 christos Exp $ */ > /* > * tc.str.c: Short string package > * This has been a lesson of how to write buggy code! >@@ -36,7 +36,7 @@ > #include <assert.h> > #include <limits.h> > >-RCSID("$tcsh: tc.str.c,v 3.42 2012/01/10 21:34:31 christos Exp $") >+RCSID("$tcsh: tc.str.c,v 3.47 2015/06/06 21:19:08 christos Exp $") > > #define MALLOC_INCR 128 > #ifdef WIDE_STRINGS >@@ -66,10 +66,24 @@ > { > int len; > >- if (wchar & INVALID_BYTE) { >- s[0] = wchar & 0xFF; >+#if INVALID_BYTE != 0 >+ if ((wchar & INVALID_BYTE) == INVALID_BYTE) { /* wchar >= INVALID_BYTE */ >+ /* invalid char >+ * exmaple) >+ * if wchar = f0000090(=90|INVALID_BYTE), then *s = ffffff90 */ >+ *s = (char)wchar; > len = 1; >+#else >+ if (wchar & (CHAR & INVALID_BYTE)) { >+ s[0] = wchar & (CHAR & 0xFF); >+ len = 1; >+#endif > } else { >+#if INVALID_BYTE != 0 >+ wchar &= MAX_UTF32; >+#else >+ wchar &= CHAR; >+#endif > #ifdef UTF16_STRINGS > if (wchar >= 0x10000) { > /* UTF-16 systems can't handle these values directly in calls to >@@ -224,7 +238,7 @@ > dst = sdst; > edst = &dst[dstsize]; > while (*src) { >- dst += one_wctomb(dst, *src & CHAR); >+ dst += one_wctomb(dst, *src); > src++; > if (dst >= edst) { > char *wdst = dst; >@@ -544,7 +558,7 @@ > dst = &edst[-MALLOC_INCR]; > } > } >- dst += one_wctomb(dst, *src & CHAR); >+ dst += one_wctomb(dst, *src); > src++; > if (dst >= edst) { > ptrdiff_t i = dst - edst; >@@ -559,7 +573,7 @@ > } > > struct blk_buf * >-bb_alloc() >+bb_alloc(void) > { > return xcalloc(1, sizeof(struct blk_buf)); > } >@@ -590,10 +604,14 @@ > struct blk_buf *bb; > size_t i; > >- bb = xbb; >- for (i = 0; i < bb->len; i++) >- xfree(bb->vec[i]); >- xfree(bb->vec); >+ bb = (struct blk_buf *)xbb; >+ if (bb->vec) { >+ for (i = 0; i < bb->len; i++) >+ xfree(bb->vec[i]); >+ xfree(bb->vec); >+ } >+ bb->vec = NULL; >+ bb->len = 0; > } > > void >Index: contrib/tcsh/tc.who.c >=================================================================== >--- contrib/tcsh/tc.who.c (revision 309109) >+++ contrib/tcsh/tc.who.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tc.who.c,v 3.57 2012/01/17 20:53:38 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tc.who.c,v 3.59 2012/11/15 02:55:08 christos Exp $ */ > /* > * tc.who.c: Watch logins and logouts... > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tc.who.c,v 3.57 2012/01/17 20:53:38 christos Exp $") >+RCSID("$tcsh: tc.who.c,v 3.59 2012/11/15 02:55:08 christos Exp $") > > #include "tc.h" > >@@ -65,6 +65,8 @@ > # define TCSH_PATH_UTMP "/var/run/utx.active" > # elif defined(__hpux) > # define TCSH_PATH_UTMP "/etc/utmpx" >+# elif defined(IBMAIX) && defined(UTMP_FILE) >+# define TCSH_PATH_UTMP UTMP_FILE > # endif > # if defined(TCSH_PATH_UTMP) || !defined(HAVE_UTMP_H) > # define utmp utmpx >Index: contrib/tcsh/tcsh.man >=================================================================== >--- contrib/tcsh/tcsh.man (revision 309109) >+++ contrib/tcsh/tcsh.man (working copy) >@@ -1,3 +1,5 @@ >+.\" $tcsh: tcsh.man,v 3.266 2016/11/24 15:04:52 christos Exp $ >+.\" > .\" Copyright (c) 1980, 1990, 1993 > .\" The Regents of the University of California. All rights reserved. > .\" >@@ -42,6 +44,10 @@ > .\" > .\" - Use `', not '' or "", except of course in shell syntax examples. > .\" '' at the beginning of a line will vanish! >+.\" >+.\" - Use \` for literal back-quote (`). >+.\" >+.\" - Use \e for literal backslash (\). > .\" > .\" - Use \-, not -. > .\" >@@ -72,7 +78,7 @@ > .\" used here if you can. In particular, please don't use nroff commands > .\" which aren't already used herein. > .\" >-.TH TCSH 1 "14 February 2012" "Astron 6.18.01" >+.TH TCSH 1 "24 November 2016" "Astron 6.20.00" > .SH NAME > tcsh \- C shell with file name completion and command line editing > .SH SYNOPSIS >@@ -160,7 +166,7 @@ > Command input is taken from the standard input. > .TP 4 > .B \-t >-The shell reads and executes a single line of input. A `\\' may be used to >+The shell reads and executes a single line of input. A `\e' may be used to > escape the newline at the end of this line and continue onto another line. > .TP 4 > .B \-v >@@ -201,7 +207,7 @@ > It then executes commands from files in the user's \fBhome\fR directory: > first \fI~/.tcshrc\fR (+) > or, if \fI~/.tcshrc\fR is not found, \fI~/.cshrc\fR, >-then \fI~/.history\fR (or the value of the \fBhistfile\fR shell variable), >+then the contents of \fI~/.history\fR (or the value of the \fBhistfile\fR shell variable) are loaded into memory, > then \fI~/.login\fR, > and finally \fI~/.cshdirs\fR (or the value of the \fBdirsfile\fR shell variable) (+). > The shell may read \fI/etc/csh.login\fR before instead of after >@@ -251,13 +257,13 @@ > the editor commands specific to the shell and their default bindings. > .SS "The command-line editor (+)" > Command-line input can be edited using key sequences much like those used in >-GNU Emacs or \fIvi\fR(1). >+\fIemacs\fR(1) or \fIvi\fR(1). > The editor is active only when the \fBedit\fR shell variable is set, which > it is by default in interactive shells. > The \fIbindkey\fR builtin can display and change key bindings. >-Emacs-style key bindings are used by default >+\fIemacs\fR(1)\-style key bindings are used by default > (unless the shell was compiled otherwise; see the \fBversion\fR shell variable), >-but \fIbindkey\fR can change the key bindings to \fIvi\fR-style bindings en masse. >+but \fIbindkey\fR can change the key bindings to \fIvi\fR(1)\-style bindings en masse. > .PP > The shell always binds the arrow keys (as defined in the \fBTERMCAP\fR > environment variable) to >@@ -284,10 +290,12 @@ > to prevent these bindings. > The ANSI/VT100 sequences for arrow keys are always bound. > .PP >-Other key bindings are, for the most part, what Emacs and \fIvi\fR(1) >+Other key bindings are, for the most part, what \fIemacs\fR(1) and \fIvi\fR(1) > users would expect and can easily be displayed by \fIbindkey\fR, so there > is no need to list them here. Likewise, \fIbindkey\fR can list the editor > commands with a short description of each. >+Certain key bindings have different behavior depending if \fIemacs\fR(1) or \fIvi\fR(1) >+style bindings are being used; see \fBvimode\fR for more information. > .PP > Note that editor commands do not have the same notion of a ``word'' as does the > shell. The editor delimits words with any non-alphanumeric characters not in >@@ -408,7 +416,7 @@ > .br > condiments.h main.c~ > .br >-> set fignore = (.o \\~) >+> set fignore = (.o \e~) > .br > > emacs ma[^D] > .br >@@ -420,7 +428,7 @@ > .PP > `main.c~' and `main.o' are ignored by completion (but not listing), > because they end in suffixes in \fBfignore\fR. >-Note that a `\\' was needed in front of `~' to prevent it from being >+Note that a `\e' was needed in front of `~' to prevent it from being > expanded to \fBhome\fR as described under \fBFilename substitution\fR. > \fBfignore\fR is ignored if only one completion is possible. > .PP >@@ -534,10 +542,6 @@ > Like completion, spelling correction works anywhere in the line, > pushing the rest of the line to the right and possibly leaving > extra characters to the right of the cursor. >-.PP >-Beware: spelling correction is not guaranteed to work the way one intends, >-and is provided mostly as an experimental feature. >-Suggestions and improvements are welcome. > .SS "Editor commands (+)" > `bindkey' lists key bindings and `bindkey \-l' lists and briefly describes > editor commands. >@@ -552,6 +556,26 @@ > to letters by default are bound to both lower- and uppercase letters for > convenience. > .TP 8 >+.B backward-char \fR(^B, left) >+Move back a character. >+Cursor behavior modified by \fBvimode\fR. >+.TP 8 >+.B backward-delete-word \fR(M-^H, M-^?) >+Cut from beginning of current word to cursor \- saved in cut buffer. >+Word boundary behavior modified by \fBvimode\fR. >+.TP 8 >+.B backward-word \fR(M-b, M-B) >+Move to beginning of current word. >+Word boundary and cursor behavior modified by \fBvimode\fR. >+.TP 8 >+.B beginning-of-line \fR(^A, home) >+Move to beginning of line. >+Cursor behavior modified by \fBvimode\fR. >+.TP 8 >+.B capitalize-word \fR(M-c, M-C) >+Capitalize the characters from cursor to end of current word. >+Word boundary behavior modified by \fBvimode\fR. >+.TP 8 > .B complete-word \fR(tab) > Completes a word as described under \fBCompletion and listing\fR. > .TP 8 >@@ -569,6 +593,7 @@ > .B copy-prev-word \fR(M-^_) > Copies the previous word in the current line into the input buffer. > See also \fIinsert-last-word\fR. >+Word boundary behavior modified by \fBvimode\fR. > .TP 8 > .B dabbrev-expand \fR(M-/) > Expands the current word to the most recent preceding one for which >@@ -581,11 +606,13 @@ > .B delete-char \fR(not bound) > Deletes the character under the cursor. > See also \fIdelete-char-or-list-or-eof\fR. >+Cursor behavior modified by \fBvimode\fR. > .TP 8 > .B delete-char-or-eof \fR(not bound) > Does \fIdelete-char\fR if there is a character under the cursor > or \fIend-of-file\fR on an empty line. > See also \fIdelete-char-or-list-or-eof\fR. >+Cursor behavior modified by \fBvimode\fR. > .TP 8 > .B delete-char-or-list \fR(not bound) > Does \fIdelete-char\fR if there is a character under the cursor >@@ -600,14 +627,26 @@ > \fIdelete-char-or-eof\fR, \fIdelete-char-or-list\fR and \fIlist-or-eof\fR, > each of which does a different two out of the three. > .TP 8 >+.B delete-word \fR(M-d, M-D) >+Cut from cursor to end of current word \- save in cut buffer. >+Word boundary behavior modified by \fBvimode\fR. >+.TP 8 > .B down-history \fR(down-arrow, ^N) > Like \fIup-history\fR, but steps down, stopping at the original input line. > .TP 8 >+.B downcase-word \fR(M-l, M-L) >+Lowercase the characters from cursor to end of current word. >+Word boundary behavior modified by \fBvimode\fR. >+.TP 8 > .B end-of-file \fR(not bound) > Signals an end of file, causing the shell to exit unless the \fBignoreeof\fR > shell variable (q.v.) is set to prevent this. > See also \fIdelete-char-or-list-or-eof\fR. > .TP 8 >+.B end-of-line \fR(^E, end) >+Move cursor to end of line. >+Cursor behavior modified by \fBvimode\fR. >+.TP 8 > .B expand-history \fR(M-space) > Expands history substitutions in the current word. > See \fBHistory substitution\fR. >@@ -626,6 +665,14 @@ > Expands the variable to the left of the cursor. > See \fBVariable substitution\fR. > .TP 8 >+.B forward-char \fR(^F, right) >+Move forward one character. >+Cursor behavior modified by \fBvimode\fR. >+.TP 8 >+.B forward-word \fR(M-f, M-F) >+Move forward to end of current word. >+Word boundary and cursor behavior modified by \fBvimode\fR. >+.TP 8 > .B history-search-backward \fR(M-p, M-P) > Searches backwards through the history list for a command beginning with > the current contents of the input buffer up to the cursor and copies it >@@ -674,12 +721,13 @@ > search, leaving the current line in the input buffer, and > is then interpreted as normal input. In particular, a carriage return > causes the current line to be executed. >-Emacs mode only. > See also \fIi-search-fwd\fR and \fIhistory-search-backward\fR. >+Word boundary behavior modified by \fBvimode\fR. > .RE > .TP 8 > .B i-search-fwd \fR(not bound) > Like \fIi-search-back\fR, but searches forward. >+Word boundary behavior modified by \fBvimode\fR. > .TP 8 > .B insert-last-word \fR(M-_) > Inserts the last word of the previous input line (`!$') into the input buffer. >@@ -722,9 +770,13 @@ > .TP 8 > .B run-fg-editor \fR(M-^Z) > Saves the current input line and >-looks for a stopped job with a name equal to the last component of the >-file name part of the \fBEDITOR\fR or \fBVISUAL\fR environment variables, >-or, if neither is set, `ed' or `vi'. >+looks for a stopped job where the file name portion of its first word >+is found in the \fBeditors\fR shell variable. >+If \fBeditors\fR is not set, then the file name portion of the >+\fBEDITOR\fR environment variable (`ed' if unset) >+and the >+\fBVISUAL\fR environment variable (`vi' if unset) >+will be used. > If such a job is found, it is restarted as if `fg %\fIjob\fR' had been > typed. This is used to toggle back and forth between an editor and > the shell easily. Some people bind this command to `^Z' so they >@@ -760,7 +812,7 @@ > .B spell-line \fR(M-$) > Attempts to correct the spelling of each word in the input buffer, like > \fIspell-word\fR, but ignores words whose first character is one of >-`\-', `!', `^' or `%', or which contain `\\', `*' or `?', to avoid problems >+`\-', `!', `^' or `%', or which contain `\e', `*' or `?', to avoid problems > with switches, substitutions and the like. > See \fBSpelling correction\fR. > .TP 8 >@@ -781,6 +833,18 @@ > If \fBhistlit\fR is set, uses the literal form of the entry. > May be repeated to step up through the history list, stopping at the top. > .TP 8 >+.B upcase-word \fR(M-u, M-U) >+Uppercase the characters from cursor to end of current word. >+Word boundary behavior modified by \fBvimode\fR. >+.TP 8 >+.B vi-beginning-of-next-word \fR(not bound) >+Vi goto the beginning of next word. >+Word boundary and cursor behavior modified by \fBvimode\fR. >+.TP 8 >+.B vi-eword \fR(not bound) >+Vi move to the end of the current word. >+Word boundary behavior modified by \fBvimode\fR. >+.TP 8 > .B vi-search-back \fR(?) > Prompts with `?' for a search string (which may be a glob-pattern, as with > \fIhistory-search-backward\fR), searches for it and copies it into the >@@ -816,8 +880,8 @@ > .PP > A special character (including a blank or tab) may be prevented from having > its special meaning, and possibly made part of another word, by preceding it >-with a backslash (`\\') or enclosing it in single (`''), double (`"') or >-backward (``') quotes. When not otherwise quoted a newline preceded by a `\\' >+with a backslash (`\e') or enclosing it in single (`''), double (`"') or >+backward (`\`') quotes. When not otherwise quoted a newline preceded by a `\e' > is equivalent to a blank, but inside quotes this sequence results in a > newline. > .PP >@@ -824,8 +888,8 @@ > Furthermore, all \fBSubstitutions\fR (see below) except \fBHistory substitution\fR > can be prevented by enclosing the strings (or parts of strings) > in which they appear with single quotes or by quoting the crucial character(s) >-(e.g., `$' or ``' for \fBVariable substitution\fR or \fBCommand substitution\fR respectively) >-with `\\'. (\fBAlias substitution\fR is no exception: quoting in any way any >+(e.g., `$' or `\`' for \fBVariable substitution\fR or \fBCommand substitution\fR respectively) >+with `\e'. (\fBAlias substitution\fR is no exception: quoting in any way any > character of a word for which an \fIalias\fR has been defined prevents > substitution of the alias. The usual way of quoting an alias is to precede it > with a backslash.) \fBHistory substitution\fR is prevented by >@@ -847,7 +911,7 @@ > to do so if appropriate. > .PP > The \fBbackslash_quote\fR shell variable (q.v.) can be set to make backslashes >-always quote `\\', `'', and `"'. (+) This may make complex quoting tasks >+always quote `\e', `'', and `"'. (+) This may make complex quoting tasks > easier, but it can cause syntax errors in \fIcsh\fR(1) scripts. > .SS Substitutions > We now describe the various transformations the shell performs on the input in >@@ -880,7 +944,7 @@ > command with little typing and a high degree of confidence. > .PP > History substitutions begin with the character `!'. They may begin anywhere in >-the input stream, but they do not nest. The `!' may be preceded by a `\\' to >+the input stream, but they do not nest. The `!' may be preceded by a `\e' to > prevent its special meaning; for convenience, a `!' is passed unchanged when it > is followed by a blank, tab, newline, `=' or `('. History substitutions also > occur when an input line begins with `^'. This special abbreviation will be >@@ -1046,8 +1110,8 @@ > \fIl\fR is simply a string like \fIr\fR, not a regular expression as in > the eponymous \fIed\fR(1) command. > Any character may be used as the delimiter in place of `/'; >-a `\\' can be used to quote the delimiter inside \fIl\fR and \fIr\fR. >-The character `&' in the \fIr\fR is replaced by \fIl\fR; `\\' also quotes `&'. >+a `\e' can be used to quote the delimiter inside \fIl\fR and \fIr\fR. >+The character `&' in the \fIr\fR is replaced by \fIl\fR; `\e' also quotes `&'. > If \fIl\fR is empty (``''), the \fIl\fR from a previous substitution or the > \fIs\fR from a previous search or event number in event specification is used. > The trailing delimiter may be omitted if it is immediately followed by a newline. >@@ -1187,7 +1251,7 @@ > executed, variable substitution is performed keyed by `$' characters. This > expansion can be prevented by preceding the `$' with a `\e' except within `"'s > where it \fIalways\fR occurs, and within `''s where it \fInever\fR occurs. >-Strings quoted by ``' are interpreted later (see \fBCommand substitution\fR >+Strings quoted by `\`' are interpreted later (see \fBCommand substitution\fR > below) so `$' substitution does not occur there until later, > if at all. A `$' is passed unchanged if followed by a blank, tab, or > end-of-line. >@@ -1316,7 +1380,7 @@ > occurs very late, after input-output redirection is performed, and in a child > of the main shell. > .SS "Command substitution" >-Command substitution is indicated by a command enclosed in ``'. The output >+Command substitution is indicated by a command enclosed in `\`'. The output > from such a command is broken into separate words at blanks, tabs and newlines, > and null words are discarded. The output is variable and command substituted > and put in place of the original string. >@@ -1401,7 +1465,7 @@ > a file glob pattern that matches any string of characters including `/', > recursively traversing any existing sub-directories. For example, > `ls **.c' will list all the .c files in the current directory tree. >-If used by itself, it will match match zero or more sub-directories >+If used by itself, it will match zero or more sub-directories > (e.g. `ls /usr/include/**/time.h' will list any file named `time.h' > in the /usr/include directory tree; `ls /usr/include/**time.h' will match > any file in the /usr/include directory tree ending in `time.h'; and >@@ -1549,9 +1613,9 @@ > Read the shell input up to a line which is identical to \fIword\fR. \fIword\fR > is not subjected to variable, filename or command substitution, and each input > line is compared to \fIword\fR before any substitutions are done on this input >-line. Unless a quoting `\e', `"', `' or ``' appears in \fIword\fR variable and >+line. Unless a quoting `\e', `"', `' or `\`' appears in \fIword\fR variable and > command substitution is performed on the intervening lines, allowing `\e' to >-quote `$', `\e' and ``'. Commands which are substituted have all blanks, tabs, >+quote `$', `\e' and `\`'. Commands which are substituted have all blanks, tabs, > and newlines preserved, except for the final newline which is dropped. The > resultant text is placed in an anonymous temporary file which is given to the > command as standard input. >@@ -1573,6 +1637,9 @@ > character special file (e.g., a terminal or `/dev/null') or an error results. > This helps prevent accidental destruction of files. In this case the `!' forms > can be used to suppress this check. >+If \fBnotempty\fR is given in \fBnoclobber\fR, `>' is allowed on empty files; >+if \fBask\fR is set, an interacive confirmation is presented, rather than an >+error. > .PP > The forms involving `&' route the diagnostic output into the specified file as > well as the standard output. \fIname\fR is expanded in the same way as `<' >@@ -1746,7 +1813,7 @@ > see if it has the specified relationship to the real user. If \fIfile\fR > does not exist or is inaccessible or, for the operators indicated by `*', > if the specified file type does not exist on the current system, >-then all enquiries return false, i.e., `0'. >+then all inquiries return false, i.e., `0'. > .PP > These operators may be combined for conciseness: `\-\fIxy file\fR' is > equivalent to `\-\fIx file\fR && \-\fIy file\fR'. (+) For example, `\-fx' is true >@@ -2174,17 +2241,20 @@ > Lists all editor commands and a short description of each. > .TP 4 > .B \-d >-Binds all keys to the standard bindings for the default editor. >+Binds all keys to the standard bindings for the default editor, >+as per \fB-e\fR and \fB-v\fR below. > .TP 4 > .B \-e >-Binds all keys to the standard GNU Emacs-like bindings. >+Binds all keys to \fIemacs\fR(1)\-style bindings. >+Unsets \fBvimode\fR. > .TP 4 > .B \-v >-Binds all keys to the standard \fIvi\fR(1)-like bindings. >+Binds all keys to \fIvi\fR(1)\-style bindings. >+Sets \fBvimode\fR. > .TP 4 > .B \-a > Lists or changes key-bindings in the alternative key map. >-This is the key map used in \fIvi\fR command mode. >+This is the key map used in \fBvimode\fR command mode. > .TP 4 > .B \-b > \fIkey\fR is interpreted as >@@ -2262,7 +2332,7 @@ > .RE > .PP > `\e' nullifies the special meaning of the following character, if it has >-any, notably `\\' and `^'. >+any, notably `\e' and `^'. > .RE > .TP 8 > .B bs2cmd \fIbs2000-command\fR (+) >@@ -2293,7 +2363,8 @@ > .TP 8 > .B cd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] [\I--\fR] [\fIname\fR] > If a directory \fIname\fR is given, changes the shell's working directory >-to \fIname\fR. If not, changes to \fBhome\fR. >+to \fIname\fR. If not, changes to \fBhome\fR, unless the \fBcdtohome\fR >+variable is not set, in which case a \fIname\fR is required. > If \fIname\fR is `\-' it is interpreted as the previous working directory > (see \fBOther substitutions\fR). (+) > If \fIname\fR is not a subdirectory of the current directory >@@ -2300,7 +2371,8 @@ > (and does not begin with `/', `./' or `../'), each component of the variable > \fBcdpath\fR is checked to see if it has a subdirectory \fIname\fR. Finally, if > all else fails but \fIname\fR is a shell variable whose value >-begins with `/', then this is tried to see if it is a directory. >+begins with `/' or '.', then this is tried to see if it is a directory, and >+the \fB\-p\fR option is implied. > .RS +8 > .PP > With \fB\-p\fR, prints the final directory stack, just like \fIdirs\fR. >@@ -2309,7 +2381,7 @@ > Using \fB\-\-\fR forces a break from option processing so the next word > is taken as the directory \fIname\fR even if it begins with '\-'. (+) > .PP >-See also the \fBimplicitcd\fR shell variable. >+See also the \fBimplicitcd\fR and \fBcdtohome\fR shell variables. > .RE > .TP 8 > .B chdir >@@ -2428,7 +2500,7 @@ > (...) > Words from the given list > .TP 8 >-`...` >+\`...\` > Words from the output of command > .PD > .RE >@@ -2445,7 +2517,7 @@ > case the fourth delimiter can also be omitted), a slash is appended to > directories and a space to other words. > .PP >-\fIcommand\fR invoked from `...` version has additional environment >+\fIcommand\fR invoked from \`...\` version has additional environment > variable set, the variable name is \%\fBCOMMAND_LINE\fR\% and > contains (as its name indicates) contents of the current (already > typed in) command line. One can examine and use contents of the >@@ -2526,7 +2598,7 @@ > .PP > or from a command run at completion time: > .IP "" 4 >-> complete kill 'p/*/`ps | awk \\{print\\ \\$1\\}`/' >+> complete kill 'p/*/\`ps | awk \e{print\e \e$1\e}\`/' > .br > > kill \-9 [^D] > .br >@@ -2587,7 +2659,7 @@ > .PP > Finally, here's a complex example for inspiration: > .IP "" 4 >-> complete find \\ >+> complete find \e > .br > \&'n/\-name/f/' 'n/\-newer/f/' 'n/\-{,n}cpio/f/' \e > .br >@@ -2618,8 +2690,6 @@ > .PP > Remember that programmed completions are ignored if the word being completed > is a tilde substitution (beginning with `~') or a variable (beginning with `$'). >-\fIcomplete\fR is an experimental feature, and the syntax may change >-in future versions of the shell. > See also the \fIuncomplete\fR builtin command. > .RE > .TP 8 >@@ -2684,7 +2754,7 @@ > from a shell script less verbose on slow terminals, or limit command > output to the number of lines on the screen: > .IP "" 4 >-> set history=`echotc lines` >+> set history=\`echotc lines\` > .br > > @ history\-\- > .PP >@@ -2693,9 +2763,9 @@ > capability string, as in the following example that places the date in > the status line: > .IP "" 4 >-> set tosl="`echotc ts 0`" >+> set tosl="\`echotc ts 0\`" > .br >-> set frsl="`echotc fs`" >+> set frsl="\`echotc fs\`" > .br > > echo \-n "$tosl";date; echo \-n "$frsl" > .PP >@@ -2814,8 +2884,10 @@ > existing history file instead of replacing it (if there is one) and > sorted by time stamp. (+) Merging is intended for an environment like > the X Window System >-with several shells in simultaneous use. Currently it succeeds >-only when the shells quit nicely one after another. >+with several shells in simultaneous use. If the second word of \fBsavehist\fR >+is `merge' and the third word is set to `lock', the history file update >+will be serialized with other shell sessions that would possibly like >+to merge history at exactly the same time. > .PP > With \fB\-L\fR, the shell appends \fIfilename\fR, which is presumably a > history list saved by the \fB\-S\fR option or the \fBsavehist\fR mechanism, >@@ -2958,6 +3030,12 @@ > \fIdescriptors\fR or \fIopenfiles\fR > the maximum number of open files for this process > .TP >+\fIpseudoterminals\fR >+the maximum number of pseudo-terminals for this user >+.TP >+\fIkqueues\fR >+the maximum number of kqueues allocated for this process >+.TP > \fIconcurrency\fR > the maximum number of threads for this process > .TP >@@ -2967,6 +3045,13 @@ > \fImaxproc\fR > the maximum number of simultaneous processes for this user id > .TP >+\fImaxthread\fR >+the maximum number of simultaneous threads (lightweight processes) for this >+user id >+.TP >+\fIthreads\fR >+the maximum number of threads for this process >+.TP > \fIsbsize\fR > the maximum size of socket buffer usage for this user > .TP >@@ -2976,6 +3061,9 @@ > \fImaxlocks\fR > the maximum number of locks for this user > .TP >+\fIposixlocks\fR >+the maximum number of POSIX advisory locks for this user >+.TP > \fImaxsignal\fR > the maximum number of pending signals for this user > .TP >@@ -3212,12 +3300,13 @@ > .PD > .RS +8 > .IP "" 4 >-> sched 11:00 echo It\\'s eleven o\\'clock. >+> sched 11:00 echo It\e's eleven o\e'clock. > .PP > causes the shell to echo `It's eleven o'clock.' at 11 AM. > The time may be in 12-hour AM/PM format > .IP "" 4 >-> sched 5pm set prompt='[%h] It\\'s after 5; go home: >' >+.\" TODO >+> sched 5pm set prompt='[%h] It\e's after 5; go home: >' > .PP > or may be relative to the current time: > .IP "" 4 >@@ -3615,7 +3704,7 @@ > shell variable to match (unless the shell variable is read-only) and vice > versa. Note that although \fBcwd\fR and \fBPWD\fR have identical meanings, they > are not synchronized in this manner, and that the shell automatically >-interconverts the different formats of \fBpath\fR and \fBPATH\fR. >+converts between the different formats of \fBpath\fR and \fBPATH\fR. > .TP 8 > .B addsuffix \fR(+) > If set, filename completion adds `/' to the end of directories and a space >@@ -3629,6 +3718,11 @@ > .B ampm \fR(+) > If set, all times are shown in 12-hour AM/PM format. > .TP 8 >+.B anyerror \fR(+) >+This variable selects what is propagated to the value of the >+\fBstatus\fR variable. For more information see the description of the >+\fBstatus\fR variable below. >+.TP 8 > .B argv > The arguments to the shell. Positional parameters are taken from \fBargv\fR, > i.e., `$1' is replaced by `$argv[1]', etc. >@@ -3672,7 +3766,8 @@ > cases. > .TP 8 > .B backslash_quote \fR(+) >-If set, backslashes (`\\') always quote `\\', `'', and `"'. This may make >+.\" TODO >+If set, backslashes (`\e') always quote `\e', `'', and `"'. This may make > complex quoting tasks easier, but it can cause syntax errors in \fIcsh\fR(1) > scripts. > .TP 8 >@@ -3685,6 +3780,11 @@ > A list of directories in which \fIcd\fR should search for > subdirectories if they aren't found in the current directory. > .TP 8 >+.B cdtohome \fR(+) >+If not set, \fIcd\fR requires a directory \fIname\fR, and will not go to the >+\fBhome\fR directory if it's omitted. >+This is set by default. >+.TP 8 > .B color > If set, it enables color display for the builtin \fBls\-F\fR and it passes > \fB\-\-color=auto\fR to \fBls\fR. Alternatively, it can be set to only >@@ -3710,7 +3810,7 @@ > separators. > If set to `Enhance', completion matches uppercase and underscore > characters explicitly and matches lowercase and hyphens in a >-case-insensivite manner; it will treat periods, hypens and underscores >+case-insensitive manner; it will treat periods, hyphens and underscores > as word separators. > .TP 8 > .B continue \fR(+) >@@ -3721,7 +3821,7 @@ > Same as continue, but the shell will execute: > .RS +8 > .IP "" 4 >-echo `pwd` $argv > ~/.<cmd>_pause; %<cmd> >+echo \`pwd\` $argv > ~/.<cmd>_pause; %<cmd> > .RE > .TP 8 > .B correct \fR(+) >@@ -3831,13 +3931,14 @@ > .PD 0 > .TP 8 > bsd >-Don't echo a newline if the first argument is `\-n'. >+Don't echo a newline if the first argument is `\-n'; the default for \fIcsh\fR. > .TP 8 > sysv > Recognize backslashed escape sequences in echo strings. > .TP 8 > both >-Recognize both the `\-n' flag and backslashed escape sequences; the default. >+Recognize both the `\-n' flag and backslashed escape sequences; the default >+for \fItcsh\fR. > .TP 8 > none > Recognize neither. >@@ -3852,6 +3953,11 @@ > If set, the command-line editor is used. Set by default in interactive > shells. > .TP 8 >+.B editors \fR(+) >+A list of command names for the \fIrun-fg-editor\fR editor command to match. >+If not set, the \fBEDITOR\fR (`ed' if unset) and \fBVISUAL\fR (`vi' if unset) >+environment variables will be used instead. >+.TP 8 > .B ellipsis \fR(+) > If set, the `%c'/`%.' and `%C' prompt sequences (see the \fBprompt\fR > shell variable) indicate skipped directories with an ellipsis (`...') >@@ -3884,7 +3990,7 @@ > If set, the `**' and `***' file glob patterns will match any string of > characters including `/' traversing any existing sub-directories. (e.g. > `ls **.c' will list all the .c files in the current directory tree). >-If used by itself, it will match match zero or more sub-directories >+If used by itself, it will match zero or more sub-directories > (e.g. `ls /usr/include/**/time.h' will list any file named `time.h' > in the /usr/include directory tree; whereas `ls /usr/include/**time.h' > will match any file in the /usr/include directory tree ending in `time.h'). >@@ -3937,7 +4043,7 @@ > .B history > The first word indicates the number of history events to save. The > optional second word (+) indicates the format in which history is >-printed; if not given, `%h\\t%T\\t%R\\n' is used. The format sequences >+printed; if not given, `%h\et%T\et%R\en' is used. The format sequences > are described below under \fBprompt\fR; note the variable meaning of > `%R'. Set to `100' by default. > .TP 8 >@@ -4278,7 +4384,7 @@ > .TP 8 > .B prompt2 \fR(+) > The string with which to prompt in \fIwhile\fR and \fIforeach\fR loops and >-after lines ending in `\\'. >+after lines ending in `\e'. > The same format sequences may be used as in \fBprompt\fR (q.v.); > note the variable meaning of `%R'. > Set by default to `%R? ' in interactive shells. >@@ -4329,14 +4435,19 @@ > .B savehist > If set, the shell does `history \-S' before exiting. > If the first word is set to a number, at most that many lines are saved. >-(The number must be less than or equal to \fBhistory\fR.) >+(The number should be less than or equal to the number \fBhistory\fR entries; >+if it is set to greater than the number of \fBhistory\fR settings, only >+\fBhistory\fR entries will be saved) > If the second word is set to `merge', the history list is merged with > the existing history file instead of replacing it (if there is one) and >-sorted by time stamp and the most recent events are retained. (+) >+sorted by time stamp and the most recent events are retained. >+If the second word of \fBsavehist\fR is `merge' and the third word is set to >+`lock', the history file update will be serialized with other shell sessions >+that would possibly like to merge history at exactly the same time. (+) > .TP 8 > .B sched \fR(+) > The format in which the \fIsched\fR builtin command prints scheduled events; >-if not given, `%h\\t%T\\t%R\\n' is used. >+if not given, `%h\et%T\et%R\en' is used. > The format sequences are described above under \fBprompt\fR; > note the variable meaning of `%R'. > .TP 8 >@@ -4353,17 +4464,22 @@ > See also \fBloginsh\fR. > .TP 8 > .B status >-The status returned by the last command, unless the variable >-.B anyerror >-is set, and any error in a pipeline or a backquote expansion will be >-propagated (this is the default >-.B csh >-behavior, and the current >-.B tcsh >-default). If it terminated >-abnormally, then 0200 is added to the status. Builtin commands >-which fail return exit status `1', all other builtin commands >-return status `0'. >+The exit status from the last command or backquote expansion, or any >+command in a pipeline is propagated to \fBstatus\fR. (This is also the >+default \fBcsh\fR behavior.) >+This default does not match what POSIX mandates (to return the >+status of the last command only). To match the POSIX behavior, you need >+to unset \fBanyerror\fR. >+.RS +8 >+.PP >+If the \fBanyerror\fR variable is unset, the exit status of a pipeline >+is determined only from the last command in the pipeline, and the exit >+status of a backquote expansion is \fInot\fR propagated to \fBstatus\fR. >+.PP >+If a command terminated abnormally, then 0200 is added to the status. >+Builtin commands which fail return exit status `1', all other builtin >+commands return status `0'. >+.RE > .TP 8 > .B symlinks \fR(+) > Can be set to several different values to control symbolic link (`symlink') >@@ -4624,7 +4740,7 @@ > `.' is omitted from \fBpath\fR for security > .TP 6 > vi >-\fIvi\fR-style editing is the default rather than \fIemacs\fR >+\fIvi\fR(1)\-style editing is the default rather than \fIemacs\fR(1)\-style > .TP 6 > dtr > Login shells drop DTR when exiting >@@ -4662,6 +4778,23 @@ > in the local version. > .RE > .TP 8 >+.B vimode \fR(+) >+.RS +8 >+If unset, various key bindings change behavior to be more \fBemacs\fR(1)\-style: >+word boundaries are determined by \fBwordchars\fR versus other characters. >+.PP >+If set, various key bindings change behavior to be more \fBvi\fR(1)\-style: >+word boundaries are determined by \fBwordchars\fR versus whitespace >+versus other characters; >+cursor behavior depends upon current vi mode (command, delete, insert, replace). >+.PP >+This variable is unset by \fIbindkey\fR \fB-e\fR and >+set by \fIbindkey\fR \fB-v\fR. >+.B vimode >+may be explicitly set or unset by the user after those \fIbindkey\fR >+operations if required. >+.RE >+.TP 8 > .B visiblebell \fR(+) > If set, a screen flash is used rather than the audible bell. > See also \fBnobeep\fR. >@@ -4726,7 +4859,9 @@ > .B wordchars \fR(+) > A list of non-alphanumeric characters to be considered part of a word by the > \fIforward-word\fR, \fIbackward-word\fR etc., editor commands. >-If unset, `*?_\-.[]~=' is used. >+If unset, the default value is determined based on the state of \fBvimode\fR: >+if \fBvimode\fR is unset, `*?_\-.[]~=' is used as the default; >+if \fBvimode\fR is set, `_' is used as the default. > .SH ENVIRONMENT > .TP 8 > .B AFSUSER \fR(+) >@@ -4741,8 +4876,9 @@ > .TP 8 > .B EDITOR > The pathname to a default editor. >-See also the \fBVISUAL\fR environment variable >-and the \fIrun-fg-editor\fR editor command. >+Used by the \fIrun-fg-editor\fR editor command if the >+the \fBeditors\fR shell variable is unset. >+See also the \fBVISUAL\fR environment variable. > .TP 8 > .B GROUP \fR(+) > Equivalent to the \fBgroup\fR shell variable. >@@ -4978,8 +5114,9 @@ > .TP 8 > .B VISUAL > The pathname to a default full-screen editor. >-See also the \fBEDITOR\fR environment variable >-and the \fIrun-fg-editor\fR editor command. >+Used by the \fIrun-fg-editor\fR editor command if the >+the \fBeditors\fR shell variable is unset. >+See also the \fBEDITOR\fR environment variable. > .SH FILES > .PD 0 > .TP 16 >@@ -5047,8 +5184,9 @@ > but experienced \fIcsh\fR(1) users will want to pay special attention to > \fItcsh\fR's new features. > .PP >-A command-line editor, which supports GNU Emacs or \fIvi\fR(1)-style >-key bindings. See \fBThe command-line editor\fR and \fBEditor commands\fR. >+A command-line editor, which supports \fIemacs\fR(1)\-style >+or \fIvi\fR(1)\-style key bindings. >+See \fBThe command-line editor\fR and \fBEditor commands\fR. > .PP > Programmable, interactive word completion and listing. > See \fBCompletion and listing\fR and the \fIcomplete\fR and \fIuncomplete\fR >@@ -5201,7 +5339,7 @@ > 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.18.01 (Astron) 2012-02-14. >+This manual documents tcsh 6.20.00 (Astron) 2016-11-24. > .SH AUTHORS > .PD 0 > .TP 2 >Index: contrib/tcsh/tw.color.c >=================================================================== >--- contrib/tcsh/tw.color.c (revision 309109) >+++ contrib/tcsh/tw.color.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tw.color.c,v 1.27 2010/08/19 05:52:19 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tw.color.c,v 1.33 2015/05/28 11:53:49 christos Exp $ */ > /* > * tw.color.c: builtin color ls-F > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tw.color.c,v 1.27 2010/08/19 05:52:19 christos Exp $") >+RCSID("$tcsh: tw.color.c,v 1.33 2015/05/28 11:53:49 christos Exp $") > > #include "tw.h" > #include "ed.h" >@@ -91,13 +91,66 @@ > VAR(NOS, "ca", "30;41"), /* File with capability */ > }; > >+#define nvariables (sizeof(variables)/sizeof(variables[0])) >+ > enum FileType { > VDir, VSym, VOrph, VPipe, VSock, VDoor, VBlock, VChr, VExe, >- VFile, VNormal, VMiss, VLeft, VRight, VEnd >+ VFile, VNormal, VMiss, VLeft, VRight, VEnd, VSuid, VSgid, VSticky, >+ VOther, Vstird, VReset, Vhard, Vhard2, VCap > }; > >-#define nvariables (sizeof(variables)/sizeof(variables[0])) >+/* >+ * Map from LSCOLORS entry index to Variable array index >+ */ >+static const uint8_t map[] = { >+ VDir, /* Directory */ >+ VSym, /* Symbolic Link */ >+ VSock, /* Socket */ >+ VPipe, /* Named Pipe */ >+ VExe, /* Executable */ >+ VBlock, /* Block Special */ >+ VChr, /* Character Special */ >+ VSuid, /* Setuid Executable */ >+ VSgid, /* Setgid Executable */ >+ VSticky, /* Directory writable to others and sticky */ >+ VOther, /* Directory writable to others but not sticky */ >+}; > >+ >+ >+enum ansi { >+ ANSI_RESET_ON = 0, /* reset colors/styles (white on black) */ >+ ANSI_BOLD_ON = 1, /* bold on */ >+ ANSI_ITALICS_ON = 3, /* italics on */ >+ ANSI_UNDERLINE_ON = 4, /* underline on */ >+ ANSI_INVERSE_ON = 7, /* inverse on */ >+ ANSI_STRIKETHROUGH_ON = 9, /* strikethrough on */ >+ ANSI_BOLD_OFF = 21, /* bold off */ >+ ANSI_ITALICS_OFF = 23, /* italics off */ >+ ANSI_UNDERLINE_OFF = 24, /* underline off */ >+ ANSI_INVERSE_OFF = 27, /* inverse off */ >+ ANSI_STRIKETHROUGH_OFF = 29,/* strikethrough off */ >+ ANSI_FG_BLACK = 30, /* fg black */ >+ ANSI_FG_RED = 31, /* fg red */ >+ ANSI_FG_GREEN = 32, /* fg green */ >+ ANSI_FG_YELLOW = 33, /* fg yellow */ >+ ANSI_FG_BLUE = 34, /* fg blue */ >+ ANSI_FG_MAGENTA = 35, /* fg magenta */ >+ ANSI_FG_CYAN = 36, /* fg cyan */ >+ ANSI_FG_WHITE = 37, /* fg white */ >+ ANSI_FG_DEFAULT = 39, /* fg default (white) */ >+ ANSI_BG_BLACK = 40, /* bg black */ >+ ANSI_BG_RED = 41, /* bg red */ >+ ANSI_BG_GREEN = 42, /* bg green */ >+ ANSI_BG_YELLOW = 43, /* bg yellow */ >+ ANSI_BG_BLUE = 44, /* bg blue */ >+ ANSI_BG_MAGENTA = 45, /* bg magenta */ >+ ANSI_BG_CYAN = 46, /* bg cyan */ >+ ANSI_BG_WHITE = 47, /* bg white */ >+ ANSI_BG_DEFAULT = 49, /* bg default (black) */ >+}; >+#define TCSH_BOLD 0x80 >+ > typedef struct { > Str extension; /* file extension */ > Str color; /* color string */ >@@ -167,7 +220,102 @@ > return *s == (Char)f; > } > >+static void >+init(size_t colorlen, size_t extnum) >+{ >+ size_t i; > >+ xfree(extensions); >+ for (i = 0; i < nvariables; i++) >+ variables[i].color = variables[i].defaultcolor; >+ if (colorlen == 0 && extnum == 0) { >+ extensions = NULL; >+ colors = NULL; >+ } else { >+ extensions = xmalloc(colorlen + extnum * sizeof(*extensions)); >+ colors = extnum * sizeof(*extensions) + (char *)extensions; >+ } >+ nextensions = 0; >+} >+ >+static int >+color(Char x) >+{ >+ static const char ccolors[] = "abcdefghx"; >+ char *p; >+ if (Isupper(x)) { >+ x = Tolower(x); >+ } >+ >+ if (x == '\0' || (p = strchr(ccolors, x)) == NULL) >+ return -1; >+ return 30 + (p - ccolors); >+} >+ >+static void >+makecolor(char **c, int fg, int bg, Str *v) >+{ >+ int l; >+ if (fg & 0x80) >+ l = xsnprintf(*c, 12, "%.2d;%.2d;%.2d;%.2d", ANSI_BOLD_ON, >+ fg & ~TCSH_BOLD, (10 + bg) & ~TCSH_BOLD, ANSI_BOLD_OFF); >+ l = xsnprintf(*c, 6, "%.2d;%.2d", >+ fg & ~TCSH_BOLD, (10 + bg) & ~TCSH_BOLD); >+ >+ v->s = *c; >+ v->len = l; >+ *c += l + 1; >+} >+ >+/* parseLSCOLORS(): >+ * Parse the LSCOLORS environment variable >+ */ >+static const Char *xv; /* setjmp clobbering */ >+void >+parseLSCOLORS(const Char *value) >+{ >+ size_t i, len, clen; >+ jmp_buf_t osetexit; >+ size_t omark; >+ xv = value; >+ >+ if (xv == NULL) { >+ init(0, 0); >+ return; >+ } >+ >+ len = Strlen(xv); >+ len >>= 1; >+ clen = len * 12; /* "??;??;??;??\0" */ >+ init(clen, 0); >+ >+ /* Prevent from crashing if unknown parameters are given. */ >+ omark = cleanup_push_mark(); >+ getexit(osetexit); >+ >+ /* init pointers */ >+ >+ if (setexit() == 0) { >+ const Char *v = xv; >+ char *c = colors; >+ >+ int fg, bg; >+ for (i = 0; i < len; i++) { >+ fg = color(*v++); >+ if (fg == -1) >+ stderror(ERR_BADCOLORVAR, v[-1], '?'); >+ >+ bg = color(*v++); >+ if (bg == -1) >+ stderror(ERR_BADCOLORVAR, '?', v[-1]); >+ makecolor(&c, fg, bg, &variables[map[i]].color); >+ } >+ >+ } >+ cleanup_pop_mark(omark); >+ resexit(osetexit); >+} >+ > /* parseLS_COLORS(): > * Parse the LS_COLORS environment variable > */ >@@ -183,16 +331,11 @@ > > (void) &e; > >- /* init */ >- xfree(extensions); >- for (i = 0; i < nvariables; i++) >- variables[i].color = variables[i].defaultcolor; >- colors = NULL; >- extensions = NULL; >- nextensions = 0; > >- if (value == NULL) >+ if (value == NULL) { >+ init(0, 0); > return; >+ } > > len = Strlen(value); > /* allocate memory */ >@@ -200,14 +343,13 @@ > for (v = value; *v; v++) > if ((*v & CHAR) == ':') > i++; >- extensions = xmalloc(len + i * sizeof(Extension)); >- colors = i * sizeof(Extension) + (char *)extensions; >- nextensions = 0; > >+ init(len, i); >+ > /* init pointers */ > v = value; > c = colors; >- e = &extensions[0]; >+ e = extensions; > > /* Prevent from crashing if unknown parameters are given. */ > >@@ -216,44 +358,44 @@ > > if (setexit() == 0) { > >- /* parse */ >- while (*v) { >- switch (*v & CHAR) { >- case ':': >- v++; >- continue; >- >- case '*': /* :*ext=color: */ >- v++; >- if (getstring(&c, &v, &e->extension, '=') && >- 0 < e->extension.len) { >+ /* parse */ >+ while (*v) { >+ switch (*v & CHAR) { >+ case ':': > v++; >- getstring(&c, &v, &e->color, ':'); >- e++; > continue; >- } >- break; > >- default: /* :vl=color: */ >- if (v[0] && v[1] && (v[2] & CHAR) == '=') { >- for (i = 0; i < nvariables; i++) >- if ((Char)variables[i].variable[0] == (v[0] & CHAR) && >- (Char)variables[i].variable[1] == (v[1] & CHAR)) >- break; >- if (i < nvariables) { >- v += 3; >- getstring(&c, &v, &variables[i].color, ':'); >+ case '*': /* :*ext=color: */ >+ v++; >+ if (getstring(&c, &v, &e->extension, '=') && >+ 0 < e->extension.len) { >+ v++; >+ getstring(&c, &v, &e->color, ':'); >+ e++; > continue; > } >- else >- stderror(ERR_BADCOLORVAR, v[0], v[1]); >+ break; >+ >+ default: /* :vl=color: */ >+ if (v[0] && v[1] && (v[2] & CHAR) == '=') { >+ for (i = 0; i < nvariables; i++) >+ if ((Char)variables[i].variable[0] == (v[0] & CHAR) && >+ (Char)variables[i].variable[1] == (v[1] & CHAR)) >+ break; >+ if (i < nvariables) { >+ v += 3; >+ getstring(&c, &v, &variables[i].color, ':'); >+ continue; >+ } >+ else >+ stderror(ERR_BADCOLORVAR, v[0], v[1]); >+ } >+ break; > } >- break; >+ while (*v && (*v & CHAR) != ':') >+ v++; > } >- while (*v && (*v & CHAR) != ':') >- v++; > } >- } > > cleanup_pop_mark(omark); > resexit(osetexit); >@@ -264,15 +406,15 @@ > /* put_color(): > */ > static void >-put_color(const Str *color) >+put_color(const Str *colorp) > { > size_t i; >- const char *c = color->s; >+ const char *c = colorp->s; > int original_output_raw = output_raw; > > output_raw = TRUE; > cleanup_push(&original_output_raw, output_raw_restore); >- for (i = color->len; 0 < i; i--) >+ for (i = colorp->len; 0 < i; i--) > xputchar(*c++); > cleanup_until(&original_output_raw); > } >@@ -286,12 +428,12 @@ > size_t i; > char *filename = short2str(fname); > char *last = filename + len; >- Str *color = &variables[VFile].color; >+ Str *colorp = &variables[VFile].color; > > switch (suffix) { > case '>': /* File is a symbolic link pointing to > * a directory */ >- color = &variables[VDir].color; >+ colorp = &variables[VDir].color; > break; > case '+': /* File is a hidden directory [aix] or > * context dependent [hpux] */ >@@ -301,7 +443,7 @@ > for (i = 0; i < nvariables; i++) > if (variables[i].suffix != NOS && > (Char)variables[i].suffix == suffix) { >- color = &variables[i].color; >+ colorp = &variables[i].color; > break; > } > if (i == nvariables) { >@@ -310,7 +452,7 @@ > && strncmp(last - extensions[i].extension.len, > extensions[i].extension.s, > extensions[i].extension.len) == 0) { >- color = &extensions[i].color; >+ colorp = &extensions[i].color; > break; > } > } >@@ -318,7 +460,7 @@ > } > > put_color(&variables[VLeft].color); >- put_color(color); >+ put_color(colorp); > put_color(&variables[VRight].color); > } > >Index: contrib/tcsh/tw.comp.c >=================================================================== >--- contrib/tcsh/tw.comp.c (revision 309109) >+++ contrib/tcsh/tw.comp.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tw.comp.c,v 1.42 2007/10/01 21:52:00 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tw.comp.c,v 1.45 2015/09/30 13:28:02 christos Exp $ */ > /* > * tw.comp.c: File completion builtin > */ >@@ -32,7 +32,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tw.comp.c,v 1.42 2007/10/01 21:52:00 christos Exp $") >+RCSID("$tcsh: tw.comp.c,v 1.45 2015/09/30 13:28:02 christos Exp $") > > #include "tw.h" > #include "ed.h" >@@ -46,7 +46,7 @@ > static Char *tw_tok (Char *); > static int tw_pos (Char *, int); > static void tw_pr (Char **); >-static int tw_match (const Char *, const Char *); >+static int tw_match (const Char *, const Char *, int); > static void tw_prlist (struct varent *); > static const Char *tw_dollar (const Char *,Char **, size_t, Char **, > Char, const char *); >@@ -248,14 +248,15 @@ > * in a prefix of the string. > */ > static int >-tw_match(const Char *str, const Char *pat) >+tw_match(const Char *str, const Char *pat, int exact) > { > const Char *estr; >- int rv = Gnmatch(str, pat, &estr); >+ int rv = exact ? Gmatch(estr = str, pat) : Gnmatch(str, pat, &estr); > #ifdef TDEBUG >- xprintf("Gnmatch(%s, ", short2str(str)); >+ xprintf("G%smatch(%s, ", exact ? "" : "n", short2str(str)); > xprintf("%s, ", short2str(pat)); >- xprintf("%s) = %d [%d]\n", short2str(estr), rv, estr - str); >+ xprintf("%s) = %d [%" TCSH_PTRDIFF_T_FMT "d]\n", short2str(estr), rv, >+ estr - str); > #endif /* TDEBUG */ > return (int) (rv ? estr - str : -1); > } >@@ -525,6 +526,7 @@ > *pos = NULL; /* scratch pointer */ > int cmd, res; > Char sep; /* the command and separator characters */ >+ int exact; > > if (ptr[0] == '\0') > continue; >@@ -599,6 +601,7 @@ > } > #endif /* TDEBUG */ > >+ exact = 0; > switch (cmd) { > case 'p': /* positional completion */ > #ifdef TDEBUG >@@ -614,12 +617,14 @@ > > case 'N': /* match with the next-next word */ > case 'n': /* match with the next word */ >+ exact = 1; >+ /*FALLTHROUGH*/ > case 'c': /* match with the current word */ > case 'C': > #ifdef TDEBUG > xprintf("%c: ", cmd); > #endif /* TDEBUG */ >- if ((n = tw_match(pos, ran)) < 0) { >+ if ((n = tw_match(pos, ran, exact)) < 0) { > cleanup_until(ran); > continue; > } >Index: contrib/tcsh/tw.decls.h >=================================================================== >--- contrib/tcsh/tw.decls.h (revision 309109) >+++ contrib/tcsh/tw.decls.h (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tw.decls.h,v 3.22 2006/01/12 18:15:25 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tw.decls.h,v 3.23 2012/06/21 17:40:40 christos Exp $ */ > /* > * tw.decls.h: Tenex external declarations > */ >@@ -125,6 +125,7 @@ > extern void set_color_context (void); > extern void print_with_color (const Char *, size_t, Char); > extern void parseLS_COLORS (const Char *); >+extern void parseLSCOLORS (const Char *); > #endif /* COLOR_LS_F */ > > #endif /* _h_tw_decls */ >Index: contrib/tcsh/tw.parse.c >=================================================================== >--- contrib/tcsh/tw.parse.c (revision 309109) >+++ contrib/tcsh/tw.parse.c (working copy) >@@ -1,4 +1,4 @@ >-/* $Header: /p/tcsh/cvsroot/tcsh/tw.parse.c,v 3.133 2011/04/14 14:33:05 christos Exp $ */ >+/* $Header: /p/tcsh/cvsroot/tcsh/tw.parse.c,v 3.139 2015/10/16 14:59:56 christos Exp $ */ > /* > * tw.parse.c: Everyone has taken a shot in this futile effort to > * lexically analyze a csh line... Well we cannot good >@@ -35,7 +35,7 @@ > */ > #include "sh.h" > >-RCSID("$tcsh: tw.parse.c,v 3.133 2011/04/14 14:33:05 christos Exp $") >+RCSID("$tcsh: tw.parse.c,v 3.139 2015/10/16 14:59:56 christos Exp $") > > #include "tw.h" > #include "ed.h" >@@ -618,7 +618,11 @@ > break; > > wq = w & QUOTE; >- w &= ~QUOTE; >+#if INVALID_BYTE != 0 >+ /* add checking INVALID_BYTE for FIX UTF32 */ >+ if ((w & INVALID_BYTE) != INVALID_BYTE) /* w < INVALID_BYTE */ >+#endif >+ w &= ~QUOTE; > > if (cmap(w, _ESC | _QF)) > wq = QUOTE; /* quotes are always quoted */ >@@ -1236,7 +1240,7 @@ > tw_suffix(int looking, struct Strbuf *word, const Char *exp_dir, Char *exp_name) > { > Char *ptr; >- Char *dollar; >+ Char *dol; > struct varent *vp; > > (void) strip(exp_name); >@@ -1258,8 +1262,8 @@ > else if ((ptr = tgetenv(exp_name)) == NULL || *ptr == '\0') > return ' '; > >- if ((dollar = Strrchr(word->s, '$')) != 0 && >- dollar[1] == '{' && Strchr(dollar, '}') == NULL) >+ if ((dol = Strrchr(word->s, '$')) != 0 && >+ dol[1] == '{' && Strchr(dol, '}') == NULL) > return '}'; > > return isadirectory(exp_dir, ptr) ? '/' : ' ';
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207860
:
167938
|
169334
| 177393