aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2023-01-29 20:46:19 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-01-29 20:46:19 +0000
commit143ef44f06822f82a8358d4c02f07102d963fe5f (patch)
treef9080b8a265dd926053ee7ae187e8fa46f3fb5e0
parent174d8b60324d7e8754709f7155e13ca95220b48c (diff)
downloadsrc-vendor/tcsh.tar.gz
src-vendor/tcsh.zip
Vendor import of tcsh-6.24.07vendor/tcsh/6.24.07vendor/tcsh
-rw-r--r--Fixes257
-rw-r--r--Imakefile44
-rw-r--r--Makefile.in275
-rw-r--r--Makefile.std113
-rw-r--r--Makefile.vms113
-rw-r--r--README.md3
-rw-r--r--WishList2
-rw-r--r--aclocal.m4410
-rw-r--r--complete.tcsh3
-rw-r--r--config.h287
-rw-r--r--config.h.in21
-rw-r--r--config_f.h13
-rwxr-xr-xconfigure6239
-rw-r--r--configure.ac545
-rw-r--r--cygwin/csh.cshrc10
-rw-r--r--cygwin/csh.login16
-rw-r--r--ed.chared.c21
-rw-r--r--ed.decls.h2
-rw-r--r--ed.defns.c2
-rw-r--r--ed.inputl.c4
-rw-r--r--ed.refresh.c89
-rw-r--r--ed.xmap.c145
-rw-r--r--glob.c1
-rw-r--r--host.defs10
-rw-r--r--nls/C/set12
-rw-r--r--nls/C/set1914
-rw-r--r--nls/C/set22
-rw-r--r--nls/Makefile.in50
-rw-r--r--nls/et/set12
-rw-r--r--nls/et/set1914
-rw-r--r--nls/et/set22
-rw-r--r--nls/finnish/set12
-rw-r--r--nls/finnish/set164
-rw-r--r--nls/finnish/set172
-rw-r--r--nls/finnish/set1916
-rw-r--r--nls/french/set12
-rw-r--r--nls/french/set1914
-rw-r--r--nls/german/set12
-rw-r--r--nls/german/set1914
-rw-r--r--nls/german/set22
-rw-r--r--nls/greek/set12
-rw-r--r--nls/greek/set1914
-rw-r--r--nls/italian/set12
-rw-r--r--nls/italian/set1914
-rw-r--r--nls/ja/set12
-rw-r--r--nls/pl/set12
-rw-r--r--nls/pl/set1914
-rw-r--r--nls/pl/set22
-rw-r--r--nls/russian/set12
-rw-r--r--nls/russian/set1914
-rw-r--r--nls/russian/set22
-rw-r--r--nls/spanish/set12
-rw-r--r--nls/spanish/set1914
-rw-r--r--nls/ukrainian/set12
-rw-r--r--nls/ukrainian/set1914
-rw-r--r--nls/ukrainian/set22
-rw-r--r--patchlevel.h6
-rw-r--r--sh.c8
-rw-r--r--sh.decls.h4
-rw-r--r--sh.dir.c12
-rw-r--r--sh.dol.c42
-rw-r--r--sh.err.c4
-rw-r--r--sh.exec.c19
-rw-r--r--sh.exp.c15
-rw-r--r--sh.file.c7
-rw-r--r--sh.func.c72
-rw-r--r--sh.h16
-rw-r--r--sh.hist.c56
-rw-r--r--sh.init.c4
-rw-r--r--sh.lex.c35
-rw-r--r--sh.misc.c2
-rw-r--r--sh.proc.c32
-rw-r--r--sh.sem.c7
-rw-r--r--sh.set.c25
-rw-r--r--tc.alloc.c33
-rw-r--r--tc.bind.c5
-rw-r--r--tc.const.c1
-rw-r--r--tc.func.c56
-rw-r--r--tc.nls.c2
-rw-r--r--tc.printf.c2
-rw-r--r--tc.prompt.c6
-rw-r--r--tc.vers.c2
-rw-r--r--tcsh.man13817
-rw-r--r--tests/aliases.at12
-rw-r--r--tests/arguments.at30
-rw-r--r--tests/commands.at131
-rw-r--r--tests/expr.at7
-rw-r--r--tests/history.at154
-rw-r--r--tests/lexical.at50
-rw-r--r--tests/mb-eucjp.at5
-rw-r--r--tests/mb-utf8.at5
-rw-r--r--tests/noexec.at5
-rw-r--r--tests/parenthesis.at23
-rw-r--r--tests/sh.dol.at7
-rw-r--r--tests/subst.at15
-rw-r--r--tests/syntax.at8
-rw-r--r--tests/testsuite.at19
-rw-r--r--tests/variables.at211
-rw-r--r--tw.color.c37
-rw-r--r--tw.decls.h3
-rw-r--r--tw.h2
-rw-r--r--tw.parse.c137
-rw-r--r--win32/README.NT2
103 files changed, 15501 insertions, 8525 deletions
diff --git a/Fixes b/Fixes
index 76fdede0c4b7..363759d6fa90 100644
--- a/Fixes
+++ b/Fixes
@@ -1,7 +1,57 @@
- 15. V6.22.04 - 20210426
+ 17. V6.24.07 - 2022-12-21
+ 16. V6.24.06 - 2022-12-12
+ 15. V6.24.05 - 2022-12-04
+ 14. Build and release process improvements (Luke Mewburn, Kimmo Suominen)
+ 13. V6.24.04 - 2022-12-03
+ 12. Fix a test to match output from old bash versions (Corinna Vinschen)
+ 11. V6.24.03 - 2022-12-03
+ 10. Fix set/@ test when diff is from busybox (Luke Mewburn)
+ 9. Handle \c in echo properly instead of printing garbage past the
+ end of the string.
+ 8. Add a configure check for a working sbrk() (Luke Mewburn)
+ 7. V6.24.02 - 2022-11-24
+ 6. Complete mdoc-based manual page (Luke Mewburn)
+ 5. Fix rechist() check for NULL filename (broke when arg was renamed).
+ > cd
+ > rm .history
+ > unset savehist
+ > history -S /tmp/s
+ > exit
+ A ~/.history has been written when it should not have been.
+ 4. Make OpenBSD use SHORT_STRINGS and fix non-SHORT_STRINGS compilation.
+ 3. V6.24.01 - 2022-05-12
+ 2. Fix quoting of ! characters in history recall (Kimmo Suominen)
+ 1. Fix return status of which (Jamie Landeg-Jones)
+
+ 12. V6.24.00 - 2022-02-02
+ 11. Update config.guess and config.sub so arm64 is recognized
+ 10. V6.23.02 - 2022-01-03
+ 9. Make the \U escape up to 8 hex digits.
+ 8. V6.23.01 - 2021-12-09
+ 7. add \cc and \Uhhh, and document escape sequences
+ 6. add $'string with escapes' ("dollar-single-quotes") (Kimmo Suominen)
+ 5. don't glob the filetest builtin arguments twice
+ 4. remove the duplicate echo escape parsing code and use parseescape
+ 3. add \x{hh} \xhh \uhhh (H.Merijn Brand)
+ 2. fix and document ln=target
+ 1. Merge in patches from pkgsrc:
+ - Modernize the installation targets so that they use INSTALL_DATA,
+ INSTALL_PROGRAM, and MKDIR_P.
+ - Enable SYSMALLOC and SHORT_STRINGS on NetBSD.
+ - Enable NO_FIX_MALLOC and SHORT_STRINGS on OpenBSD.
+
+ 23. V6.23.00 - 2021-11-11
+ 22. Guard against running off the beginning of the array (Simon Burge)
+ 21. Add jobs -Z to setproctitle(3) like zsh(1)
+ 20. Prevent infinite recursion with tcsh -fc 'set -r status;:' (Gabriel Ravier)
+ 19. Fix postcmd trashing history when invoking domod (Jan Macku)
+ 18. Fix off-by-one in RefCursor (H.Merijn Brand)
+ 17. add ln=target in LS_COLORS (ajrosen)
+ 16. prefer mallinfo2 instead of mallinfo (H.Merijn Brand)
+ 15. V6.22.04 - 2021-04-26
14. Don't crash with 'bindkey "^0" clear-screen' (Karl Jeacle)
13. Fix $x:q:h and $x:q:t return the whole string for strings not containing /
- 12. V6.22.03 - 20201118
+ 12. V6.22.03 - 2020-11-18
11. Fix $x:q:h and $x:q:t to not crash (alzwded) with strings containing /
10. Block SIGHUP while writing history/directory stack (Brett Frankenberger)
9. Fixed reversed test that broke history merging (Brett Frankenberger)
@@ -11,16 +61,16 @@
6. alzwded@github, fix infinite loop with :gas variable modifier
5. PR/88: Add a Q: modifier that preserves empty arguments leaving :q
alone.
- 4. V6.22.02 - 20191204
+ 4. V6.22.02 - 2019-12-04
3. Fix version in configure.ac
- 2. V6.22.01 - 20191201
+ 2. V6.22.01 - 2019-12-01
1. undo PR/88: Preserve empty arguments in :q, since it breaks
$ set x=""
$ alias test "echo "\""$x:q"\"" is working."
$ alias test
echo "
- 6. V6.22.00 - 20191128
+ 6. V6.22.00 - 2019-11-28
5. PR/113: Sobomax: avoid infinite loops for -c commands when stdout is
not a tty.
4. Avoid infinite loops during history loads when merging, print a better
@@ -30,7 +80,7 @@
1. PR/81: Fix range matching issue where we were comparing with the
range character instead of the start of range. [l-z]* would match foo
- 12. V6.21.00 - 20190508
+ 12. V6.21.00 - 2019-05-08
11. Abort history loading on words and lines too long
https://bugzilla.redhat.com/show_bug.cgi?id=1598502
10. PR/37: Introduce GetCmdChar() to avoid open coding array access.
@@ -45,9 +95,9 @@
2. Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar)
1. PR/471: Delay arginp parsing
- 20. V6.20.00 - 20161124
+ 20. V6.20.00 - 2016-11-24
19. Don't resize the screen if it did not change size.
- 18. V6.19.01 - 20161025
+ 18. V6.19.01 - 2016-10-25
17. restore file description when cleaning up after eval:
repeat 99 time
16. PR/572: Fix $SHLVL issue when exec'ing subshells.
@@ -68,16 +118,16 @@
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
+ 41. V6.19.00 - 2015-05-21
+ 40. V6.18.05 - 2015-05-10
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
+ 36. V6.18.04 - 2015-05-04
35. revert fix echo "\1", it is incorrect.
34. revert fix to PR/437, breaks short strings.
- 33. V6.18.03 - 20150503
+ 33. V6.18.03 - 2015-05-03
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.
@@ -91,7 +141,7 @@
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
+ 24. V6.18.02 - 2014-06-18
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
@@ -137,30 +187,30 @@
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
+ 6. V6.18.01 - 2012-02-14
5. fix interruptible wait again
4. ignore bogus compiler overflow message
3. cleanup ifdefs in utmp code, and provide default array entries
2. Ignore #machine entries in host.defs
1. Detect missing ) in gethost.c (Corinna Vinschen)
-104. V6.18.00 - 20120114
+104. V6.18.00 - 2012-01-14
103. remove unused variables.
102. Make gethost use definitions for x __x__ and __x automatically.
101. More utmp fixes
-100. V6.17.10 - 20120105
+100. V6.17.10 - 2012-01-05
99. Add more FreeBSD/NetBSD machines
98. Add portability wrapper for gencat
97. Fix warning for write in SYSMALLOC systems.
- 96. V6.17.09 - 20120102
+ 96. V6.17.09 - 2012-01-02
95. revert gencat handling to pre-cygwin fixes (without the env settings)
94. remove stray endutent()
- 93. V6.17.08 - 20111230
+ 93. V6.17.08 - 2011-12-30
92. Remove - from gencat
91. Provide support for malloc_usable_size() so that linux works again
without SYSMALLOC
90. Add support for FreeBSD's utmpx.
- 89. V6.17.07 - 20111227
+ 89. V6.17.07 - 2011-12-27
88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
there are more than 10 jobs.
87. PR/155: Default $anyerror to set for backward compatibility
@@ -172,7 +222,7 @@
83. PR/38: Null check for jobs (Kurt Miller)
82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
81. PR/120: string0 in filetest does not have enough space.
- 80. V6.17.06 - 20110415
+ 80. V6.17.06 - 2011-04-15
79. PR/110: Add $anyerror to select behavior. Default to the new one.
78. Don't try to spell commands that are correct (Rouben Rostamian)
[./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo;
@@ -187,7 +237,7 @@
72. check that the NLS path works before setting $NLSPATH.
71. use SYSMALLOC for GLIBC (Werner Fink)
70. use mallinfo for SYSMALLOC (Corinna Vinschen)
- 69. V6.17.05 - 20110201
+ 69. V6.17.05 - 2011-02-01
68. Use mkstemp() if there for here docs (Werner Fink)
67. Fix handling of errors and exit values in builtins (Werner Fink)
66. Better pty name detection (Werner Fink)
@@ -207,9 +257,9 @@
56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin
settings (Corinna Vinschen)
55. Avoid double slashes in cdpath (Corinna Vinschen)
- 54. V6.17.04 - 20110118
+ 54. V6.17.04 - 2011-01-18
53. Revert PR/110, breaks the test suite.
- 52. V6.17.03 - 20110117
+ 52. V6.17.03 - 2011-01-17
51. PR/102: Complain on input files with missing trailing \n
50. PR/104: If atime == mtime we don't have new mail.
49. PR/113: Don't allow illegal variable names to be set.
@@ -235,7 +285,7 @@
34. Better fixes for histchars and promptchars (nargs)
33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context.
(Fabio Fabbri)
- 32. V6.17.02 - 20100512
+ 32. V6.17.02 - 2010-05-12
31. PR/79: nargs: Better handling for promptchars.
30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim
Zajkowski)
@@ -253,7 +303,7 @@
23. Turn HistLit on while recording history to avoid \!\! losing its \.
From Debian
22. set autoexpand; set histchars="";\n<tab> crash. From Debian
- 21. V6.17.01 - 20100506
+ 21. V6.17.01 - 2010-05-06
20. unset verbose while we are reading the history file to avoid echoing
to the terminal. (Jeffrey Bastian)
19. globstar addition, Enhance addition, euid, euser, gid variables
@@ -281,14 +331,14 @@
1. remember to closedir in mailchk (from Werner Fink, reported by
David Binderman)
- 21. V6.17.00 - 20090710
+ 21. V6.17.00 - 2009-07-10
20. Fix dataroot autoconf issue.
19. Fix directory stuff for unit tests.
18. Fix small bug in history in loops.
17. Provide newer config.{guess,sub}
16. Fix gcc 4 warnings.
15. Fix memory trashing bug introduced in 10.
- 14. V6.16.01 - 20090624
+ 14. V6.16.01 - 2009-06-24
13. add missing sigemptyset in goodbye()
12. add rlimit swapsize from FreeBSD.
11. restore behavior where a[n-] never prints an error.
@@ -307,11 +357,11 @@
2. Add missing colorls "rs" variable (Shlomi Fish, m70)
1. Fix pts detection issue (Ruslan Ermilov)
- 33. V6.16.00 - 20080930
+ 33. V6.16.00 - 2008-09-30
32. longjmp clobbered variable fixes.
31. __GNX__ addition
30. Windows fork fixes
- 28. V6.15.02 - 20080830
+ 28. V6.15.02 - 2008-08-30
27. Fix an eval free'ing botch (Per Hedeland)
26. /bin/echo "`" coredumped because stderror() calls longjmp corrupting
the stack (Mark Davies). We should vet the code for all stderror()
@@ -326,7 +376,7 @@
(Martin Kraemer)
20. Add environment variable COMMAND_LINE to be available in completions
(Marcin Konarski)
- 19. V6.15.01 - 20070928
+ 19. V6.15.01 - 2007-09-28
18. Evaluate expressions in the proper order (Li Zefan), controlled by
compat_expr.
17. Don't need to flush() if we are silent. Prevents recursive error issue.
@@ -352,7 +402,7 @@
These characters return true for isalpha/isalnum. Ignore them
because they break parsing (Martin Kraemer)
- 74. V6.15.00 - 20070303
+ 74. V6.15.00 - 2007-03-03
73. fix extension eating windows code (christos)
72. fix loop in %R history expansion (christos)
71. sched +X source file disables interrupts (Mike Sullivan)
@@ -360,27 +410,27 @@
69. Avoid infinite loops in :ga modifiers when the LHS is a substring of the
RHS.
68. Automatically disable WIDE_STRINGS with --disable-nls (Miloslav Trmac)
- 67. V6.14.07 - 20060825
+ 67. V6.14.07 - 2006-08-25
66. rename set to setv to avoid clashes (christos)
65. Eliminate sighold/sigrelse (christos)
64. Compilation cleanups. (Martin Kraemer)
63. Don't rebuild needlessly when generated files are unchanged
(Martin Kraemer)
62. Fix confusion between Char and eChar (Martin Kraemer)
- 61. V6.14.06 - 20060824
+ 61. V6.14.06 - 2006-08-24
60. set PROGRAM_ENVIRONMENT for OSD_POSIX (Martin Kraemer)
59. EBCDIC patch (Martin Kraemer)
58. Remove globbing support in history rearches (Ryan Barrett)
57. Highlighting patch (Ryan Barrett)
56. Mark-Cursor exchange emacs editing fix (Martin Kraemer)
- 55. V6.14.05 - 20060304
+ 55. V6.14.05 - 2006-03-04
54. don't limit termcap strings to 1K (Alan Ferrency)
53. protect against null path.
52. Be more conservative in wide_read PR#29
51. remove HAVE_STRCOLL; not needed anymore (Miloslav Trmac)
50. remove imake support and make nls configurable by configure
(Miloslav Trmac)
- 49. V6.14.04 - 20060214
+ 49. V6.14.04 - 2006-02-14
48. Fixes build failure with !SHORT_STRINGS (Miloslav Trmac)
47. Fixes constness warnings with !SHORT_STRINGS: short2str is "strip()",
which modifies its argument. Rather than verify this is safe in all
@@ -412,7 +462,7 @@
and the declaration is correct for Linux, anyway. (Miloslav Trmac)
36. warning.patch: Fix a const warning.
35. More color-ls variables (Jean-Luc Leger)
- 34. V6.14.03 - 20060212
+ 34. V6.14.03 - 2006-02-12
33. Signal related changes (Miloslav Trmac)
32. Misc cast cleanups and code clarification (Miloslav Trmac)
31. Use dynamically allocated buffers everywhere (Miloslav Trmac)
@@ -440,9 +490,9 @@
13. Fix uppercase/lowercase transformations (Jean-Luc Leger)
12. Fix symlink expansion (revert from 6.10.00) (Jean-Luc Leger and Christos)
11. Fix literal sequence in prompt (Miloslav Trmac)
- 10. V6.14.02 - 20050412
+ 10. V6.14.02 - 2005-04-12
9. Prototype fixes (Miloslav Trmac and Jean-Luc Leger)
- 8. V6.14.01 - 20050411
+ 8. V6.14.01 - 2005-04-11
7. Make =- refer to $owd (H.Merijn Brand)
6. Use prototypes (almost) everywhere (Miloslav Trmac) (issue #5)
5. Fix doc path in Cygwin installation (Corinna Vinschen)
@@ -451,14 +501,14 @@
2. Messages fixes for the ja (Japanese) locale (NAKAMURA Takeshi) (issue #4)
1. Enable charset conversion in nls (Miloslav Trmac) (issue #3)
- 76. V6.14.00 - 20050325
+ 76. V6.14.00 - 2005-03-25
75. Additional messages for the ja (Japanese) locale (NAKAMURA Takeshi)
- 74. V6.13.10 - 20050321
+ 74. V6.13.10 - 2005-03-21
73. Implement --help (Tom Warzeka)
72. Clamp solaris autologout time
71. Add support for "limit heapsize" (Martin Kraemer)
70. Improved autoconf for utmp/utmpx (Miloslav Trmac)
- 69. V6.13.09 - 20050303
+ 69. V6.13.09 - 2005-03-03
68. Autoconf additions (Miloslav Trmac and Jean-Luc Leger)
67. Fix erroneous sign extension when printing huge numbers (Martin Kraemer)
66. Handle delay in termcap entries (Martin Kraemer)
@@ -467,11 +517,11 @@
63. Mark position update fixes (Martin Kraemer)
62. Define BSDLIMIT and BSDTIMES for Cygwin (Corinna Vinschen)
61. Fix NLSFrom prototype (Martin Kraemer)
- 60. V6.13.08 - 20050303
+ 60. V6.13.08 - 2005-03-03
59. Add test for socklen_t in autoconf
58. Fix problems with NLSFrom prototype
57. Deal with AIX's utmpx lossage
- 56. V6.13.07 - 20050118
+ 56. V6.13.07 - 2005-01-18
55. constifications, XXX: duplicate prototype on setpgrp().
54. iconv fixes (Miloslav Trmac)
53. literal code cleanups (Miloslav Trmac)
@@ -483,17 +533,17 @@
50. forward<->reverse char conversion verification (Miloslav Trmac)
49. japanese locale additions (Yoshiyuki Sakakibara)
48. wide character/utf 8 cleanups (Michael Schroeder)
- 47. V6.13.06 - 20050105
+ 47. V6.13.06 - 2005-01-05
46. autoconf cleanup (Miloslav Trmac)
45. Fix literal refresh code (Michael Schroeder)
44. Fix history printing bug with WIDE_STRINGS
- 43. V6.13.05 - 20041121
+ 43. V6.13.05 - 2004-11-21
42. deal with not having intptr_t
41. get rid of bool.
40. Protect HAVE_ICONV with NLS_CATALOGS
39. Deal with wchar_t being unsigned.
38. If we HAVEUTMPX redefine some utmp functions in terms of utmpx ones.
- 37. V6.13.04 - 20041120
+ 37. V6.13.04 - 2004-11-20
36. Fix display problems with two-column characters when using WIDE_STRINGS.
(Miloslav Trmac)
35. Change charset declarations for some of the translations.
@@ -504,7 +554,7 @@
(Miloslav Trmac)
31. Fix escaping of "control" bytes 0x80..0x9F when they are actually
parts of UTF-8 character representation. (Miloslav Trmac)
- 30. V6.13.03 - 20041120
+ 30. V6.13.03 - 2004-11-20
29. More close_on_exec fixes (Miloslav Trmac)
28. SUSE dspmbyte fixes (via Harald)
27. Newline handling in command substitution controlled by csubstnonl
@@ -517,14 +567,14 @@
22. Complete arguments that contant a # (Steven Grady)
21. Set close-on-exec in subshells
20. Compilation fixes (Miloslav Trmac)
- 19. V6.13.02 - 20040804
+ 19. V6.13.02 - 2004-08-04
18. de-register, de-extern, de-shadow, and const poison.
17. WIDE_STRINGS support (Miloslav Trmac)
16. warning cleanups (Miloslav Trmac)
15. nlsclose() arg passing, exp2 is now a gcc builtin (Mark Peek)
14. iconv malloc portability fix.
13. make automatic dspmbyte determination case insensitive
- 12. V6.13.01 - 20040724
+ 12. V6.13.01 - 2004-07-24
11. bug fix in automatic dspmbyte setting (Miloslav Trmac)
10. iconv patches (Miloslav Trmac)
9. cygwin signal fixes; only init 32 signals, don't set bit flag on error;
@@ -541,15 +591,15 @@
1. UTF-8 handling for both single and double width characters, but
no combining character support. (Michael Schroeder)
- 36. V6.13.00 - 20040519
- 35. V6.12.03 - 20040322
+ 36. V6.13.00 - 2004-05-19
+ 35. V6.12.03 - 2004-03-22
34. turn on kanji and dspmbyte by default; add check for utf8 locales,
and turn parsing of that automatically based on $LANG.
33. Fix compilation issue under Windows/NT and charset incorrect patch
(Yoshiyuki Sakakibara)
32. completion additions (Tom Warzeka)
31. compilation fix (Martin Kraemer)
- 30. V6.12.02 - 20040221
+ 30. V6.12.02 - 2004-02-21
29. Glob completion listing addition (Tom Warzeka)
28. BS2000 bs2cmd builtin. (Martin Kraemer)
27. Fix interrupt resetting code when /etc startup scripts have syntax errors
@@ -576,21 +626,21 @@
9. Don't go into an infinite loop when tcgetpgrp() returns an error.
8. Cygwin fixes (Corinna Vinschen)
7. NLS catclose() bug avoidance (KAJIMOTO Masato)
- 6. V6.12.01 - 20030208
+ 6. V6.12.01 - 2003-02-08
5. Misc NT cleanup. No more GPL code (amol)
4. use strtol() to detect errors in builtin kill (Peter Jeremy)
3. Recognize linux systems on mips* (Maciej W. Rozycki)
2. Enable complete=igncase on unix (Stephen Krauth)
1. Eliminate maxitems (Todd Miller)
- 58. V6.12.00 - 20020732
+ 58. V6.12.00 - 2002-07-32
57. misc cleanups.
- 56. V6.11.05 - 20020712
+ 56. V6.11.05 - 2002-07-12
55. We should have socklen_t in the INET6 case, but we leave int otherwise.
54. Fixed for Darwin/Rhapsody (Mark Peek)
53. provide new config.sub and config.guess from ftp://ftp.gnu.org/gnu/config/
(Nelson Beebe)
- 52. V6.11.04 - 20020709
+ 52. V6.11.04 - 2002-07-09
51. Dissallow setting of environment variables that do not contain
alphanumeric names (Ton Voon)
50. Don't expand path components that don't resolve to path names (Jonathan
@@ -609,7 +659,7 @@
problems) (Nelson Beebe)
38. Disable ipv6 for Apple (Nelson Beebe)
37. Fix darwin configure entry (Nelson Beebe)
- 36. V6.11.03 - 20020701
+ 36. V6.11.03 - 2002-07-01
35. Add Ian D. Allen's bug list.
34. If we are invoked as csh, default to bsd echo (Matej Vela)
33. Don't close file descriptors too early because setuid scripts fail.
@@ -621,7 +671,7 @@
28. fix ipv4 only compilation, remove extra sigsetmask() call (Takayuki Nakao)
27. window change can cause free to be re-entered causing abort (Mark Peek)
26. vp->vec vetting, suggested by Ian Dall.
- 25. V6.11.02 - 20020516
+ 25. V6.11.02 - 2002-05-16
24. Fix prompt bugs in $var and %c0n (TAKAI Kousuke)
23. Add Cray SV2 config (Rafal Maszkowski)
22. Add pdf manual page (Warren Ferguson)
@@ -631,8 +681,8 @@
18. Avoid collapsing paths that refer to non-existent components
(Martin Kraemer)
17. Make -shell invocations always treated as a login shell.
- 16. V6.11.01 - 20020308
- 15. Fixes to polish nls locale (Pawe³ Niewiadomski)
+ 16. V6.11.01 - 2002-03-08
+ 15. Fixes to polish nls locale (Paweł Niewiadomski)
14. russian locale fixes (Alexey Dokuchaev)
13. document door support (Shaen)
12. tcsh euc handling extensions (Alexey Zelkin)
@@ -651,12 +701,12 @@
2. unlimit should set rlim.rlim_max to rlim.rlim_cur if max < cur.
1. Make ~user work again when the home directory is '/'.
- 40. V6.11.00 - 20010902
+ 40. V6.11.00 - 2001-09-02
39. Completion fixes (Tom Warzeka)
38. make c_insert not static so that it can be used from win32 (amol)
37. Fix rmstar not to corrupt memory when we say no. (Mark Peek)
- 36. V6.10.02 - 20010806
- 35. polish nls locale (Pawe³ Niewiadomski))
+ 36. V6.10.02 - 2001-08-06
+ 35. polish nls locale (Paweł Niewiadomski))
34. Fix a tcsetattr race running background jobs as the last line on an xterm
window (Andrew Brown)
33. jobcmd alias (Greg Parker)
@@ -670,7 +720,7 @@
25. Fix bindkey "\\" cmd (reported by Ismail H. Tuncer)
24. %0Xc was broken in the prompt if the user's home directory was '/'.
(reported by Edward Glowacki)
- 23. V6.10.01 - 20010426
+ 23. V6.10.01 - 2001-04-26
22. LARGEFILE support on Linux.
21. Add big5 multibyte support (Yen-Ming Lee)
20. Check the return value of setpriority (Dima Dorfman)
@@ -695,13 +745,13 @@
2. Add Estonian translation (Toomas Soome)
1. Accept empty $savedirs to mean infinity.
- 57. V6.10.00 - 20001119
+ 57. V6.10.00 - 2000-11-19
56. Completion fixes (Tom Warzeka)
55. add missing linux kanji define (Tsuyoshi Kawabe)
54. More WINNT_NATIVE fixes (amol)
53. Fix compile error on winnt (Yoshiyuki Sakakibara)
52. nonstopux configure and makefile fixes (Tom Bates)
- 51. V6.09.04 - 20001111
+ 51. V6.09.04 - 2000-11-11
50. Order of initialization for multibyte display was wrong
(HyunChul Kim)
49. Follow the guideline for linux for japanese locale:
@@ -719,14 +769,14 @@
40. Security fix for here-doc tmp files (proton@ENERGYMECH.NET)
39. Fix resource limit rounding *again* (Johannes Gross)
38. Fix $ expansion in prompt (Takashi Sumiyoshi)
- 37. V6.09.03 - 20000715
+ 37. V6.09.03 - 2000-07-15
36. cygwin port fixes (Arihiro Yoshida)
35. Add a new "catalog" variable that specifies which NLS catalog
to be used (Issei Suzuki)
34. cleanup and addition of page up/down (amol)
33. fix vfork compile problem.
32. use inet_addr instead of inet_aton for portability.
- 31. V6.09.02 - 20000704
+ 31. V6.09.02 - 2000-07-04
30. lots more completions (George Cox)
29. change FILSIZ to BUFSIZE [now that BUFSIZE >> MAXPATHLEN] and
avoid a potential buffer overflow in sh.dir.c (Volker Schmidt)
@@ -742,8 +792,8 @@
19. NT-specific executable detection moved to NT code (amol)
18. New "complete module" (Dan Nicolaescu)
17. Correctly display scaling string in limit error messages (Nathan Ahlstrom)
- 16. Don't display "unset watch" message when not appropriate (kim)
- 15. V6.09.01 - 20000114
+ 16. Don't display "unset watch" message when not appropriate (Kimmo Suominen)
+ 15. V6.09.01 - 2000-01-14
14. Circumvent IRIX4D ESTALE bug by exiting.
13. IRIS4D de-linting.
12. Finnish nls catalogs (Jukka A. Ukkonen)
@@ -761,24 +811,24 @@
2. More multibyte fixes (Rodney Ruddock)
1. Change 6.08 -> 6.09 where I missed it; update for utlrix 4.5 (Simon Burge)
- 65. V6.09.00 - 19990816
+ 65. V6.09.00 - 1999-08-16
64. Add csh emacs mode (Dan Harkless)
63. Make sure the the glob buffer matches the word buffer size (Brian Biswas)
62. Fix periodic to work without tperiod set (Kenny McCormack)
- 61. V6.08.07 - 19990813
+ 61. V6.08.07 - 1999-08-13
60. Fix e_dabbrev_expand (Bjorn Knutsson)
59. Make \builtin work again (by calling the command not the builtin)
58. Add NLS_BUGS for OS's that keep file descriptors open for NLS (Ian Dowse)
57. Make NONLSREBIND work after tcsh starts up.
56. Fix AIX stupid exit bug. (Dan Harkless)
55. More irix fixes (Kaveh)
- 54. V6.08.06 - 19990701
+ 54. V6.08.06 - 1999-07-01
53. module command completion (Dan Nicolaescu)
52. Man command completion enhancement (Tom)
51. Fixes for irix configuration (Kaveh)
50. Support \a and \e in echo command. From (Keith Thompson)
49. Alpha configure nit from Kaveh
- 48. V6.08.05 - 19990511
+ 48. V6.08.05 - 1999-05-11
47. In some system, when a builtin fails immediately after we start
tcsh and before we print any messages, NLS messages fail (some
descriptor might be closed) [FreeBSD, HP/UX?]. So we force reading
@@ -790,13 +840,13 @@
42. autoconf fixes from Kaveh (and if it broke, me)
41. SGI irix fixes from Glenn Coombs.
40. Don't spin writing the history file when quota is exceeded (Rob McMahon)
- 39. V6.08.04 - 19990419
+ 39. V6.08.04 - 1999-04-19
38. complete additions (John Gotts)
37. Port to amiga with geek gadgets (Arto Huusko)
36. Ignore case in setenv for windows (amol)
35. Bug fixes for NT unc stuff (amol)
34. Hash spell check (amol)
- 33. V6.08.03 - 19990211
+ 33. V6.08.03 - 1999-02-11
32. Helpcommand documentation (Vladimir Alexiev)
31. small Y2K fix [%y in prompt would be formatted as 10 not 00 at year 2000],
and new Itoa() code (Chris Torek)
@@ -806,7 +856,7 @@
27. Don't set $shell to csh, if we were invoked as tcsh (Tomas Persson)
26. added $_
25. added postcmd
- 24. V6.08.02 - 19981124
+ 24. V6.08.02 - 1998-11-24
23. document continue and continue_args
22. wrong test in slowexec made NT optimization a noop (Amol)
21. Rhapsody fixes + separate CFLAGS/CPPFLAGS (Wilfredo Sanchez)
@@ -816,7 +866,7 @@
the NT source (amol)
17. dspmbyte fixes for AIX, typos in man page and nls (Yoshiyuki Sakakibara)
16. Convex fixes (Ron Echeverri)
- 15. V6.08.01 - 19981025
+ 15. V6.08.01 - 1998-10-25
14. SX4 port; this adds many casts for machines where ptrdiff_t is 64 bits.
(Andreas Schott)
13. U/Win port; does not work properly with U/Win 1.6, wait for the next
@@ -834,21 +884,22 @@
2. Cygwin32 port (Raj Menon)
1. Ported Fixes (Tom)
- 95. V6.08.00 - 19981002
+ 95. V6.08.00 - 1998-10-02
94. where builtin nt fix (Amol)
- 93. V6.07.13 - 19980926
+ 93. V6.07.13 - 1998-09-26
96. NT multibyte fixes (Amol)
95. NeXT needs getcwd.
94. fix new bug introduced by strncpy'fication in sh.dir.c (Taga Nayuta)
- 93. V6.07.12 - 19980918
+ 93. V6.07.12 - 1998-09-18
92. add cray in configure script (Tom)
91. nls fixes
- 90. Avoid buffer overflows in directory code (kim)
+ 90. Avoid buffer overflows in directory code (Kimmo Suominen)
89. Add multibyte character display support (Yoshiyuki Sakakibara)
88. Make tcsh use getcwd instead of getwd and supply a getcwd.
- 87. Fix remotehost again (kim)
- 86. V6.07.11 - 19980913
- 85. Leave remotehost ip addresses alone (don't try to resolve them) (Kim)
+ 87. Fix remotehost again (Kimmo Suominen)
+ 86. V6.07.11 - 1998-09-13
+ 85. Leave remotehost ip addresses alone (don't try to resolve them)
+ (Kimmo Suominen)
84. Read vs. force_read fixes (Amol)
83. Make colorls if color is set before the first LS_COLORS setenv
(Taga Nayuta)
@@ -856,7 +907,7 @@
81. Cursor bounds checks (Michael Schroeder)
80. Syntax error nits (Michael Schroeder)
79. configure fixes (Michael Schroeder)
- 78. V6.07.10 - 19980904
+ 78. V6.07.10 - 1998-09-04
77. Off by one error in NO_ERRORS...
76. Japanese NLS messages (Yoshiyuki Sakakibara)
75. Add ENXIO and EBADF in the test for write failures for Irix Zombies
@@ -867,15 +918,15 @@
71. WIN32 fixes for ntslowexec and color_ls literal printing in prompt (Amol)
70. a few missed WIN32 merges (Amol)
69. defined YPBUGS for sgi (Kaveh)
- 68. V6.07.09 - 19980707
+ 68. V6.07.09 - 1998-07-07
67. Separate the nt builtins (Amol)
66. completion fixes (Tom)
65. color ls fixes (Taga Nayuta)
- 64. V6.07.08 - 19980629
+ 64. V6.07.08 - 1998-06-29
63. add config.h.in (Kaveh)
62. win32 updates (Amol)
61. warning and portability cleanups on the new changes (Kaveh)
- 60. V6.07.07 - 19980628
+ 60. V6.07.07 - 1998-06-28
59. Fast execute by-pass for win32 (Amol Deshpande)
58. Clean up const usage a bit, and fix gcc 2.8.1 warnings.
57. Use @bindir@ for DESTBIN in Makefile.in (Edgar Hoch)
@@ -941,9 +992,9 @@
7. $rprompt code (Luke Mewburn)
6. Kanji patches (Huw Rogers)
5. Cray T3E port (Jorn Amundsen)
- 4. Avoid html redirects in tcsh.man2html (from Kimmo)
+ 4. Avoid html redirects in tcsh.man2html (Kimmo Suominen)
3. HP/UX 10.0 fix for filesize resource limit; don't scale by 512 anymore.
- 2. Workaround for TIOCSTAT for NetBSD from lukem@netbsd.org
+ 2. Workaround for TIOCSTAT for NetBSD from (Luke Mewburn)
1. Return exit status from 0..255 not -128...127, as POSIX mandates.
V6.07.02, 10/27/96
@@ -952,7 +1003,7 @@ V6.07.02, 10/27/96
storage.
56. 6.07.01 - 10/19/96
55. Fix histdup=erase, where after some repetitions, we would get negative
- history events (kim@gw.com)
+ history events (Kimmo Suominen)
54. NLS fixes and typo in sh.err.c (Martin.Kraemer@deejai.mch.sni.de)
53. Output history in raw format in the history file (mveksler@VNET.IBM.COM)
52. Fix possible core dump when !:<tab> in autoexpand mode (rbrown@ERA.COM)
@@ -1230,7 +1281,7 @@ V6.05.00, 06/19/94
55. don't remove trailing spaces in history searches.
54. dirs -L and dirs -S spurious warning elimination.
53. man page fixes from David.
- 52. Kimmo's patch [makefile, gcc warning, netdb.h include]
+ 52. Kimmo Suominen's patch [makefile, gcc warning, netdb.h include]
51. 6.04.05 12/12/93
50. rewrote srcunit() to use st_save and st_restore. The code was
too messy to be useful before.
@@ -1245,7 +1296,7 @@ V6.05.00, 06/19/94
42. Removed aliases, bind, linedit builtins [ifdef'ed out as OBSOLETE]
41. change REMHOST to REMOTEHOST for compatibility with SGI.
40. $owd was not working correctly.
- 39. Debugging printf elimination (from Kimmo)
+ 39. Debugging printf elimination (from Kimmo Suominen)
38. Typos in the new hup code in sh.c (from Matt)
37. Imakefile fix for sequent (from Jaap)
36. 6.04.03, 10/30/93
@@ -1772,7 +1823,7 @@ V6.00.04, (never released)
34. (beta-5 11/25/91)
33. Simplify code in BindArrowKeys()
32. Get rid of the PNULL's
-31. Support for shadow password in locking code. (From Kimmo)
+31. Support for shadow password in locking code. (From Kimmo Suominen)
30. Normalize-path editor function.
29. (beta-4 11/21/91)
28. minix additions
@@ -2196,3 +2247,19 @@ V5.19.01, 9/26/90.
3. Fixed the Makefile and MAKEDIFFS so that a tahoe diff can be made.
2. RS6000: hacked around execv bug, and ed.init.c warning.
1. Editor should not be enabled when we don't have a tty.
+
+V5.19.00
+ 7. 8 bit clean code, by using 16 bit strings.
+ 6. Mostly shared strings (a side-effect)
+ 5. Highlights everywhere (and in ls-F) filenames that contain characters
+ with the eighth bit set (or passes them unchanged depending on the
+ variable 'nometa')
+ 4. Newline in the prompt via %n.
+ 3. dirs takes also a -v flag for `vertical display'
+ 2. There is a new variable `listjobs' which controls if and how jobs
+ are displayed when a new job is suspended. [Idea from the mtXinu
+ code, very useful for novice users who hit control-Z 10 times on
+ the same job!]
+ set listjobs=long, jobs -l is executed every time a job is suspended.
+ set listjobs=short, jobs is executed every time a job is suspended.
+ 1. Passes lint... At least on a sun.
diff --git a/Imakefile b/Imakefile
index bd1b43b1a24e..237dd2a0b59f 100644
--- a/Imakefile
+++ b/Imakefile
@@ -522,19 +522,9 @@ TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
tc.vers.${SUF} tc.who.${SUF}
-MISCF = Makefile.std BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md \
- FAQ WishList config_f.h eight-bit.me glob.3 patchlevel.h pathnames.h \
- tcsh.man Ported src.desc Imakefile imake.config complete.tcsh \
- Makefile.vms termcap.vms snames.h host.defs gethost.c tcsh.man2html \
- Makefile.in configure.ac Makefile.win32 aclocal.m4 dot.login dot.tcshrc
-CONFSRCS=config/[a-z]*
-
-
SRCS = $(SHSRCS) $(TWSRCS) $(EDSRCS) $(TCSRCS)
OBJS = $(SHOBJS) $(TWOBJS) $(EDOBJS) $(TCOBJS)
-ALLSRCS= $(MISCF) $(SRCS) $(EXTF)
-
AllTarget(tcsh)
ed.defns.h: config.h ed.defns.c
@@ -565,42 +555,10 @@ tc.const.h: config.h tc.const.c
@echo '#endif /* _h_tc_const */' >> $@
config.h: config_f.h
- cp config/ConfigH config.h
+ cp system/ConfigH config.h
$(OBJS): sh.err.h tc.const.h ed.defns.h
-tar.Z:
- rm -f tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tar.gz:
- rm -f tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
-
-shar:
- rm -f tcsh-*.shar
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
- tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
- tcsh-${VERSION}/?*/set?*
- rm -rf tcsh-${VERSION}
-
catalogs:
@(cd nls; make catalogs)
diff --git a/Makefile.in b/Makefile.in
index c6b5f2554cc0..19569f768775 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,10 +9,105 @@ SHELL=/bin/sh
ENVCMD=/usr/bin/env
VERSION=@PACKAGE_VERSION@
BUILD=tcsh$(EXEEXT)
+EXEEXT=@EXEEXT@
+INSTALL=@INSTALL@
+INSTALL_DATA=@INSTALL_DATA@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+MKDIR_P?=$(INSTALL) -d
VPATH=@srcdir@
srcdir=@srcdir@
################################################################
+## Default target
+################################################################
+
+all: ${BUILD} catalogs
+
+################################################################
+## Packaging
+################################################################
+
+RELEASE_GROUP=astron
+RELEASE_USER=${USER}
+RELEASE_TAG=TCSH@PACKAGE_REV@_@PACKAGE_VERS@_@PACKAGE_PATCHLEVEL@
+
+.PHONY: Announce
+Announce: ${srcdir}/Announce-${VERSION}
+${srcdir}/Announce-${VERSION}:
+ touch ${@}
+
+RELEASE_ARTIFACTS= \
+ Fixes aclocal.m4 config.h.in configure configure.ac \
+ debian/changelog
+
+.PHONY: release-add add
+release-add add:
+ cd ${srcdir} \
+ && test -f Announce-${VERSION} \
+ && git add Announce-${VERSION} \
+ || true
+ cmp -s dch-template ${srcdir}/debian/changelog \
+ || cp dch-template ${srcdir}/debian/changelog
+ cd ${srcdir} \
+ && git add ${RELEASE_ARTIFACTS}
+
+.PHONY: release-diff
+release-diff diff:
+ git diff --staged
+
+.PHONY: release-commit commit
+release-commit commit:
+ git commit -m 'Release ${VERSION}'
+ git tag ${RELEASE_TAG}
+
+.PHONY: release-push push
+release-push push:
+ git push origin
+ git push origin tag ${RELEASE_TAG}
+
+.PHONY: release-archive tar.gz
+release-archive tar.gz: ${srcdir}/tcsh-${VERSION}.tar.gz
+${srcdir}/tcsh-${VERSION}.tar.gz:
+ cd ${srcdir} \
+ && git archive -o tcsh-${VERSION}.tar.gz \
+ --prefix=tcsh-${VERSION}/ ${RELEASE_TAG}
+
+.PHONY: head-archive orig.tar.gz
+head-archive orig.tar.gz: ${srcdir}/tcsh_${VERSION}.orig.tar.gz
+${srcdir}/tcsh_${VERSION}.orig.tar.gz:
+ cd ${srcdir} \
+ && git archive -o tcsh_${VERSION}.orig.tar.gz \
+ --prefix=tcsh-${VERSION}/ HEAD
+
+.PHONY: release-sign sign
+release-sign sign: ${srcdir}/tcsh-${VERSION}.tar.gz.asc
+${srcdir}/tcsh-${VERSION}.tar.gz.asc: ${srcdir}/tcsh-${VERSION}.tar.gz
+ cd ${srcdir} \
+ && gpg --armor --detach-sign tcsh-${VERSION}.tar.gz
+
+RELEASE_UPLOAD_FILES= \
+ ${srcdir}/Announce-${VERSION} \
+ ${srcdir}/FAQ \
+ ${srcdir}/Ported \
+ ${srcdir}/README.md \
+ ${srcdir}/tcsh-${VERSION}.tar.gz \
+ ${srcdir}/tcsh-${VERSION}.tar.gz.asc \
+ tcsh.man
+
+RELEASE_UPLOAD_TARGET=rebar.astron.com:/p/astron/ftp/pub/tcsh
+
+.PHONY: release-upload upload
+release-upload upload:
+ rsync -Pv -csgp \
+ --chmod Fgo-w,a+r \
+ --numeric-ids \
+ --groupmap '*:${RELEASE_GROUP}' \
+ --usermap '*:${RELEASE_USER}' \
+ --ignore-missing-args \
+ ${RELEASE_UPLOAD_FILES} \
+ ${RELEASE_UPLOAD_TARGET}/
+
+################################################################
## CFLAGS. For various -D things, see config.h
################################################################
#
@@ -28,7 +123,6 @@ LFLAGS=
# hpux lint
#LFLAGS= -Zn10000
-
# This is set by autoconf:
CFLAGS = @CFLAGS@
# debug:
@@ -145,7 +239,6 @@ CFLAGS = @CFLAGS@
## The following is set by autoconf.
DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcsh"' @DFLAGS@ @CPPFLAGS@
-
################################################################
## LDFLAGS. Define something here if you need to
################################################################
@@ -297,8 +390,6 @@ LIBES= @LIBS@
EXTRAFLAGS = @HESDEF@ $(AFSDEF)
EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV@
-
-
# The difficult choice of a c-compiler...
# First, you should try your own c-compiler.
# Gcc -traditional is also a safe choice.
@@ -356,7 +447,8 @@ P=
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-mandir=@datarootdir@/man
+datarootdir=@datarootdir@
+mandir=@mandir@
MANSECT=1
DESTBIN=${DESTDIR}${bindir}
DESTMAN=${DESTDIR}${mandir}/man${MANSECT}
@@ -366,19 +458,9 @@ DESTMAN=${DESTDIR}${mandir}/man${MANSECT}
# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT}
# Amiga unix (SysVR4)
# DESTMAN=/usr/catman/1l
-EXEEXT=@EXEEXT@
-FTPAREA=/usr/spool/ftp
BUILD_CATALOGS = @BUILD_CATALOGS@
-ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
- sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
- 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 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} \
sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \
sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \
@@ -386,50 +468,27 @@ SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${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 \
- tw.comp.c tw.color.c
TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
tw.comp.${SUF} tw.color.${SUF}
-EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
- ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
-TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
- tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
- tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
- tc.who.c tc.h
TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} tc.printf.${SUF} \
tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
tc.vers.${SUF} tc.who.${SUF}
-PVSRCS= Makefile.std Makefile.vms Makefile.in Makefile.win32
-AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
- WishList config_f.h eight-bit.me glob.3 patchlevel.h \
- pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
- complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
- gethost.c tcsh.man2html configure.ac configure config.h.in \
- tests/testsuite.at aclocal.m4 dot.login dot.tcshrc
-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/parenthesis.at tests/syntax.at \
- tests/subst.at tests/variables.at tests/sh.dol.at
-
-VHSRCS=${PVSRCS} ${AVSRCS}
-
-CONFSRCS=config/*
-
-ALLSRCS= ${SHSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${VHSRCS}
-DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${AVSRCS} $(TESTFILES)
-
+# tests/*.at except for tests/testsuite.at
+TESTFILES= \
+ tests/aliases.at tests/arguments.at tests/commands.at \
+ tests/expr.at tests/history.at tests/lexical.at \
+ tests/mb-eucjp.at tests/mb-utf8.at tests/noexec.at \
+ tests/parenthesis.at tests/sh.dol.at tests/subst.at \
+ tests/syntax.at tests/variables.at
OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
-
-all: ${BUILD} catalogs
-
tcsh$(EXEEXT):$(P) ${OBJS}
rm -f tcsh$(EXEEXT) core
${CC} -o tcsh$(EXEEXT) ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS}
@@ -446,9 +505,12 @@ pure:$(P) ${OBJS}
#tcsh.exe: tcsh
# emxbind tcsh
-gethost: gethost.c sh.err.h tc.const.h sh.h
+gethost.${SUF}: gethost.c sh.err.h tc.const.h sh.h
+ ${CC_FOR_GETHOST} ${CF} ${CPPFLAGS} ${CFLAGS} $(srcdir)/gethost.c
+
+gethost: gethost.${SUF}
rm -f gethost
- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $(srcdir)/gethost.c
+ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} gethost.${SUF}
tc.defs.c: gethost host.defs
@rm -f $@.tmp
@@ -456,9 +518,13 @@ tc.defs.c: gethost host.defs
./gethost $(srcdir)/host.defs >> $@.tmp
@if [ -f $@ ] && cmp -s $@.tmp $@; then echo $@ unchanged.; rm -f $@.tmp; else mv -f $@.tmp $@; echo $@ recreated.; fi
+tcsh.html: tcsh.man
+ rm -f $@
+ -mandoc -Thtml tcsh.man > $@
+
tcsh.ps: tcsh.man
rm -f tcsh.ps
- -ptroff -t -man $(srcdir)/tcsh.man > tcsh.ps
+ -ptroff -t -man tcsh.man > tcsh.ps
.c.${SUF}:
${CC} ${CF} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} ${EXTRAFLAGS} $<
@@ -592,27 +658,20 @@ vgrind:
@for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
@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)
- chmod 755 ${DESTBIN}/tcsh$(EXEEXT)
+ $(MKDIR_P) ${DESTBIN}
+ $(INSTALL_PROGRAM) tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT)
install.catalogs:
@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0
install.man: tcsh.man
- -mkdir -p ${DESTMAN}
- -rm -f ${DESTMAN}/tcsh.${MANSECT}
- cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT}
- chmod 444 ${DESTMAN}/tcsh.${MANSECT}
+ $(MKDIR_P) ${DESTMAN}
+ $(INSTALL_DATA) tcsh.man ${DESTMAN}/tcsh.${MANSECT}
# Amiga Unix
#install.man: tcsh.man
-# compress tcsh.man
+# compress tcsh.man
# cp tcsh.man.Z ${DESTMAN}/tcsh.Z
# chmod 444 ${DESTMAN}/tcsh.Z
@@ -622,112 +681,34 @@ install.man: tcsh.man
# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
+.PHONY: clean
clean: clean.catalogs
${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost
${RM} -f *.${SUF} *.i *.s
${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c
${RM} -f tcsh.*.m tcsh.*.cat
+.PHONY: clean.catalogs
clean.catalogs:
@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0
-veryclean: clean
- ${RM} -f Makefile config.h config_p.h
- ${RM} -f config.status config.cache config.log tcsh.ps
+.PHONY: cleandir distclean veryclean
+cleandir distclean veryclean: clean
+ ${RM} -f Makefile config.h config_p.h dch-template nls/Makefile patchlevel.h tcsh.man
+ ${RM} -f config.status config.cache config.log tcsh.html tcsh.ps
${RM} -f missing
- ${RM} -f testsuite.log
+ ${RM} -f atconfig testsuite.log
${RM} -rf testsuite.dir
${RM} -rf autom4te.cache
${RM} -f *~ #*
-distclean: veryclean
-
-cleandir: veryclean
-
tags: /tmp
${CTAGS} sh*.c
-tar.Z:
- rm -f tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
- -mkdir tcsh-${VERSION} tcsh-${VERSION}/config tcsh-${VERSION}/tests
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tar.gz:
- rm -f tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
- -mkdir tcsh-${VERSION} tcsh-${VERSION}/config tcsh-${VERSION}/tests
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
-
-shar:
- rm -f tcsh-*.shar
- rm -rf tcsh-${VERSION}
- -mkdir tcsh-${VERSION} tcsh-${VERSION}/config tcsh-${VERSION}/tests
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
- tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
- tcsh-${VERSION}/?*/set?*
- rm -rf tcsh-${VERSION}
-
+.PHONY: catalogs
catalogs:
@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0
-tcsh-${VERSION}.tar.Z:
- rm -rf tcsh-${VERSION}
- rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
- -mkdir tcsh-${VERSION} tcsh-${VERSION}/tests
- ./MAKEDIFFS bsd
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
- cp ${DISTSRCS} tcsh-${VERSION}
- -mkdir tcsh-${VERSION}/config
- cp ${CONFSRCS} tcsh-${VERSION}/config
- cp Makefile tcsh-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tcsh.tahoe-${VERSION}.tar.Z:
- rm -rf tcsh.tahoe-${VERSION}
- rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
- -mkdir tcsh.tahoe-${VERSION}
- ./MAKEDIFFS tahoe
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
- cp ${DISTSRCS} tcsh.tahoe-${VERSION}
- -mkdir tcsh.tahoe-${VERSION}/config
- cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
- cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh.tahoe-${VERSION} | compress > tcsh.tahoe-${VERSION}.tar.Z
- rm -rf tcsh.tahoe-${VERSION}
-
-tcsh.reno-${VERSION}.tar.Z:
- rm -rf tcsh.reno-${VERSION}
- rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
- -mkdir tcsh.reno-${VERSION}
- ./MAKEDIFFS reno
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
- cp ${DISTSRCS} tcsh.reno-${VERSION}
- -mkdir tcsh.reno-${VERSION}/config
- cp ${CONFSRCS} tcsh.reno-${VERSION}/config
- cp Makefile tcsh.reno-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh.reno-${VERSION} | compress > tcsh.reno-${VERSION}.tar.Z
- rm -rf tcsh.reno-${VERSION}
-
-ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z
- cp tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z ${FTPAREA}
- cp tcsh.man ${FTPAREA}
-
autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in
$(srcdir)/configure: $(srcdir)/configure.ac
@@ -741,7 +722,7 @@ $(srcdir)/stamp-h.in: $(srcdir)/configure.ac
check test: atconfig $(srcdir)/tests/testsuite
$(ENVCMD) - \
USER="$(USER)" \
- $(SHELL) $(srcdir)/tests/testsuite
+ $(SHELL) $(srcdir)/tests/testsuite $(TESTSUITEFLAGS)
#
# Dependencies
diff --git a/Makefile.std b/Makefile.std
index 8c479fa1f213..1da5f7777625 100644
--- a/Makefile.std
+++ b/Makefile.std
@@ -279,15 +279,7 @@ DESTMAN=${DESTDIR}/man/man${MANSECT}
# DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX
# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
# DESTMAN=/usr/catman/1l # Amiga unix (SysVR4)
-FTPAREA=/usr/spool/ftp
-
-ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
- sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
- 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 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} \
sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \
sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \
@@ -295,44 +287,19 @@ SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${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 \
- tw.comp.c tw.color.c
TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
tw.comp.${SUF} tw.color.${SUF}
-EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
- ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
-TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
- tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
- tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
- tc.who.c tc.h
TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} tc.printf.${SUF} \
tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
tc.vers.${SUF} tc.who.${SUF}
-PVSRCS= Makefile.std Makefile.vms Makefile.in Makefile.win32
-AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
- WishList config_f.h eight-bit.me glob.3 patchlevel.h \
- pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
- complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
- gethost.c tcsh.man2html configure.ac configure config.h.in \
- aclocal.m4 dot.login dot.tcshrc
-
-VHSRCS=${PVSRCS} ${AVSRCS}
-
-CONFSRCS=config/*
-
-ALLSRCS= ${SHSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${VHSRCS}
-DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${AVSRCS}
-
-
OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
-
all: ${BUILD}
tcsh:$(P) ${OBJS}
@@ -500,87 +467,9 @@ distclean: veryclean
tags: /tmp
${CTAGS} sh*.c
-tar.Z:
- rm -f tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tar.gz:
- rm -f tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
-
-shar:
- rm -f tcsh-*.shar
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
- tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
- tcsh-${VERSION}/?*/set?*
- rm -rf tcsh-${VERSION}
-
catalogs:
@(cd nls; make catalogs)
-tcsh-${VERSION}.tar.Z:
- rm -rf tcsh-${VERSION}
- rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh-${VERSION}
- ./MAKEDIFFS bsd
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
- cp ${DISTSRCS} tcsh-${VERSION}
- mkdir tcsh-${VERSION}/config
- cp ${CONFSRCS} tcsh-${VERSION}/config
- cp Makefile tcsh-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tcsh.tahoe-${VERSION}.tar.Z:
- rm -rf tcsh.tahoe-${VERSION}
- rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh.tahoe-${VERSION}
- ./MAKEDIFFS tahoe
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
- cp ${DISTSRCS} tcsh.tahoe-${VERSION}
- mkdir tcsh.tahoe-${VERSION}/config
- cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
- cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh.tahoe-${VERSION} | compress > tcsh.tahoe-${VERSION}.tar.Z
- rm -rf tcsh.tahoe-${VERSION}
-
-tcsh.reno-${VERSION}.tar.Z:
- rm -rf tcsh.reno-${VERSION}
- rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh.reno-${VERSION}
- ./MAKEDIFFS reno
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
- cp ${DISTSRCS} tcsh.reno-${VERSION}
- mkdir tcsh.reno-${VERSION}/config
- cp ${CONFSRCS} tcsh.reno-${VERSION}/config
- cp Makefile tcsh.reno-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh.reno-${VERSION} | compress > tcsh.reno-${VERSION}.tar.Z
- rm -rf tcsh.reno-${VERSION}
-
-ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z
- cp tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z ${FTPAREA}
- cp tcsh.man ${FTPAREA}
-
autoconfigure: $(srcdir)/configure $(srcdir)/config.h.in
$(srcdir)/configure: $(srcdir)/configure.ac
diff --git a/Makefile.vms b/Makefile.vms
index 2e3f4adbfed4..61600e1c9c59 100644
--- a/Makefile.vms
+++ b/Makefile.vms
@@ -257,15 +257,7 @@ DESTMAN=${DESTDIR}/man/man${MANSECT}
# DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX
# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
# DESTMAN=/usr/catman/1l # Amiga unix (SysVR4)
-FTPAREA=/usr/spool/ftp
-
-ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
- sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
- 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 \
- vms.termcap.c
-SHSRCS= ${ASSRCS} ${PSSRCS}
+
SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
sh.char.${SUF} sh.exp.${SUF} sh.func.${SUF} sh.glob.${SUF} \
sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} sh.misc.${SUF} \
@@ -273,43 +265,19 @@ SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
sh.set.${SUF} sh.time.${SUF} glob.${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 \
- tw.comp.c tw.color.c
TWOBJS= tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF} \
tw.comp.${SUF} tw.color.${SUF}
-EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
- ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
EDOBJS= ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
-TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
- tc.func.c tc.os.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
- tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
- tc.who.c tc.h
TCOBJS= tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.os.${SUF} tc.printf.${SUF} \
tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
tc.vers.${SUF} tc.who.${SUF}
-PVSRCS= Makefile.std Makefile.vms Makefile.in Makefile.win32
-AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
- WishList config_f.h eight-bit.me glob.3 patchlevel.h \
- pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
- complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
- gethost.c tcsh.man2html configure.ac aclocal.m4 dot.login dot.tcshrc
-
-VHSRCS=${PVSRCS} ${AVSRCS}
-
-CONFSRCS=config/*
-
-ALLSRCS= ${SHSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${VHSRCS}
-DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${AVSRCS}
-
-
OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
-
all: ${BUILD}
tcsh:$(P) ${OBJS}
@@ -349,7 +317,6 @@ tcsh.ps: tcsh.man
@mv $*..o $*.o
@rm -f $*..c
-
# Don't do any special massaging of C files for sharing of strings!!
# it causes weird segmentation faults on some systems.
#.c.o:
@@ -475,87 +442,9 @@ veryclean: clean
tags: /tmp
${CTAGS} sh*.c
-tar.Z:
- rm -f tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tar.gz:
- rm -f tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | gzip > tcsh-${VERSION}.tar.gz
- rm -rf tcsh-${VERSION}
-
-shar:
- rm -f tcsh-*.shar
- rm -rf tcsh-${VERSION}
- mkdir tcsh-${VERSION} tcsh-${VERSION}/config
- cp ${ALLSRCS} tcsh-${VERSION}
- cp ${CONFSRCS} tcsh-${VERSION}/config
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- MAKESHAR -v -n tcsh-${VERSION} tcsh-${VERSION} \
- tcsh-${VERSION}/?* tcsh-${VERSION}/config/?* \
- tcsh-${VERSION}/?*/set?*
- rm -rf tcsh-${VERSION}
-
catalogs:
@(cd nls; make catalogs)
-tcsh-${VERSION}.tar.Z:
- rm -rf tcsh-${VERSION}
- rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh-${VERSION}
- ./MAKEDIFFS bsd
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
- cp ${DISTSRCS} tcsh-${VERSION}
- mkdir tcsh-${VERSION}/config
- cp ${CONFSRCS} tcsh-${VERSION}/config
- cp Makefile tcsh-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
- rm -rf tcsh-${VERSION}
-
-tcsh.tahoe-${VERSION}.tar.Z:
- rm -rf tcsh.tahoe-${VERSION}
- rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh.tahoe-${VERSION}
- ./MAKEDIFFS tahoe
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
- cp ${DISTSRCS} tcsh.tahoe-${VERSION}
- mkdir tcsh.tahoe-${VERSION}/config
- cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
- cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh.tahoe-${VERSION} | compress > tcsh.tahoe-${VERSION}.tar.Z
- rm -rf tcsh.tahoe-${VERSION}
-
-tcsh.reno-${VERSION}.tar.Z:
- rm -rf tcsh.reno-${VERSION}
- rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
- mkdir tcsh.reno-${VERSION}
- ./MAKEDIFFS reno
- mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
- cp ${DISTSRCS} tcsh.reno-${VERSION}
- mkdir tcsh.reno-${VERSION}/config
- cp ${CONFSRCS} tcsh.reno-${VERSION}/config
- cp Makefile tcsh.reno-${VERSION}/Makefile.new
- tar cf - nls/Makefile nls/?*/set?* | (cd tcsh-${VERSION}; tar xpf -)
- tar cvf - tcsh.reno-${VERSION} | compress > tcsh.reno-${VERSION}.tar.Z
- rm -rf tcsh.reno-${VERSION}
-
-ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z
- cp tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z ${FTPAREA}
- cp tcsh.man ${FTPAREA}
-
#
# Dependencies
#
diff --git a/README.md b/README.md
index df6671b0316e..51e1e745ffe4 100644
--- a/README.md
+++ b/README.md
@@ -19,11 +19,8 @@ the tcsh mailing list:
> tcsh@astron.com
> https://mailman.astron.com/mailman/listinfo/tcsh
-[![Build Status][status]][travis]
[![Coverity Scan][badge]][coverity]
[BUILDING]: BUILDING
[badge]: https://scan.coverity.com/projects/20307/badge.svg
[coverity]: https://scan.coverity.com/projects/tcsh-org-tcsh
-[status]: https://travis-ci.com/tcsh-org/tcsh.svg?branch=master
-[travis]: https://travis-ci.com/tcsh-org/tcsh
diff --git a/WishList b/WishList
index 6a2a0d97a9e5..4f5d371d97cc 100644
--- a/WishList
+++ b/WishList
@@ -250,7 +250,7 @@ setenv: Too many arguments.
In addition to message catalogs, there are more problems:
ipi:~/test/tcsh/bin> ls
-tcsh åäö
+tcsh åäö
ipi:~/test/tcsh/bin> set dspmbyte utf8
ipi:~/test/tcsh/bin> ls ???
ls: No match.
diff --git a/aclocal.m4 b/aclocal.m4
index b0ff2e853c42..b4b2514f84dd 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -12,8 +12,8 @@
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-# host-cpu-c-abi.m4 serial 11
-dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# host-cpu-c-abi.m4 serial 13
+dnl Copyright (C) 2002-2020 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.
@@ -69,7 +69,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI],
[case "$host_cpu" in
changequote(,)dnl
- i[4567]86 )
+ i[34567]86 )
changequote([,])dnl
gl_cv_host_cpu_c_abi=i386
;;
@@ -471,7 +471,8 @@ EOF
dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
-dnl (application binary interface) is a 32-bit one, or to 'no' otherwise.
+dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
+dnl one, or to 'unknown' if unknown.
dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
[
@@ -481,14 +482,44 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
case "$gl_cv_host_cpu_c_abi" in
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
gl_cv_host_cpu_c_abi_32bit=yes ;;
- *)
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
esac
else
case "$host_cpu" in
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh[1234] | sh[1234]e[lb] \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+changequote(,)dnl
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
changequote(,)dnl
- i[4567]86 )
+ i[34567]86 )
changequote([,])dnl
gl_cv_host_cpu_c_abi_32bit=yes
;;
@@ -648,7 +679,7 @@ changequote([,])dnl
;;
*)
- gl_cv_host_cpu_c_abi_32bit=no
+ gl_cv_host_cpu_c_abi_32bit=unknown
;;
esac
fi
@@ -658,7 +689,7 @@ changequote([,])dnl
])
# iconv.m4 serial 21
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -947,7 +978,7 @@ size_t iconv();
])
# lib-ld.m4 serial 9
-dnl Copyright (C) 1996-2003, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2009-2020 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.
@@ -1115,8 +1146,8 @@ fi
AC_LIB_PROG_LD_GNU
])
-# lib-link.m4 serial 28
-dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
+# lib-link.m4 serial 31
+dnl Copyright (C) 2001-2020 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.
@@ -1309,6 +1340,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
])
AC_ARG_WITH(PACK[-prefix],
[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
@@ -1321,17 +1354,23 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
])
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
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
fi
fi
])
+ if test "X$additional_libdir2" = "X$additional_libdir"; then
+ additional_libdir2=
+ fi
+ if test "X$additional_libdir3" = "X$additional_libdir"; then
+ additional_libdir3=
+ fi
dnl Search the library and its dependencies in $additional_libdir and
dnl $LDFLAGS. Using breadth-first-seach.
LIB[]NAME=
@@ -1387,48 +1426,54 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
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"
+ for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+ if test "X$found_dir" = "X"; then
+ eval dir=\$$additional_libdir_variable
+ if test -n "$dir"; then
+ 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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
fi
- else
- eval library_names=\"$acl_library_names_spec\"
- for f in $library_names; do
- if test -f "$dir/$f"; then
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
found_dir="$dir"
- found_so="$dir/$f"
- break
+ found_a="$dir/$libname.$acl_libext"
fi
- done
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
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
+ done
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIB[]NAME; do
@@ -1438,7 +1483,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
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
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
@@ -1448,14 +1493,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
| 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
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$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
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
@@ -1466,7 +1511,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
fi
dnl Then look for a static library.
if test "X$found_dir" = "X"; then
- if test -f "$dir/$libname.$acl_libext"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
@@ -1492,7 +1537,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
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
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -1592,6 +1638,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
fi
additional_includedir="$basedir/include"
;;
+ */$acl_libdirstem3 | */$acl_libdirstem3/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+ 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.
@@ -1642,19 +1695,21 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
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.
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $dependency_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
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
- || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -1665,29 +1720,29 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
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
+ if test "X$x" = "X-L$dependency_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"
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_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
+ if test "X$x" = "X-L$dependency_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"
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir"
fi
fi
fi
@@ -1835,7 +1890,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
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
+ && test "X$dir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dir" != "X/usr/$acl_libdirstem3"; then
rpathdirs="$rpathdirs $dir"
fi
next=
@@ -1845,7 +1901,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-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
+ && test "X$dir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dir" != "X/usr/$acl_libdirstem3"; then
rpathdirs="$rpathdirs $dir"
fi
next= ;;
@@ -1890,8 +1947,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
AC_SUBST([$1])
])
-# lib-prefix.m4 serial 14
-dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 17
+dnl Copyright (C) 2001-2005, 2008-2020 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.
@@ -2039,21 +2096,24 @@ AC_DEFUN([AC_LIB_WITH_FINAL_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".
+dnl - a function acl_is_expected_elfclass, that tests whether standard input
+dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI,
+dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing
+dnl the basename of the libdir to try in turn, either "lib" or "lib64" or
+dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar.
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 There is no formal standard regarding lib, lib32, and lib64.
+ dnl On most 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 $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on
+ dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go
+ dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib.
+ dnl We determine the compiler's default mode by looking at the compiler's
+ dnl library search path. If at least one of its elements ends in /lib64 or
+ dnl points to a directory whose absolute pathname ends in /lib64, we use that
+ dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
+ dnl 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
@@ -2061,27 +2121,72 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
- case "$host_os" in
- solaris*)
- AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _LP64
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_solaris_64bit=yes],
- [gl_cv_solaris_64bit=no])
- ]);;
- esac
+ AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
+ [AC_EGREP_CPP([Extensible Linking Format],
+ [#ifdef __ELF__
+ Extensible Linking Format
+ #endif
+ ],
+ [gl_cv_elf=yes],
+ [gl_cv_elf=no])
+ ])
+ if test $gl_cv_elf; then
+ # Extract the ELF class of a file (5th byte) in decimal.
+ # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+ if od -A x < /dev/null >/dev/null 2>/dev/null; then
+ # Use POSIX od.
+ func_elfclass ()
+ {
+ od -A n -t d1 -j 4 -N 1
+ }
+ else
+ # Use BSD hexdump.
+ func_elfclass ()
+ {
+ dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+ echo
+ }
+ fi
+changequote(,)dnl
+ case $HOST_CPU_C_ABI_32BIT in
+ yes)
+ # 32-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 1
+ }
+ ;;
+ no)
+ # 64-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 2
+ }
+ ;;
+ *)
+ # Unknown.
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ ;;
+ esac
+changequote([,])dnl
+ else
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ fi
dnl Allow the user to override the result by setting acl_cv_libdirstems.
AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
[acl_cv_libdirstems],
- [acl_libdirstem=lib
+ [dnl Try 'lib' first, because that's the default for libdir in GNU, see
+ dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
+ acl_libdirstem=lib
acl_libdirstem2=
+ acl_libdirstem3=
case "$host_os" in
solaris*)
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
@@ -2089,54 +2194,77 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
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.
- if test $gl_cv_solaris_64bit = yes; then
- acl_libdirstem=lib/64
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ acl_libdirstem2=lib/64
case "$host_cpu" in
- sparc*) acl_libdirstem2=lib/sparcv9 ;;
- i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ sparc*) acl_libdirstem3=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
esac
fi
;;
*)
dnl If $CC generates code for a 32-bit ABI, the libraries are
- dnl surely under $prefix/lib, not $prefix/lib64.
- if test "$HOST_CPU_C_ABI_32BIT" != yes; then
- dnl The result is a property of the system. However, non-system
- dnl compilers sometimes have odd library search paths. Therefore
- dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
- searchpath=`(if test -f /usr/bin/gcc \
- && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
- LC_ALL=C /usr/bin/gcc -print-search-dirs; \
- else \
- LC_ALL=C $CC -print-search-dirs; \
- fi) 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"
+ dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
+ dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
+ dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
+ dnl Find the compiler's search path. However, non-system compilers
+ dnl sometimes have odd library search paths. But we can't simply invoke
+ dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
+ dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
+ searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ # 32-bit or unknown ABI.
+ if test -d /usr/lib32; then
+ acl_libdirstem2=lib32
+ fi
+ fi
+ if test $HOST_CPU_C_ABI_32BIT != yes; then
+ # 64-bit or unknown ABI.
+ if test -d /usr/lib64; then
+ acl_libdirstem3=lib64
+ fi
+ fi
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64 ) acl_libdirstem3=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ if test $HOST_CPU_C_ABI_32BIT = yes; then
+ # 32-bit ABI.
+ acl_libdirstem3=
+ fi
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ # 64-bit ABI.
+ acl_libdirstem2=
fi
fi
;;
esac
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
- acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+ test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
])
- # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
+ dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
+ dnl acl_libdirstem3.
+changequote(,)dnl
acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
- acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+ acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
+changequote([,])dnl
])
diff --git a/complete.tcsh b/complete.tcsh
index 657888c5b986..127d792d8cdc 100644
--- a/complete.tcsh
+++ b/complete.tcsh
@@ -615,9 +615,6 @@ complete gmake 'c/{--directory=,--include-dir=}/d/' \
'n@*@`cat -s GNUMakefile Makefile makefile |& sed -n -e "/No such file/d" -e "s/^\([A-Za-z0-9-]*\):.*/\1/p"`@' \
'n/=/f/' \
'n/-f/f/'
-complete mixer p/1/'(vol bass treble synth pcm speaker mic cd mix \
- pcm2 rec igain ogain line1 line2 line3)'/ \
- p@2@'`mixer $:-1 | awk \{\ print\ \$7\ \}`'@
complete mpg123 'c/--/(2to1 4to1 8bit aggressive au audiodevice auth \
buffer cdr check doublespeed equalizer frames \
diff --git a/config.h b/config.h
new file mode 100644
index 000000000000..eb0e9545b691
--- /dev/null
+++ b/config.h
@@ -0,0 +1,287 @@
+/* config.h. Generated from config.h.in by configure. */
+/* 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'. */
+#define GETGROUPS_T gid_t
+
+/* Define to 1 if the `getpgrp' function requires zero arguments. */
+#define GETPGRP_VOID 1
+
+/* Define to 1 if you have the <auth.h> header file. */
+/* #undef HAVE_AUTH_H */
+
+/* Define to 1 if you have the <crypt.h> header file. */
+/* #undef HAVE_CRYPT_H */
+
+/* Define to 1 if you have the declaration of `crypt', and to 0 if you don't.
+ */
+#define HAVE_DECL_CRYPT 1
+
+/* Define to 1 if you have the declaration of `environ', and to 0 if you
+ don't. */
+#define HAVE_DECL_ENVIRON 0
+
+/* Define to 1 if you have the declaration of `gethostname', and to 0 if you
+ don't. */
+#define HAVE_DECL_GETHOSTNAME 1
+
+/* Define to 1 if you have the declaration of `getpgrp', and to 0 if you
+ don't. */
+#define HAVE_DECL_GETPGRP 1
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the `dup2' function. */
+#define HAVE_DUP2 1
+
+/* Define to 1 if you have the <features.h> header file. */
+/* #undef HAVE_FEATURES_H */
+
+/* Define to 1 if you have the `getauthid' function. */
+/* #undef HAVE_GETAUTHID */
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the `getpwent' function. */
+#define HAVE_GETPWENT 1
+
+/* Define to 1 if you have the `getutent' function. */
+/* #undef HAVE_GETUTENT */
+
+/* Define to 1 if you have the `getutxent' function. */
+#define HAVE_GETUTXENT 1
+
+/* Define if you have the iconv() function and it works. */
+#define HAVE_ICONV 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if the system has the type `long long'. */
+#define HAVE_LONG_LONG 1
+
+/* Define to 1 if you have the `mallinfo' function. */
+/* #undef HAVE_MALLINFO */
+
+/* Define to 1 if you have the `mallinfo2' function. */
+/* #undef HAVE_MALLINFO2 */
+
+/* Define to 1 if you have the `mblen' function. */
+#define HAVE_MBLEN 1
+
+/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
+#define HAVE_MBRTOWC 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the `nice' function. */
+#define HAVE_NICE 1
+
+/* Define to 1 if you have the `nl_langinfo' function. */
+#define HAVE_NL_LANGINFO 1
+
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
+/* Define to 1 if you have the `sbrk' function. */
+#define HAVE_SBRK 1
+
+/* Define to 1 if you have the `setpgid' function. */
+#define HAVE_SETPGID 1
+
+/* Define to 1 if you have the `setpriority' function. */
+#define HAVE_SETPRIORITY 1
+
+/* Define to 1 if you have the `setproctitle' function. */
+#define HAVE_SETPROCTITLE 1
+
+/* Define to 1 if you have the <shadow.h> header file. */
+/* #undef HAVE_SHADOW_H */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcoll' function and it is properly defined.
+ */
+#define HAVE_STRCOLL 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if `d_ino' is a member of `struct dirent'. */
+#define HAVE_STRUCT_DIRENT_D_INO 1
+
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
+#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
+
+/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
+#define HAVE_STRUCT_UTMPX_UT_HOST 1
+
+/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */
+#define HAVE_STRUCT_UTMPX_UT_TV 1
+
+/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
+#define HAVE_STRUCT_UTMPX_UT_USER 1
+
+/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */
+
+/* Define to 1 if `ut_host' is a member of `struct utmp'. */
+#define HAVE_STRUCT_UTMP_UT_HOST 1
+
+/* Define to 1 if `ut_tv' is a member of `struct utmp'. */
+#define HAVE_STRUCT_UTMP_UT_TV 1
+
+/* Define to 1 if `ut_user' is a member of `struct utmp'. */
+#define HAVE_STRUCT_UTMP_UT_USER 1
+
+/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */
+/* #undef HAVE_STRUCT_UTMP_UT_XTIME */
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <utmpx.h> header file. */
+#define HAVE_UTMPX_H 1
+
+/* Define to 1 if you have the <utmp.h> header file. */
+/* #undef HAVE_UTMP_H */
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define HAVE_WCTYPE_H 1
+
+/* Define to 1 if you have the `wcwidth' function. */
+#define HAVE_WCWIDTH 1
+
+/* Define to 1 if sbrk(N) works. */
+#define HAVE_WORKING_SBRK 1
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST
+
+/* Support NLS. */
+#define NLS 1
+
+/* Support NLS catalogs. */
+#define NLS_CATALOGS 1
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "https://bugs.astron.com/"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "Tcsh"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "Tcsh 6.24.07"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "tcsh"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://www.tcsh.org/"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "6.24.07"
+
+/* Define to 1 if the `setpgrp' function requires zero arguments. */
+/* #undef SETPGRP_VOID */
+
+/* The size of `wchar_t', as computed by sizeof. */
+#define SIZEOF_WCHAR_T 4
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
+#define STDC_HEADERS 1
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef gid_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef mode_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to `int' if neither <sys/types.h> nor <sys/socket.h> define. */
+/* #undef socklen_t */
+
+/* Define to `int' not defined in <sys/types.h>. */
+/* #undef ssize_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef uid_t */
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+ code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */
+
+#include "config_p.h"
+#include "config_f.h"
diff --git a/config.h.in b/config.h.in
index 60ce2ea9c815..a477e80713c0 100644
--- a/config.h.in
+++ b/config.h.in
@@ -69,6 +69,9 @@
/* Define to 1 if you have the `mallinfo' function. */
#undef HAVE_MALLINFO
+/* Define to 1 if you have the `mallinfo2' function. */
+#undef HAVE_MALLINFO2
+
/* Define to 1 if you have the `mblen' function. */
#undef HAVE_MBLEN
@@ -78,9 +81,6 @@
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
@@ -108,12 +108,18 @@
/* Define to 1 if you have the `setpriority' function. */
#undef HAVE_SETPRIORITY
+/* Define to 1 if you have the `setproctitle' function. */
+#undef HAVE_SETPROCTITLE
+
/* Define to 1 if you have the <shadow.h> header file. */
#undef HAVE_SHADOW_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -198,6 +204,9 @@
/* Define to 1 if you have the `wcwidth' function. */
#undef HAVE_WCWIDTH
+/* Define to 1 if sbrk(N) works. */
+#undef HAVE_WORKING_SBRK
+
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
@@ -225,7 +234,7 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if the `setpgrp' function takes no argument. */
+/* Define to 1 if the `setpgrp' function requires zero arguments. */
#undef SETPGRP_VOID
/* The size of `wchar_t', as computed by sizeof. */
@@ -234,7 +243,9 @@
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
diff --git a/config_f.h b/config_f.h
index 1ceef7a232ce..fb9e69be9761 100644
--- a/config_f.h
+++ b/config_f.h
@@ -47,7 +47,16 @@
* of nls...
*
*/
-#define SHORT_STRINGS
+#if defined(__NetBSD__)
+# include <sys/param.h>
+# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 200000000)
+# define SHORT_STRINGS
+# else
+# undef SHORT_STRINGS
+# endif
+#else
+# define SHORT_STRINGS
+#endif
/*
* WIDE_STRINGS Represent strings using wide characters
@@ -138,7 +147,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__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__)
+#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__) || defined(__NetBSD__) || !defined(HAVE_WORKING_SBRK)
# define SYSMALLOC
#else
# undef SYSMALLOC
diff --git a/configure b/configure
index 90ddda07cc98..975e6b9011ac 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,12 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcsh 6.22.04.
+# Generated by GNU Autoconf 2.71 for Tcsh 6.24.07.
#
# Report bugs to <https://bugs.astron.com/>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -16,14 +17,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -33,46 +36,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -96,8 +92,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -109,30 +109,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# 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.
@@ -154,20 +134,22 @@ 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
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+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 :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -187,42 +169,53 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || 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'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -230,14 +223,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
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
@@ -255,18 +255,19 @@ 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
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
$0: https://bugs.astron.com/ about your system, including
$0: any error possibly output before this message. Then
$0: install a modern shell, or manually run the script
@@ -294,6 +295,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -311,6 +313,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -325,7 +335,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -334,7 +344,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -373,12 +383,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -390,18 +401,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -413,9 +433,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -442,7 +462,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -486,7 +506,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
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; }
+ { printf "%s\n" "$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
@@ -500,6 +520,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -513,6 +537,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -578,50 +609,46 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME='tcsh'
+PACKAGE_NAME='Tcsh'
PACKAGE_TARNAME='tcsh'
-PACKAGE_VERSION='6.22.04'
-PACKAGE_STRING='tcsh 6.22.04'
+PACKAGE_VERSION='6.24.07'
+PACKAGE_STRING='Tcsh 6.24.07'
PACKAGE_BUGREPORT='https://bugs.astron.com/'
-PACKAGE_URL=''
+PACKAGE_URL='https://www.tcsh.org/'
ac_unique_file="tc.vers.c"
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
+ac_header_c_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
BUILD_CATALOGS
@@ -630,11 +657,11 @@ HESDEF
DFLAGS
CC_FOR_GETHOST
GENCAT
+LTLIBICONV
+LIBICONV
EGREP
GREP
CPP
-LTLIBICONV
-LIBICONV
OBJEXT
EXEEXT
ac_ct_CC
@@ -653,6 +680,14 @@ build
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+PACKAGE_PATCHLEVEL
+PACKAGE_VERS
+PACKAGE_REV
+PACKAGE_CHANGELOG_DATE
+PACKAGE_ENGLISH_DATE
+PACKAGE_MAILLIST
+PACKAGE_ORIGIN
+PACKAGE_DATE
target_alias
host_alias
build_alias
@@ -672,6 +707,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -748,6 +784,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -777,8 +814,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -819,9 +854,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -845,9 +880,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1000,6 +1035,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1049,9 +1093,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1065,9 +1109,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1111,9 +1155,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1129,7 +1173,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1137,7 +1181,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1193,7 +1237,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1250,7 +1294,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tcsh 6.22.04 to adapt to many kinds of systems.
+\`configure' configures Tcsh 6.24.07 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1290,6 +1334,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1315,7 +1360,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tcsh 6.22.04:";;
+ short | recursive ) echo "Configuration of Tcsh 6.24.07:";;
esac
cat <<\_ACEOF
@@ -1349,6 +1394,7 @@ Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <https://bugs.astron.com/>.
+Tcsh home page: <https://www.tcsh.org/>.
_ACEOF
ac_status=$?
fi
@@ -1364,9 +1410,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1394,7 +1440,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1402,7 +1449,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1411,10 +1458,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tcsh configure 6.22.04
-generated by GNU Autoconf 2.69
+Tcsh configure 6.24.07
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1431,14 +1478,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1446,14 +1493,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1463,20 +1511,58 @@ fi
} # ac_fn_c_try_compile
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1484,17 +1570,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1511,8 +1598,8 @@ fi
# ac_fn_c_try_run LINENO
# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
@@ -1522,25 +1609,26 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
@@ -1551,134 +1639,6 @@ fi
} # ac_fn_c_try_run
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## --------------------------------------- ##
-## Report this to https://bugs.astron.com/ ##
-## --------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -1686,26 +1646,28 @@ fi
ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1724,7 +1686,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -1734,14 +1696,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -1751,9 +1714,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid; break
-else
+else $as_nop
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -1761,14 +1725,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -1778,14 +1742,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -1795,9 +1760,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=$ac_mid; break
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -1805,14 +1771,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
ac_lo= ac_hi=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -1820,7 +1786,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -1830,12 +1796,13 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -1845,12 +1812,12 @@ esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.val", "w");
@@ -1878,9 +1845,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -1900,17 +1868,18 @@ rm -f conftest.val
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -1918,12 +1887,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -1931,18 +1901,19 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -1954,11 +1925,12 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_find_uintX_t ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
-$as_echo_n "checking for uint$2_t... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+printf %s "checking for uint$2_t... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
# Order is important - never check a type that is potentially smaller
# than half of the expected target width.
@@ -1968,7 +1940,7 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
test_array [0] = 0;
@@ -1978,7 +1950,8 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
case $ac_type in #(
uint$2_t) :
eval "$3=yes" ;; #(
@@ -1986,17 +1959,18 @@ if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=\$ac_type" ;;
esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if eval test \"x\$"$3"\" = x"no"; then :
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"
+then :
-else
+else $as_nop
break
fi
done
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_find_uintX_t
@@ -2008,16 +1982,17 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
@@ -2026,14 +2001,15 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
@@ -2042,41 +2018,45 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
eval "$4=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -2090,19 +2070,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_decl
+} # ac_fn_check_decl
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
@@ -2110,11 +2093,12 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -2122,16 +2106,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -2149,35 +2126,56 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
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.22.04, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by Tcsh $as_me 6.24.07, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -2210,8 +2208,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2246,7 +2248,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2281,11 +2283,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2296,8 +2300,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2321,7 +2325,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2329,14 +2333,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2344,15 +2348,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2360,8 +2364,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2375,63 +2379,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2441,19 +2430,434 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="config.rpath config.guess config.sub install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/acaux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2464,12 +2868,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2478,24 +2882,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2505,11 +2909,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2523,42 +2928,75 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+PACKAGE_DATE=2022-12-21
+
+PACKAGE_ORIGIN=Astron
+
+PACKAGE_MAILLIST=https://mailman.astron.com/mailman/listinfo/tcsh
+
+
+package_year="${PACKAGE_DATE%%-*}"
+package_month="${PACKAGE_DATE#*-}"
+package_month="${package_month%-*}"
+package_day="${PACKAGE_DATE##*-}"
+package_day="${package_day#0}"
+
+case ${package_month} in #(
+ 01) :
+ package_month_name=January ;; #(
+ 02) :
+ package_month_name=February ;; #(
+ 03) :
+ package_month_name=March ;; #(
+ 04) :
+ package_month_name=April ;; #(
+ 05) :
+ package_month_name=May ;; #(
+ 06) :
+ package_month_name=June ;; #(
+ 07) :
+ package_month_name=July ;; #(
+ 08) :
+ package_month_name=August ;; #(
+ 09) :
+ package_month_name=September ;; #(
+ 10) :
+ package_month_name=October ;; #(
+ 11) :
+ package_month_name=November ;; #(
+ 12) :
+ package_month_name=December ;; #(
+ *) :
+ ;;
+esac
+
+PACKAGE_ENGLISH_DATE="${package_month_name} ${package_day}, ${package_year}"
+
+
+package_changelog_date_format='+%a, %d %b %Y %T %z'
+
+
+PACKAGE_REV="${PACKAGE_VERSION%%.*}"
+
+
+PACKAGE_VERS="${PACKAGE_VERSION#*.}"
+PACKAGE_VERS="${PACKAGE_VERS%.*}"
+
+
+PACKAGE_PATCHLEVEL="${PACKAGE_VERSION##*.}"
+
+
+
+
ac_config_headers="$ac_config_headers config.h"
ac_config_commands="$ac_config_commands ./atconfig"
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Find a good install program. We prefer a C program (faster),
+ # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
@@ -2572,20 +3010,25 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -2595,13 +3038,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -2609,12 +3052,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -2630,7 +3073,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -2640,8 +3083,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -2651,26 +3094,29 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -2689,21 +3135,22 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -2739,6 +3186,15 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
prefix="$acl_save_prefix"
+
+
+
+
+
+
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2747,11 +3203,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2759,11 +3216,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2774,11 +3235,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2787,11 +3248,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -2799,11 +3261,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2814,11 +3280,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2826,8 +3292,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2840,11 +3306,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2852,11 +3319,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2867,11 +3338,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2880,11 +3351,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2893,15 +3365,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- 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
+ 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
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2917,18 +3393,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2939,11 +3415,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -2951,11 +3428,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2966,11 +3447,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2983,11 +3464,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -2995,11 +3477,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3010,11 +3496,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3026,34 +3512,138 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
+else
+ CC="$ac_cv_prog_CC"
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -3063,7 +3653,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -3071,7 +3661,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3083,9 +3673,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -3106,11 +3696,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -3127,7 +3718,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -3143,44 +3734,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -3194,15 +3787,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -3211,7 +3804,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -3223,8 +3816,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -3232,10 +3825,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -3243,39 +3836,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3289,11 +3883,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -3302,31 +3897,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -3336,29 +3932,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -3367,57 +3967,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -3432,94 +4035,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.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);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -3532,9 +4185,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
+else $as_nop
with_gnu_ld=no
fi
@@ -3552,25 +4206,26 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
-$as_echo_n "checking for ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
+printf %s "checking for ld... " >&6; }
elif test "$GCC" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
fi
if test -n "$LD"; then
# Let the user override the test with a path.
:
else
- if ${acl_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${acl_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
acl_cv_path_LD= # Final result of this test
ac_prog=ld # Program to search in $PATH
@@ -3639,7 +4294,8 @@ else
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# The compiler produces 64-bit code. Add option '-b64' so that the
# linker groks 64-bit object files.
case "$acl_cv_path_LD " in
@@ -3648,7 +4304,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
sparc64-*-netbsd*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3660,9 +4316,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
# The compiler produces 32-bit code. Add option '-m elf32_sparc'
# so that the linker groks 32-bit object files.
case "$acl_cv_path_LD " in
@@ -3671,7 +4328,7 @@ else
esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
esac
@@ -3680,18 +4337,19 @@ fi
LD="$acl_cv_path_LD"
fi
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${acl_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${acl_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# 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'*)
@@ -3702,18 +4360,21 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
-$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$acl_cv_prog_gnu_ld
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-$as_echo_n "checking for shared library run path origin... " >&6; }
-if ${acl_cv_rpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+printf %s "checking for shared library run path origin... " >&6; }
+if test ${acl_cv_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
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
@@ -3722,8 +4383,8 @@ else
acl_cv_rpath=done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-$as_echo "$acl_cv_rpath" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+printf "%s\n" "$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
acl_libext="$acl_cv_libext"
acl_shlibext="$acl_cv_shlibext"
@@ -3734,31 +4395,61 @@ $as_echo "$acl_cv_rpath" >&6; }
acl_hardcode_direct="$acl_cv_hardcode_direct"
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
# Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
+if test ${enable_rpath+y}
+then :
enableval=$enable_rpath; :
-else
+else $as_nop
enable_rpath=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
-$as_echo_n "checking 32-bit host C ABI... " >&6; }
-if ${gl_cv_host_cpu_c_abi_32bit+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
+printf %s "checking 32-bit host C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi_32bit+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$gl_cv_host_cpu_c_abi"; then
case "$gl_cv_host_cpu_c_abi" in
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
gl_cv_host_cpu_c_abi_32bit=yes ;;
- *)
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
esac
else
case "$host_cpu" in
- i[4567]86 )
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh1234 | sh1234elb \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
+ i[34567]86 )
gl_cv_host_cpu_c_abi_32bit=yes
;;
@@ -3781,12 +4472,13 @@ else
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
arm* | aarch64 )
@@ -3805,12 +4497,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
@@ -3825,12 +4518,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
ia64* )
@@ -3845,12 +4539,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=yes
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
mips* )
@@ -3865,12 +4560,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
powerpc* )
@@ -3889,12 +4585,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
rs6000 )
@@ -3913,12 +4610,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
s390* )
@@ -3933,12 +4631,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
sparc | sparc64 )
@@ -3953,114 +4652,453 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_host_cpu_c_abi_32bit=no
-else
+else $as_nop
gl_cv_host_cpu_c_abi_32bit=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
*)
- gl_cv_host_cpu_c_abi_32bit=no
+ gl_cv_host_cpu_c_abi_32bit=unknown
;;
esac
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
-$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
+fi
+ done
+ ac_cv_prog_CPP=$CPP
- case "$host_os" in
- solaris*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
-$as_echo_n "checking for 64-bit host... " >&6; }
-if ${gl_cv_solaris_64bit+:} false; then :
- $as_echo_n "(cached) " >&6
+fi
+ CPP=$ac_cv_prog_CPP
else
+ ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef _LP64
- int ok;
- #else
- error fail
- #endif
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_solaris_64bit=yes
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ 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"
+ 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
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
else
- gl_cv_solaris_64bit=no
+ ac_cv_path_GREP=$GREP
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
-$as_echo "$gl_cv_solaris_64bit" >&6; };;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
esac
+ 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"
+ 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
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
-$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
-if ${acl_cv_libdirstems+:} false; then :
- $as_echo_n "(cached) " >&6
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
else
- acl_libdirstem=lib
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
+printf %s "checking for ELF binary format... " >&6; }
+if test ${gl_cv_elf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __ELF__
+ Extensible Linking Format
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+ gl_cv_elf=yes
+else $as_nop
+ gl_cv_elf=no
+fi
+rm -rf conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
+printf "%s\n" "$gl_cv_elf" >&6; }
+ if test $gl_cv_elf; then
+ # Extract the ELF class of a file (5th byte) in decimal.
+ # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+ if od -A x < /dev/null >/dev/null 2>/dev/null; then
+ # Use POSIX od.
+ func_elfclass ()
+ {
+ od -A n -t d1 -j 4 -N 1
+ }
+ else
+ # Use BSD hexdump.
+ func_elfclass ()
+ {
+ dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+ echo
+ }
+ fi
+ case $HOST_CPU_C_ABI_32BIT in
+ yes)
+ # 32-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 1
+ }
+ ;;
+ no)
+ # 64-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ test "`func_elfclass | sed -e 's/[ ]//g'`" = 2
+ }
+ ;;
+ *)
+ # Unknown.
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ ;;
+ esac
+ else
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
+printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
+if test ${acl_cv_libdirstems+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ acl_libdirstem=lib
acl_libdirstem2=
+ acl_libdirstem3=
case "$host_os" in
solaris*)
- if test $gl_cv_solaris_64bit = yes; then
- acl_libdirstem=lib/64
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ acl_libdirstem2=lib/64
case "$host_cpu" in
- sparc*) acl_libdirstem2=lib/sparcv9 ;;
- i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ sparc*) acl_libdirstem3=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
esac
fi
;;
*)
- if test "$HOST_CPU_C_ABI_32BIT" != yes; then
- searchpath=`(if test -f /usr/bin/gcc \
- && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
- LC_ALL=C /usr/bin/gcc -print-search-dirs; \
- else \
- LC_ALL=C $CC -print-search-dirs; \
- fi) 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"
+ searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ # 32-bit or unknown ABI.
+ if test -d /usr/lib32; then
+ acl_libdirstem2=lib32
+ fi
+ fi
+ if test $HOST_CPU_C_ABI_32BIT != yes; then
+ # 64-bit or unknown ABI.
+ if test -d /usr/lib64; then
+ acl_libdirstem3=lib64
+ fi
+ fi
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64 ) acl_libdirstem3=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ if test $HOST_CPU_C_ABI_32BIT = yes; then
+ # 32-bit ABI.
+ acl_libdirstem3=
+ fi
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ # 64-bit ABI.
+ acl_libdirstem2=
fi
fi
;;
esac
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
- acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+ test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
-$as_echo "$acl_cv_libdirstems" >&6; }
- # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
- acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
- acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
+printf "%s\n" "$acl_cv_libdirstems" >&6; }
+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+ acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
@@ -4081,13 +5119,16 @@ $as_echo "$acl_cv_libdirstems" >&6; }
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
# Check whether --with-libiconv-prefix was given.
-if test "${with_libiconv_prefix+set}" = set; then :
+if test ${with_libiconv_prefix+y}
+then :
withval=$with_libiconv_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
@@ -4101,6 +5142,8 @@ if test "${with_libiconv_prefix+set}" = set; then :
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
@@ -4108,15 +5151,19 @@ if test "${with_libiconv_prefix+set}" = set; then :
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
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
fi
fi
fi
+ if test "X$additional_libdir2" = "X$additional_libdir"; then
+ additional_libdir2=
+ fi
+ if test "X$additional_libdir3" = "X$additional_libdir"; then
+ additional_libdir3=
+ fi
LIBICONV=
LTLIBICONV=
INCICONV=
@@ -4162,45 +5209,51 @@ fi
shrext=
fi
if test $use_additional = yes; then
- dir="$additional_libdir"
- 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"
+ for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+ if test "X$found_dir" = "X"; then
+ eval dir=\$$additional_libdir_variable
+ if test -n "$dir"; then
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$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" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
fi
- else
- eval library_names=\"$acl_library_names_spec\"
- for f in $library_names; do
- if test -f "$dir/$f"; then
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
found_dir="$dir"
- found_so="$dir/$f"
- break
+ found_a="$dir/$libname.$acl_libext"
fi
- done
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
fi
fi
- fi
- 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
+ done
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIBICONV; do
@@ -4217,7 +5270,7 @@ fi
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
if test -n "$acl_shlibext"; then
- if test -f "$dir/$libname$shrext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
found_dir="$dir"
found_so="$dir/$libname$shrext"
else
@@ -4227,14 +5280,14 @@ fi
| 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
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$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
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
found_dir="$dir"
found_so="$dir/$f"
break
@@ -4244,7 +5297,7 @@ fi
fi
fi
if test "X$found_dir" = "X"; then
- if test -f "$dir/$libname.$acl_libext"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
found_dir="$dir"
found_a="$dir/$libname.$acl_libext"
fi
@@ -4266,7 +5319,8 @@ fi
if test "X$found_so" != "X"; then
if test "$enable_rpath" = no \
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
- || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
haveit=
@@ -4345,6 +5399,13 @@ fi
fi
additional_includedir="$basedir/include"
;;
+ */$acl_libdirstem3 | */$acl_libdirstem3/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
esac
if test "X$additional_includedir" != "X"; then
if test "X$additional_includedir" != "X/usr/include"; then
@@ -4390,12 +5451,14 @@ fi
for dep in $dependency_libs; do
case "$dep" in
-L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
- && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
- || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -4414,14 +5477,14 @@ fi
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
- if test "X$x" = "X-L$additional_libdir"; then
+ if test "X$x" = "X-L$dependency_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ if test -d "$dependency_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
fi
fi
haveit=
@@ -4435,14 +5498,14 @@ fi
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
- if test "X$x" = "X-L$additional_libdir"; then
+ if test "X$x" = "X-L$dependency_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ if test -d "$dependency_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
fi
fi
fi
@@ -4556,11 +5619,12 @@ fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
-$as_echo_n "checking for iconv... " >&6; }
-if ${am_cv_func_iconv+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+printf %s "checking for iconv... " >&6; }
+if test ${am_cv_func_iconv+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
@@ -4571,7 +5635,7 @@ else
#include <iconv.h>
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
@@ -4580,10 +5644,11 @@ iconv_t cd = iconv_open("","");
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
am_cv_func_iconv=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
@@ -4595,7 +5660,7 @@ rm -f core conftest.err conftest.$ac_objext \
#include <iconv.h>
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
@@ -4604,24 +5669,26 @@ iconv_t cd = iconv_open("","");
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$am_save_LIBS"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
-$as_echo "$am_cv_func_iconv" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+printf "%s\n" "$am_cv_func_iconv" >&6; }
if test "$am_cv_func_iconv" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
-$as_echo_n "checking for working iconv... " >&6; }
-if ${am_cv_func_iconv_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+printf %s "checking for working iconv... " >&6; }
+if test ${am_cv_func_iconv_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
@@ -4629,12 +5696,13 @@ else
fi
am_cv_func_iconv_works=no
for ac_iconv_const in '' 'const'; do
- if test "$cross_compiling" = yes; then :
+ 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
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4646,7 +5714,7 @@ else
#endif
int
-main ()
+main (void)
{
int result = 0;
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
@@ -4758,7 +5826,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
am_cv_func_iconv_works=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -4770,8 +5839,8 @@ fi
LIBS="$am_save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
-$as_echo "$am_cv_func_iconv_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+printf "%s\n" "$am_cv_func_iconv_works" >&6; }
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
@@ -4781,14 +5850,14 @@ $as_echo "$am_cv_func_iconv_works" >&6; }
fi
if test "$am_func_iconv" = yes; then
-$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
fi
if test "$am_cv_lib_iconv" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
-$as_echo_n "checking how to link with libiconv... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
-$as_echo "$LIBICONV" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+printf %s "checking how to link with libiconv... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+printf "%s\n" "$LIBICONV" >&6; }
else
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
@@ -4798,11 +5867,12 @@ $as_echo "$LIBICONV" >&6; }
if test "$am_cv_func_iconv" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
-$as_echo_n "checking for iconv declaration... " >&6; }
- if ${am_cv_proto_iconv+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+printf %s "checking for iconv declaration... " >&6; }
+ if test ${am_cv_proto_iconv+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4820,300 +5890,297 @@ size_t iconv();
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
am_cv_proto_iconv_arg1=""
-else
+else $as_nop
am_cv_proto_iconv_arg1="const"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
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);"
fi
am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
$am_cv_proto_iconv" >&5
-$as_echo "
+printf "%s\n" "
$am_cv_proto_iconv" >&6; }
else
am_cv_proto_iconv_arg1=""
fi
-cat >>confdefs.h <<_ACEOF
-#define ICONV_CONST $am_cv_proto_iconv_arg1
-_ACEOF
+printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking cached host tuple" >&5
-$as_echo_n "checking cached host tuple... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking cached host tuple" >&5
+printf %s "checking cached host tuple... " >&6; }
if { test x"${ac_cv_host_system_type+set}" = x"set" &&
- test x"$ac_cv_host_system_type" != x"$host"; }; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: different" >&5
-$as_echo "different" >&6; }
- as_fn_error $? "remove config.cache and re-run configure" "$LINENO" 5
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+ test x"$ac_cv_host_system_type" != x"$host"; }
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: different" >&5
+printf "%s\n" "different" >&6; }
+ as_fn_error $? "remove config.cache and re-run configure" "$LINENO" 5
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
fi
ac_cv_host_system_type="$host"
+case ${host} in #(
+ *-*-darwin*|*-*-freebsd*|*-*-rhapsody*) :
+ PACKAGE_CHANGELOG_DATE="$(
+ TZ=UTC date -v0H -v0M -v0S \
+ -v${package_year}y \
+ -v${package_month}m \
+ -v${package_day}d \
+ "${package_changelog_date_format}"
+ )" ;; #(
+ *-*-openbsd*) :
+ PACKAGE_CHANGELOG_DATE="$(
+ TZ=UTC date -j \
+ "${package_changelog_date_format}" \
+ ${package_year}${package_month}${package_day}0000
+ )" ;; #(
+ *) :
+ # Default: NetBSD, GNU core utilities (i.e. most Linux)
+ PACKAGE_CHANGELOG_DATE="$(
+ TZ=UTC date -d ${PACKAGE_DATE} \
+ "${package_changelog_date_format}"
+ )" ;;
+esac
-
-case "${host}" in
-
+case ${host} in #(
## Alpha (DEC) machines.
- alpha*-dec-osf* )
- tcsh_config_file=decosf1
- ;;
-
+ alpha*-dec-osf*) :
+ tcsh_config_file=decosf1
+ ;; #(
## Ultrix
- *-dec-ultrix* )
- tcsh_config_file=ultrix
- ;;
-
+ *-dec-ultrix*) :
+ tcsh_config_file=ultrix
+ ;; #(
## DGUX
- *-dg-dguxR4* )
- tcsh_config_file=dgux5.4
- ;;
- m88k-dg-dgux5.4R* )
- tcsh_config_file=dgux5.4
- ;;
-
+ *-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
- ;;
-
+ *-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
- ;;
-
+ *-ibm-aix*) :
+ tcsh_config_file=aix
+ ;; #(
## SX-4
- sx4-nec-*)
- CC='cc -h0,ansi,novector,float0'
+ sx4-nec-*) :
+ CC='cc -h0,ansi,novector,float0'
LDFLAGS='-Gsmall'
tcsh_config_file=superux8
- ;;
-
+ ;; #(
## IBM OS/390 systems
- *-ibm-os390*)
- CC='c89'
+ *-ibm-os390*) :
+ CC='c89'
tcsh_config_file=os390
- ;;
-
+ ;; #(
## Android
- *-*-android*)
- tcsh_config_file=android
- ;;
-
+ *-*-android*) :
+ tcsh_config_file=android
+ ;; #(
## Linux
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
- tcsh_config_file=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
- ;;
-
+ m68k-motorola-sysv*) :
+ tcsh_config_file=sysV68
+ ;; #(
+ m88k-motorola-sysv3*) :
+ tcsh_config_file=sysV88
+ ;; #(
## Minix systems
- *-*-minix*)
- tcsh_config_file=minix
- ;;
-
+ *-*-minix*) :
+ tcsh_config_file=minix
+ ;; #(
## NetBSD systems
- *-*-netbsd*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-netbsd*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## FreeBSD systems
- *-*-freebsd*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-freebsd*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## MidnightBSD systems
- *-*-midnightbsd*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-midnightbsd*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## DragonFlyBSD systems
- *-*-dragonfly*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-dragonfly*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## MirBSD systems
- *-*-mirbsd*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-mirbsd*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## OpenBSD systems
- *-*-openbsd*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-openbsd*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## BSDI systems
- *-*-bsdi*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-bsdi*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## Mac OS X Server
- *-*-rhapsody* )
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-rhapsody*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## Mac OS X Server
- *-*-darwin* )
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-darwin*) :
+ tcsh_config_file=bsd4.4
+ ;; #(
## DragonFly systems
- *-*-dragonfly*)
- tcsh_config_file=bsd4.4
- ;;
-
+ *-*-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
+ *-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
+ ;; #(
+ 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
- ;;
-
+ ;; #(
+ 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
+ *-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
+ ;; #(
+ *-sun-solaris2.2) :
+ # Sparc only release
tcsh_config_file=sol22
- ;;
- *-sun-solaris2.3 ) # Sparc only release
+ ;; #(
+ *-sun-solaris2.3) :
+ # Sparc only release
tcsh_config_file=sol23
- ;;
- *-*-solaris2.[45] ) # Should handle sparc, x86 and powerpc
+ ;; #(
+ *-*-solaris2.[45]) :
+ # Should handle sparc, x86 and powerpc
tcsh_config_file=sol24
- ;;
- *-*-solaris2.[678] ) # Should handle sparc, x86 and powerpc
+ ;; #(
+ *-*-solaris2.[678]) :
+ # Should handle sparc, x86 and powerpc
tcsh_config_file=sol26
- ;;
- *-*-solaris2.* ) # Should handle sparc, x86 and powerpc
+ ;; #(
+ *-*-solaris2.*) :
+ # Should handle sparc, x86 and powerpc
tcsh_config_file=sol29
- ;;
-
+ ;; #(
## Dell SVR4
- *-dell-sysv4* )
- tcsh_config_file=sysv4
+ *-dell-sysv4*) :
+ tcsh_config_file=sysv4
DFLAGS="$DFLAGS -DDELL"
- ;;
-
+ ;; #(
## SVR4 (Generic and otherwise)
- *-*-sysv4* )
- tcsh_config_file=sysv4
- ;;
-
+ *-*-sysv4*) :
+ tcsh_config_file=sysv4
+ ;; #(
## Tektronix systems
- m68k-tektronix-bsd* )
- tcsh_config_file=bsd
+ m68k-tektronix-bsd*) :
+ tcsh_config_file=bsd
NON_GNU_DFLAGS='-DBSD -DUTek'
- ;;
- m88k-tektronix-sysv3* )
- tcsh_config_file=tekXD88
- ;;
-
+ ;; #(
+ 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
- ;;
-
+ *-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
- ;;
-
+ bs2000-siemens-*) :
+ tcsh_config_file=bs2000
+ ;; #(
## Convex
- *-convex*)
- tcsh_config_file=convex
- ;;
-
+ *-convex*) :
+ tcsh_config_file=convex
+ ;; #(
## Cray
- *-cray-unicos*)
- tcsh_config_file=cray
- ;;
-
+ *-cray-unicos*) :
+ tcsh_config_file=cray
+ ;; #(
## Red Hat Cygwin
- *-cygwin)
- tcsh_config_file=cygwin
- ;;
-
+ *-cygwin) :
+ tcsh_config_file=cygwin
+ ;; #(
## mips-compaq-nonstopux
- *-*-nonstopux)
- tcsh_config_file=sysv4
- ;;
-
+ *-*-nonstopux) :
+ tcsh_config_file=sysv4
+ ;; #(
## Apollo Domain/OS
- *-apollo-*)
- tcsh_config_file=apollo
- ;;
-
+ *-apollo-*) :
+ tcsh_config_file=apollo
+ ;; #(
## QNX6
- *-qnx6*)
- tcsh_config_file=qnx6
- ;;
-
- * )
+ *-qnx6*) :
+ tcsh_config_file=qnx6
+ ;; #(
+ *) :
as_fn_error $? "Tcsh can't guess the configuration file name
for \`${host}' systems.
-Check tcsh's \`Ported' file for manual configuration instructions." "$LINENO" 5
- ;;
-
+Check tcsh's \`Ported' file for manual configuration instructions." "$LINENO" 5 ;;
esac
-echo "Tcsh will use configuration file \`$tcsh_config_file'."
-cp ${srcdir}/config/${tcsh_config_file} config_p.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: using configuration file \`$tcsh_config_file'" >&5
+printf "%s\n" "$as_me: using configuration file \`$tcsh_config_file'" >&6;}
+cp ${srcdir}/system/${tcsh_config_file} config_p.h
+
ac_ext=c
@@ -5124,11 +6191,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -5136,11 +6204,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5151,11 +6223,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5164,11 +6236,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -5176,11 +6249,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5191,11 +6268,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -5203,8 +6280,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -5217,11 +6294,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -5229,11 +6307,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5244,11 +6326,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5257,11 +6339,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -5270,15 +6353,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- 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
+ 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
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5294,18 +6381,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5316,11 +6403,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -5328,11 +6416,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5343,11 +6435,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5360,11 +6452,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -5372,11 +6465,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$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
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5387,11 +6484,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5403,8 +6500,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -5412,25 +6509,129 @@ esac
fi
fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -5440,20 +6641,21 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -5463,29 +6665,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -5494,57 +6700,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -5559,94 +6768,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.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);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -5660,40 +6919,36 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -5705,10 +6960,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -5718,7 +6974,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -5730,29 +6987,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -5764,10 +7016,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -5777,11 +7030,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -5792,143 +7046,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- 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"
- 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
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- 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"
- 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
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
if test $ac_cv_c_compiler_gnu = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
-if ${ac_cv_prog_gcc_traditional+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+printf %s "checking whether $CC needs -traditional... " >&6; }
+if test ${ac_cv_prog_gcc_traditional+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_pattern="Autoconf.*'x'"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5936,12 +7060,13 @@ else
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
-else
+else $as_nop
ac_cv_prog_gcc_traditional=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $ac_cv_prog_gcc_traditional = no; then
@@ -5951,15 +7076,16 @@ rm -f conftest*
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
fi
-rm -f conftest*
+rm -rf conftest*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
@@ -5968,11 +7094,12 @@ fi
# Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GENCAT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GENCAT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $GENCAT in
[\\/]* | ?:[\\/]*)
ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
@@ -5982,11 +7109,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_GENCAT="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5998,39 +7129,44 @@ esac
fi
GENCAT=$ac_cv_path_GENCAT
if test -n "$GENCAT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENCAT" >&5
-$as_echo "$GENCAT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GENCAT" >&5
+printf "%s\n" "$GENCAT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-if test "x${cross_compiling}" = xyes ; then
+if test "x${cross_compiling}" = xyes
+then :
CC_FOR_GETHOST="cc"
-else
+else $as_nop
CC_FOR_GETHOST="\$(CC)"
fi
-if test "x$GCC" != xyes ; then
+if test "x$GCC" != xyes
+then :
DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
- CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
+ CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
fi
-case "${host}" in
- *-*-android*)
- CFLAGS="${CFLAGS} -fPIE"
+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 :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
+printf %s "checking for library containing crypt... " >&6; }
+if test ${ac_cv_search_crypt+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6038,55 +7174,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char crypt ();
int
-main ()
+main (void)
{
return crypt ();
;
return 0;
}
_ACEOF
-for ac_lib in '' crypt; do
+for ac_lib in '' crypt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_crypt=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_crypt+:} false; then :
+ if test ${ac_cv_search_crypt+y}
+then :
break
fi
done
-if ${ac_cv_search_crypt+:} false; then :
+if test ${ac_cv_search_crypt+y}
+then :
-else
+else $as_nop
ac_cv_search_crypt=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
-$as_echo "$ac_cv_search_crypt" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
+printf "%s\n" "$ac_cv_search_crypt" >&6; }
ac_res=$ac_cv_search_crypt
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getspnam" >&5
-$as_echo_n "checking for library containing getspnam... " >&6; }
-if ${ac_cv_search_getspnam+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getspnam" >&5
+printf %s "checking for library containing getspnam... " >&6; }
+if test ${ac_cv_search_getspnam+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6094,55 +7233,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char getspnam ();
int
-main ()
+main (void)
{
return getspnam ();
;
return 0;
}
_ACEOF
-for ac_lib in '' sec; do
+for ac_lib in '' sec
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_getspnam=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_getspnam+:} false; then :
+ if test ${ac_cv_search_getspnam+y}
+then :
break
fi
done
-if ${ac_cv_search_getspnam+:} false; then :
+if test ${ac_cv_search_getspnam+y}
+then :
-else
+else $as_nop
ac_cv_search_getspnam=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getspnam" >&5
-$as_echo "$ac_cv_search_getspnam" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getspnam" >&5
+printf "%s\n" "$ac_cv_search_getspnam" >&6; }
ac_res=$ac_cv_search_getspnam
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
-$as_echo_n "checking for library containing tgetent... " >&6; }
-if ${ac_cv_search_tgetent+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
+printf %s "checking for library containing tgetent... " >&6; }
+if test ${ac_cv_search_tgetent+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6150,59 +7292,62 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char tgetent ();
int
-main ()
+main (void)
{
return tgetent ();
;
return 0;
}
_ACEOF
-for ac_lib in '' termlib tinfo termcap curses ncurses; do
+for ac_lib in '' termlib tinfo termcap curses ncurses
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_tgetent=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_tgetent+:} false; then :
+ if test ${ac_cv_search_tgetent+y}
+then :
break
fi
done
-if ${ac_cv_search_tgetent+:} false; then :
+if test ${ac_cv_search_tgetent+y}
+then :
-else
+else $as_nop
ac_cv_search_tgetent=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
-$as_echo "$ac_cv_search_tgetent" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
+printf "%s\n" "$ac_cv_search_tgetent" >&6; }
ac_res=$ac_cv_search_tgetent
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-else
+else $as_nop
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
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if ${ac_cv_search_gethostbyname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+printf %s "checking for library containing gethostbyname... " >&6; }
+if test ${ac_cv_search_gethostbyname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6210,55 +7355,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char gethostbyname ();
int
-main ()
+main (void)
{
return gethostbyname ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' nsl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_gethostbyname=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_gethostbyname+:} false; then :
+ if test ${ac_cv_search_gethostbyname+y}
+then :
break
fi
done
-if ${ac_cv_search_gethostbyname+:} false; then :
+if test ${ac_cv_search_gethostbyname+y}
+then :
-else
+else $as_nop
ac_cv_search_gethostbyname=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
-$as_echo "$ac_cv_search_gethostbyname" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+printf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing connect" >&5
-$as_echo_n "checking for library containing connect... " >&6; }
-if ${ac_cv_search_connect+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing connect" >&5
+printf %s "checking for library containing connect... " >&6; }
+if test ${ac_cv_search_connect+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6266,55 +7414,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char connect ();
int
-main ()
+main (void)
{
return connect ();
;
return 0;
}
_ACEOF
-for ac_lib in '' socket; do
+for ac_lib in '' socket
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_connect=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_connect+:} false; then :
+ if test ${ac_cv_search_connect+y}
+then :
break
fi
done
-if ${ac_cv_search_connect+:} false; then :
+if test ${ac_cv_search_connect+y}
+then :
-else
+else $as_nop
ac_cv_search_connect=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_connect" >&5
-$as_echo "$ac_cv_search_connect" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_connect" >&5
+printf "%s\n" "$ac_cv_search_connect" >&6; }
ac_res=$ac_cv_search_connect
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing catgets" >&5
-$as_echo_n "checking for library containing catgets... " >&6; }
-if ${ac_cv_search_catgets+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing catgets" >&5
+printf %s "checking for library containing catgets... " >&6; }
+if test ${ac_cv_search_catgets+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6322,217 +7473,163 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char catgets ();
int
-main ()
+main (void)
{
return catgets ();
;
return 0;
}
_ACEOF
-for ac_lib in '' catgets; do
+for ac_lib in '' catgets
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_catgets=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_catgets+:} false; then :
+ if test ${ac_cv_search_catgets+y}
+then :
break
fi
done
-if ${ac_cv_search_catgets+:} false; then :
+if test ${ac_cv_search_catgets+y}
+then :
-else
+else $as_nop
ac_cv_search_catgets=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_catgets" >&5
-$as_echo "$ac_cv_search_catgets" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_catgets" >&5
+printf "%s\n" "$ac_cv_search_catgets" >&6; }
ac_res=$ac_cv_search_catgets
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-fi
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "auth.h" "ac_cv_header_auth_h" "$ac_includes_default"
+if test "x$ac_cv_header_auth_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_AUTH_H 1" >>confdefs.h
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
+if test "x$ac_cv_header_crypt_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+ac_fn_c_check_header_compile "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default"
+if test "x$ac_cv_header_features_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FEATURES_H 1" >>confdefs.h
fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
+if test "x$ac_cv_header_paths_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
+if test "x$ac_cv_header_shadow_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
-for ac_header in auth.h crypt.h features.h inttypes.h paths.h shadow.h stdint.h utmp.h utmpx.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmpx_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
-done
+fi
-for ac_header in wchar.h
+ for ac_header in wchar.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
-if test "x$ac_cv_header_wchar_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WCHAR_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
+if test "x$ac_cv_header_wchar_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
-$as_echo_n "checking size of wchar_t... " >&6; }
-if ${ac_cv_sizeof_wchar_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
+printf %s "checking size of wchar_t... " >&6; }
+if test ${ac_cv_sizeof_wchar_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <stdio.h>
#include <wchar.h>
-"; then :
-else
+"
+then :
+
+else $as_nop
if test "$ac_cv_type_wchar_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (wchar_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -6541,47 +7638,40 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
-$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
+printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
- for ac_header in wctype.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
-if test "x$ac_cv_header_wctype_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WCTYPE_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
+if test "x$ac_cv_header_wctype_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
fi
-done
-
fi
done
-
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+printf %s "checking for $ac_hdr that defines DIR... " >&6; }
+if eval test \${$as_ac_Header+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
int
-main ()
+main (void)
{
if ((DIR *) 0)
return 0;
@@ -6589,19 +7679,21 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_ac_Header=yes"
-else
+else $as_nop
eval "$as_ac_Header=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
@@ -6610,11 +7702,12 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6622,56 +7715,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
+for ac_lib in '' dir
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6679,57 +7775,60 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
+for ac_lib in '' x
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if ${ac_cv_header_stat_broken+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+printf %s "checking whether stat file-mode macros are broken... " >&6; }
+if test ${ac_cv_header_stat_broken+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -6752,182 +7851,74 @@ extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_header_stat_broken=no
-else
+else $as_nop
ac_cv_header_stat_broken=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
-$as_echo "$ac_cv_header_stat_broken" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
if test $ac_cv_header_stat_broken = yes; then
-$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
-if test "x$ac_cv_type_long_long" = xyes; then :
+if test "x$ac_cv_type_long_long" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
+printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then :
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
ac_cv_type_uid_t=yes
-else
+else $as_nop
ac_cv_type_uid_t=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
-$as_echo "#define uid_t int" >>confdefs.h
+printf "%s\n" "#define uid_t int" >>confdefs.h
-$as_echo "#define gid_t int" >>confdefs.h
+printf "%s\n" "#define gid_t int" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
-$as_echo_n "checking type of array argument to getgroups... " >&6; }
-if ${ac_cv_type_getgroups+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
+printf %s "checking type of array argument to getgroups... " >&6; }
+if test ${ac_cv_type_getgroups+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_type_getgroups=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Mike Rendell for this test. */
@@ -6937,7 +7928,7 @@ $ac_includes_default
#define MAX(x, y) ((x) > (y) ? (x) : (y))
int
-main ()
+main (void)
{
gid_t gidset[NGID];
int i, n;
@@ -6954,9 +7945,10 @@ main ()
return n > 0 && gidset[n] != val.gval;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_type_getgroups=gid_t
-else
+else $as_nop
ac_cv_type_getgroups=int
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -6970,72 +7962,71 @@ if test $ac_cv_type_getgroups = cross; then
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
+ $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1
+then :
ac_cv_type_getgroups=gid_t
-else
+else $as_nop
ac_cv_type_getgroups=int
fi
-rm -f conftest*
+rm -rf conftest*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
-$as_echo "$ac_cv_type_getgroups" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
+printf "%s\n" "$ac_cv_type_getgroups" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define GETGROUPS_T $ac_cv_type_getgroups
-_ACEOF
+printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-if test "x$ac_cv_type_mode_t" = xyes; then :
+if test "x$ac_cv_type_mode_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
+printf "%s\n" "#define mode_t int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then :
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
ac_cv_type_uid_t=yes
-else
+else $as_nop
ac_cv_type_uid_t=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
-$as_echo "#define uid_t int" >>confdefs.h
+printf "%s\n" "#define uid_t int" >>confdefs.h
-$as_echo "#define gid_t int" >>confdefs.h
+printf "%s\n" "#define gid_t int" >>confdefs.h
fi
@@ -7044,27 +8035,25 @@ case $ac_cv_c_uint32_t in #(
no|yes) ;; #(
*)
-$as_echo "#define _UINT32_T 1" >>confdefs.h
+printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define uint32_t $ac_cv_c_uint32_t
-_ACEOF
+printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
;;
esac
-ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "
-#include <sys/types.h>
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "#include <sys/types.h>
"
-if test "x$ac_cv_type_ssize_t" = xyes; then :
+if test "x$ac_cv_type_ssize_t" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define ssize_t int" >>confdefs.h
+printf "%s\n" "#define ssize_t int" >>confdefs.h
fi
@@ -7072,22 +8061,21 @@ fi
-ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
-#include <sys/types.h>
+ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
#include <sys/socket.h>
"
-if test "x$ac_cv_type_socklen_t" = xyes; then :
+if test "x$ac_cv_type_socklen_t" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define socklen_t int" >>confdefs.h
+printf "%s\n" "#define socklen_t int" >>confdefs.h
fi
-
ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dirent_d_ino" "#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else
@@ -7098,12 +8086,12 @@ ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dire
# endif
# define dirent direct
#endif
+
"
-if test "x$ac_cv_member_struct_dirent_d_ino" = xyes; then :
+if test "x$ac_cv_member_struct_dirent_d_ino" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_DIRENT_D_INO 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
fi
@@ -7115,12 +8103,12 @@ ac_fn_c_check_member "$LINENO" "struct utmp" "ut_host" "ac_cv_member_struct_utmp
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmp_ut_host" = xyes; then :
+if test "x$ac_cv_member_struct_utmp_ut_host" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMP_UT_HOST 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_HOST 1" >>confdefs.h
fi
@@ -7131,12 +8119,12 @@ ac_fn_c_check_member "$LINENO" "struct utmp" "ut_user" "ac_cv_member_struct_utmp
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmp_ut_user" = xyes; then :
+if test "x$ac_cv_member_struct_utmp_ut_user" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMP_UT_USER 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_USER 1" >>confdefs.h
fi
@@ -7147,12 +8135,12 @@ ac_fn_c_check_member "$LINENO" "struct utmp" "ut_tv" "ac_cv_member_struct_utmp_u
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmp_ut_tv" = xyes; then :
+if test "x$ac_cv_member_struct_utmp_ut_tv" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMP_UT_TV 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_TV 1" >>confdefs.h
fi
@@ -7163,12 +8151,12 @@ ac_fn_c_check_member "$LINENO" "struct utmp" "ut_xtime" "ac_cv_member_struct_utm
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmp_ut_xtime" = xyes; then :
+if test "x$ac_cv_member_struct_utmp_ut_xtime" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMP_UT_XTIME 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMP_UT_XTIME 1" >>confdefs.h
fi
@@ -7179,12 +8167,12 @@ ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_host" "ac_cv_member_struct_utm
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmpx_ut_host" = xyes; then :
+if test "x$ac_cv_member_struct_utmpx_ut_host" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMPX_UT_HOST 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_HOST 1" >>confdefs.h
fi
@@ -7195,12 +8183,12 @@ ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_user" "ac_cv_member_struct_utm
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmpx_ut_user" = xyes; then :
+if test "x$ac_cv_member_struct_utmpx_ut_user" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMPX_UT_USER 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_USER 1" >>confdefs.h
fi
@@ -7211,12 +8199,12 @@ ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_tv" "ac_cv_member_struct_utmpx
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmpx_ut_tv" = xyes; then :
+if test "x$ac_cv_member_struct_utmpx_ut_tv" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMPX_UT_TV 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_TV 1" >>confdefs.h
fi
@@ -7227,39 +8215,40 @@ ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_xtime" "ac_cv_member_struct_ut
#elif defined HAVE_UTMP_H
#include <utmp.h>
#endif
+
"
-if test "x$ac_cv_member_struct_utmpx_ut_xtime" = xyes; then :
+if test "x$ac_cv_member_struct_utmpx_ut_xtime" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_UTMPX_UT_XTIME 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_UTMPX_UT_XTIME 1" >>confdefs.h
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
#include <sys/socket.h>
+
"
-if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -7272,7 +8261,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -7300,7 +8289,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM 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]; } bx;
struct s *b = &bx; b->j = 5;
@@ -7316,31 +8305,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if ${ac_cv_c_volatile+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+printf %s "checking for working volatile... " >&6; }
+if test ${ac_cv_c_volatile+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
volatile int x;
@@ -7350,157 +8341,362 @@ return !x && !y;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_volatile=yes
-else
+else $as_nop
ac_cv_c_volatile=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
-$as_echo "$ac_cv_c_volatile" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+printf "%s\n" "$ac_cv_c_volatile" >&6; }
if test $ac_cv_c_volatile = no; then
-$as_echo "#define volatile /**/" >>confdefs.h
+printf "%s\n" "#define volatile /**/" >>confdefs.h
fi
-ac_fn_c_check_decl "$LINENO" "crypt" "ac_cv_have_decl_crypt" "#include \"config_p.h\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "crypt" "ac_cv_have_decl_crypt" "#include \"config_p.h\"
$ac_includes_default
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
-"
-if test "x$ac_cv_have_decl_crypt" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_crypt" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_CRYPT $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" "#include \"config_p.h\"
+printf "%s\n" "#define HAVE_DECL_CRYPT $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" "#include \"config_p.h\"
$ac_includes_default
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
-"
-if test "x$ac_cv_have_decl_environ" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_environ" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ENVIRON $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "gethostname" "ac_cv_have_decl_gethostname" "#include \"config_p.h\"
+printf "%s\n" "#define HAVE_DECL_ENVIRON $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "gethostname" "ac_cv_have_decl_gethostname" "#include \"config_p.h\"
$ac_includes_default
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
-"
-if test "x$ac_cv_have_decl_gethostname" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_gethostname" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETHOSTNAME $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "getpgrp" "ac_cv_have_decl_getpgrp" "#include \"config_p.h\"
+printf "%s\n" "#define HAVE_DECL_GETHOSTNAME $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "getpgrp" "ac_cv_have_decl_getpgrp" "#include \"config_p.h\"
$ac_includes_default
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
-"
-if test "x$ac_cv_have_decl_getpgrp" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_getpgrp" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETPGRP $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_GETPGRP $ac_have_decl" >>confdefs.h
ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
-if test "x$ac_cv_func_setlocale" = xyes; then :
+if test "x$ac_cv_func_setlocale" = xyes
+then :
have_setlocale=yes
-else
+else $as_nop
have_setlocale=no
fi
ac_fn_c_check_func "$LINENO" "catgets" "ac_cv_func_catgets"
-if test "x$ac_cv_func_catgets" = xyes; then :
+if test "x$ac_cv_func_catgets" = xyes
+then :
have_catgets=yes
-else
+else $as_nop
have_catgets=no
fi
-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"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
+if test "x$ac_cv_func_dup2" = xyes
+then :
+ printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "getauthid" "ac_cv_func_getauthid"
+if test "x$ac_cv_func_getauthid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETAUTHID 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
-$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
-if ${ac_cv_func_getpgrp_void+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
+ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
+if test "x$ac_cv_func_getcwd" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
+if test "x$ac_cv_func_gethostname" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
+if test "x$ac_cv_func_getpwent" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getutent" "ac_cv_func_getutent"
+if test "x$ac_cv_func_getutent" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETUTENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getutxent" "ac_cv_func_getutxent"
+if test "x$ac_cv_func_getutxent" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETUTXENT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mallinfo" "ac_cv_func_mallinfo"
+if test "x$ac_cv_func_mallinfo" = xyes
+then :
+ printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mallinfo2" "ac_cv_func_mallinfo2"
+if test "x$ac_cv_func_mallinfo2" = xyes
+then :
+ printf "%s\n" "#define HAVE_MALLINFO2 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
+if test "x$ac_cv_func_mblen" = xyes
+then :
+ printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
+if test "x$ac_cv_func_memmove" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
+if test "x$ac_cv_func_memset" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
+if test "x$ac_cv_func_mkstemp" = xyes
+then :
+ printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
+if test "x$ac_cv_func_nice" = xyes
+then :
+ printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
+if test "x$ac_cv_func_setproctitle" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETPROCTITLE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = xyes
+then :
+ printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sbrk" "ac_cv_func_sbrk"
+if test "x$ac_cv_func_sbrk" = xyes
+then :
+ printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
+if test "x$ac_cv_func_setpgid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
+if test "x$ac_cv_func_setpriority" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
+if test "x$ac_cv_func_strerror" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
+if test "x$ac_cv_func_strstr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+if test "x$ac_cv_func_sysconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
+if test "x$ac_cv_func_wcwidth" = xyes
+then :
+ printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
+printf %s "checking whether getpgrp requires zero arguments... " >&6; }
+if test ${ac_cv_func_getpgrp_void+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# Use it with a single arg.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
getpgrp (0);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_func_getpgrp_void=no
-else
+else $as_nop
ac_cv_func_getpgrp_void=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
-$as_echo "$ac_cv_func_getpgrp_void" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
+printf "%s\n" "$ac_cv_func_getpgrp_void" >&6; }
if test $ac_cv_func_getpgrp_void = yes; then
-$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
+printf "%s\n" "#define GETPGRP_VOID 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
-$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
-if ${ac_cv_func_mbrtowc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
+printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
+if test ${ac_cv_func_mbrtowc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
int
-main ()
+main (void)
{
wchar_t wc;
char const s[] = "";
@@ -7511,79 +8707,83 @@ wchar_t wc;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_mbrtowc=yes
-else
+else $as_nop
ac_cv_func_mbrtowc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
-$as_echo "$ac_cv_func_mbrtowc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
+printf "%s\n" "$ac_cv_func_mbrtowc" >&6; }
if test $ac_cv_func_mbrtowc = yes; then
-$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
fi
-if test "x${cross_compiling}" != xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
-$as_echo_n "checking whether setpgrp takes no argument... " >&6; }
-if ${ac_cv_func_setpgrp_void+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "x${cross_compiling}" != xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setpgrp requires zero arguments" >&5
+printf %s "checking whether setpgrp requires zero arguments... " >&6; }
+if test ${ac_cv_func_setpgrp_void+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Call it with two arguments.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
-/* If this system has a BSD-style setpgrp which takes arguments,
- setpgrp(1, 1) will fail with ESRCH and return -1, in that case
- exit successfully. */
- return setpgrp (1,1) != -1;
+setpgrp(0, 0);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_func_setpgrp_void=no
-else
+else $as_nop
ac_cv_func_setpgrp_void=yes
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
-$as_echo "$ac_cv_func_setpgrp_void" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
+printf "%s\n" "$ac_cv_func_setpgrp_void" >&6; }
if test $ac_cv_func_setpgrp_void = yes; then
-$as_echo "#define SETPGRP_VOID 1" >>confdefs.h
+printf "%s\n" "#define SETPGRP_VOID 1" >>confdefs.h
fi
-else
+else $as_nop
ac_cv_func_setpgrp_void=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
-$as_echo_n "checking for working strcoll... " >&6; }
-if ${ac_cv_func_strcoll_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_strcoll_works=no
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
+printf %s "checking for working strcoll... " >&6; }
+if test ${ac_cv_func_strcoll_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in # ((
+ # Guess yes on glibc systems.
+ *-gnu*) ac_cv_func_strcoll_works=yes ;;
+ # If we don't know, assume the worst.
+ *) ac_cv_func_strcoll_works=no ;;
+ esac
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
return (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 ||
@@ -7592,9 +8792,10 @@ return (strcoll ("abc", "def") >= 0 ||
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_strcoll_works=yes
-else
+else $as_nop
ac_cv_func_strcoll_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -7602,68 +8803,124 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
-$as_echo "$ac_cv_func_strcoll_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
+printf "%s\n" "$ac_cv_func_strcoll_works" >&6; }
if test $ac_cv_func_strcoll_works = yes; then
-$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
+
+fi
+
+
+if test x"$ac_cv_func_sbrk" = x"yes"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5
+printf %s "checking for working sbrk... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unknown - cross compiling" >&5
+printf "%s\n" "unknown - cross compiling" >&6; }
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+
+int
+main (void)
+{
+
+return sbrk(2048) == (void*)-1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+printf "%s\n" "#define HAVE_WORKING_SBRK 1" >>confdefs.h
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; use system malloc" >&5
+printf "%s\n" "no; use system malloc" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: sbrk not present; use system malloc" >&5
+printf "%s\n" "$as_me: sbrk not present; use system malloc" >&6;}
+fi
-if test "$have_setlocale" != no; then
+if test "$have_setlocale" != no
+then :
# Check whether --enable-nls was given.
-if test "${enable_nls+set}" = set; then :
+if test ${enable_nls+y}
+then :
enableval=$enable_nls;
-else
+else $as_nop
enable_nls=yes
fi
- if test "x$enable_nls" != xno; then
+ if test "x$enable_nls" != xno
+then :
-$as_echo "#define NLS 1" >>confdefs.h
+printf "%s\n" "#define NLS 1" >>confdefs.h
- fi
+fi
fi
-if test "x$enable_nls" != xno -a "$have_catgets" != no -a -n "$GENCAT" ; then
+if { test "x$enable_nls" != xno &&
+ test "$have_catgets" != no &&
+ test -n "$GENCAT"; }
+then :
# Check whether --enable-nls-catalogs was given.
-if test "${enable_nls_catalogs+set}" = set; then :
+if test ${enable_nls_catalogs+y}
+then :
enableval=$enable_nls_catalogs;
-else
+else $as_nop
enable_nls_catalogs=yes
fi
- if test "x$enable_nls_catalogs" != xno; then
- BUILD_CATALOGS="yes"
+ if test "x$enable_nls_catalogs" != xno
+then :
+ BUILD_CATALOGS="yes"
-$as_echo "#define NLS_CATALOGS 1" >>confdefs.h
+printf "%s\n" "#define NLS_CATALOGS 1" >>confdefs.h
- fi
+fi
fi
# Check whether --with-hesiod was given.
-if test "${with_hesiod+set}" = set; then :
+if test ${with_hesiod+y}
+then :
withval=$with_hesiod; hesiod="$withval"
-else
+else $as_nop
hesiod=no
fi
-if test "$hesiod" != no; then
+if test "$hesiod" != no
+then :
HESLIB="-lhesiod"
- ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
-if test "x$ac_cv_func_res_send" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
+if test "x$ac_cv_func_res_send" = xyes
+then :
:
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
-$as_echo_n "checking for res_send in -lresolv... " >&6; }
-if ${ac_cv_lib_resolv_res_send+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
+printf %s "checking for res_send in -lresolv... " >&6; }
+if test ${ac_cv_lib_resolv_res_send+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7672,46 +8929,46 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char res_send ();
int
-main ()
+main (void)
{
return res_send ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_resolv_res_send=yes
-else
+else $as_nop
ac_cv_lib_resolv_res_send=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
-$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
-if test "x$ac_cv_lib_resolv_res_send" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
+printf "%s\n" "$ac_cv_lib_resolv_res_send" >&6; }
+if test "x$ac_cv_lib_resolv_res_send" = xyes
+then :
HESLIB="$HESLIB -lresolv"
fi
fi
- HESDEF=-DHESIOD
- if test "$hesiod" != yes; then
- HESDEF="$HESDEF -I$hesiod/include"
- HESLIB="-L$hesiod/lib $HESLIB"
- fi
+ HESDEF=-DHESIOD
+ if test "$hesiod" != yes
+then :
+ HESDEF="$HESDEF -I$hesiod/include"
+ HESLIB="-L$hesiod/lib $HESLIB"
+fi
fi
-ac_config_files="$ac_config_files Makefile nls/Makefile"
+ac_config_files="$ac_config_files Makefile dch-template nls/Makefile patchlevel.h tcsh.man"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -7740,8 +8997,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -7771,15 +9028,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -7793,8 +9050,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -7811,7 +9068,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -7827,8 +9084,8 @@ LTLIBOBJS=$ac_ltlibobjs
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -7851,14 +9108,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -7868,46 +9127,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -7916,13 +9175,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -7931,8 +9183,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -7944,30 +9200,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -7980,13 +9216,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -8013,18 +9250,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -8036,12 +9275,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -8072,7 +9312,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -8094,6 +9334,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -8107,6 +9351,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -8148,7 +9398,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -8157,7 +9407,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8219,8 +9469,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.22.04, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by Tcsh $as_me 6.24.07, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -8279,17 +9529,20 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <https://bugs.astron.com/>."
+Report bugs to <https://bugs.astron.com/>.
+Tcsh home page: <https://www.tcsh.org/>."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-tcsh config.status 6.22.04
-configured by $0, generated by GNU Autoconf 2.69,
+Tcsh config.status 6.24.07
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -8327,15 +9580,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -8343,7 +9596,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -8352,7 +9605,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -8380,7 +9633,7 @@ 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
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -8394,7 +9647,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -8402,6 +9655,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
+ac_cv_exeext="$ac_cv_exeext"
_ACEOF
@@ -8415,7 +9669,10 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"./atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS ./atconfig" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "dch-template") CONFIG_FILES="$CONFIG_FILES dch-template" ;;
"nls/Makefile") CONFIG_FILES="$CONFIG_FILES nls/Makefile" ;;
+ "patchlevel.h") CONFIG_FILES="$CONFIG_FILES patchlevel.h" ;;
+ "tcsh.man") CONFIG_FILES="$CONFIG_FILES tcsh.man" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -8427,9 +9684,9 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -8765,7 +10022,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -8773,17 +10030,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -8800,7 +10057,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8824,9 +10081,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -8883,8 +10140,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -8927,9 +10184,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -8945,27 +10202,27 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -8974,7 +10231,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
"./atconfig":C) cat >./atconfig <<ATEOF
# Configurable variable values for building test suites.
# Generated by $0.
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2021 Free Software Foundation, Inc.
# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
at_testdir='.'
@@ -8989,6 +10246,8 @@ abs_top_builddir='$ac_abs_top_builddir'
# Backward compatibility with Autotest <= 2.59b:
at_top_builddir=\$at_top_build_prefix
+
+EXEEXT='$ac_cv_exeext'
AUTOTEST_PATH='.'
SHELL=\${CONFIG_SHELL-'$SHELL'}
@@ -9028,7 +10287,53 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ========= Configuration results =========" >&5
+printf "%s\n" "$as_me: ========= Configuration results =========" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: BUILD_CATALOGS $BUILD_CATALOGS" >&5
+printf "%s\n" "$as_me: BUILD_CATALOGS $BUILD_CATALOGS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CC $CC" >&5
+printf "%s\n" "$as_me: CC $CC" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CC_FOR_GETHOST $CC_FOR_GETHOST" >&5
+printf "%s\n" "$as_me: CC_FOR_GETHOST $CC_FOR_GETHOST" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS $CFLAGS" >&5
+printf "%s\n" "$as_me: CFLAGS $CFLAGS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPP $CPP" >&5
+printf "%s\n" "$as_me: CPP $CPP" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS $CPPFLAGS" >&5
+printf "%s\n" "$as_me: CPPFLAGS $CPPFLAGS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: DFLAGS $DFLAGS" >&5
+printf "%s\n" "$as_me: DFLAGS $DFLAGS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: HESDEF $HESDEF" >&5
+printf "%s\n" "$as_me: HESDEF $HESDEF" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: HESLIB $HESLIB" >&5
+printf "%s\n" "$as_me: HESLIB $HESLIB" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS $LDFLAGS" >&5
+printf "%s\n" "$as_me: LDFLAGS $LDFLAGS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: LIBICONV $LIBICONV" >&5
+printf "%s\n" "$as_me: LIBICONV $LIBICONV" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: LIBS $LIBS" >&5
+printf "%s\n" "$as_me: LIBS $LIBS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_CHANGELOG_DATE $PACKAGE_CHANGELOG_DATE" >&5
+printf "%s\n" "$as_me: PACKAGE_CHANGELOG_DATE $PACKAGE_CHANGELOG_DATE" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_DATE $PACKAGE_DATE" >&5
+printf "%s\n" "$as_me: PACKAGE_DATE $PACKAGE_DATE" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_ENGLISH_DATE $PACKAGE_ENGLISH_DATE" >&5
+printf "%s\n" "$as_me: PACKAGE_ENGLISH_DATE $PACKAGE_ENGLISH_DATE" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_PATCHLEVEL $PACKAGE_PATCHLEVEL" >&5
+printf "%s\n" "$as_me: PACKAGE_PATCHLEVEL $PACKAGE_PATCHLEVEL" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_REV $PACKAGE_REV" >&5
+printf "%s\n" "$as_me: PACKAGE_REV $PACKAGE_REV" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_VERS $PACKAGE_VERS" >&5
+printf "%s\n" "$as_me: PACKAGE_VERS $PACKAGE_VERS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: PACKAGE_VERSION $PACKAGE_VERSION" >&5
+printf "%s\n" "$as_me: PACKAGE_VERSION $PACKAGE_VERSION" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: tcsh_config_file system/$tcsh_config_file" >&5
+printf "%s\n" "$as_me: tcsh_config_file system/$tcsh_config_file" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: =========================================" >&5
+printf "%s\n" "$as_me: =========================================" >&6;}
diff --git a/configure.ac b/configure.ac
index 23d0dc2f8b80..e313a941012d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,318 +1,373 @@
dnl Autoconf script for tcsh
dnl To rebuild the `configure' script from this, execute the command
-dnl autoconf
+dnl autoreconf
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.
-AC_PREREQ([2.59])dnl Minimum Autoconf version required.
-AC_INIT([tcsh], [6.22.04], [https://bugs.astron.com/])
+dnl
+dnl UPDATE THIS SECTION FOR RELEASE
+dnl
+AC_DEFUN([TCSH_VERSION], [6.24.07])
+AC_DEFUN([TCSH_DATE], [2022-12-21])
+
+AC_PREREQ([2.69])dnl Minimum Autoconf version required.
+AC_INIT([Tcsh],TCSH_VERSION,[https://bugs.astron.com/],,[https://www.tcsh.org/])
+
+AC_SUBST(PACKAGE_DATE, TCSH_DATE)
+AC_SUBST(PACKAGE_ORIGIN, [Astron])
+AC_SUBST(PACKAGE_MAILLIST, [https://mailman.astron.com/mailman/listinfo/tcsh])
+
+package_year="${PACKAGE_DATE%%-*}"
+package_month="${PACKAGE_DATE#*-}"
+package_month="${package_month%-*}"
+package_day="${PACKAGE_DATE##*-}"
+package_day="${package_day#0}"
+
+AS_CASE([${package_month}],
+[01], [package_month_name=January],
+[02], [package_month_name=February],
+[03], [package_month_name=March],
+[04], [package_month_name=April],
+[05], [package_month_name=May],
+[06], [package_month_name=June],
+[07], [package_month_name=July],
+[08], [package_month_name=August],
+[09], [package_month_name=September],
+[10], [package_month_name=October],
+[11], [package_month_name=November],
+[12], [package_month_name=December])
+
+PACKAGE_ENGLISH_DATE="${package_month_name} ${package_day}, ${package_year}"
+AC_SUBST(PACKAGE_ENGLISH_DATE)
+
+package_changelog_date_format='+%a, %d %b %Y %T %z'
+AC_SUBST(PACKAGE_CHANGELOG_DATE)
+
+PACKAGE_REV="${PACKAGE_VERSION%%.*}"
+AC_SUBST(PACKAGE_REV)
+
+PACKAGE_VERS="${PACKAGE_VERSION#*.}"
+PACKAGE_VERS="${PACKAGE_VERS%.*}"
+AC_SUBST(PACKAGE_VERS)
+
+PACKAGE_PATCHLEVEL="${PACKAGE_VERSION##*.}"
+AC_SUBST(PACKAGE_PATCHLEVEL)
+
+AC_CONFIG_AUX_DIR([acaux])
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_PROG_INSTALL()
+AC_CANONICAL_HOST()
-AM_ICONV
+AM_ICONV()
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
+AS_IF([{ test x"${ac_cv_host_system_type+set}" = x"set" &&
+ test x"$ac_cv_host_system_type" != x"$host"; }],
+ [AC_MSG_RESULT([different])
+ AC_MSG_ERROR([remove config.cache and re-run configure])],
+ [AC_MSG_RESULT(ok)])
ac_cv_host_system_type="$host"
-
-changequote(, )dnl
-
-case "${host}" in
+AS_CASE([${host}],
+ [*-*-darwin*|*-*-freebsd*|*-*-rhapsody*], [dnl
+ PACKAGE_CHANGELOG_DATE="$(
+ TZ=UTC date -v0H -v0M -v0S \
+ -v${package_year}y \
+ -v${package_month}m \
+ -v${package_day}d \
+ "${package_changelog_date_format}"
+ )"],
+ [*-*-openbsd*], [dnl
+ PACKAGE_CHANGELOG_DATE="$(
+ TZ=UTC date -j \
+ "${package_changelog_date_format}" \
+ ${package_year}${package_month}${package_day}0000
+ )"],
+
+ # Default: NetBSD, GNU core utilities (i.e. most Linux)
+ [dnl
+ PACKAGE_CHANGELOG_DATE="$(
+ TZ=UTC date -d ${PACKAGE_DATE} \
+ "${package_changelog_date_format}"
+ )"])
+
+AS_CASE([${host}],
## Alpha (DEC) machines.
- alpha*-dec-osf* )
+ [alpha*-dec-osf*], [dnl
tcsh_config_file=decosf1
- ;;
+ ],
## Ultrix
- *-dec-ultrix* )
+ [*-dec-ultrix*], [dnl
tcsh_config_file=ultrix
- ;;
+ ],
## DGUX
- *-dg-dguxR4* )
+ [*-dg-dguxR4*], [dnl
tcsh_config_file=dgux5.4
- ;;
- m88k-dg-dgux5.4R* )
+ ],
+ [m88k-dg-dgux5.4R*], [dnl
tcsh_config_file=dgux5.4
- ;;
+ ],
## HP/UX
- *-hp-hpux7* )
+ [*-hp-hpux7*], [dnl
tcsh_config_file=hpux7
- ;;
- *-hp-hpux[89]* )
+ ],
+ [*-hp-hpux@<:@89@:>@*], [dnl
tcsh_config_file=hpux8
- ;;
- *-hp-hpux1[0-9]* )
+ ],
+ [*-hp-hpux1@<:@0-9@:>@*], [dnl
tcsh_config_file=hpux11
- ;;
+ ],
## IBM AIX systems
- *-ibm-aix*)
+ [*-ibm-aix*], [dnl
tcsh_config_file=aix
- ;;
+ ],
## SX-4
- sx4-nec-*)
+ [sx4-nec-*], [dnl
CC='cc -h0,ansi,novector,float0'
LDFLAGS='-Gsmall'
tcsh_config_file=superux8
- ;;
+ ],
## IBM OS/390 systems
- *-ibm-os390*)
+ [*-ibm-os390*], [dnl
CC='c89'
tcsh_config_file=os390
- ;;
+ ],
## Android
- *-*-android*)
+ [*-*-android*], [dnl
tcsh_config_file=android
- ;;
+ ],
## Linux
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ [*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu], [dnl
tcsh_config_file=linux
- ;;
+ ],
## Motorola systems
- m68k-motorola-sysv* )
+ [m68k-motorola-sysv*], [dnl
tcsh_config_file=sysV68
- ;;
- m88k-motorola-sysv3* )
+ ],
+ [m88k-motorola-sysv3*], [dnl
tcsh_config_file=sysV88
- ;;
+ ],
## Minix systems
- *-*-minix*)
+ [*-*-minix*], [dnl
tcsh_config_file=minix
- ;;
+ ],
## NetBSD systems
- *-*-netbsd*)
+ [*-*-netbsd*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## FreeBSD systems
- *-*-freebsd*)
+ [*-*-freebsd*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## MidnightBSD systems
- *-*-midnightbsd*)
+ [*-*-midnightbsd*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## DragonFlyBSD systems
- *-*-dragonfly*)
+ [*-*-dragonfly*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## MirBSD systems
- *-*-mirbsd*)
+ [*-*-mirbsd*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## OpenBSD systems
- *-*-openbsd*)
+ [*-*-openbsd*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## BSDI systems
- *-*-bsdi*)
+ [*-*-bsdi*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## Mac OS X Server
- *-*-rhapsody* )
+ [*-*-rhapsody*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## Mac OS X Server
- *-*-darwin* )
+ [*-*-darwin*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## DragonFly systems
- *-*-dragonfly*)
+ [*-*-dragonfly*], [dnl
tcsh_config_file=bsd4.4
- ;;
+ ],
## Silicon Graphics machines
- *-sgi-iri* )
+ [*-sgi-iri*], [dnl
tcsh_config_file=irix
- case "${host_os}" in
- irix[34]*) # Irix-3.x - Irix 4.x
+ AS_CASE([${host_os}],
+ [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
+ ],
+ [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
- ;;
+ ],
+ [irix6.@<:@2-9@:>@*], [# Irix 6.2 and later
+ tcsh_config_file=irix62
+ ])
+ ],
## Suns
- *-sun-sunos3* )
+ [*-sun-sunos3*], [dnl
tcsh_config_file=sunos35
- ;;
- *-sun-sunos4.0* )
+ ],
+ [*-sun-sunos4.0*], [dnl
tcsh_config_file=sunos40
- ;;
- *-sun-sunos4.1.[12]* )
+ ],
+ [*-sun-sunos4.1.@<:@12@:>@*], [dnl
tcsh_config_file=sunos41
- ;;
- *-sun-sunos4.1.[3456]* )
+ ],
+ [*-sun-sunos4.1.@<:@3456@:>@*], [dnl
tcsh_config_file=sunos413
- ;;
- *-*-solaris2.[01] ) # Should handle sparc or x86
+ ],
+ [*-*-solaris2.@<:@01@:>@], [# Should handle sparc or x86
tcsh_config_file=sol2
- ;;
- *-sun-solaris2.2 ) # Sparc only release
+ ],
+ [*-sun-solaris2.2], [# Sparc only release
tcsh_config_file=sol22
- ;;
- *-sun-solaris2.3 ) # Sparc only release
+ ],
+ [*-sun-solaris2.3], [# Sparc only release
tcsh_config_file=sol23
- ;;
- *-*-solaris2.[45] ) # Should handle sparc, x86 and powerpc
+ ],
+ [*-*-solaris2.@<:@45@:>@], [# Should handle sparc, x86 and powerpc
tcsh_config_file=sol24
- ;;
- *-*-solaris2.[678] ) # Should handle sparc, x86 and powerpc
+ ],
+ [*-*-solaris2.@<:@678@:>@], [# Should handle sparc, x86 and powerpc
tcsh_config_file=sol26
- ;;
- *-*-solaris2.* ) # Should handle sparc, x86 and powerpc
+ ],
+ [*-*-solaris2.*], [# Should handle sparc, x86 and powerpc
tcsh_config_file=sol29
- ;;
+ ],
## Dell SVR4
- *-dell-sysv4* )
+ [*-dell-sysv4*], [dnl
tcsh_config_file=sysv4
DFLAGS="$DFLAGS -DDELL"
- ;;
+ ],
## SVR4 (Generic and otherwise)
- *-*-sysv4* )
+ [*-*-sysv4*], [dnl
tcsh_config_file=sysv4
- ;;
+ ],
## Tektronix systems
- m68k-tektronix-bsd* )
+ [m68k-tektronix-bsd*], [dnl
tcsh_config_file=bsd
NON_GNU_DFLAGS='-DBSD -DUTek'
- ;;
- m88k-tektronix-sysv3* )
+ ],
+ [m88k-tektronix-sysv3*], [dnl
tcsh_config_file=tekXD88
- ;;
+ ],
## SCO
- *-sco3.2v5*)
+ [*-sco3.2v5*], [dnl
tcsh_config_file=sco32v5
- ;;
- *-sco3.2v4*)
+ ],
+ [*-sco3.2v4*], [dnl
tcsh_config_file=sco32v4
- ;;
- *-sco3.2v2*)
+ ],
+ [*-sco3.2v2*], [dnl
tcsh_config_file=sco32v2
- ;;
+ ],
## Siemens BS2000 Mainframe
- bs2000-siemens-*)
+ [bs2000-siemens-*], [dnl
tcsh_config_file=bs2000
- ;;
+ ],
## Convex
- *-convex*)
+ [*-convex*], [dnl
tcsh_config_file=convex
- ;;
+ ],
## Cray
- *-cray-unicos*)
+ [*-cray-unicos*], [dnl
tcsh_config_file=cray
- ;;
+ ],
## Red Hat Cygwin
- *-cygwin)
+ [*-cygwin], [dnl
tcsh_config_file=cygwin
- ;;
+ ],
## mips-compaq-nonstopux
- *-*-nonstopux)
+ [*-*-nonstopux], [dnl
tcsh_config_file=sysv4
- ;;
+ ],
## Apollo Domain/OS
- *-apollo-*)
+ [*-apollo-*], [dnl
tcsh_config_file=apollo
- ;;
+ ],
## QNX6
- *-qnx6*)
+ [*-qnx6*], [dnl
tcsh_config_file=qnx6
- ;;
+ ],
- * )
- changequote([, ])dnl
- AC_MSG_ERROR([Tcsh can't guess the configuration file name
+ [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
- ;;
+Check tcsh's `Ported' file for manual configuration instructions.])])
-esac
+AC_MSG_NOTICE([using configuration file `$tcsh_config_file'])
+cp ${srcdir}/system/${tcsh_config_file} config_p.h
-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_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
+AS_IF([test "x${cross_compiling}" = xyes],
+ [CC_FOR_GETHOST="cc"],
+ [CC_FOR_GETHOST="\$(CC)"])
AC_SUBST(CC_FOR_GETHOST)
-if test "x$GCC" != xyes ; then
- DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
- CFLAGS="$CFLAGS $NON_GNU_CFLAGS"
-fi
+AS_IF([test "x$GCC" != xyes],
+ [DFLAGS="$DFLAGS $NON_GNU_DFLAGS"
+ CFLAGS="$CFLAGS $NON_GNU_CFLAGS"])
dnl More recent Android requires PIEs
-case "${host}" in
- *-*-android*)
+AS_CASE([${host}],
+ [*-*-android*], [dnl
CFLAGS="${CFLAGS} -fPIE"
LDFLAGS="${LDFLAGS} -pie"
- ;;
-esac
+])
dnl Checks for libraries
AC_SEARCH_LIBS(crypt, crypt)
@@ -326,47 +381,44 @@ AC_SEARCH_LIBS(catgets, catgets)
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])
+ [shadow.h stdint.h utmp.h utmpx.h])
AC_CHECK_HEADERS([wchar.h],
- [AC_CHECK_SIZEOF([wchar_t], [], [dnl
+ [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
+#include <wchar.h>
+])
+ AC_CHECK_HEADERS([wctype.h])])
+AC_HEADER_DIRENT()
+AC_HEADER_STAT()
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_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>.]),
-[
+AC_DEFINE(ssize_t, int, [Define to `int' not defined in <sys/types.h>.]), [dnl
#include <sys/types.h>
])
])
-AC_TYPE_SSIZE_T
+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.]),
-[
+AC_DEFINE(socklen_t, int, [Define to `int' if neither <sys/types.h> nor <sys/socket.h> define.]), [dnl
#include <sys/types.h>
#include <sys/socket.h>
])
])
-AC_TYPE_SOCKLEN_T
-
+AC_TYPE_SOCKLEN_T()
dnl Checks for structures
-AC_CHECK_MEMBERS([struct dirent.d_ino], , ,
-[#ifdef HAVE_DIRENT_H
+AC_CHECK_MEMBERS([struct dirent.d_ino], , , [dnl
+#ifdef HAVE_DIRENT_H
# include <dirent.h>
#else
# ifdef HAVE_NDIR_H
@@ -375,29 +427,32 @@ AC_CHECK_MEMBERS([struct dirent.d_ino], , ,
# include <sys/dir.h>
# endif
# define dirent direct
-#endif])
+#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>
+ struct utmp.ut_xtime, struct utmpx.ut_host,
+ struct utmpx.ut_user, struct utmpx.ut_tv,
+ struct utmpx.ut_xtime], , , [dnl
+#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>])
+#endif
+])
+AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], , , [dnl
+#include <sys/types.h>
+#include <sys/socket.h>
+])
dnl Checks for compiler characteristics
-AC_C_CONST
-AC_C_VOLATILE
+AC_C_CONST()
+AC_C_VOLATILE()
dnl checks for library functions
-AC_CHECK_DECLS([crypt, environ, gethostname, getpgrp], , ,
-[#include "config_p.h"
+AC_CHECK_DECLS([crypt, environ, gethostname, getpgrp], , , [dnl
+#include "config_p.h"
AC_INCLUDES_DEFAULT([])
#ifdef HAVE_CRYPT_H
#include <crypt.h>
@@ -406,24 +461,34 @@ AC_INCLUDES_DEFAULT([])
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
+ [getutent getutxent mallinfo mallinfo2 mblen memmove memset] dnl
+ [mkstemp nice setproctitle] dnl
+ [nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth])
+AC_FUNC_GETPGRP()
+AC_FUNC_MBRTOWC()
+AS_IF([test "x${cross_compiling}" != xyes],
+ [AC_FUNC_SETPGRP()],
+ [ac_cv_func_setpgrp_void=yes])
+AC_FUNC_STRCOLL()
+
+AS_IF([test x"$ac_cv_func_sbrk" = x"yes"],
+ [AC_MSG_CHECKING([for working sbrk])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <unistd.h>
+]], [[
+return sbrk(2048) == (void*)-1;
+]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_WORKING_SBRK], [1], [Define to 1 if sbrk(N) works.])],
+ [AC_MSG_RESULT([no; use system malloc])],
+ [AC_MSG_RESULT([unknown - cross compiling])])],
+ [AC_MSG_NOTICE([sbrk not present; use system malloc])])
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 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
@@ -431,7 +496,7 @@ 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 break
dnl fi
dnl done])dnl
dnl AC_MSG_RESULT($ipv6_cv_dir)
@@ -446,8 +511,8 @@ 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 ipv6_libinet6=yes
+dnl LIBS="$LIBS -linet6"
dnl fi],)dnl
dnl if test $ipv6_libinet6 = no; then
dnl LDFLAGS="$SAVELDFLAGS"
@@ -466,39 +531,59 @@ 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
+AS_IF([test "$have_setlocale" != no],
+ [AC_ARG_ENABLE([nls], AS_HELP_STRING([--disable-nls], [Disable NLS support]),
+ [], [enable_nls=yes])
+ AS_IF([test "x$enable_nls" != xno],
+ [AC_DEFINE([NLS], [1], [Support NLS.])])])
+
+AS_IF([{ test "x$enable_nls" != xno &&
+ test "$have_catgets" != no &&
+ test -n "$GENCAT"; }],
+ [AC_ARG_ENABLE([nls-catalogs],
+ AS_HELP_STRING([--disable-nls-catalogs], [Disable NLS catalog support]),
+ [], [enable_nls_catalogs=yes])
+ AS_IF([test "x$enable_nls_catalogs" != xno],
+ [BUILD_CATALOGS="yes"
+ AC_DEFINE([NLS_CATALOGS], [1], [Support NLS catalogs.])])])
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
+AS_IF([test "$hesiod" != no],
+ [HESLIB="-lhesiod"
+ AC_CHECK_FUNC(res_send, :,
+ AC_CHECK_LIB(resolv, res_send, HESLIB="$HESLIB -lresolv"))
+ HESDEF=-DHESIOD
+ AS_IF([test "$hesiod" != yes],
+ [HESDEF="$HESDEF -I$hesiod/include"
+ HESLIB="-L$hesiod/lib $HESLIB"])])
AC_SUBST(HESDEF)
AC_SUBST(HESLIB)
AC_SUBST(BUILD_CATALOGS)
-AC_CONFIG_FILES([Makefile nls/Makefile])
-AC_OUTPUT
+AC_CONFIG_FILES([Makefile dch-template nls/Makefile patchlevel.h tcsh.man])
+AC_OUTPUT()
+
+AC_MSG_NOTICE([========= Configuration results =========])
+AC_MSG_NOTICE([BUILD_CATALOGS $BUILD_CATALOGS])
+AC_MSG_NOTICE([CC $CC])
+AC_MSG_NOTICE([CC_FOR_GETHOST $CC_FOR_GETHOST])
+AC_MSG_NOTICE([CFLAGS $CFLAGS])
+AC_MSG_NOTICE([CPP $CPP])
+AC_MSG_NOTICE([CPPFLAGS $CPPFLAGS])
+AC_MSG_NOTICE([DFLAGS $DFLAGS])
+AC_MSG_NOTICE([HESDEF $HESDEF])
+AC_MSG_NOTICE([HESLIB $HESLIB])
+AC_MSG_NOTICE([LDFLAGS $LDFLAGS])
+AC_MSG_NOTICE([LIBICONV $LIBICONV])
+AC_MSG_NOTICE([LIBS $LIBS])
+AC_MSG_NOTICE([PACKAGE_CHANGELOG_DATE $PACKAGE_CHANGELOG_DATE])
+AC_MSG_NOTICE([PACKAGE_DATE $PACKAGE_DATE])
+AC_MSG_NOTICE([PACKAGE_ENGLISH_DATE $PACKAGE_ENGLISH_DATE])
+AC_MSG_NOTICE([PACKAGE_PATCHLEVEL $PACKAGE_PATCHLEVEL])
+AC_MSG_NOTICE([PACKAGE_REV $PACKAGE_REV])
+AC_MSG_NOTICE([PACKAGE_VERS $PACKAGE_VERS])
+AC_MSG_NOTICE([PACKAGE_VERSION $PACKAGE_VERSION])
+AC_MSG_NOTICE([tcsh_config_file system/$tcsh_config_file])
+AC_MSG_NOTICE([=========================================])
diff --git a/cygwin/csh.cshrc b/cygwin/csh.cshrc
index d59f30f1bd55..be0ec5d9bbef 100644
--- a/cygwin/csh.cshrc
+++ b/cygwin/csh.cshrc
@@ -3,16 +3,6 @@
#
onintr -
-if ( -d /etc/profile.d ) then
- set nonomatch
- foreach _s ( /etc/profile.d/*.csh )
- if ( -r $_s ) then
- source $_s
- endif
- end
- unset _s nonomatch
-endif
-
if (! ${?prompt}) goto end
# This is an interactive session
diff --git a/cygwin/csh.login b/cygwin/csh.login
index 876b3e33c140..a92327a11596 100644
--- a/cygwin/csh.login
+++ b/cygwin/csh.login
@@ -4,7 +4,21 @@
unsetenv TEMP
unsetenv TMP
-set path=( /usr/local/bin /usr/bin /bin $path:q )
+set winpath = ( $path:q )
+if ( ${?CYGWIN_NOWINPATH} ) then
+ set path=( /usr/bin )
+else
+ set path=( /usr/bin $path:q )
+endif
+if ( -d /etc/profile.d ) then
+ set nonomatch
+ foreach _s ( /etc/profile.d/*.csh )
+ if ( -r $_s ) then
+ source $_s
+ endif
+ end
+ unset _s nonomatch
+endif
if ( ! ${?USER} ) then
set user="`id -un`"
diff --git a/ed.chared.c b/ed.chared.c
index 2a8689713399..3792000a523d 100644
--- a/ed.chared.c
+++ b/ed.chared.c
@@ -44,8 +44,8 @@
# echo h<press key bound to dabbrev-expande>
# echo hello\ world<cursor>
- The same problem occured if spaces were present in a string withing quotation
- marks. Example:
+ The same problem occurred if spaces were present in a string withing
+ quotation marks. Example:
# echo "hello world"
hello world
@@ -126,7 +126,7 @@ static void c_get_word (Char **, Char **);
#endif
static Char *c_preword (Char *, Char *, int, Char *);
static Char *c_nexword (Char *, Char *, int);
-static Char *c_endword (Char *, Char *, int, Char *);
+static Char *c_endword (Char *, Char *, Char *, int, Char *);
static Char *c_eword (Char *, Char *, int);
static void c_push_kill (Char *, Char *);
static void c_save_inputbuf (void);
@@ -266,7 +266,7 @@ c_preword(Char *p, Char *low, int n, Char *delim)
while (new < p) {
prev = new;
- new = c_endword(prev-1, p, 1, delim); /* Skip to next non-word char */
+ new = c_endword(prev-1, low, p, 1, delim); /* Skip to next non-word char */
new++; /* Step away from end of word */
while (new <= p) { /* Skip trailing non-word chars */
if (!Strchr(delim, *new) || (new > prev && new[-1] == (Char)'\\'))
@@ -788,7 +788,7 @@ c_delfini(void) /* Finish up delete action */
}
static Char *
-c_endword(Char *p, Char *high, int n, Char *delim)
+c_endword(Char *p, Char *low, Char *high, int n, Char *delim)
{
Char inquote = 0;
p++;
@@ -801,13 +801,14 @@ c_endword(Char *p, Char *high, int n, Char *delim)
}
while (p < high) { /* Skip string */
if ((*p == (Char)'\'' || *p == (Char)'"')) { /* Quotation marks? */
- if (inquote || p[-1] != (Char)'\\') { /* Should it be honored? */
+ /* Should it be honored? */
+ if (inquote || (p > low && p[-1] != (Char)'\\')) {
if (inquote == 0) inquote = *p;
else if (inquote == *p) inquote = 0;
}
}
/* Break if unquoted non-word char */
- if (!inquote && Strchr(delim, *p) && p[-1] != (Char)'\\')
+ if (!inquote && Strchr(delim, *p) && p > low && p[-1] != (Char)'\\')
break;
p++;
}
@@ -2205,7 +2206,7 @@ e_dabbrev_expand(Char c)
continue;
} else {
word++;
- len = c_endword(ncp-1, cp, 1, STRshwordsep) - ncp + 1;
+ len = c_endword(ncp-1, InputBuf, cp, 1, STRshwordsep) - ncp + 1;
cp = ncp;
}
if (len > patbuf.len && Strncmp(cp, patbuf.s, patbuf.len) == 0) {
@@ -3567,7 +3568,7 @@ e_load_average(Char c)
#ifdef TIOCSTAT
/*
* Here we pass &c to the ioctl because some os's (NetBSD) expect it
- * there even if they don't use it. (lukem@netbsd.org)
+ * there even if they don't use it. (Luke Mewburn)
*/
if (ioctl(SHIN, TIOCSTAT, (ioctl_t) &c) < 0)
#endif
@@ -3605,7 +3606,7 @@ v_endword(Char c)
return(CC_ERROR);
/* else */
- Cursor = c_endword(Cursor, LastChar, Argument, STRshwspace);
+ Cursor = c_endword(Cursor, InputBuf, LastChar, Argument, STRshwspace);
if (ActionFlag & TCSHOP_DELETE)
{
diff --git a/ed.decls.h b/ed.decls.h
index ea36c6f3dd13..ce89c342ee76 100644
--- a/ed.decls.h
+++ b/ed.decls.h
@@ -276,7 +276,7 @@ extern void ResetXmap (void);
extern int DeleteXkey (const CStr *);
extern void PrintXkey (const CStr *);
extern void printOne (const Char *, const XmapVal *, int);
-extern eChar parseescape (const Char **);
+extern eChar parseescape (const Char **, int);
extern unsigned char *unparsestring (const CStr *, const Char *);
#endif /* _h_ed_decls */
diff --git a/ed.defns.c b/ed.defns.c
index f4030b530f6d..2a0932229b47 100644
--- a/ed.defns.c
+++ b/ed.defns.c
@@ -1860,7 +1860,7 @@ ed_InitMetaBindings(void)
AddXkey(&cstr, XmapCmd((int) map[CTL_ESC(i)]), XK_CMD);
}
}
- map[buf[0]] = F_XKEY;
+ map[(unsigned char)buf[0]] = F_XKEY;
}
void
diff --git a/ed.inputl.c b/ed.inputl.c
index 35f21a4e95a8..a0e66fcb20d7 100644
--- a/ed.inputl.c
+++ b/ed.inputl.c
@@ -668,9 +668,9 @@ int
GetCmdChar(Char ch)
{
#ifndef WINNT_NATIVE // We use more than 256 for various extended keys
- wint_t c = ch & CHAR;
+ eChar c = ch & CHAR;
#else
- wint_t c = ch;
+ eChar c = ch;
#endif
return c < NT_NUM_KEYS ? CurrentKeyMap[c] : F_INSERT;
}
diff --git a/ed.refresh.c b/ed.refresh.c
index c1f1cfb0b16f..183050e0b1cf 100644
--- a/ed.refresh.c
+++ b/ed.refresh.c
@@ -1136,6 +1136,39 @@ cpy_pad_spaces(Char *dst, Char *src, int width)
*dst = (Char) 0;
}
+static void
+CalcPosition(int w, int th, int *h, int *v)
+{
+ switch(w) {
+ case NLSCLASS_NL:
+ *h = 0;
+ (*v)++;
+ break;
+ case NLSCLASS_TAB:
+ while (++(*h) & 07)
+ ;
+ break;
+ case NLSCLASS_CTRL:
+ *h += 2;
+ break;
+ case NLSCLASS_ILLEGAL:
+ *h += 4;
+ break;
+ case NLSCLASS_ILLEGAL2:
+ case NLSCLASS_ILLEGAL3:
+ case NLSCLASS_ILLEGAL4:
+ case NLSCLASS_ILLEGAL5:
+ *h += 4 + 2 * NLSCLASS_ILLEGAL_SIZE(w);
+ break;
+ default:
+ *h += w;
+ }
+ if (*h >= th) { /* check, extra long tabs picked up here also */
+ *h -= th;
+ (*v)++;
+ }
+}
+
void
RefCursor(void)
{ /* only move to new cursor pos */
@@ -1154,65 +1187,13 @@ RefCursor(void)
}
w = NLSClassify(*cp & CHAR, cp == Prompt, 0);
cp++;
- switch(w) {
- case NLSCLASS_NL:
- h = 0;
- v++;
- break;
- case NLSCLASS_TAB:
- while (++h & 07)
- ;
- break;
- case NLSCLASS_CTRL:
- h += 2;
- break;
- case NLSCLASS_ILLEGAL:
- h += 4;
- break;
- case NLSCLASS_ILLEGAL2:
- case NLSCLASS_ILLEGAL3:
- case NLSCLASS_ILLEGAL4:
- h += 3 + 2 * NLSCLASS_ILLEGAL_SIZE(w);
- break;
- default:
- h += w;
- }
- if (h >= th) { /* check, extra long tabs picked up here also */
- h -= th;
- v++;
- }
+ CalcPosition(w, th, &h, &v);
}
for (cp = InputBuf; cp < Cursor;) { /* do input buffer to Cursor */
w = NLSClassify(*cp & CHAR, cp == InputBuf, 0);
cp++;
- switch(w) {
- case NLSCLASS_NL:
- h = 0;
- v++;
- break;
- case NLSCLASS_TAB:
- while (++h & 07)
- ;
- break;
- case NLSCLASS_CTRL:
- h += 2;
- break;
- case NLSCLASS_ILLEGAL:
- h += 4;
- break;
- case NLSCLASS_ILLEGAL2:
- case NLSCLASS_ILLEGAL3:
- case NLSCLASS_ILLEGAL4:
- h += 3 + 2 * NLSCLASS_ILLEGAL_SIZE(w);
- break;
- default:
- h += w;
- }
- if (h >= th) { /* check, extra long tabs picked up here also */
- h -= th;
- v++;
- }
+ CalcPosition(w, th, &h, &v);
}
/* now go there */
diff --git a/ed.xmap.c b/ed.xmap.c
index cc7d7054a229..f293825a4654 100644
--- a/ed.xmap.c
+++ b/ed.xmap.c
@@ -543,7 +543,7 @@ printOne(const Char *key, const XmapVal *val, int ntype)
struct KeyFuncs *fp;
static const char *fmt = "%s\n";
- xprintf("%-15S-> ", key);
+ xprintf("%-15" TCSH_S "-> ", key);
if (val != NULL)
switch (ntype) {
case XK_STR:
@@ -604,8 +604,60 @@ unparsech(struct Strbuf *buf, Char ch)
}
}
+static Char
+parse_hex_range(const Char **cp, size_t l)
+{
+ size_t ui = 0;
+ Char r = 0, c;
+
+ if (l > 8)
+ abort();
+
+ for (; (c = (**cp & CHAR)) != '\0' && ui < l && Isxdigit(c); (*cp)++, ui++) {
+ Char x = Isdigit(c) ? '0' : ((Isupper(c) ? 'A' : 'a') - 10);
+#ifndef IS_ASCII
+ c = _toascii(c);
+#endif
+ r <<= 4;
+ r |= c - x;
+ }
+ (*cp)--;
+#ifndef IS_ASCII
+ return _toebcdic[r & 0xff];
+#else
+ return r;
+#endif
+}
+
+static int
+okcontrol(Char c)
+{
+ return c && (isalpha(c & CHAR) || strchr("@^_?\\|[{]}", c));
+}
+
+static Char
+handlecontrol(Char c)
+{
+ Char o;
+#ifdef IS_ASCII
+ o = (c == '?') ? CTL_ESC('\177') : (c & 0237);
+#else
+ o = (c == '?') ? CTL_ESC('\177') : _toebcdic[_toascii[c] & 0237];
+ if (adrof(STRwarnebcdic))
+ xprintf(/*CGETS(9, 9, no NLS-String yet!*/
+ "Warning: Control character %s%c may be interpreted differently in EBCDIC.\n", "\\c", c /*)*/);
+#endif
+ return o;
+}
+
+/*
+ * The e parameter is false when we are doing echo and true when we are
+ * using it to parse other escaped strings. For echo, we don't print errors
+ * and we don't unescape backslashes that we don't understand. Perhaps we
+ * always not unescape backslashes we don't understand...
+ */
eChar
-parseescape(const Char **ptr)
+parseescape(const Char **ptr, int e)
{
const Char *p;
Char c;
@@ -613,7 +665,8 @@ parseescape(const Char **ptr)
p = *ptr;
if ((p[1] & CHAR) == 0) {
- xprintf(CGETS(9, 8, "Something must follow: %c\n"), (char)*p);
+ if (e)
+ xprintf(CGETS(9, 8, "Something must follow: %c\n"), (char)*p);
return CHAR_ERR;
}
if ((*p & CHAR) == '\\') {
@@ -625,6 +678,34 @@ parseescape(const Char **ptr)
case 'b':
c = CTL_ESC('\010'); /* Backspace */
break;
+ case 'c':
+ p++;
+ if ((*p & CHAR) == '\\') {
+ p++;
+ if ((*p & CHAR) != '\\') {
+out:
+ *ptr = p;
+ if (e)
+ xprintf(/*CGETS(9, 9, */
+ "Invalid escape sequence: %s%c\n"/*)*/, "\\c\\", (char)*p);
+ return CHAR_ERR;
+ }
+ c = (*p & CHAR) & 0237;
+ } else if (okcontrol(*p & CHAR)) {
+ c = handlecontrol(*p & CHAR);
+ } else { /* backward compat */
+ /*
+ * we allow a plain \c to mean no more output for echo,
+ * (e is FALSE) and return CHAR_EOF, but we require a
+ * control character for the rest of the cases.
+ */
+ if (e)
+ goto out;
+ /* point to the last character */
+ *ptr = p - 1;
+ return CHAR_EOF;
+ }
+ break;
case 'e':
c = CTL_ESC('\033'); /* Escape */
break;
@@ -646,6 +727,41 @@ parseescape(const Char **ptr)
case '\\':
c = '\\';
break;
+ case 'x':
+ p++;
+ if ((*p & CHAR) == '{' && Isxdigit(*(p + 1) & CHAR)) { /* \x{20ac} */
+ const Char *q = p - 2;
+ p++;
+ c = parse_hex_range(&p, 8);
+ if ((p[1] & CHAR) != '}') {
+ if (e)
+ xprintf("%s", /* CGETS(9, 9, */
+ "Missing closing brace");
+ p = q;
+ c = '\\';
+ break;
+ }
+ p++;
+ } else if (Isxdigit(*p & CHAR)) { /* \x9f */
+ c = parse_hex_range(&p, 2);
+ } else { /* backward compat */
+ c = '\\';
+ p -= 2;
+ }
+ break;
+ case 'u':
+ case 'U':
+ {
+ size_t limit = (*p & CHAR) == 'u' ? 4 : 8;
+ p++;
+ if (Isxdigit(*p & CHAR)) { /* \u20ac or \U000020ac */
+ c = parse_hex_range(&p, limit);
+ } else { /* backward compat */
+ c = '\\';
+ p -= 2;
+ }
+ }
+ break;
case '0':
case '1':
case '2':
@@ -667,35 +783,32 @@ parseescape(const Char **ptr)
val = (val << 3) | (ch - '0');
}
if ((val & ~0xff) != 0) {
- xprintf("%s", CGETS(9, 9,
+ if (e)
+ xprintf("%s", CGETS(9, 9,
"Octal constant does not fit in a char.\n"));
- return 0;
+ *ptr = p;
+ return CHAR_ERR;
}
#ifndef IS_ASCII
if (CTL_ESC(val) != val && adrof(STRwarnebcdic))
xprintf(/*CGETS(9, 9, no NLS-String yet!*/
- "Warning: Octal constant \\%3.3o is interpreted as EBCDIC value.\n", val/*)*/);
+ "Warning: Octal constant \\%3.3o is interpreted as "
+ "EBCDIC value.\n", val/*)*/);
#endif
c = (Char) val;
--p;
}
break;
default:
+ if (!e)
+ --p;
c = *p;
break;
}
}
- else if ((*p & CHAR) == '^' && (Isalpha(p[1] & CHAR) ||
- strchr("@^_?\\|[{]}", p[1] & CHAR))) {
+ else if ((*p & CHAR) == '^' && okcontrol(p[1] & CHAR)) {
p++;
-#ifdef IS_ASCII
- c = ((*p & CHAR) == '?') ? CTL_ESC('\177') : ((*p & CHAR) & 0237);
-#else
- c = ((*p & CHAR) == '?') ? CTL_ESC('\177') : _toebcdic[_toascii[*p & CHAR] & 0237];
- if (adrof(STRwarnebcdic))
- xprintf(/*CGETS(9, 9, no NLS-String yet!*/
- "Warning: Control character ^%c may be interpreted differently in EBCDIC.\n", *p & CHAR /*)*/);
-#endif
+ c = handlecontrol(*p & CHAR);
}
else
c = *p & CHAR;
diff --git a/glob.c b/glob.c
index 03d536d59910..66de34f52bd5 100644
--- a/glob.c
+++ b/glob.c
@@ -553,6 +553,7 @@ One_Char_mbtowc(__Char *pwc, const Char *s, size_t n)
;
return one_mbtowc(pwc, buf, n);
#else
+ (void)n;
*pwc = *s & CHAR;
return 1;
#endif
diff --git a/host.defs b/host.defs
index 6e03537fa612..e549f8886533 100644
--- a/host.defs
+++ b/host.defs
@@ -526,6 +526,7 @@ enddef :
newdef : defined(NetBSD)
comment : NetBSD
+vendor : defined(aarch64) : "arm"
vendor : defined(algor) : "algoritmics"
vendor : defined(arm32) || defined(arm) : "acorn"
vendor : defined(alpha) : "digital"
@@ -546,6 +547,7 @@ vendor : defined(vax) : "digital"
vendor : defined(M_amd64) : "amd"
hosttype: : "NetBSD"
ostype : : "NetBSD"
+machtype: defined(aarch64) : "aarch64"
machtype: defined(alpha) : "alpha"
machtype: defined(algor) : "algor"
machtype: defined(arm32) || defined(APCS_32) : "arm32"
@@ -566,6 +568,7 @@ enddef :
newdef : defined(OpenBSD)
comment : OpenBSD
+vendor : defined(aarch64) : "arm"
vendor : defined(alpha) : "digital"
vendor : defined(M_amd64) : "amd"
vendor : defined(arm) : "arm"
@@ -580,6 +583,7 @@ vendor : defined(sparc) || defined(sparc64) : "sun"
vendor : defined(vax) : "digital"
hosttype: : "OpenBSD"
ostype : : "OpenBSD"
+machtype: defined(aarch64) : "aarch64"
machtype: defined(alpha) : "alpha"
machtype: defined(M_amd64) : "amd64"
machtype: defined(arm) : "arm"
@@ -599,6 +603,7 @@ enddef :
newdef : defined(FreeBSD)
comment : FreeBSD
+vendor : defined(aarch64) : "arm"
vendor : defined(alpha) : "digital"
vendor : defined(arm32) || defined(arm) : "acorn"
vendor : defined(M_intel) : "intel"
@@ -610,6 +615,7 @@ vendor : defined(sparc64) : "sun"
vendor : defined(M_amd64) : "amd"
hosttype: : "FreeBSD"
ostype : : "FreeBSD"
+machtype: defined(aarch64) : "aarch64"
machtype: defined(alpha) : "alpha"
machtype: defined(arm32) || defined(APCS_32) : "arm32"
machtype: defined(arm) : "arm"
@@ -855,12 +861,14 @@ newdef : defined(APPLE)
comment : OS X
vendor : : "apple"
hosttype: defined(i386) : "intel-mac"
-hosttype: defined(ppc) : "powermac"
hosttype: defined(M_amd64) : "intel-mac"
+hosttype: defined(ppc) : "powermac"
+hosttype: defined(aarch64) : "arm64mac"
ostype : : "darwin"
machtype: defined(i386) : "i386"
machtype: defined(M_amd64) : "x86_64"
machtype: defined(ppc) : "powerpc"
+machtype: defined(aarch64) : "aarch64"
enddef :
diff --git a/nls/C/set1 b/nls/C/set1
index 6e97bd6985ea..24af74a19e37 100644
--- a/nls/C/set1
+++ b/nls/C/set1
@@ -56,7 +56,7 @@ $set 1
54 Can't make pipe
55 %s: %s
56 %s
-57 Usage: jobs [ -l ]
+57 Usage: jobs [ -lZ ]
58 Arguments should be jobs or process id's
59 No current job
60 No previous job
diff --git a/nls/C/set19 b/nls/C/set19
index 6e47635c77eb..9853db89c324 100644
--- a/nls/C/set19
+++ b/nls/C/set19
@@ -13,10 +13,10 @@ $set 19
11 \tAllocated memory from 0x%lx to 0x%lx. Real top at 0x%lx\n
12 Allocated memory from 0x%lx to 0x%lx (%ld).\n
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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/C/set2 b/nls/C/set2
index a2b761c77220..db9cd9ad54be 100644
--- a/nls/C/set2
+++ b/nls/C/set2
@@ -62,7 +62,7 @@ $set 2
60 Virtual time alarm
61 Profiling time alarm
62 DIL signal
-63 Pollable event occured
+63 Pollable event occurred
64 Process's lwps are blocked
65 Special LWP signal
66 Special CPR Signal
diff --git a/nls/Makefile.in b/nls/Makefile.in
index fc5d3847d981..b335e66b1b48 100644
--- a/nls/Makefile.in
+++ b/nls/Makefile.in
@@ -5,6 +5,8 @@ CATALOGS= C.cat et.cat finnish.cat french.cat german.cat greek.cat \
LOCALES= ${CATALOGS:.cat=}
GENCAT= @GENCAT@
INSTALL= @INSTALL@
+INSTALL_DATA= @INSTALL_DATA@
+MKDIR_P?= $(INSTALL) -d
RM?= rm -f
VPATH=@srcdir@
srcdir=@srcdir@
@@ -18,96 +20,96 @@ all: ${CATALOGS}
INSTALLED+=${localedir}/C/LC_MESSAGES/tcsh.cat
${localedir}/C/LC_MESSAGES/tcsh.cat: C.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
C.cat: ${srcdir}/C/charset ${srcdir}/C/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/et/LC_MESSAGES/tcsh.cat
${localedir}/et/LC_MESSAGES/tcsh.cat: et.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
et.cat: ${srcdir}/et/charset ${srcdir}/et/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/fi/LC_MESSAGES/tcsh.cat
${localedir}/fi/LC_MESSAGES/tcsh.cat: finnish.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
finnish.cat: ${srcdir}/finnish/charset ${srcdir}/finnish/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/fr/LC_MESSAGES/tcsh.cat
${localedir}/fr/LC_MESSAGES/tcsh.cat: french.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
french.cat: ${srcdir}/french/charset ${srcdir}/french/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/de/LC_MESSAGES/tcsh.cat
${localedir}/de/LC_MESSAGES/tcsh.cat: german.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
german.cat: ${srcdir}/german/charset ${srcdir}/german/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/gr/LC_MESSAGES/tcsh.cat
${localedir}/gr/LC_MESSAGES/tcsh.cat: greek.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
greek.cat: ${srcdir}/greek/charset ${srcdir}/greek/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/it/LC_MESSAGES/tcsh.cat
${localedir}/it/LC_MESSAGES/tcsh.cat: italian.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
italian.cat: ${srcdir}/italian/charset ${srcdir}/italian/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/ja/LC_MESSAGES/tcsh.cat
${localedir}/ja/LC_MESSAGES/tcsh.cat: ja.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
ja.cat: ${srcdir}/ja/charset ${srcdir}/ja/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/pl/LC_MESSAGES/tcsh.cat
${localedir}/pl/LC_MESSAGES/tcsh.cat: pl.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
pl.cat: ${srcdir}/pl/charset ${srcdir}/pl/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/ru/LC_MESSAGES/tcsh.cat
${localedir}/ru/LC_MESSAGES/tcsh.cat: russian.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
russian.cat: ${srcdir}/russian/charset ${srcdir}/russian/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/es/LC_MESSAGES/tcsh.cat
${localedir}/es/LC_MESSAGES/tcsh.cat: spanish.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
spanish.cat: ${srcdir}/spanish/charset ${srcdir}/spanish/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
INSTALLED+=${localedir}/ru_UA/LC_MESSAGES/tcsh.cat
${localedir}/ru_UA/LC_MESSAGES/tcsh.cat: ukrainian.cat
- mkdir -p $(@D)
- $(INSTALL) $> $^ $@
+ $(MKDIR_P) $(@D)
+ $(INSTALL_DATA) $> $^ $@
ukrainian.cat: ${srcdir}/ukrainian/charset ${srcdir}/ukrainian/*set[0-9]*
@${CATGEN} $(GENCAT) $@ $^ $>
diff --git a/nls/et/set1 b/nls/et/set1
index 7e3d28d4f84e..fdc6bd076f0e 100644
--- a/nls/et/set1
+++ b/nls/et/set1
@@ -56,7 +56,7 @@ $set 1
54 Toru ei saa luua
55 %s: %s
56 %s
-57 Kasuta: jobs [ -l ]
+57 Kasuta: jobs [ -lZ ]
58 Argumendid peavad olema tööde või protsesside identifikaatorid
59 Käesolevat tööd pole
60 Pole eelmist tööd
diff --git a/nls/et/set19 b/nls/et/set19
index 22319cc86f34..f0a72a62ba7b 100644
--- a/nls/et/set19
+++ b/nls/et/set19
@@ -13,10 +13,10 @@ $set 19
11 \tMälu vahemikus 0x%lx kuni 0x%lx. Tegelik algus 0x%lx\n
12 Mälu vahemikus 0x%lx kuni 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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/et/set2 b/nls/et/set2
index 9d2458e40fa0..9950db6a8a1c 100644
--- a/nls/et/set2
+++ b/nls/et/set2
@@ -62,7 +62,7 @@ $set 2
60 Virtuaalaja alarm
61 Profiling time alarm
62 DIL signaal
-63 Pollable event occured
+63 Pollable event occurred
64 Protsessi lwpd on blokeeritud
65 Spetsiaalne LWP signaal
66 Spetsiaalne CPR Signaal
diff --git a/nls/finnish/set1 b/nls/finnish/set1
index 6bfd9688f798..52b55116f2eb 100644
--- a/nls/finnish/set1
+++ b/nls/finnish/set1
@@ -56,7 +56,7 @@ $set 1
54 Putkea ei voida luoda
55 %s: %s
56 %s
-57 Käyttö: jobs [ -l ]
+57 Käyttö: jobs [ -lZ ]
58 Argumenttien on oltava töiden tai prosessien tunnisteita
59 Ei tämänhetkistä työtä
60 Ei edellistä työtä
diff --git a/nls/finnish/set16 b/nls/finnish/set16
index bb1764fba597..f4912cafccb8 100644
--- a/nls/finnish/set16
+++ b/nls/finnish/set16
@@ -1,8 +1,8 @@
$ sh.lex.c
$set 16
1 Päätteen prosessiryhmä vaihdettu arvosta %d %d:ksi.\n
-2 \nSano "logout" kirjoittautuaksesi ulos järjestelmästä.\n
-3 \nSano "exit" lopettaaksesi %s:n\n
+2 \nKomenna "logout" kirjautuaksesi ulos järjestelmästä.\n
+3 \nKomenna "exit" poistuaksesi %s:sta\n
4 seek to eval %x %x\n
5 seek to alias %x %x\n
6 seek to file %x\n
diff --git a/nls/finnish/set17 b/nls/finnish/set17
index 630d2eb44db8..f34b0fc35f89 100644
--- a/nls/finnish/set17
+++ b/nls/finnish/set17
@@ -13,4 +13,4 @@ $set 17
11 hakemisto nyt:
12 %S: On jo keskeytetty\n
13 %S: On jo pysäytetty\n
-14 %S: Badly formed number\n
+14 %S: Virheellisesti muodostettu numero\n
diff --git a/nls/finnish/set19 b/nls/finnish/set19
index d809eac86d87..d468eb0b974e 100644
--- a/nls/finnish/set19
+++ b/nls/finnish/set19
@@ -12,11 +12,11 @@ $set 19
10 \n\tYhteensä käytössä: %d, yhteensä vapaana: %d\n
11 \tVarattu muisti alueella 0x%lx .. 0x%lx. Todellinen huippu 0x%lx\n
12 Varattu muisti alueella 0x%lx .. 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
+13 %s tämänhetkinen muistivaraus:\n
+14 Järjestelmältä varattu kokonaistila: %zu\n
+15 Käyttämättömien lohkojen lukumäärä: %zu\n
+16 Muistikartoitettujen alueiden lukumäärä: %zu\n
+17 Muistikartoitettujen alueiden kokonaistila: %zu\n
+18 Varatun tilan kokonaismäärä: %zu\n
+19 Käyttämättömän tilan kokonaismäärä: %zu\n
+20 Päällimmäinen vapautettava tila: %zu\n
diff --git a/nls/french/set1 b/nls/french/set1
index 12d73fea231c..6110e38a9434 100644
--- a/nls/french/set1
+++ b/nls/french/set1
@@ -56,7 +56,7 @@ $set 1
54 Impossible de créer un tube
55 %s: %s
56 %s
-57 Syntaxe: jobs [ -l ]
+57 Syntaxe: jobs [ -lZ ]
58 Les arguments doivent être des ID de processus ou des numéros de travaux
59 Pas de travail en cours
60 Pas de travail précédent
diff --git a/nls/french/set19 b/nls/french/set19
index aa47265a5b49..c7d471dc59f2 100644
--- a/nls/french/set19
+++ b/nls/french/set19
@@ -13,10 +13,10 @@ $set 19
11 \tMémoire allouée de 0x%lx à 0x%lx. Limite réelle supérieure à 0x%lx\n
12 Mémoire allouée de 0x%lx à 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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/german/set1 b/nls/german/set1
index 119b7e8ea90a..3cb9c2149644 100644
--- a/nls/german/set1
+++ b/nls/german/set1
@@ -56,7 +56,7 @@ $set 1
54 Kann keine Pipe erzeugen
55 %s: %s
56 %s
-57 Benutzung: jobs [ -l ]
+57 Benutzung: jobs [ -lZ ]
58 Argumente können Job- oder Prozeß-ID's sein
59 Kein aktueller Job
60 Kein vorhergehender Job
diff --git a/nls/german/set19 b/nls/german/set19
index c4f19094a0f0..6edad357646c 100644
--- a/nls/german/set19
+++ b/nls/german/set19
@@ -13,10 +13,10 @@ $set 19
11 \tAllokierter Speicher von 0x%lx bis 0x%lx. Wirklicher Anfang 0x%lx\n
12 Allokierter Speicher von 0x%lx bis 0x%lx (%ld).\n
13 Tcsh's augenblickliche Speicherbelegung:\n
-14 Gesamter vom System angeforderter Speicher: %d\n
-15 Anzahl nicht benutzter Blöcke:: %d\n
-16 Anzahl via mmap angeforderter Speicherbereiche: %d\n
-17 Via mmap angeforderter Speicher: %d\n
-18 Gesamter benutzer Speicher im Pool: %d\n
-19 Gesamter freier Speicher im Pool: %d\n
-20 Speicher der freigegeben werden kann: %d\n
+14 Gesamter vom System angeforderter Speicher: %zu\n
+15 Anzahl nicht benutzter Blöcke:: %zu\n
+16 Anzahl via mmap angeforderter Speicherbereiche: %zu\n
+17 Via mmap angeforderter Speicher: %zu\n
+18 Gesamter benutzer Speicher im Pool: %zu\n
+19 Gesamter freier Speicher im Pool: %zu\n
+20 Speicher der freigegeben werden kann: %zu\n
diff --git a/nls/german/set2 b/nls/german/set2
index 86104b9a645b..5555e5ce76c0 100644
--- a/nls/german/set2
+++ b/nls/german/set2
@@ -62,7 +62,7 @@ $set 2
60 Virtueller Zeitalarm
61 Profiling time alarm
62 DIL signal
-63 Pollable event occured
+63 Pollable event occurred
64 Process's lwps are blocked
65 Special LWP signal
66 Special CPR Signal
diff --git a/nls/greek/set1 b/nls/greek/set1
index 4b30e826fd63..21d69da4fdda 100644
--- a/nls/greek/set1
+++ b/nls/greek/set1
@@ -56,7 +56,7 @@ $set 1
54 Δεν μποÏÏŽ να δημιουÏγήσω pipe
55 %s: %s
56 %s
-57 ΧÏήση: jobs [ -l ]
+57 ΧÏήση: jobs [ -lZ ]
58 Tα οÏίσματα Ï€Ïέπει να είναι εÏγασίες ή ταυτότητες διεÏγασιών
59 Δεν υπάÏχει Ï„Ïέχουσα εÏγασία
60 Δεν υπάÏχει Ï€ÏοηγοÏμενη εÏγασία
diff --git a/nls/greek/set19 b/nls/greek/set19
index 7958512902dd..c1f3b4cbbcdc 100644
--- a/nls/greek/set19
+++ b/nls/greek/set19
@@ -13,10 +13,10 @@ $set 19
11 \tΕχει εκχωÏηθεί μνήμη από 0x%lx ως 0x%lx. ΠÏαγματική αÏχή 0x%lx\n
12 Εχει εκχωÏηθεί μνήμη από 0x%lx ως 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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/italian/set1 b/nls/italian/set1
index b6bed0641b5d..cc7faba6acdf 100644
--- a/nls/italian/set1
+++ b/nls/italian/set1
@@ -56,7 +56,7 @@ $set 1
54 Non posso creare una pipe
55 %s: %s
56 %s
-57 Utilizzo: jobs [ -l ]
+57 Utilizzo: jobs [ -lZ ]
58 Gli argomenti devono essere lavori o identificativi di processo
59 Non esiste un lavoro predefinito
60 Non esiste un lavoro precedente
diff --git a/nls/italian/set19 b/nls/italian/set19
index a683ed27816c..a3ed024524eb 100644
--- a/nls/italian/set19
+++ b/nls/italian/set19
@@ -13,10 +13,10 @@ $set 19
11 \tAllocata memoria da 0x%lx a 0x%lx. Limite superiore effettivo a 0x%lx\n
12 Allocata memoria da 0x%lx a 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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/ja/set1 b/nls/ja/set1
index fca3eeb2b5b7..ecd60f404696 100644
--- a/nls/ja/set1
+++ b/nls/ja/set1
@@ -56,7 +56,7 @@ $set 1
54 パイプを作れã¾ã›ã‚“
55 %s: %s
56 %s
-57 å½¢å¼: jobs [ -l ]
+57 å½¢å¼: jobs [ -lZ ]
58 アーギュメントã¯ã‚¸ãƒ§ãƒ–ã‹ãƒ—ロセスIDã§ã™.
59 カレントã®jobã¯ã‚ã‚Šã¾ã›ã‚“
60 å‰ã®jobã¯ã‚ã‚Šã¾ã›ã‚“
diff --git a/nls/pl/set1 b/nls/pl/set1
index bad75b0b966c..3ec4042582d2 100644
--- a/nls/pl/set1
+++ b/nls/pl/set1
@@ -56,7 +56,7 @@ $set 1
54 Nie mogę stworzyć potoku
55 %s: %s
56 %s
-57 Użycie: jobs [ -l ]
+57 Użycie: jobs [ -lZ ]
58 Argumentami powinny być identyfikatory prac lub procesów
59 Nie ma aktualnej pracy
60 Brak poprzednich prac
diff --git a/nls/pl/set19 b/nls/pl/set19
index dd0ba587f2b9..8f5e63a509ce 100644
--- a/nls/pl/set19
+++ b/nls/pl/set19
@@ -13,10 +13,10 @@ $set 19
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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/pl/set2 b/nls/pl/set2
index 84b1aa0d31ba..3f4393379ef6 100644
--- a/nls/pl/set2
+++ b/nls/pl/set2
@@ -62,7 +62,7 @@ $set 2
60 Virtual time alarm
61 Profiling time alarm
62 DIL signal
-63 Pollable event occured
+63 Pollable event occurred
64 Process's lwps are blocked
65 Special LWP signal
66 Special CPR Signal
diff --git a/nls/russian/set1 b/nls/russian/set1
index bc0a4eec95de..2d612dd2bc77 100644
--- a/nls/russian/set1
+++ b/nls/russian/set1
@@ -56,7 +56,7 @@ $set 1
54 Ðе могу Ñоздать неименованный канал
55 %s: %s
56 %s
-57 ИÑпользование: jobs [ -l ]
+57 ИÑпользование: jobs [ -lZ ]
58 Ðргументы должны ÑвлÑÑ‚ÑŒÑÑ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ð°Ð¼Ð¸ заданий или процеÑÑов
59 Ðет текущего заданиÑ
60 Ðет предыдущего заданиÑ
diff --git a/nls/russian/set19 b/nls/russian/set19
index 07b180009b1b..185424a90b70 100644
--- a/nls/russian/set19
+++ b/nls/russian/set19
@@ -13,10 +13,10 @@ $set 19
11 \tAllocated memory from 0x%lx to 0x%lx. Real top at 0x%lx\n
12 Allocated memory from 0x%lx to 0x%lx (%ld).\n
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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/russian/set2 b/nls/russian/set2
index 419003732855..348ed90d133c 100644
--- a/nls/russian/set2
+++ b/nls/russian/set2
@@ -62,7 +62,7 @@ $set 2
60 Virtual time alarm
61 Profiling time alarm
62 DIL signal
-63 Pollable event occured
+63 Pollable event occurred
64 Process's lwps are blocked
65 Special LWP signal
66 Special CPR Signal
diff --git a/nls/spanish/set1 b/nls/spanish/set1
index ac035b71b2dd..6dc314fa66b3 100644
--- a/nls/spanish/set1
+++ b/nls/spanish/set1
@@ -56,7 +56,7 @@ $set 1
54 No se puede crear la tubería
55 %s: %s
56 %s
-57 Uso: jobs [ -l ]
+57 Uso: jobs [ -lZ ]
58 Los argumentos deben ser trabajos o identificadores de proceso
59 No hay trabajo en curso
60 No hay trabajo previo
diff --git a/nls/spanish/set19 b/nls/spanish/set19
index 8d093fdb5bea..9a454fc12439 100644
--- a/nls/spanish/set19
+++ b/nls/spanish/set19
@@ -13,10 +13,10 @@ $set 19
11 \tSe ha asignado memoria de 0x%lx a 0x%lx. Límite superior real en 0x%lx\n
12 Se ha asignado memoria de 0x%lx a 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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/ukrainian/set1 b/nls/ukrainian/set1
index f650c2665a5c..15d309cffedd 100644
--- a/nls/ukrainian/set1
+++ b/nls/ukrainian/set1
@@ -56,7 +56,7 @@ $set 1
54 Ðе можу Ñтворити канал
55 %s: %s
56 %s
-57 ВикориÑтаннÑ: jobs [ -l ]
+57 ВикориÑтаннÑ: jobs [ -lZ ]
58 Ðргументом має бути номер задачі чи процеÑу
59 Ðемає поточної задачі
60 Ðемає попередньої задачі
diff --git a/nls/ukrainian/set19 b/nls/ukrainian/set19
index a64a1e921e5d..5d788db0f683 100644
--- a/nls/ukrainian/set19
+++ b/nls/ukrainian/set19
@@ -13,10 +13,10 @@ $set 19
11 \tЗанÑто пам'ÑÑ‚ÑŒ з 0x%lx до 0x%lx. Real top at 0x%lx\n
12 ЗанÑто пам'ÑÑ‚ÑŒ з 0x%lx до 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
+14 Total space allocated from system: %zu\n
+15 Number of non-inuse chunks: %zu\n
+16 Number of mmapped regions: %zu\n
+17 Total space in mmapped regions: %zu\n
+18 Total allocated space: %zu\n
+19 Total non-inuse space: %zu\n
+20 Top-most, releasable space: %zu\n
diff --git a/nls/ukrainian/set2 b/nls/ukrainian/set2
index 65148cdac439..53f1087ba8df 100644
--- a/nls/ukrainian/set2
+++ b/nls/ukrainian/set2
@@ -62,7 +62,7 @@ $set 2
60 Virtual time alarm
61 Profiling time alarm
62 DIL signal
-63 Pollable event occured
+63 Pollable event occurred
64 Process's lwps are blocked
65 Special LWP signal
66 Special CPR Signal
diff --git a/patchlevel.h b/patchlevel.h
index 78cdf2023e56..b3c4903c5c35 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -6,8 +6,8 @@
#define ORIGIN "Astron"
#define REV 6
-#define VERS 22
-#define PATCHLEVEL 04
-#define DATE "2021-04-26"
+#define VERS 24
+#define PATCHLEVEL 07
+#define DATE "2022-12-21"
#endif /* _h_patchlevel */
diff --git a/sh.c b/sh.c
index 4d3094bde463..390d8915000f 100644
--- a/sh.c
+++ b/sh.c
@@ -565,7 +565,7 @@ main(int argc, char **argv)
sigset_interrupting(SIGALRM, queue_alrmcatch);
- setcopy(STRstatus, STR0, VAR_READWRITE);
+ setstatus(0);
/*
* get and set machine specific environment variables
@@ -886,11 +886,11 @@ main(int argc, char **argv)
fix_version(); /* publish the shell version */
if (argc > 1 && strcmp(argv[1], "--version") == 0) {
- xprintf("%S\n", varval(STRversion));
+ xprintf("%" TCSH_S "\n", varval(STRversion));
xexit(0);
}
if (argc > 1 && strcmp(argv[1], "--help") == 0) {
- xprintf("%S\n\n", varval(STRversion));
+ xprintf("%" TCSH_S "\n\n", varval(STRversion));
xprintf("%s", CGETS(11, 8, HELP_STRING));
xexit(0);
}
@@ -1830,7 +1830,7 @@ exitstat(void)
*/
child = 1;
- xexit(getn(varval(STRstatus)));
+ xexit(getstatus());
}
/*
diff --git a/sh.decls.h b/sh.decls.h
index e230becd8e0e..a863fedeeb2b 100644
--- a/sh.decls.h
+++ b/sh.decls.h
@@ -217,6 +217,7 @@ extern int t_pmatch (const Char *, const Char *,
*/
extern void dohist (Char **, struct command *);
extern struct Hist *enthist (int, struct wordent *, int, int, int);
+extern void cleanhist (void);
extern void savehist (struct wordent *, int);
extern char *fmthist (int, ptr_t);
extern void rechist (Char *, int);
@@ -402,6 +403,9 @@ extern void autoset_dspmbyte (const Char *);
extern void autoset_kanji (void);
#endif
extern void update_wordchars (void);
+extern void setstrstatus (Char *);
+extern void setstatus (int);
+extern int getstatus (void);
/*
* sh.time.c
diff --git a/sh.dir.c b/sh.dir.c
index 7d6b767b2e87..511b83d1659f 100644
--- a/sh.dir.c
+++ b/sh.dir.c
@@ -283,8 +283,8 @@ printdirs(int dflag)
cur = len;
}
if (user)
- xprintf("~%S", user);
- xprintf("%-S%c", s, (dflag & DIR_VERT) ? '\n' : ' ');
+ xprintf("~%" TCSH_S, user);
+ xprintf("%-" TCSH_S "%c", s, (dflag & DIR_VERT) ? '\n' : ' ');
} while ((dp = dp->di_prev) != dcwd);
if (!(dflag & DIR_VERT))
xputchar('\n');
@@ -295,9 +295,9 @@ dtildepr(Char *dir)
{
Char* user;
if ((user = getusername(&dir)) != NULL)
- xprintf("~%-S%S", user, dir);
+ xprintf("~%-" TCSH_S "%" TCSH_S, user, dir);
else
- xprintf("%S", dir);
+ xprintf("%" TCSH_S, dir);
}
void
@@ -1405,10 +1405,10 @@ recdirs(Char *fname, int def)
if (cdflag == 0) {
cdflag = 1;
- xprintf("cd %S\n", quote_meta(&qname, dp->di_name));
+ xprintf("cd %" TCSH_S "\n", quote_meta(&qname, dp->di_name));
}
else
- xprintf("pushd %S\n", quote_meta(&qname, dp->di_name));
+ xprintf("pushd %" TCSH_S "\n", quote_meta(&qname, dp->di_name));
if (num-- == 0)
break;
diff --git a/sh.dol.c b/sh.dol.c
index b7aae3421d03..912d6c76cd4c 100644
--- a/sh.dol.c
+++ b/sh.dol.c
@@ -30,6 +30,8 @@
* SUCH DAMAGE.
*/
#include "sh.h"
+#include "ed.h"
+#include "tw.h"
/*
* C shell
@@ -386,6 +388,38 @@ Dgetdol(void)
stderror(ERR_SYNTAX);
return;
}
+ if ((c & TRIM) == '\'') {
+ const Char *cp;
+ struct Strbuf *expanded = Strbuf_alloc();
+
+ cleanup_push(expanded, Strbuf_free);
+ for (;;) {
+ c = DgetC(0);
+ if ((c & TRIM) == '\'')
+ break;
+ if ((c & TRIM) == '\\') {
+ Strbuf_append1(name, (Char) c);
+ c = DgetC(0);
+ }
+ if (c == '\n' || c == DEOF) {
+ cleanup_until(name);
+ stderror(ERR_MISSING, '\'');
+ return;
+ }
+ Strbuf_append1(name, (Char) c);
+ }
+ Strbuf_terminate(name);
+ for (cp = name->s; (c = *cp) != 0; cp++) {
+ if (c == '\\' && (c = parseescape(&cp, TRUE)) == CHAR_ERR)
+ c = '\\';
+ Strbuf_append1(expanded, (Char) c | QUOTE);
+ }
+ Strbuf_terminate(expanded);
+ np = Strsave(expanded->s);
+ cleanup_until(name);
+ addla(np);
+ return;
+ }
if (c == '{')
c = DgetC(0); /* sc is { to take } later */
if ((c & TRIM) == '#')
@@ -746,6 +780,7 @@ fixDolMod(void)
if (c == 's') { /* [eichin:19910926.0755EST] */
int delimcnt = 2;
+ int esc = 0;
eChar delim = DgetC(0);
Strbuf_append1(&dolmod, (Char) c);
Strbuf_append1(&dolmod, (Char) delim);
@@ -756,9 +791,14 @@ fixDolMod(void)
break;
}
while ((c = DgetC(0)) != DEOF) {
+ if (esc == 0 && c == '\\') {
+ esc = 1;
+ continue;
+ }
Strbuf_append1(&dolmod, (Char) c);
- if (c == delim) delimcnt--;
+ if (!esc && c == delim) delimcnt--;
if (!delimcnt) break;
+ esc = 0;
}
if (delimcnt) {
seterror(ERR_BADSUBST);
diff --git a/sh.err.c b/sh.err.c
index 3e1fedce8fd3..f462e6d76c20 100644
--- a/sh.err.c
+++ b/sh.err.c
@@ -266,7 +266,7 @@ errinit(void)
elst[ERR_PIPE] = CSAVS(1, 54, "Can't make pipe");
elst[ERR_SYSTEM] = CSAVS(1, 55, "%s: %s");
elst[ERR_STRING] = CSAVS(1, 56, "%s");
- elst[ERR_JOBS] = CSAVS(1, 57, "Usage: jobs [ -l ]");
+ elst[ERR_JOBS] = CSAVS(1, 57, "Usage: jobs [ -lZ ]");
elst[ERR_JOBARGS] = CSAVS(1, 58, "Arguments should be jobs or process id's");
elst[ERR_JOBCUR] = CSAVS(1, 59, "No current job");
elst[ERR_JOBPREV] = CSAVS(1, 60, "No previous job");
@@ -573,7 +573,7 @@ fixerror(void)
*/
btoeof();
- setcopy(STRstatus, STR1, VAR_READWRITE);/*FIXRESET*/
+ setstatus(1);
#ifdef BSDJOBS
if (tpgrp > 0)
(void) tcsetpgrp(FSHTTY, tpgrp);
diff --git a/sh.exec.c b/sh.exec.c
index d327e3e6e519..4b111a0a9c4d 100644
--- a/sh.exec.c
+++ b/sh.exec.c
@@ -972,7 +972,7 @@ tellmewhat(struct wordent *lexp, Char **str)
if (str == NULL) {
if (aliased)
prlex(lexp);
- xprintf(CGETS(13, 5, "%S: shell built-in command.\n"),
+ xprintf(CGETS(13, 5, "%" TCSH_S ": shell built-in command.\n"),
sp->word);
flush();
}
@@ -988,7 +988,7 @@ tellmewhat(struct wordent *lexp, Char **str)
if (str == NULL) {
if (aliased)
prlex(lexp);
- xprintf(CGETS(13, 5, "%S: shell built-in command.\n"),
+ xprintf(CGETS(13, 5, "%" TCSH_S ": shell built-in command.\n"),
sp->word);
flush();
}
@@ -1042,7 +1042,8 @@ tellmewhat(struct wordent *lexp, Char **str)
if (str == NULL) {
if (aliased)
prlex(lexp);
- xprintf(CGETS(13, 6, "%S: Command not found.\n"), sp->word);
+ xprintf(CGETS(13, 6, "%" TCSH_S ": Command not found.\n"),
+ sp->word);
flush();
}
else
@@ -1074,7 +1075,7 @@ dowhere(Char **v, struct command *c)
found &= find_cmd(*v, 1);
/* Make status nonzero if any command is not found. */
if (!found)
- setcopy(STRstatus, STR1, VAR_READWRITE);
+ setstatus(1);
}
int
@@ -1095,7 +1096,7 @@ find_cmd(Char *cmd, int prt)
if (prt && adrof1(cmd, &aliases)) {
if ((var = adrof1(cmd, &aliases)) != NULL) {
- xprintf(CGETS(13, 8, "%S is aliased to "), cmd);
+ xprintf(CGETS(13, 8, "%" TCSH_S " is aliased to "), cmd);
if (var->vec != NULL)
blkpr(var->vec);
xputchar('\n');
@@ -1109,7 +1110,7 @@ find_cmd(Char *cmd, int prt)
if (eq(cmd, str2short(bptr->bname))) {
rval = 1;
if (prt)
- xprintf(CGETS(13, 9, "%S is a shell built-in\n"), cmd);
+ xprintf(CGETS(13, 9, "%" TCSH_S " is a shell built-in\n"), cmd);
else
return rval;
}
@@ -1119,7 +1120,7 @@ find_cmd(Char *cmd, int prt)
if (eq(cmd, str2short(bptr->bname))) {
rval = 1;
if (prt)
- xprintf(CGETS(13, 9, "%S is a shell built-in\n"), cmd);
+ xprintf(CGETS(13, 9, "%" TCSH_S " is a shell built-in\n"), cmd);
else
return rval;
}
@@ -1159,8 +1160,8 @@ retry:
if (ex) {
rval = 1;
if (prt) {
- xprintf("%S/", *pv);
- xprintf("%S\n", cmd);
+ xprintf("%" TCSH_S "/", *pv);
+ xprintf("%" TCSH_S "\n", cmd);
}
else
return rval;
diff --git a/sh.exp.c b/sh.exp.c
index 2f5f0088e126..f291a59d3526 100644
--- a/sh.exp.c
+++ b/sh.exp.c
@@ -36,9 +36,6 @@
* C shell
*/
-#define TEXP_IGNORE 1 /* in ignore, it means to ignore value, just parse */
-#define TEXP_NOGLOB 2 /* in ignore, it means not to globone */
-
#define ADDOP 1
#define MULOP 2
#define EQOP 4
@@ -579,8 +576,8 @@ exp6(Char ***vp, int ignore)
}
pwait();
cleanup_until(&faket);
- etraci("exp6 {} status", egetn(varval(STRstatus)), vp);
- return (putn(egetn(varval(STRstatus)) == 0));
+ etraci("exp6 {} status", getstatus(), vp);
+ return putn(getstatus() == 0);
}
if (isa(**vp, ANYOP))
return (Strsave(STRNULL));
@@ -677,7 +674,11 @@ filetest(Char *cp, Char ***vp, int ignore)
dp = *(*vp)++;
if (ignore & TEXP_IGNORE)
return (Strsave(STRNULL));
- ep = globone(dp, G_APPEND);
+ if ((ignore & TEXP_NOGLOB) == 0) {
+ ep = globone(dp, G_APPEND);
+ } else {
+ ep = Strsave(dp);
+ }
cleanup_push(ep, xfree);
ft = &cp[1];
do
@@ -950,7 +951,7 @@ evalav(Char **v)
struct command *t;
struct wordent *wdp = hp;
- setcopy(STRstatus, STR0, VAR_READWRITE);
+ setstatus(0);
initlex(hp);
while (*v) {
struct wordent *new = xcalloc(1, sizeof *wdp);
diff --git a/sh.file.c b/sh.file.c
index eb529b949702..c6742c4c6adc 100644
--- a/sh.file.c
+++ b/sh.file.c
@@ -59,7 +59,6 @@ typedef enum {
static void setup_tty (int);
static void back_to_col_1 (void);
static void pushback (const Char *);
-static int filetype (const Char *, const Char *);
static void print_by_column (const Char *, Char *[], size_t);
static Char *tilde (const Char *);
static void retype (void);
@@ -327,7 +326,7 @@ print_by_column(const Char *dir, Char *items[], size_t count)
if (i < count) {
int w;
- xprintf("%S", items[i]);
+ xprintf("%" TCSH_S, items[i]);
xputchar(dir ? filetype(dir, items[i]) : ' ');
if (c < columns - 1) { /* last column? */
w = Strlen(items[i]) + 1;
@@ -441,13 +440,13 @@ print_recognized_stuff(const Char *recognized_part)
break;
case 1: /* overstrike the ^, erase the [ */
- xprintf("%S", recognized_part);
+ xprintf("%" TCSH_S, recognized_part);
(void) putraw(' ');
(void) putraw('\b');
break;
default: /* overstrike both Characters ^[ */
- xprintf("%S", recognized_part);
+ xprintf("%" TCSH_S, recognized_part);
break;
}
flush();
diff --git a/sh.func.c b/sh.func.c
index ede623f2ff10..0cb2e391c7b3 100644
--- a/sh.func.c
+++ b/sh.func.c
@@ -227,9 +227,9 @@ dofiletest(Char **v, struct command *c)
cleanup_push(globbed, blk_cleanup);
while (*(fileptr = v++) != NULL) {
- res = filetest(ftest, &fileptr, 0);
+ res = filetest(ftest, &fileptr, TEXP_NOGLOB);
cleanup_push(res, xfree);
- xprintf("%S", res);
+ xprintf("%" TCSH_S, res);
cleanup_until(res);
if (*v)
xprintf(" ");
@@ -493,7 +493,7 @@ doexit(Char **v, struct command *c)
*/
v++;
if (*v) {
- setv(STRstatus, putn(expr(&v)), VAR_READWRITE);
+ setstrstatus(putn(expr(&v)));
if (*v)
stderror(ERR_NAME | ERR_EXPRESSION);
}
@@ -1199,7 +1199,8 @@ doglob(Char **v, struct command *c)
static void
xecho(int sep, Char **v)
{
- Char *cp, **globbed = NULL;
+ Char **globbed = NULL;
+ const Char *cp;
int nonl = 0;
int echo_style = ECHO_STYLE;
struct varent *vp;
@@ -1235,7 +1236,7 @@ xecho(int sep, Char **v)
nonl++, v++;
while ((cp = *v++) != 0) {
- Char c;
+ eChar c;
if (setintr) {
int old_pintr_disabled;
@@ -1243,63 +1244,16 @@ xecho(int sep, Char **v)
pintr_push_enable(&old_pintr_disabled);
cleanup_until(&old_pintr_disabled);
}
- while ((c = *cp++) != 0) {
+ for (; (c = *cp) != 0; cp++) {
if ((echo_style & SYSV_ECHO) != 0 && c == '\\') {
- switch (c = *cp++) {
- case 'a':
- c = '\a';
- break;
- case 'b':
- c = '\b';
- break;
- case 'c':
- nonl = 1;
- goto done;
- case 'e':
-#if 0 /* Windows does not understand \e */
- c = '\e';
-#else
- c = CTL_ESC('\033');
-#endif
- break;
- case 'f':
- c = '\f';
- break;
- case 'n':
- c = '\n';
- break;
- case 'r':
- c = '\r';
- break;
- case 't':
- c = '\t';
- break;
- case 'v':
- c = '\v';
- break;
- case '\\':
+ if ((c = parseescape(&cp, FALSE)) == CHAR_ERR)
c = '\\';
- break;
- case '0':
- c = 0;
- if (*cp >= '0' && *cp < '8')
- c = c * 8 + *cp++ - '0';
- if (*cp >= '0' && *cp < '8')
- c = c * 8 + *cp++ - '0';
- if (*cp >= '0' && *cp < '8')
- c = c * 8 + *cp++ - '0';
- break;
- case '\0':
- c = '\\';
- cp--;
- break;
- default:
- xputchar('\\' | QUOTE);
+ else if (c == CHAR_EOF) {
+ nonl++;
break;
}
}
xputwchar(c | QUOTE);
-
}
if (*v)
xputchar(sep | QUOTE);
@@ -1356,7 +1310,7 @@ doprintenv(Char **v, struct command *c)
pintr_push_enable(&old_pintr_disabled);
cleanup_until(&old_pintr_disabled);
}
- xprintf("%S\n", *ep);
+ xprintf("%" TCSH_S "\n", *ep);
}
cleanup_until(&xlate_cr);
}
@@ -1366,11 +1320,11 @@ doprintenv(Char **v, struct command *c)
old_output_raw = output_raw;
output_raw = 1;
cleanup_push(&old_output_raw, output_raw_restore);
- xprintf("%S\n", e);
+ xprintf("%" TCSH_S "\n", e);
cleanup_until(&old_output_raw);
}
else
- setcopy(STRstatus, STR1, VAR_READWRITE);
+ setstatus(1);
}
/* from "Karl Berry." <karl%mote.umb.edu@relay.cs.net> -- for NeXT things
diff --git a/sh.h b/sh.h
index 3c285a9e8a36..19bf10d62956 100644
--- a/sh.h
+++ b/sh.h
@@ -78,6 +78,7 @@ typedef unsigned long intptr_t;
#if defined(KANJI) && defined(WIDE_STRINGS) && defined(HAVE_NL_LANGINFO) && defined(CODESET)
#define AUTOSET_KANJI
#endif
+
/*
* Sanity
*/
@@ -92,13 +93,14 @@ typedef unsigned long intptr_t;
#define TMP_TEMPLATE ".XXXXXX"
#ifdef SHORT_STRINGS
+# define TCSH_S "S"
# ifdef WIDE_STRINGS
#include <wchar.h>
# ifdef UTF16_STRINGS
typedef wint_t Char;
# else
typedef wchar_t Char;
-#endif
+# endif
typedef unsigned long uChar;
typedef wint_t eChar; /* Can contain any Char value or CHAR_ERR */
#define CHAR_ERR WEOF /* Pretty please, use bit 31... */
@@ -114,6 +116,7 @@ typedef int eChar;
# endif
# define SAVE(a) (Strsave(str2short(a)))
#else
+#define TCSH_S "s"
typedef char Char;
typedef unsigned char uChar;
typedef int eChar;
@@ -122,6 +125,7 @@ typedef int eChar;
#define reset_mbtowc() ((void)0)
# define SAVE(a) (strsave(a))
#endif
+#define CHAR_EOF (-2)
#if !defined(__inline) && !defined(__GNUC__) && !defined(_MSC_VER)
#define __inline
@@ -319,7 +323,7 @@ typedef long tcsh_number_t;
* redefines malloc(), so we define the following
* to avoid it.
*/
-# if defined(SYSMALLOC) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || defined(sgi) || defined(_OSD_POSIX)
+# if defined(SYSMALLOC) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) || defined(sgi) || defined(_OSD_POSIX) || defined(__OpenBSD__)
# define NO_FIX_MALLOC
# include <stdlib.h>
# else /* glibc */
@@ -1010,6 +1014,7 @@ EXTERN struct varent {
#define VAR_READONLY 1
#define VAR_READWRITE 2
#define VAR_NOGLOB 4
+#define VAR_NOERROR 8
#define VAR_FIRST 32
#define VAR_LAST 64
struct varent *v_link[3]; /* The links, see below */
@@ -1027,6 +1032,7 @@ EXTERN struct varent {
* The following are for interfacing redo substitution in
* aliases to the lexical routines.
*/
+#define HIST_PURGE -500000
EXTERN struct wordent *alhistp IZERO_STRUCT;/* Argument list (first) */
EXTERN struct wordent *alhistt IZERO_STRUCT;/* Node after last in arg list */
EXTERN Char **alvec IZERO_STRUCT,
@@ -1121,7 +1127,7 @@ EXTERN Char PRCHROOT; /* Prompt symbol for root */
#define Strend(a) strend(a)
#define Strstr(a, b) strstr(a, b)
-#define str2short(a) (a)
+#define str2short(a) ((void *)(intptr_t)(a))
#define blk2short(a) saveblk(a)
#define short2blk(a) saveblk(a)
#define short2str(a) caching_strip(a)
@@ -1296,4 +1302,8 @@ extern int filec;
#include "tc.nls.h"
+#define TEXP_IGNORE 1 /* in ignore, it means to ignore value, just parse */
+#define TEXP_NOGLOB 2 /* in ignore, it means not to globone */
+
+
#endif /* _h_sh */
diff --git a/sh.hist.c b/sh.hist.c
index 14d862a3e7bb..576ec45ddd91 100644
--- a/sh.hist.c
+++ b/sh.hist.c
@@ -239,20 +239,33 @@ addWordToHash(struct hashValue *h, const Char *word)
#endif
#else
assert(sizeof(Char) == 1);
+#define GETK if ((k = *word++) == 0) break
while (1) {
unsigned k;
- if ((k = *word++) == 0) break; a += k;
- if ((k = *word++) == 0) break; a += k << 8;
- if ((k = *word++) == 0) break; a += k << 16;
- if ((k = *word++) == 0) break; a += k << 24;
- if ((k = *word++) == 0) break; b += k;
- if ((k = *word++) == 0) break; b += k << 8;
- if ((k = *word++) == 0) break; b += k << 16;
- if ((k = *word++) == 0) break; b += k << 24;
- if ((k = *word++) == 0) break; c += k;
- if ((k = *word++) == 0) break; c += k << 8;
- if ((k = *word++) == 0) break; c += k << 16;
- if ((k = *word++) == 0) break; c += k << 24;
+ GETK;
+ a += k;
+ GETK;
+ a += k << 8;
+ GETK;
+ a += k << 16;
+ GETK;
+ a += k << 24;
+ GETK;
+ b += k;
+ GETK;
+ b += k << 8;
+ GETK;
+ b += k << 16;
+ GETK;
+ b += k << 24;
+ GETK;
+ c += k;
+ GETK;
+ c += k << 8;
+ GETK;
+ c += k << 16;
+ GETK;
+ c += k << 24;
mix(a, b, c);
}
#endif
@@ -1072,7 +1085,7 @@ phist(struct Hist *hp, int hflg)
xprintf("#+%010lu\n", (unsigned long)hp->Htime);
if (HistLit && hp->histline)
- xprintf("%S\n", hp->histline);
+ xprintf("%" TCSH_S "\n", hp->histline);
else
prlex(&hp->Hlex);
cleanup_until(&old_output_raw);
@@ -1184,6 +1197,17 @@ dohist(Char **vp, struct command *c)
}
}
+void
+cleanhist(void)
+{
+ struct Hist *hp, *np;
+
+ for (hp = &Histlist; (np = hp->Hnext) != NULL;) {
+ if (np->Hnum != HIST_PURGE)
+ return;
+ hremove(np), hfree(np);
+ }
+}
char *
fmthist(int fmt, ptr_t ptr)
@@ -1196,7 +1220,7 @@ fmthist(int fmt, ptr_t ptr)
return xasprintf("%6d", hp->Hnum);
case 'R':
if (HistLit && hp->histline)
- return xasprintf("%S", hp->histline);
+ return xasprintf("%" TCSH_S, hp->histline);
else {
Char *istr, *ip;
char *p;
@@ -1236,7 +1260,7 @@ rechist(Char *xfname, int ref)
static Char *fname;
static Char *dumphist[] = {STRhistory, STRmhT, 0, 0};
- if (fname == NULL && !ref)
+ if (xfname == NULL && !ref)
return;
fname = xfname;
@@ -1314,7 +1338,7 @@ rechist(Char *xfname, int ref)
}
}
rs = randsuf();
- xsnprintf(path, sizeof(path), "%S.%S", fname, rs);
+ xsnprintf(path, sizeof(path), "%" TCSH_S ".%" TCSH_S, fname, rs);
xfree(rs);
fp = xcreat(path, 0600);
diff --git a/sh.init.c b/sh.init.c
index 997b94108338..737afbc7d8ab 100644
--- a/sh.init.c
+++ b/sh.init.c
@@ -93,7 +93,7 @@ const struct biltins bfunc[] = {
#ifdef apollo
{ "inlib", doinlib, 1, INF },
#endif /* apollo */
- { "jobs", dojobs, 0, 1 },
+ { "jobs", dojobs, 0, 2 },
{ "kill", dokill, 1, INF },
#ifndef HAVENOLIMIT
{ "limit", dolimit, 0, 3 },
@@ -690,7 +690,7 @@ mesginit(void)
#ifdef SIGPOLL
if (mesg[SIGPOLL].pname == NULL) {
mesg[SIGPOLL].iname = "POLL";
- mesg[SIGPOLL].pname = CSAVS(2, 63, "Pollable event occured");
+ mesg[SIGPOLL].pname = CSAVS(2, 63, "Pollable event occurred");
}
#endif /* SIGPOLL */
diff --git a/sh.lex.c b/sh.lex.c
index d22e4f45616d..2de265b529a9 100644
--- a/sh.lex.c
+++ b/sh.lex.c
@@ -153,8 +153,7 @@ lex(struct wordent *hp)
if (!postcmd_active)
btell(&lineloc);
- hp->next = hp->prev = hp;
- hp->word = STRNULL;
+ initlex(hp);
hadhist = 0;
do
c = readc(0);
@@ -227,7 +226,7 @@ prlex(struct wordent *sp0)
struct wordent *sp = sp0->next;
for (;;) {
- xprintf("%S", sp->word);
+ xprintf("%" TCSH_S, sp->word);
sp = sp->next;
if (sp == sp0)
break;
@@ -512,6 +511,24 @@ getdol(void)
}
cleanup_push(&name, Strbuf_cleanup);
Strbuf_append1(&name, '$');
+ if (c == '\'') {
+ for (;;) {
+ Strbuf_append1(&name, c);
+ c = getC(DOEXCL);
+ if (c == '\'') break;
+ if (c == '\\') {
+ Strbuf_append1(&name, c);
+ c = getC(DOEXCL);
+ }
+ if (c == '\n') {
+ ungetD(c);
+ seterror(ERR_MISSING, '\'');
+ goto end;
+ }
+ }
+ Strbuf_append1(&name, c);
+ goto end;
+ }
if (c == '{')
Strbuf_append1(&name, c), c = getC(DOEXCL);
if (c == '#' || c == '?' || c == '%')
@@ -618,6 +635,7 @@ getdol(void)
/* scan s// [eichin:19910926.0512EST] */
if (c == 's') {
int delimcnt = 2;
+ int esc = 0;
eChar delim = getC(0);
Strbuf_append1(&name, delim);
@@ -627,9 +645,15 @@ getdol(void)
break;
}
while ((c = getC(0)) != CHAR_ERR) {
+ if (esc == 0 && c == '\\') {
+ esc = 1;
+ Strbuf_append1(&name, c);
+ continue;
+ }
Strbuf_append1(&name, c);
- if (c == delim) delimcnt--;
+ if (!esc && c == delim) delimcnt--;
if (!delimcnt) break;
+ esc = 0;
}
if (delimcnt) {
seterror(ERR_BADSUBST);
@@ -704,7 +728,7 @@ getexcl(Char sc)
lastev = eventno;
hp = gethent(sc);
- if (hp == 0)
+ if (hp == NULL)
return;
hadhist = 1;
dol = 0;
@@ -894,7 +918,6 @@ getsub(struct wordent *en)
* We raise the limit to 50000000
*/
-#define HIST_PURGE -50000000
static struct wordent *
dosub(Char sc, struct wordent *en, int global)
{
diff --git a/sh.misc.c b/sh.misc.c
index 05b58d197a1d..0b6b3370934c 100644
--- a/sh.misc.c
+++ b/sh.misc.c
@@ -99,7 +99,7 @@ blkpr(Char *const *av)
{
for (; *av; av++) {
- xprintf("%S", *av);
+ xprintf("%" TCSH_S, *av);
if (av[1])
xprintf(" ");
}
diff --git a/sh.proc.c b/sh.proc.c
index 2d2a61e33ca9..60301c5f73a7 100644
--- a/sh.proc.c
+++ b/sh.proc.c
@@ -576,7 +576,7 @@ pjwait(struct process *pp)
xprintf(CGETS(17, 2, "Exit %d\n"), reason);
reason_str = putn((tcsh_number_t)reason);
cleanup_push(reason_str, xfree);
- setv(STRstatus, reason_str, VAR_READWRITE);
+ setstrstatus(reason_str);
cleanup_ignore(reason_str);
cleanup_until(reason_str);
if (reason && exiterr)
@@ -1055,7 +1055,7 @@ pprint(struct process *pp, int flag)
xprintf(" ");
}
if (flag & FANCY) {
- xprintf("%5d ", pp->p_procid);
+ xprintf("%7d ", pp->p_procid);
#ifdef TCF
xprintf("%11s ", sitename(pp->p_procid));
#endif /* TCF */
@@ -1133,7 +1133,7 @@ pprint(struct process *pp, int flag)
}
prcomd:
if (flag & NAME) {
- xprintf("%S", pp->p_command);
+ xprintf("%" TCSH_S, pp->p_command);
if (pp->p_flags & PPOU)
xprintf(" |");
if (pp->p_flags & PDIAG)
@@ -1320,8 +1320,22 @@ dojobs(Char **v, struct command *c)
if (chkstop)
chkstop = 2;
if (*++v) {
- if (v[1] || !eq(*v, STRml))
- stderror(ERR_JOBS);
+ if (v[1]) {
+ if (eq(*v, STRml)) {
+ flag |= FANCY | JOBDIR;
+ } else if (eq(*v, STRmZ)) {
+#ifdef HAVE_SETPROCTITLE
+ if (v[1] && v[1][0]) {
+ setproctitle("%s", short2str(v[1]));
+ } else {
+ setproctitle(NULL);
+ }
+#endif
+ return;
+ } else {
+ stderror(ERR_JOBS);
+ }
+ }
flag |= FANCY | JOBDIR;
}
for (i = 1; i <= pmaxindex; i++)
@@ -1526,9 +1540,11 @@ pkill(Char **v, int signum)
case SIGTTOU:
if ((jobflags & PRUNNING) == 0) {
# ifdef SUSPENDED
- xprintf(CGETS(17, 12, "%S: Already suspended\n"), cp);
+ xprintf(CGETS(17, 12, "%" TCSH_S ": Already suspended\n"),
+ cp);
# else /* !SUSPENDED */
- xprintf(CGETS(17, 13, "%S: Already stopped\n"), cp);
+ xprintf(CGETS(17, 13, "%" TCSH_S ": Already stopped\n"),
+ cp);
# endif /* !SUSPENDED */
err1++;
goto cont;
@@ -1550,7 +1566,7 @@ pkill(Char **v, int signum)
}
#endif /* BSDJOBS */
if (killpg(pp->p_jobid, signum) < 0) {
- xprintf("%S: %s\n", cp, strerror(errno));
+ xprintf("%" TCSH_S ": %s\n", cp, strerror(errno));
err1++;
}
#ifdef BSDJOBS
diff --git a/sh.sem.c b/sh.sem.c
index 3850331b5656..d6294efedf6e 100644
--- a/sh.sem.c
+++ b/sh.sem.c
@@ -220,7 +220,7 @@ execute(struct command *t, volatile int wanttty, int *pipein, int *pipeout,
xclose(0);
}
- setcopy(STRstatus, STR0, VAR_READWRITE);
+ setstatus(0);
/*
* This mess is the necessary kludge to handle the prefix builtins:
@@ -655,7 +655,7 @@ execute(struct command *t, volatile int wanttty, int *pipein, int *pipeout,
haderr = ohaderr;
if (adrof(STRprintexitvalue)) {
- int rv = getn(varval(STRstatus));
+ int rv = getstatus();
if (rv != 0)
xprintf(CGETS(17, 2, "Exit %d\n"), rv);
}
@@ -735,8 +735,7 @@ execute(struct command *t, volatile int wanttty, int *pipein, int *pipeout,
if (t->t_dcar) {
t->t_dcar->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ);
execute(t->t_dcar, wanttty, NULL, NULL, do_glob);
- if ((getn(varval(STRstatus)) == 0) !=
- (t->t_dtyp == NODE_AND)) {
+ if ((getstatus() == 0) != (t->t_dtyp == NODE_AND)) {
return;
}
}
diff --git a/sh.set.c b/sh.set.c
index e714cc726bc0..1a53d7524c07 100644
--- a/sh.set.c
+++ b/sh.set.c
@@ -726,8 +726,11 @@ setq(const Char *name, Char **vec, struct varent *p, int flags)
while ((c = p->v_link[f]) != 0) {
if ((f = *name - *c->v_name) == 0 &&
(f = Strcmp(name, c->v_name)) == 0) {
- if (c->v_flags & VAR_READONLY)
+ if (c->v_flags & VAR_READONLY) {
+ if (flags & VAR_NOERROR)
+ return;
stderror(ERR_READONLY|ERR_NAME, c->v_name);
+ }
blkfree(c->vec);
c->v_flags = flags;
trim(c->vec = vec);
@@ -1123,7 +1126,7 @@ x:
cleanup_until(&old_pintr_disabled);
}
len = blklen(p->vec);
- xprintf("%S\t", p->v_name);
+ xprintf("%" TCSH_S "\t", p->v_name);
if (len != 1)
xputchar('(');
blkpr(p->vec);
@@ -1350,3 +1353,21 @@ update_wordchars(void)
word_chars = (VImode ? STR_WORD_CHARS_VI : STR_WORD_CHARS);
}
}
+
+void
+setstrstatus(Char *str)
+{
+ setv(STRstatus, str, VAR_READWRITE|VAR_NOERROR);
+}
+
+void
+setstatus(int n)
+{
+ setcopy(STRstatus, n ? STR1 : STR0, VAR_READWRITE|VAR_NOERROR);
+}
+
+int
+getstatus(void)
+{
+ return getn(varval(STRstatus));
+}
diff --git a/tc.alloc.c b/tc.alloc.c
index 6464279fc3ee..386951f77658 100644
--- a/tc.alloc.c
+++ b/tc.alloc.c
@@ -631,26 +631,39 @@ showall(Char **v, struct command *c)
(unsigned long) membot, (unsigned long) memtop,
(unsigned long) sbrk(0));
#else /* SYSMALLOC */
-#ifndef HAVE_MALLINFO
+#if !defined(HAVE_MALLINFO) && !defined(HAVE_MALLINFO2)
#ifdef USE_SBRK
memtop = sbrk(0);
#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));
-#else /* HAVE_MALLINFO */
+#else
+# if defined(HAVE_MALLINFO2)
+ struct mallinfo2 mi;
+
+ mi = mallinfo2();
+# else
struct mallinfo mi;
mi = mallinfo();
+# endif
xprintf(CGETS(19, 13, "%s current memory allocation:\n"), progname);
- xprintf(CGETS(19, 14, "Total space allocated from system: %d\n"), mi.arena);
- xprintf(CGETS(19, 15, "Number of non-inuse chunks: %d\n"), mi.ordblks);
- xprintf(CGETS(19, 16, "Number of mmapped regions: %d\n"), mi.hblks);
- xprintf(CGETS(19, 17, "Total space in mmapped regions: %d\n"), mi.hblkhd);
- xprintf(CGETS(19, 18, "Total allocated space: %d\n"), mi.uordblks);
- xprintf(CGETS(19, 19, "Total non-inuse space: %d\n"), mi.fordblks);
- xprintf(CGETS(19, 20, "Top-most, releasable space: %d\n"), mi.keepcost);
-#endif /* HAVE_MALLINFO */
+ xprintf(CGETS(19, 14, "Total space allocated from system: %zu\n"),
+ (size_t)mi.arena);
+ xprintf(CGETS(19, 15, "Number of non-inuse chunks: %zu\n"),
+ (size_t)mi.ordblks);
+ xprintf(CGETS(19, 16, "Number of mmapped regions: %zu\n"),
+ (size_t)mi.hblks);
+ xprintf(CGETS(19, 17, "Total space in mmapped regions: %zu\n"),
+ (size_t)mi.hblkhd);
+ xprintf(CGETS(19, 18, "Total allocated space: %zu\n"),
+ (size_t)mi.uordblks);
+ xprintf(CGETS(19, 19, "Total non-inuse space: %zu\n"),
+ (size_t)mi.fordblks);
+ xprintf(CGETS(19, 20, "Top-most, releasable space: %zu\n"),
+ (size_t)mi.keepcost);
+#endif /* HAVE_MALLINFO || HAVE_MALLINFO2 */
#endif /* SYSMALLOC */
USE(c);
USE(v);
diff --git a/tc.bind.c b/tc.bind.c
index 33312f478522..74883a78d0e5 100644
--- a/tc.bind.c
+++ b/tc.bind.c
@@ -32,6 +32,7 @@
#include "sh.h"
#include "ed.h"
#include "ed.defns.h"
+#include "tw.h"
static void printkey (const KEYCMD *, CStr *);
static KEYCMD parsecmd (Char *);
@@ -139,7 +140,7 @@ dobindkey(Char **v, struct command *c)
}
cleanup_push(in.buf, xfree);
-#ifndef WINNT_NATIVE
+#if !defined(WINNT_NATIVE) && defined(SHORT_STRINGS)
if (in.buf[0] > 0xFF) {
bad_spec(in.buf);
cleanup_until(in.buf);
@@ -385,7 +386,7 @@ parsestring(const Char *str, CStr *buf)
cleanup_push(&b, Strbuf_cleanup);
for (p = str; *p != 0; p++) {
if ((*p & CHAR) == '\\' || (*p & CHAR) == '^') {
- if ((es = parseescape(&p)) == CHAR_ERR) {
+ if ((es = parseescape(&p, TRUE)) == CHAR_ERR) {
cleanup_until(&b);
return 0;
} else
diff --git a/tc.const.c b/tc.const.c
index 664897c9c0fd..323930063ee5 100644
--- a/tc.const.c
+++ b/tc.const.c
@@ -267,6 +267,7 @@ Char STRperiodic[] = { 'p', 'e', 'r', 'i', 'o', 'd', 'i', 'c', '\0' };
Char STRtperiod[] = { 't', 'p', 'e', 'r', 'i', 'o', 'd', '\0' };
Char STRmf[] = { '-', 'f', '\0' };
Char STRml[] = { '-', 'l', '\0' };
+Char STRmZ[] = { '-', 'Z', '\0' };
Char STRslash[] = { '/', '\0' };
Char STRdotsl[] = { '.', '/', '\0' };
Char STRdotdotsl[] = { '.', '.', '/', '\0' };
diff --git a/tc.func.c b/tc.func.c
index 9f2b1a29f4eb..1c1bf778bb6a 100644
--- a/tc.func.c
+++ b/tc.func.c
@@ -98,7 +98,7 @@ expand_lex(const struct wordent *sp0, int from, int to)
const struct wordent *sp;
Char *s;
Char prev_c;
- int i;
+ int i, dolsq = 0;
prev_c = '\0';
@@ -113,11 +113,29 @@ expand_lex(const struct wordent *sp0, int from, int to)
* character {(PWP) and backslash} seem to be dealt with
* elsewhere.
*/
- if ((*s & QUOTE)
- && (((*s & TRIM) == HIST && HIST != '\0') ||
- (((*s & TRIM) == '\'') && (prev_c != '\\')) ||
- (((*s & TRIM) == '\"') && (prev_c != '\\')))) {
- Strbuf_append1(&buf, '\\');
+ if (*s & QUOTE) {
+ if ((*s & TRIM) == HIST && HIST != '\0')
+ Strbuf_append1(&buf, '\\');
+ else
+ switch (*s & TRIM) {
+ case '\'':
+ if (prev_c == '\\') break;
+ if (dolsq) {
+ dolsq = 0;
+ break;
+ }
+ if (prev_c == '$') {
+ dolsq++;
+ break;
+ }
+ Strbuf_append1(&buf, '\\');
+ break;
+ case '\"':
+ if (prev_c == '\\') break;
+ if (dolsq) break;
+ Strbuf_append1(&buf, '\\');
+ break;
+ }
}
#if INVALID_BYTE != 0
if ((*s & INVALID_BYTE) != INVALID_BYTE) /* *s < INVALID_BYTE */
@@ -336,7 +354,7 @@ dolist(Char **v, struct command *c)
print_by_column(STRNULL, &v[i], k - i, FALSE);
}
haderr = 1;
- xprintf("%S: %s.\n", tmp, strerror(err));
+ xprintf("%" TCSH_S ": %s.\n", tmp, strerror(err));
haderr = 0;
i = k + 1;
ret = 1;
@@ -351,7 +369,7 @@ dolist(Char **v, struct command *c)
}
if (k != 0 && v[1] != NULL)
xputchar('\n');
- xprintf("%S:\n", tmp);
+ xprintf("%" TCSH_S ":\n", tmp);
buf.len = 0;
for (cp = tmp; *cp; cp++)
Strbuf_append1(&buf, (*cp | QUOTE));
@@ -453,7 +471,7 @@ cmd_expand(Char *cmd, Char **str)
if ((vp = adrof1(cmd, &aliases)) != NULL && vp->vec != NULL) {
if (str == NULL) {
- xprintf(CGETS(22, 1, "%S: \t aliased to "), cmd);
+ xprintf(CGETS(22, 1, "%" TCSH_S ": \t aliased to "), cmd);
blkpr(vp->vec);
xputchar('\n');
}
@@ -485,7 +503,7 @@ dowhich(Char **v, struct command *c)
rv &= cmd_expand(*v, NULL);
if (!rv)
- setcopy(STRstatus, STR1, VAR_READWRITE);
+ setstatus(1);
}
static int
@@ -999,6 +1017,7 @@ aliasrun(int cnt, Char *s1, Char *s2)
getexit(osetexit);
if (seterr) {
+ cleanhist();
xfree(seterr);
seterr = NULL; /* don't repeatedly print err msg. */
}
@@ -1021,7 +1040,7 @@ aliasrun(int cnt, Char *s1, Char *s2)
cleanup_push(&w, lex_cleanup);
/* Save the old status */
- status = getn(varval(STRstatus));
+ status = getstatus();
/* expand aliases like process() does. */
alias(&w);
@@ -1075,8 +1094,9 @@ aliasrun(int cnt, Char *s1, Char *s2)
}
cleanup_until(&w);
pendjob();
+ cleanhist();
/* Restore status */
- setv(STRstatus, putn((tcsh_number_t)status), VAR_READWRITE);
+ setstrstatus(putn((tcsh_number_t)status));
}
void
@@ -1162,7 +1182,7 @@ rmstar(struct wordent *cp)
cmd++;
#ifdef RMDEBUG
if (*tag)
- xprintf(CGETS(22, 7, "parsing command line [%S]\n"), cmd);
+ xprintf(CGETS(22, 7, "parsing command line [%" TCSH_S "]\n"), cmd);
#endif /* RMDEBUG */
if (!StrQcmp(cmd, STRrm)) {
args = we->next;
@@ -1223,7 +1243,7 @@ rmstar(struct wordent *cp)
if (*tag) {
xprintf(CGETS(22, 10, "command line now is:\n"));
for (we = cp->next; we != cp; we = we->next)
- xprintf("[%S] ", we->word);
+ xprintf("[%" TCSH_S "] ", we->word);
}
#endif /* RMDEBUG */
pintr_disabled = opintr_disabled;
@@ -1298,7 +1318,7 @@ continue_jobs(struct wordent *cp)
if (*tag) {
xprintf(CGETS(22, 13, "command line now is:\n"));
for (we = cp->next; we != cp; we = we->next)
- xprintf("%S ", we->word);
+ xprintf("%" TCSH_S " ", we->word);
}
#endif /* CNDEBUG */
return;
@@ -2105,7 +2125,7 @@ dotermname(Char **v, struct command *c)
/* no luck - the user didn't provide one and none is
* specified in the environment
*/
- setcopy(STRstatus, STR1, VAR_READWRITE);
+ setstatus(1);
return;
}
@@ -2118,8 +2138,8 @@ dotermname(Char **v, struct command *c)
*/
if (tgetent(termcap_buffer, termtype) == 1) {
xprintf("%s\n", termtype);
- setcopy(STRstatus, STR0, VAR_READWRITE);
+ setstatus(0);
} else
- setcopy(STRstatus, STR1, VAR_READWRITE);
+ setstatus(1);
}
#endif /* WINNT_NATIVE */
diff --git a/tc.nls.c b/tc.nls.c
index f59df412e14a..0ceff85a124d 100644
--- a/tc.nls.c
+++ b/tc.nls.c
@@ -136,8 +136,10 @@ NLSClassify(Char c, int nocomb, int drawPrompt)
if (c >= 0x100000) /* U+100000 = F4 80 80 80 */
return NLSCLASS_ILLEGAL3;
#endif
+#ifdef SHORT_STRINGS
if (c >= 0x10000) /* U+10000 = F0 90 80 80 */
return NLSCLASS_ILLEGAL2;
+#endif
}
if (Iscntrl(c) && (c & CHAR) < 0x100) {
if (c == '\n')
diff --git a/tc.printf.c b/tc.printf.c
index dca375a89019..8e94e590de73 100644
--- a/tc.printf.c
+++ b/tc.printf.c
@@ -305,7 +305,9 @@ doprnt(void (*addchar) (int), const char *sfmt, va_list ap)
case 's':
case 'q':
bp = va_arg(ap, char *);
+#ifdef SHORT_STRINGS
lcase_s:
+#endif
if (!bp)
bp = snil;
f_width = f_width - strlen(bp);
diff --git a/tc.prompt.c b/tc.prompt.c
index 8ab6da958a2d..65066f11211e 100644
--- a/tc.prompt.c
+++ b/tc.prompt.c
@@ -38,7 +38,7 @@
* PWP 4/27/87 -- rearange for tcsh.
* mrdch@com.tau.edu.il 6/26/89 - added ~, T and .# - rearanged to switch()
* instead of if/elseif
- * Luke Mewburn, <lukem@cs.rmit.edu.au>
+ * Luke Mewburn
* 6-Sep-91 changed date format
* 16-Feb-94 rewrote directory prompt code, added $ellipsis
* 29-Dec-96 added rprompt support
@@ -340,7 +340,6 @@ tprintf(int what, const Char *fmt, const char *str, time_t tim, ptr_t info)
break;
}
- /* lukem: new directory prompt code */
case '~':
case '/':
case '.':
@@ -453,7 +452,6 @@ tprintf(int what, const Char *fmt, const char *str, time_t tim, ptr_t info)
while (*z)
Strbuf_append1(&buf, attributes | *z++);
break;
- /* lukem: end of new directory prompt code */
case 'n':
#ifndef HAVENOUTMP
@@ -596,7 +594,7 @@ tprintf(int what, const Char *fmt, const char *str, time_t tim, ptr_t info)
}
}
else if (*cp == '\\' || *cp == '^')
- Strbuf_append1(&buf, attributes | parseescape(&cp));
+ Strbuf_append1(&buf, attributes | parseescape(&cp, TRUE));
else if (*cp == HIST) { /* EGS: handle '!'s in prompts */
if (what == FMT_HISTORY)
cz = fmthist('h', info);
diff --git a/tc.vers.c b/tc.vers.c
index 6b739e5cb2ce..737a4360d110 100644
--- a/tc.vers.c
+++ b/tc.vers.c
@@ -156,7 +156,7 @@ fix_version(void)
version = xasprintf(
-"tcsh %d.%.2d.%.2d (%s) %s (%S-%S-%S) options %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+"tcsh %d.%.2d.%.2d (%s) %s (%" TCSH_S "-%" TCSH_S "-%" TCSH_S ") options %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
REV, VERS, PATCHLEVEL, ORIGIN, DATE, machtype, vendor, ostype,
SSSTR, NLSSTR, LFSTR, DLSTR, VISTR, DTRSTR, BYESTR,
ALSTR, KANSTR, SMSTR, HBSTR, NGSTR, RHSTR, AFSSTR, NDSTR,
diff --git a/tcsh.man b/tcsh.man
index e348756e8411..8be7a0d289da 100644
--- a/tcsh.man
+++ b/tcsh.man
@@ -14,56 +14,40 @@
.\" 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
+.\" 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
+.\" 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)
+.\" OR SERVICES; LESS 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.
-.\"
-.\" Style notes for the tcsh man page:
-.\"
-.\" - Tags in lists are bold, except in the FILES section where they are
-.\" italic.
-.\"
-.\" - References are bold for section headings and environment and shell
-.\" variables and italic for commands (externals, builtins, aliases, and
-.\" editor commands) and arguments to commands.
-.\"
-.\" - Be careful with the .B and .I macros: they handle only a limited number
-.\" of words. Work around this with \fB and \fI, but only if absolutely
-.\" necessary, because tcsh.man2html uses .B/.I to find name anchors.
-.\"
+.\"
.\" - Indent in multiples of 4, usually 8.
-.\"
-.\" - 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 -.
-.\"
-.\" - Include the tilde when naming dot files. `~/.login', not `.login'.
-.\"
-.\" - Refer to external commands in man page format, e.g., `csh(1)'. However,
-.\" tcsh is `tcsh', not `tcsh(1)', because this is the tcsh man page (and
+.\"
+.\" - Include the tilde when naming dot files. .Pa ~/.login , not .Pa .login
+.\"
+.\" - Refer to external commands in man page format, e.g., .Xr csh 1
+.\" However, tcsh is .Nm , because this is the tcsh man page (and
.\" see the next note anyway).
-.\"
-.\" - Say `the shell', not `tcsh', unless distinguishing between tcsh and csh.
-.\"
-.\" - Say `shell variable'/`environment variable' instead of `variable'
+.\"
+.\" - Write `the shell', not `tcsh', unless distinguishing between tcsh and csh.
+.\"
+.\" - Write `shell variable'/`environment variable' instead of `variable'
.\" and `builtin command'/`editor command' instead of `builtin' or `command'
.\" unless the distinction is absolutely clear from context.
-.\"
+.\"
.\" - Use the simple present tense. `The shell uses', not `The shell will use'.
-.\"
+.\"
.\" - IMPORTANT: Cross-reference as much as possible. Commands, variables,
.\" etc. in the reference section should be mentioned in the appropriate
.\" descriptive section, or at least in the reference-section description
@@ -71,3277 +55,6442 @@
.\" section. Remember to note OS-specific things in "OS variant support",
.\" new features in NEW FEATURES and referenced external commands in SEE
.\" ALSO.
-.\"
-.\" - tcsh.man2html depends heavily on the specific nroff commands used in the
-.\" man page when the script was written. Please stick closely to the style
-.\" used here if you can. In particular, please don't use nroff commands
-.\" which aren't already used herein.
-.\"
-.TH TCSH 1 "26 Apr 2021" "Astron 6.22.04"
-.SH NAME
-tcsh \- C shell with file name completion and command line editing
-.SH SYNOPSIS
-.B tcsh \fR[\fB\-bcdefFimnqstvVxX\fR] [\fB\-Dname\fR[\fB=value\fR]] [arg ...]
-.br
-.B tcsh \-l
-.SH DESCRIPTION
-\fItcsh\fR is an enhanced but completely compatible version of the Berkeley
-UNIX C shell, \fIcsh\fR(1).
+.\"
+.Dd December 21, 2022
+.Dt TCSH 1
+.Os Astron 6.24.07
+.
+.Sh NAME
+.Nm tcsh
+.Nd C shell with file name completion and command line editing
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl bcdefFimnqstvVxX
+.Op Fl D Ns Ar name Ns Op Ns = Ns Ar value
+.Op Ar arg
+\&...
+.Nm
+.Fl l
+.
+.Sh DESCRIPTION
+.Nm
+is an enhanced but completely compatible version of the Berkeley
+UNIX C shell,
+.Xr csh 1 .
It is a command language interpreter usable both as an interactive login
shell and a shell script command processor.
-It includes a command-line editor (see \fBThe command-line editor\fR),
-programmable word completion (see \fBCompletion and listing\fR),
-spelling correction (see \fBSpelling correction\fR),
-a history mechanism (see \fBHistory substitution\fR),
-job control (see \fBJobs\fR)
+It includes a command-line editor (see
+.Sx The command-line editor (+) ) ,
+programmable word completion (see
+.Sx Completion and listing (+) ) ,
+spelling correction (see
+.Sx Spelling correction (+) ) ,
+a history mechanism (see
+.Sx History substitution ) ,
+job control (see
+.Sx Jobs )
and a C-like syntax.
-The \fBNEW FEATURES\fR section describes major enhancements of \fItcsh\fR
-over \fIcsh\fR(1).
+The
+.Sx NEW FEATURES (+)
+section describes major enhancements of
+.Nm
+over
+.Xr csh 1 .
Throughout this manual, features of
-\fItcsh\fR not found in most \fIcsh\fR(1) implementations
-(specifically, the 4.4BSD \fIcsh\fR)
-are labeled with `(+)', and features which are present in \fIcsh\fR(1)
-but not usually documented are labeled with `(u)'.
-.SS "Argument list processing"
-If the first argument (argument 0) to the shell is `\-' then it is a
-login shell. A login shell can be also specified by invoking the shell with
-the \fB\-l\fR flag as the only argument.
-.PP
+.Nm
+not found in most
+.Xr csh 1
+implementations
+(specifically, the 4.4BSD
+.Xr csh 1 )
+are labeled with
+.Sq (+) ,
+and features which are present in
+.Xr csh 1
+but not usually documented are labeled with
+.Sq (u) .
+.
+.Ss Argument list processing
+If the first argument (argument 0) to the shell is
+.Ql \-
+then it is a login shell.
+A login shell can be also specified by invoking the shell with
+the
+.Fl l
+flag as the only argument.
+.Pp
The rest of the flag arguments are interpreted as follows:
-.TP 4
-.B \-b
-Forces a ``break'' from option processing, causing any
-further shell arguments to be treated as non-option arguments. The remaining
-arguments will not be interpreted as shell options. This may be used to pass
-options to a shell script without confusion or possible subterfuge. The shell
-will not run a set-user ID script without this option.
-.TP 4
-.B \-c
+.Bl -tag -width 6n
+.
+.It Fl b
+Forces a
+.Dq break
+from option processing, causing any
+further shell arguments to be treated as non-option arguments.
+The remaining arguments will not be interpreted as shell options.
+This may be used to pass options to a shell script without confusion
+or possible subterfuge.
+The shell will not run a set-user ID script without this option.
+.
+.It Fl c
Commands are read from the following argument (which must be present, and
must be a single argument),
-stored in the \fBcommand\fR shell variable for reference, and executed.
-Any remaining arguments are placed in the \fBargv\fR shell variable.
-.TP 4
-.B \-d
-The shell loads the directory stack from \fI~/.cshdirs\fR as described under
-\fBStartup and shutdown\fR, whether or not it is a login shell. (+)
-.TP 4
-.B \-D\fIname\fR[=\fIvalue\fR]
-Sets the environment variable \fIname\fR to \fIvalue\fR. (Domain/OS only) (+)
-.TP 4
-.B \-e
+stored in the
+.Ic command
+shell variable for reference, and executed.
+Any remaining arguments are placed in the
+.Ic argv
+shell variable.
+.
+.It Fl d
+The shell loads the directory stack from
+.Pa ~/.cshdirs
+as described under
+.Sx Startup and shutdown ,
+whether or not it is a login shell. (+)
+.
+.It Fl D Ns Ar name Ns Op Ns = Ns Ar value
+Sets the environment variable
+.Ar name
+to
+.Ar value .
+(Domain/OS only) (+)
+.
+.It Fl e
The shell exits if any invoked command terminates abnormally or
yields a non-zero exit status.
-.TP 4
-.B \-f
-The shell does not load any resource or startup files, or perform any
+.
+.It Fl f
+The shell does not load any resource or startup files, or perform any
command hashing, and thus starts faster.
-.TP 4
-.B \-F
-The shell uses \fIfork\fR(2) instead of \fIvfork\fR(2) to spawn processes. (+)
-.TP 4
-.B \-i
+.
+.It Fl F
+The shell uses
+.Xr fork 2
+instead of
+.Xr vfork 2
+to spawn processes. (+)
+.
+.It Fl i
The shell is interactive and prompts for its top-level input, even if
-it appears to not be a terminal. Shells are interactive without this option if
+it appears to not be a terminal.
+Shells are interactive without this option if
their inputs and outputs are terminals.
-.TP 4
-.B \-l
-The shell is a login shell. Applicable only if \fB\-l\fR is the only
+.
+.It Fl l
+The shell is a login shell.
+Applicable only if
+.Fl l
+is the only
flag specified.
-.TP 4
-.B \-m
-The shell loads \fI~/.tcshrc\fR even if it does not belong to the effective
-user. Newer versions of \fIsu\fR(1) can pass \fB\-m\fR to the shell. (+)
-.TP 4
-.B \-n
+.
+.It Fl m
+The shell loads
+.Pa ~/.tcshrc
+even if it does not belong to the effective user.
+Newer versions of
+.Xr su 1
+can pass
+.Fl m
+to the shell. (+)
+.
+.It Fl n
The shell parses commands but does not execute them.
This aids in debugging shell scripts.
-.TP 4
-.B \-q
-The shell accepts SIGQUIT (see \fBSignal handling\fR) and behaves when
-it is used under a debugger. Job control is disabled. (u)
-.TP 4
-.B \-s
+.
+.It Fl q
+The shell accepts SIGQUIT (see
+.Sx Signal handling )
+and behaves when it is used under a debugger.
+Job control is disabled. (u)
+.
+.It Fl s
Command input is taken from the standard input.
-.TP 4
-.B \-t
-The shell reads and executes a single line of input. A `\e' may be used to
+.
+.It Fl t
+The shell reads and executes a single line of input.
+A
+.Ql \e
+may be used to
escape the newline at the end of this line and continue onto another line.
-.TP 4
-.B \-v
-Sets the \fBverbose\fR shell variable, so that
+.
+.It Fl v
+Sets the
+.Ic verbose
+shell variable, so that
command input is echoed after history substitution.
-.TP 4
-.B \-x
-Sets the \fBecho\fR shell variable, so that commands are echoed
+.
+.It Fl x
+Sets the
+.Ic echo
+shell variable, so that commands are echoed
immediately before execution.
-.TP 4
-.B \-V
-Sets the \fBverbose\fR shell variable even before executing \fI~/.tcshrc\fR.
-.TP 4
-.B \-X
-Is to \fB\-x\fR as \fB\-V\fR is to \fB\-v\fR.
-.TP 4
-.B \-\-help
+.
+.It Fl V
+Sets the
+.Ic verbose
+shell variable even before executing
+.Pa ~/.tcshrc .
+.
+.It Fl X
+Is to
+.Fl x
+as
+.Fl V
+is to
+.Fl v .
+.
+.It Fl \-help
Print a help message on the standard output and exit. (+)
-.TP 4
-.B \-\-version
+.
+.It Fl \-version
Print the version/platform/compilation options on the standard output and exit.
-This information is also contained in the \fBversion\fR shell variable. (+)
-.PP
+This information is also contained in the
+.Ic version
+shell variable. (+)
+.El
+.Pp
After processing of flag arguments, if arguments remain but none of the
-\fB\-c\fR, \fB\-i\fR, \fB\-s\fR, or \fB\-t\fR options were given, the first
-argument is taken as the name of a file of commands, or ``script'', to
-be executed. The shell opens this file and saves its name for possible
-resubstitution by `$0'. Because many systems use either the standard
+.Fl c ,
+.Fl i ,
+.Fl s ,
+or
+.Fl t
+options were given, the first argument is taken as the name of a file of
+commands, or
+.Dq script ,
+to be executed.
+The shell opens this file and saves its name for possible
+resubstitution by
+.Ql $0 .
+Because many systems use either the standard
version 6 or version 7 shells whose shell scripts are not compatible
-with this shell, the shell uses such a `standard' shell to execute a script
-whose first character is not a `#', i.e., that does not start with a
+with this shell, the shell uses such a
+.Dq standard
+shell to execute a script
+whose first character is not a
+.Ql # ,
+i.e., that does not start with a
comment.
-.PP
-Remaining arguments are placed in the \fBargv\fR shell variable.
-.SS "Startup and shutdown"
+.Pp
+Remaining arguments are placed in the
+.Ic argv
+shell variable.
+.
+.Ss Startup and shutdown
A login shell begins by executing commands from the system files
-\fI/etc/csh.cshrc\fR and \fI/etc/csh.login\fR.
-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 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
-\fI/etc/csh.cshrc\fR, and \fI~/.login\fR before instead of after
-\fI~/.tcshrc\fR or \fI~/.cshrc\fR and \fI~/.history\fR, if so compiled;
-see the \fBversion\fR shell variable. (+)
-.PP
-Non-login shells read only \fI/etc/csh.cshrc\fR and \fI~/.tcshrc\fR
-or \fI~/.cshrc\fR on startup.
-.PP
-For examples of startup files, please consult
-\fIhttp://tcshrc.sourceforge.net\fR.
-.PP
-Commands like \fIstty\fR(1) and \fItset\fR(1),
-which need be run only once per login, usually go in one's \fI~/.login\fR file.
-Users who need to use the same set of files with both \fIcsh\fR(1) and
-\fItcsh\fR can have only a \fI~/.cshrc\fR which checks for the existence of the
-\fBtcsh\fR shell variable (q.v.) before using \fItcsh\fR-specific commands,
-or can have both a \fI~/.cshrc\fR and a \fI~/.tcshrc\fR which \fIsource\fRs
-(see the builtin command) \fI~/.cshrc\fR.
-The rest of this manual uses `\fI~/.tcshrc\fR' to mean `\fI~/.tcshrc\fR or,
-if \fI~/.tcshrc\fR is not found, \fI~/.cshrc\fR'.
-.PP
+.Pa /etc/csh.cshrc
+and
+.Pa /etc/csh.login .
+It then executes commands from files in the user's
+.Pa home
+directory:
+first
+.Pa ~/.tcshrc (+)
+or, if
+.Pa ~/.tcshrc
+is not found,
+.Pa ~/.cshrc ,
+then the contents of
+.Pa ~/.history
+(or the value of the
+.Ic histfile
+shell variable) are loaded into memory, then
+.Pa ~/.login ,
+and finally
+.Pa ~/.cshdirs
+(or the value of the
+.Ic dirsfile
+shell variable) (+).
+The shell may read
+.Pa /etc/csh.login
+before instead of after
+.Pa /etc/csh.cshrc ,
+and
+.Pa ~/.login
+before instead of after
+.Pa ~/.tcshrc
+or
+.Pa ~/.cshrc
+and
+.Pa ~/.history ,
+if so compiled;
+see the
+.Ic version
+shell variable. (+)
+.Pp
+Non-login shells read only
+.Pa /etc/csh.cshrc
+and
+.Pa ~/.tcshrc
+or
+.Pa ~/.cshrc
+on startup.
+.Pp
+For examples of startup files, please consult:
+.Lk http://tcshrc.sourceforge.net
+.Pp
+Commands like
+.Xr stty 1
+and
+.Xr tset 1 ,
+which need be run only once per login, usually go in one's
+.Pa ~/.login
+file.
+Users who need to use the same set of files with both
+.Xr csh 1
+and
+.Nm
+can have only a
+.Pa ~/.cshrc
+which checks for the existence of the
+.Ic tcsh
+shell variable before using
+.Nm Ns
+\-specific commands,
+or can have both a
+.Pa ~/.cshrc
+and a
+.Pa ~/.tcshrc
+which
+.Ic source Ns
+s
+(see the builtin command)
+.Pa ~/.cshrc .
+The rest of this manual uses
+.Pa ~/.tcshrc
+to mean
+.Pa ~/.tcshrc
+or,
+if
+.Pa ~/.tcshrc
+is not found,
+.Pa ~/.cshrc .
+.Pp
In the normal case, the shell begins reading commands from the terminal,
-prompting with `> '. (Processing of arguments and the use of the shell to
+prompting with
+.Dl Li >\ \&
+.Pp
+(Processing of arguments and the use of the shell to
process files containing command scripts are described later.)
The shell repeatedly reads a line of command input, breaks it into words,
places it on the command history list, parses it and executes each command
in the line.
-.PP
-One can log out by typing `^D' on an empty line, `logout' or `login' or
-via the shell's autologout mechanism (see the \fBautologout\fR shell variable).
-When a login shell terminates it sets the \fBlogout\fR shell variable to
-`normal' or `automatic' as appropriate, then
-executes commands from the files
-\fI/etc/csh.logout\fR and \fI~/.logout\fR. The shell may drop DTR on logout
-if so compiled; see the \fBversion\fR shell variable.
-.PP
+.Pp
+One can log out by typing
+.Ic ^D
+on an empty line,
+.Ic logout
+or
+.Ic login
+or
+via the shell's autologout mechanism (see the
+.Ic autologout
+shell variable).
+When a login shell terminates it sets the
+.Ic logout
+shell variable to
+.Ql normal
+or
+.Ql automatic
+as appropriate, then executes commands from the files
+.Pa /etc/csh.logout
+and
+.Pa ~/.logout .
+The shell may drop DTR on logout
+if so compiled; see the
+.Ic version
+shell variable.
+.Pp
The names of the system login and logout files vary from system to system for
-compatibility with different \fIcsh\fR(1) variants; see \fBFILES\fR.
-.SS Editing
-We first describe \fBThe command-line editor\fR.
-The \fBCompletion and listing\fR and \fBSpelling correction\fR sections
-describe two sets of functionality that are implemented as editor commands
-but which deserve their own treatment.
-Finally, \fBEditor commands\fR lists and describes
+compatibility with different
+.Xr csh 1
+variants; see
+.Sx FILES .
+.
+.Ss Editing
+We first describe
+.Sx The command-line editor (+) .
+The
+.Sx Completion and listing (+)
+and
+.Sx Spelling correction (+)
+sections describe two sets of functionality that are implemented as editor
+commands but which deserve their own treatment.
+Finally,
+.Sx Editor commands (+)
+lists and describes
the editor commands specific to the shell and their default bindings.
-.SS "The command-line editor (+)"
+.
+.Ss The command-line editor (+)
Command-line input can be edited using key sequences much like those used in
-\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.
-\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(1)\-style bindings en masse.
-.PP
-The shell always binds the arrow keys (as defined in the \fBTERMCAP\fR
-environment variable) to
-.PP
-.PD 0
-.RS +4
-.TP 8
-down
-\fIdown-history\fR
-.TP 8
-up
-\fIup-history\fR
-.TP 8
-left
-\fIbackward-char\fR
-.TP 8
-right
-\fIforward-char\fR
-.PD
-.RE
-.PP
+.Xr emacs 1
+or
+.Xr vi 1 .
+The editor is active only when the
+.Ic edit
+shell variable is set, which it is by default in interactive shells.
+The
+.Ic bindkey
+builtin can display and change key bindings to editor commands
+(see
+.Sx Editor commands (+) ) .
+.Xr emacs 1 Ns
+\-style key bindings are used by default
+(unless the shell was compiled otherwise; see the
+.Ic version
+shell variable),
+but
+.Ic bindkey
+can change the key bindings to
+.Xr vi 1 Ns
+\-style bindings en masse.
+.Pp
+The shell always binds the arrow keys (as defined in the
+.Ev TERMCAP
+environment variable) to editor commands:
+.Pp
+.Bl -tag -width ".Ic right" -offset indent -compact
+.It Sy Key
+.Sy Editor command
+.Pp
+.It Ic down
+.Ic down-history
+.It Ic up
+.Ic up-history
+.It Ic left
+.Ic backward-char
+.It Ic right
+.Ic forward-char
+.El
+.Pp
unless doing so would alter another single-character binding.
-One can set the arrow key escape sequences to the empty string with \fIsettc\fR
+One can set the arrow key escape sequences to the empty string with
+.Ic settc
to prevent these bindings.
The ANSI/VT100 sequences for arrow keys are always bound.
-.PP
-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
+.Pp
+Other key bindings are, for the most part, what
+.Xr emacs 1
+and
+.Xr vi 1
+users would expect and can easily be displayed by
+.Ic bindkey ,
+so there
+is no need to list them here.
+Likewise,
+.Ic bindkey
+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
-the shell variable \fBwordchars\fR, while the shell recognizes only whitespace
+Certain key bindings have different behavior depending if
+.Xr emacs 1
+or
+.Xr vi 1 Ns
+\-style bindings are being used; see
+.Ic vimode
+for more information.
+.Pp
+Note that editor commands do not have the same notion of a
+.Dq word
+as does the shell.
+The editor delimits words with any non-alphanumeric characters not in
+the shell variable
+.Ic wordchars ,
+while the shell recognizes only whitespace
and some of the characters with special meanings to it, listed under
-\fBLexical structure\fR.
-.SS "Completion and listing (+)"
+.Sx Lexical structure .
+.
+.Ss Completion and listing (+)
The shell is often able to complete words when given a unique abbreviation.
-Type part of a word (for example `ls /usr/lost') and hit the tab key to
-run the \fIcomplete-word\fR editor command.
-The shell completes the filename `/usr/lost' to `/usr/lost+found/',
+For example, typing part of a word
+.Dl ls /usr/lost
+and hit the tab key to run the
+.Ic complete-word
+editor command.
+The shell completes the filename
+.Pa /usr/lost
+to
+.Pa /usr/lost+found/ ,
replacing the incomplete word with the complete word in the input buffer.
-(Note the terminal `/'; completion adds a `/' to the
-end of completed directories and a space to the end of other completed words,
-to speed typing and provide a visual indicator of successful completion.
-The \fBaddsuffix\fR shell variable can be unset to prevent this.)
-If no match is found (perhaps `/usr/lost+found' doesn't exist),
-the terminal bell rings.
-If the word is already complete (perhaps there is a `/usr/lost' on your
+(Note the terminal
+.Sq Pa / ;
+completion adds a
+.Ql /
+to the end of completed directories and a space to the end of other completed
+words, to speed typing and provide a visual indicator of successful completion.
+The
+.Ic addsuffix
+shell variable can be unset to prevent this.)
+If no match is found (perhaps
+.Pa /usr/lost+found
+doesn't exist), the terminal bell rings.
+If the word is already complete (perhaps there is a
+.Pa /usr/lost
+on your
system, or perhaps you were thinking too far ahead and typed the whole thing)
-a `/' or space is added to the end if it isn't already there.
-.PP
+a
+.Ql /
+or space is added to the end if it isn't already there.
+.Pp
Completion works anywhere in the line, not at just the end; completed
-text pushes the rest of the line to the right. Completion in the middle of a word
+text pushes the rest of the line to the right.
+Completion in the middle of a word
often results in leftover characters to the right of the cursor that need
to be deleted.
-.PP
+.Pp
Commands and variables can be completed in much the same way.
-For example, typing `em[tab]' would complete `em' to
-`emacs' if \fIemacs\fR were the only command on your system beginning with `em'.
-Completion can find a command in any directory in \fBpath\fR or if
-given a full pathname.
-Typing `echo $ar[tab]' would complete `$ar' to `$argv'
-if no other variable began with `ar'.
-.PP
+For example, typing
+.Dl em[tab]
+would complete
+.Ql em
+to
+.Ql emacs
+if
+.Ql emacs
+were the only command on your system beginning with
+.Ql em .
+Completion can find a command in any directory in
+.Ic path
+or if given a full pathname.
+.Pp
+Typing
+.Dl echo $ar[tab]
+would complete
+.Ql $ar
+to
+.Ql $argv
+if no other variable began with
+.Ql ar .
+.Pp
The shell parses the input buffer to determine whether the word you want to
complete should be completed as a filename, command or variable.
The first word in the buffer and the first word following
-`;', `|', `|&', `&&' or `||' is considered to be a command.
-A word beginning with `$' is considered to be a variable.
-Anything else is a filename. An empty line is `completed' as a filename.
-.PP
-You can list the possible completions of a word at any time by typing `^D'
-to run the \fIdelete-char-or-list-or-eof\fR editor command.
-The shell lists the possible completions using the \fIls\-F\fR builtin (q.v.)
+.Ql \&; ,
+.Ql | ,
+.Ql |& ,
+.Ql && ,
+or
+.Ql ||
+is considered to be a command.
+A word beginning with
+.Ql $
+is considered to be a variable.
+Anything else is a filename.
+An empty line is
+.Dq completed
+as a filename.
+.Pp
+You can list the possible completions of a word at any time by typing
+.Ic ^D
+to run the
+.Ic delete-char-or-list-or-eof
+editor command.
+The shell lists the possible completions using the
+.Ic ls\-F
+builtin
and reprints the prompt and unfinished command line, for example:
-.IP "" 4
+.Bd -literal -offset indent
> ls /usr/l[^D]
-.br
lbin/ lib/ local/ lost+found/
-.br
> ls /usr/l
-.PP
-If the \fBautolist\fR shell variable is set, the shell lists the remaining
+.Ed
+.Pp
+If the
+.Ic autolist
+shell variable is set, the shell lists the remaining
choices (if any) whenever completion fails:
-.IP "" 4
+.Bd -literal -offset indent
> set autolist
-.br
> nm /usr/lib/libt[tab]
-.br
libtermcap.a@ libtermlib.a@
-.br
> nm /usr/lib/libterm
-.PP
-If \fBautolist\fR is set to `ambiguous', choices are listed only when
+.Ed
+.Pp
+If the
+.Ic autolist
+shell variable is set to
+.Ql ambiguous ,
+choices are listed only when
completion fails and adds no new characters to the word being completed.
-.PP
+.Pp
A filename to be completed can contain variables, your own or others' home
-directories abbreviated with `~' (see \fBFilename substitution\fR) and
-directory stack entries abbreviated with `='
-(see \fBDirectory stack substitution\fR). For example,
-.IP "" 4
+directories abbreviated with
+.Ql ~
+(see
+.Sx Filename substitution )
+and directory stack entries abbreviated with
+.Ql =
+(see
+.Sx Directory stack substitution (+) ) .
+For example,
+.Bd -literal -offset indent
> ls ~k[^D]
-.br
kahn kas kellogg
-.br
> ls ~ke[tab]
-.br
> ls ~kellogg/
-.PP
+.Ed
+.Pp
or
-.IP "" 4
+.Bd -literal -offset indent
> set local = /usr/local
-.br
> ls $lo[tab]
-.br
> ls $local/[^D]
-.br
bin/ etc/ lib/ man/ src/
-.br
> ls $local/
-.PP
+.Ed
+.Pp
Note that variables can also be expanded explicitly with the
-\fIexpand-variables\fR editor command.
-.PP
-\fIdelete-char-or-list-or-eof\fR lists at only the end of the line;
+.Ic expand-variables
+editor command.
+.Pp
+.Ic delete-char-or-list-or-eof
+lists at only the end of the line;
in the middle of a line it deletes the character under the cursor and
-on an empty line it logs one out or, if \fBignoreeof\fR is set, does nothing.
-`M-^D', bound to the editor command \fIlist-choices\fR, lists completion
-possibilities anywhere on a line, and \fIlist-choices\fR (or any one of the
+on an empty line it logs one out or, if the
+.Ic ignoreeof
+variable is set, does nothing.
+.Ic M-^D ,
+bound to the editor command
+.Ic list-choices ,
+lists completion
+possibilities anywhere on a line, and
+.Ic list-choices
+(or any one of the
related editor commands that do or don't delete, list and/or log out,
-listed under \fIdelete-char-or-list-or-eof\fR) can be bound to `^D' with
-the \fIbindkey\fR builtin command if so desired.
-.PP
-The \fIcomplete-word-fwd\fR and \fIcomplete-word-back\fR editor commands
+listed under
+.Ic delete-char-or-list-or-eof )
+can be bound to
+.Ic ^D
+with the
+.Ic bindkey
+builtin command if so desired.
+.Pp
+The
+.Ic complete-word-fwd
+and
+.Ic complete-word-back
+editor commands
(not bound to any keys by default) can be used to cycle up and down through
the list of possible completions, replacing the current word with the next or
previous word in the list.
-.PP
-The shell variable \fBfignore\fR can be set to a list of suffixes to be
-ignored by completion. Consider the following:
-.IP "" 4
+.Pp
+The shell variable
+.Ic fignore
+can be set to a list of suffixes to be ignored by completion.
+Consider the following:
+.Bd -literal -offset indent
> ls
-.br
Makefile condiments.h~ main.o side.c
-.br
README main.c meal side.o
-.br
condiments.h main.c~
-.br
> set fignore = (.o \e~)
-.br
> emacs ma[^D]
-.br
main.c main.c~ main.o
-.br
> emacs ma[tab]
-.br
> emacs main.c
-.PP
-`main.c~' and `main.o' are ignored by completion (but not listing),
-because they end in suffixes in \fBfignore\fR.
-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
-If the \fBcomplete\fR shell variable is set to `enhance', completion
-1) ignores case and 2) considers periods, hyphens and underscores
-(`.', `\-' and `_') to be word separators and hyphens and underscores to
-be equivalent. If you had the following files
-.IP "" 4
+.Ed
+.Pp
+.Ql main.c~
+and
+.Ql main.o
+are ignored by completion (but not listing),
+because they end in suffixes in
+.Ic fignore .
+Note that a
+.Ql \e
+was needed in front of
+.Ql ~
+to prevent it from being expanded to
+.Ic home
+as described under
+.Sx Filename substitution .
+.Ic fignore
+is ignored if only one completion is possible.
+.Pp
+If the
+.Ic complete
+shell variable is set to
+.Ql enhance ,
+completion 1) ignores case and 2) considers periods, hyphens and underscores
+.Po
+.Ql \&. ,
+.Ql \- ,
+and
+.Ql _
+.Pc
+to be word separators and hyphens and underscores to be equivalent.
+If you had the following files
+.Bd -literal -offset indent
comp.lang.c comp.lang.perl comp.std.c++
-.br
comp.lang.c++ comp.std.c
-.PP
-and typed `mail \-f c.l.c[tab]', it would be completed to
-`mail \-f comp.lang.c', and ^D would list `comp.lang.c' and `comp.lang.c++'.
-`mail \-f c..c++[^D]' would list `comp.lang.c++' and `comp.std.c++'. Typing
-`rm a\-\-file[^D]' in the following directory
-.IP "" 4
+.Ed
+.Pp
+and typed
+.Dl mail \-f c.l.c[tab]
+it would be completed to
+.Dl mail \-f comp.lang.c
+and typing
+.Dl mail \-f c.l.c[^D]
+would list
+.Ql comp.lang.c
+and
+.Ql comp.lang.c++ .
+.Pp
+Typing
+.Dl mail \-f c..c++[^D]
+would list
+.Ql comp.lang.c++
+and
+.Ql comp.std.c++ .
+.Pp
+Typing
+.Dl rm a\-\-file[^D]
+in the following directory
+.Bd -literal -offset indent
A_silly_file a-hyphenated-file another_silly_file
-.PP
+.Ed
+.Pp
would list all three files, because case is ignored and hyphens and
-underscores are equivalent. Periods, however, are not equivalent to
+underscores are equivalent.
+Periods, however, are not equivalent to
hyphens or underscores.
-.PP
-If the \fBcomplete\fR shell variable is set to `Enhance', completion
+.Pp
+If the
+.Ic complete
+shell variable is set to
+.Ql Enhance ,
+completion
ignores case and differences between a hyphen and an underscore word
separator only when the user types a lowercase character or a hyphen.
-Entering an uppercase character or an underscore will not match the
-corresponding lowercase character or hyphen word separator.
-Typing `rm a\-\-file[^D]' in the directory of the previous example would
-still list all three files, but typing `rm A\-\-file' would match only
-`A_silly_file' and typing `rm a__file[^D]' would match just `A_silly_file'
-and `another_silly_file' because the user explicitly used an uppercase
-or an underscore character.
-.PP
+Entering an uppercase character or an underscore will not match the
+corresponding lowercase character or hyphen word separator.
+.Pp
+Typing
+.Dl rm a\-\-file[^D]
+in the directory of the previous example would
+still list all three files, but typing
+.Dl rm A\-\-file
+would match only
+.Ql A_silly_file
+and typing
+.Dl rm a__file[^D]
+would match just
+.Ql A_silly_file
+and
+.Ql another_silly_file
+because the user explicitly used an uppercase
+or an underscore character.
+.Pp
Completion and listing are affected by several other shell variables:
-\fBrecexact\fR can be set to complete on the shortest possible unique
+.Ic recexact
+can be set to complete on the shortest possible unique
match, even if more typing might result in a longer match:
-.IP "" 4
+.Bd -literal -offset indent
> ls
-.br
fodder foo food foonly
-.br
> set recexact
-.br
> rm fo[tab]
-.PP
-just beeps, because `fo' could expand to `fod' or `foo', but if we type
-another `o',
-.IP "" 4
+.Ed
+.Pp
+just beeps, because
+.Ql fo
+could expand to
+.Ql fod
+or
+.Ql foo ,
+but if we type another
+.Ql o ,
+.Bd -literal -offset indent
> rm foo[tab]
-.br
> rm foo
-.PP
-the completion completes on `foo', even though `food' and `foonly'
+.Ed
+.Pp
+the completion completes on
+.Ql foo ,
+even though
+.Ql food
+and
+.Ql foonly
also match.
-\fBautoexpand\fR can be set to run the \fIexpand-history\fR editor command
-before each completion attempt, \fBautocorrect\fR can be set to
-spelling-correct the word to be completed (see \fBSpelling correction\fR)
-before each completion attempt and \fBcorrect\fR can be set to complete
-commands automatically after one hits `return'.
-\fBmatchbeep\fR can be set to make completion beep or not beep in a variety
-of situations, and \fBnobeep\fR can be set to never beep at all.
-\fBnostat\fR can be set to a list of directories and/or patterns that
-match directories to prevent the completion mechanism from \fIstat\fR(2)ing
+.Ic autoexpand
+can be set to run the
+.Ic expand-history
+editor command
+before each completion attempt,
+.Ic autocorrect
+can be set to
+spelling-correct the word to be completed (see
+.Sx Spelling correction (+) )
+before each completion attempt and
+.Ic correct
+can be set to complete commands automatically after one hits
+return.
+.Ic matchbeep
+can be set to make completion beep or not beep in a variety
+of situations, and
+.Ic nobeep
+can be set to never beep at all.
+.Ic nostat
+can be set to a list of directories and/or patterns that
+match directories to prevent the completion mechanism from
+.Xr stat 2 Ns
+ing
those directories.
-\fBlistmax\fR and \fBlistmaxrows\fR can be set to limit the number of items
+.Ic listmax
+and
+.Ic listmaxrows
+can be set to limit the number of items
and rows (respectively) that are listed without asking first.
-\fBrecognize_only_executables\fR can be set to make the shell list only
+.Ic recognize_only_executables
+can be set to make the shell list only
executables when listing commands, but it is quite slow.
-.PP
-Finally, the \fIcomplete\fR builtin command can be used to tell the shell how
+.Pp
+Finally, the
+.Ic complete
+builtin command can be used to tell the shell how
to complete words other than filenames, commands and variables.
-Completion and listing do not work on glob-patterns (see \fBFilename substitution\fR),
-but the \fIlist-glob\fR and \fIexpand-glob\fR editor commands perform
+Completion and listing do not work on glob-patterns (see
+.Sx Filename substitution ) ,
+but the
+.Ic list-glob
+and
+.Ic expand-glob
+editor commands perform
equivalent functions for glob-patterns.
-.SS "Spelling correction (+)"
-The shell can sometimes correct the spelling of filenames, commands and variable names
-as well as completing and listing them.
-.PP
-Individual words can be spelling-corrected with the \fIspell-word\fR
-editor command (usually bound to M-s and M-S)
-and the entire input buffer with \fIspell-line\fR (usually bound to M-$).
-The \fBcorrect\fR shell variable can be set to `cmd' to correct the
-command name or `all' to correct the entire line each time return is typed,
-and \fBautocorrect\fR can be set to correct the word to be completed
+.
+.Ss Spelling correction (+)
+The shell can sometimes correct the spelling of filenames, commands and
+variable names as well as completing and listing them.
+.Pp
+Individual words can be spelling-corrected with the
+.Ic spell-word
+editor command (usually bound to
+.Ic M-s
+and
+.Ic M-S )
+and the entire input buffer with
+.Ic spell-line
+(usually bound to
+.Ic M-$ ) .
+The
+.Ic correct
+shell variable can be set to
+.Ql cmd
+to correct the command name or
+.Ql all
+to correct the entire line each time return is typed, and
+.Ic autocorrect
+can be set to correct the word to be completed
before each completion attempt.
-.PP
+.Pp
When spelling correction is invoked in any of these ways and
the shell thinks that any part of the command line is misspelled,
it prompts with the corrected line:
-.IP "" 4
+.Bd -literal -offset indent
> set correct = cmd
-.br
> lz /usr/bin
-.br
CORRECT>ls /usr/bin (y|n|e|a)?
-.PP
-One can answer `y' or space to execute the corrected line,
-`e' to leave the uncorrected command in the input buffer,
-`a' to abort the command as if `^C' had been hit, and
+.Ed
+.Pp
+One can answer
+.Ql y
+or space to execute the corrected line,
+.Ql e
+to leave the uncorrected command in the input buffer,
+.Ql a
+to abort the command as if
+.Ic ^C
+had been hit, and
anything else to execute the original line unchanged.
-.PP
+.Pp
Spelling correction recognizes user-defined completions (see the
-\fIcomplete\fR builtin command). If an input word in a position for
+.Ic complete
+builtin command).
+If an input word in a position for
which a completion is defined resembles a word in the completion list,
spelling correction registers a misspelling and suggests the latter
-word as a correction. However, if the input word does not match any of
+word as a correction.
+However, if the input word does not match any of
the possible completions for that position, spelling correction does
not register a misspelling.
-.PP
+.Pp
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.
-.SS "Editor commands (+)"
-`bindkey' lists key bindings and `bindkey \-l' lists and briefly describes
-editor commands.
+.
+.Ss Editor commands (+)
+.Ic bindkey
+lists key bindings and
+.Ic bindkey \-l
+lists and briefly describes editor commands.
Only new or especially interesting editor commands are described here.
-See \fIemacs\fR(1) and \fIvi\fR(1) for descriptions of each editor's
-key bindings.
-.PP
+See
+.Xr emacs 1
+and
+.Xr vi 1
+for descriptions of each editor's key bindings.
+.Pp
The character or characters to which each command is bound by default is
-given in parentheses. `^\fIcharacter\fR' means a control character and
-`M-\fIcharacter\fR' a meta character, typed as escape-\fIcharacter\fR
-on terminals without a meta key. Case counts, but commands that are bound
+given in parentheses.
+.Ic ^ Ns Ar character
+means a control character and
+.Ic M- Ns Ar character
+a meta character, typed as
+.Ic escape- Ns Ar character
+(or
+.Ic ^ Ns \&[ Ns Ar character )
+on terminals without a meta key.
+Case counts, but commands that are bound
to letters by default are bound to both lower- and uppercase letters for
convenience.
-.TP 8
-.B backward-char \fR(^B, left)
+.Pp
+Supported editor commands are:
+.Bl -tag -width 6n
+.
+.It Ic backward-char ( ^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)
+Cursor behavior modified by
+.Ic vimode .
+.
+.It Ic backward-delete-word ( M-^H , M-^\&? )
+Cut from beginning of current word to cursor - saved in cut buffer.
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic backward-word ( 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)
+Word boundary and cursor behavior modified by
+.Ic vimode .
+.
+.It Ic beginning-of-line ( ^A , home )
Move to beginning of line.
-Cursor behavior modified by \fBvimode\fR.
-.TP 8
-.B capitalize-word \fR(M-c, M-C)
+Cursor behavior modified by
+.Ic vimode .
+.
+.It Ic capitalize-word ( 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
-.B complete-word-back \fR(not bound)
-Like \fIcomplete-word-fwd\fR, but steps up from the end of the list.
-.TP 8
-.B complete-word-fwd \fR(not bound)
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic complete-word ( tab )
+Completes a word as described under
+.Sx Completion and listing (+) .
+.
+.It Ic complete-word-back No (not bound)
+Like
+.Ic complete-word-fwd ,
+but steps up from the end of the list.
+.
+.It Ic complete-word-fwd No (not bound)
Replaces the current word with the first word in the list of possible
-completions. May be repeated to step down through the list.
+completions.
+May be repeated to step down through the list.
At the end of the list, beeps and reverts to the incomplete word.
-.TP 8
-.B complete-word-raw \fR(^X-tab)
-Like \fIcomplete-word\fR, but ignores user-defined completions.
-.TP 8
-.B copy-prev-word \fR(M-^_)
+.
+.It Ic complete-word-raw ( ^X-tab )
+Like
+.Ic complete-word ,
+but ignores user-defined completions.
+.
+.It Ic copy-prev-word ( 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-/)
+See also
+.Ic insert-last-word .
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic dabbrev-expand ( M-/ )
Expands the current word to the most recent preceding one for which
the current is a leading substring, wrapping around the history list
(once) if necessary.
-Repeating \fIdabbrev-expand\fR without any intervening typing
+Repeating
+.Ic dabbrev-expand
+without any intervening typing
changes to the next previous word etc., skipping identical matches
-much like \fIhistory-search-backward\fR does.
-.TP 8
-.B delete-char \fR(not bound)
+much like
+.Ic history-search-backward
+does.
+.
+.It Ic delete-char No (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
-or \fIlist-choices\fR at the end of the line.
-See also \fIdelete-char-or-list-or-eof\fR.
-.TP 8
-.B delete-char-or-list-or-eof \fR(^D)
-Does \fIdelete-char\fR if there is a character under the cursor,
-\fIlist-choices\fR at the end of the line
-or \fIend-of-file\fR on an empty line.
+See also
+.Ic delete-char-or-list-or-eof .
+Cursor behavior modified by
+.Ic vimode .
+.
+.It Ic delete-char-or-eof No (not bound)
+Does
+.Ic delete-char
+if there is a character under the cursor or
+.Ic end-of-file
+on an empty line.
+See also
+.Ic delete-char-or-list-or-eof .
+Cursor behavior modified by
+.Ic vimode .
+.
+.It Ic delete-char-or-list No (not bound)
+Does
+.Ic delete-char
+if there is a character under the cursor
+or
+.Ic list-choices
+at the end of the line.
+See also
+.Ic delete-char-or-list-or-eof .
+.
+.It Ic delete-char-or-list-or-eof ( ^D )
+Does
+.Ic delete-char
+if there is a character under the cursor,
+.Ic list-choices
+at the end of the line or
+.Ic end-of-file
+on an empty line.
See also those three commands, each of which does only a single action, and
-\fIdelete-char-or-eof\fR, \fIdelete-char-or-list\fR and \fIlist-or-eof\fR,
+.Ic delete-char-or-eof ,
+.Ic delete-char-or-list ,
+and
+.Ic list-or-eof ,
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)
+.
+.It Ic delete-word ( M-d , M-D )
+Cut from cursor to end of current word - save in cut buffer.
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic down-history ( down , ^N )
+Like
+.Ic up-history ,
+but steps down, stopping at the original input line.
+.
+.It Ic downcase-word ( 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)
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic end-of-file No (not bound)
+Signals an end of file, causing the shell to exit unless the
+.Ic ignoreeof
+shell variable is set to prevent this.
+See also
+.Ic delete-char-or-list-or-eof .
+.
+.It Ic end-of-line ( ^E , end )
Move cursor to end of line.
-Cursor behavior modified by \fBvimode\fR.
-.TP 8
-.B expand-history \fR(M-space)
+Cursor behavior modified by
+.Ic vimode .
+.
+.It Ic expand-history ( M-space )
Expands history substitutions in the current word.
-See \fBHistory substitution\fR.
-See also \fImagic-space\fR, \fItoggle-literal-history\fR and
-the \fBautoexpand\fR shell variable.
-.TP 8
-.B expand-glob \fR(^X-*)
+See
+.Sx History substitution .
+See also
+.Ic magic-space ,
+.Ic toggle-literal-history ,
+and the
+.Ic autoexpand
+shell variable.
+.
+.It Ic expand-glob ( ^X-* )
Expands the glob-pattern to the left of the cursor.
-See \fBFilename substitution\fR.
-.TP 8
-.B expand-line \fR(not bound)
-Like \fIexpand-history\fR, but
-expands history substitutions in each word in the input buffer.
-.TP 8
-.B expand-variables \fR(^X-$)
+See
+.Sx Filename substitution .
+.
+.It Ic expand-line No (not bound)
+Like
+.Ic expand-history ,
+but expands history substitutions in each word in the input buffer.
+.
+.It Ic expand-variables ( ^X-$ )
Expands the variable to the left of the cursor.
-See \fBVariable substitution\fR.
-.TP 8
-.B forward-char \fR(^F, right)
+See
+.Sx Variable substitution .
+.
+.It Ic forward-char ( ^F , right )
Move forward one character.
-Cursor behavior modified by \fBvimode\fR.
-.TP 8
-.B forward-word \fR(M-f, M-F)
+Cursor behavior modified by
+.Ic vimode .
+.
+.It Ic forward-word ( 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)
+Word boundary and cursor behavior modified by
+.Ic vimode .
+.
+.It Ic history-search-backward ( 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
into the input buffer.
-The search string may be a glob-pattern (see \fBFilename substitution\fR)
-containing `*', `?', `[]' or `{}'.
-\fIup-history\fR and \fIdown-history\fR will proceed from the
+The search string may be a glob-pattern (see
+.Sx Filename substitution )
+containing
+.Ql * ,
+.Ql \&? ,
+.Ql [] ,
+or
+.Ql {} .
+.Ic up-history
+and
+.Ic down-history
+will proceed from the
appropriate point in the history list.
Emacs mode only.
-See also \fIhistory-search-forward\fR and \fIi-search-back\fR.
-.TP 8
-.B history-search-forward \fR(M-n, M-N)
-Like \fIhistory-search-backward\fR, but searches forward.
-.TP 8
-.B i-search-back \fR(not bound)
-Searches backward like \fIhistory-search-backward\fR, copies the first match
+See also
+.Ic history-search-forward
+and
+.Ic i-search-back .
+.
+.It Ic history-search-forward ( M-n , M-N )
+Like
+.Ic history-search-backward ,
+but searches forward.
+.
+.It Ic i-search-back No (not bound)
+Searches backward like
+.Ic history-search-backward ,
+copies the first match
into the input buffer with the cursor positioned at the end of the pattern,
-and prompts with `bck: ' and the first match. Additional characters may be
-typed to extend the search, \fIi-search-back\fR may be typed to continue
+and prompts with
+.Dl bck:\ \&
+and the first match.
+Additional characters may be
+typed to extend the search,
+.Ic i-search-back
+may be typed to continue
searching with the same pattern, wrapping around the history list if
-necessary, (\fIi-search-back\fR must be bound to a
+necessary,
+.Ic ( i-search-back
+must be bound to a
single character for this to work) or one of the following special characters
may be typed:
-.PP
-.RS +8
-.RS +4
-.PD 0
-.TP 8
-^W
+.
+.Bl -tag -width ".Ic escape" -offset indent
+.It Sy Key
+.Sy Behavior
+.
+.It Ic ^W
Appends the rest of the word under the cursor to the search pattern.
-.TP 8
-delete (or any character bound to \fIbackward-delete-char\fR)
+.
+.It Ic delete Xo No (or any character bound to
+.Ic backward-delete-char )
+.Xc
Undoes the effect of the last character typed and deletes a character
from the search pattern if appropriate.
-.TP 8
-^G
+.
+.It Ic ^G
If the previous search was successful, aborts the entire search.
If not, goes back to the last successful search.
-.TP 8
-escape
+.
+.It Ic escape
Ends the search, leaving the current line in the input buffer.
-.RE
-.PD
-.PP
-Any other character not bound to \fIself-insert-command\fR terminates the
+.
+.El
+.Pp
+Any other character not bound to
+.Ic self-insert-command
+terminates the
search, leaving the current line in the input buffer, and
-is then interpreted as normal input. In particular, a carriage return
+is then interpreted as normal input.
+In particular, a carriage return
causes the current line to be executed.
-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.
-See also \fIcopy-prev-word\fR.
-.TP 8
-.B list-choices \fR(M-^D)
-Lists completion possibilities as described under \fBCompletion and listing\fR.
-See also \fIdelete-char-or-list-or-eof\fR and \fIlist-choices-raw\fR.
-.TP 8
-.B list-choices-raw \fR(^X-^D)
-Like \fIlist-choices\fR, but ignores user-defined completions.
-.TP 8
-.B list-glob \fR(^X-g, ^X-G)
-Lists (via the \fIls\-F\fR builtin) matches to the glob-pattern
-(see \fBFilename substitution\fR) to the left of the cursor.
-.TP 8
-.B list-or-eof \fR(not bound)
-Does \fIlist-choices\fR
-or \fIend-of-file\fR on an empty line.
-See also \fIdelete-char-or-list-or-eof\fR.
-.TP 8
-.B magic-space \fR(not bound)
+See also
+.Ic i-search-fwd
+and
+.Ic history-search-backward .
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic i-search-fwd No (not bound)
+Like
+.Ic i-search-back ,
+but searches forward.
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic insert-last-word ( M-_ )
+Inserts the last word of the previous input line
+.Pq Ql \&!$
+into the input buffer.
+See also
+.Ic copy-prev-word .
+.
+.It Ic list-choices ( M-^D )
+Lists completion possibilities as described under
+.Sx Completion and listing (+) .
+See also
+.Ic delete-char-or-list-or-eof
+and
+.Ic list-choices-raw .
+.
+.It Ic list-choices-raw ( ^X-^D )
+Like
+.Ic list-choices ,
+but ignores user-defined completions.
+.
+.It Ic list-glob ( ^X-g , ^X-G )
+Lists (via the
+.Ic ls\-F
+builtin) matches to the glob-pattern
+(see
+.Sx Filename substitution )
+to the left of the cursor.
+.
+.It Ic list-or-eof No (not bound)
+Does
+.Ic list-choices
+or
+.Ic end-of-file
+on an empty line.
+See also
+.Ic delete-char-or-list-or-eof .
+.
+.It Ic magic-space No (not bound)
Expands history substitutions in the current line,
-like \fIexpand-history\fR, and inserts a space.
-\fImagic-space\fR is designed to be bound to the space bar,
+like
+.Ic expand-history ,
+and inserts a space.
+.Ic magic-space
+is designed to be bound to the space bar,
but is not bound by default.
-.TP 8
-.B normalize-command \fR(^X-?)
-Searches for the current word in PATH and, if it is found, replaces it with
-the full path to the executable. Special characters are quoted. Aliases are
-expanded and quoted but commands within aliases are not. This command is
-useful with commands that take commands as arguments, e.g., `dbx' and `sh \-x'.
-.TP 8
-.B normalize-path \fR(^X-n, ^X-N)
-Expands the current word as described under the `expand' setting
-of the \fBsymlinks\fR shell variable.
-.TP 8
-.B overwrite-mode \fR(unbound)
+.
+.It Ic normalize-command ( ^X-\&? )
+Searches for the current word in
+.Ev PATH
+and, if it is found, replaces it with
+the full path to the executable.
+Special characters are quoted.
+Aliases are
+expanded and quoted but commands within aliases are not.
+This command is
+useful with commands that take commands as arguments, e.g.,
+.Ql dbx
+and
+.Ql sh \-x .
+.
+.It Ic normalize-path ( ^X-n , ^X-N )
+Expands the current word as described under the
+.Ql expand
+setting
+of the
+.Ic symlinks
+shell variable.
+.
+.It Ic overwrite-mode No (unbound)
Toggles between input and overwrite modes.
-.TP 8
-.B run-fg-editor \fR(M-^Z)
+.
+.It Ic run-fg-editor ( M-^Z )
Saves the current input line and
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)
+is found in the
+.Ic editors
+shell variable.
+If
+.Ic editors
+is not set, then the file name portion of the
+.Ev EDITOR
+environment variable
+.Ql ( ed
+if unset)
and the
-\fBVISUAL\fR environment variable (`vi' if unset)
+.Ev VISUAL
+environment variable
+.Ql ( 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
+If such a job is found, it is restarted as if
+.Ql fg % Ns Ar job
+had been typed.
+This is used to toggle back and forth between an editor and
+the shell easily.
+Some people bind this command to
+.Ic ^Z
+so they
can do this even more easily.
-.TP
-.B run-help \fR(M-h, M-H)
+.
+.It Ic run-help ( M-h , M-H )
Searches for documentation on the current command, using the same notion of
-`current command' as the completion routines, and prints it. There is no way
-to use a pager; \fIrun-help\fR is designed for short help files.
-If the special alias \fBhelpcommand\fR is defined, it is run with the
-command name as a sole argument. Else,
-documentation should be in a file named \fIcommand\fR.help, \fIcommand\fR.1,
-\fIcommand\fR.6, \fIcommand\fR.8 or \fIcommand\fR, which should be in one
-of the directories listed in the \fBHPATH\fR environment variable.
+.Dq current command
+as the completion routines, and prints it.
+There is no way
+to use a pager;
+.Ic run-help
+is designed for short help files.
+If the special alias
+.Ic helpcommand
+is defined, it is run with the
+command name as a sole argument.
+Else,
+documentation should be in a file named
+.Pa command.help ,
+.Pa command.1 ,
+.Pa command.6 ,
+.Pa command.8 ,
+or
+.Pa command ,
+which should be in one
+of the directories listed in the
+.Ev HPATH
+environment variable.
If there is more than one help file only the first is printed.
-.TP 8
-.B self-insert-command \fR(text characters)
-In insert mode (the default), inserts the typed character into the input line after the character under the cursor.
-In overwrite mode, replaces the character under the cursor with the typed character.
+.
+.It Ic self-insert-command No (text characters)
+In insert mode (the default), inserts the typed character into
+the input line after the character under the cursor.
+In overwrite mode, replaces the character under the cursor with the
+typed character.
The input mode is normally preserved between lines, but the
-\fBinputmode\fR shell variable can be set to `insert' or `overwrite' to put the
+.Ic inputmode
+shell variable can be set to
+.Ql insert
+or
+.Ql overwrite
+to put the
editor in that mode at the beginning of each line.
-See also \fIoverwrite-mode\fR.
-.TP 8
-.B sequence-lead-in \fR(arrow prefix, meta prefix, ^X)
+See also
+.Ic overwrite-mode .
+.
+.It Ic sequence-lead-in No ( arrow prefix , meta prefix , Ic ^X )
Indicates that the following characters are part of a
-multi-key sequence. Binding a command to a multi-key sequence really creates
-two bindings: the first character to \fIsequence-lead-in\fR and the
-whole sequence to the command. All sequences beginning with a character
-bound to \fIsequence-lead-in\fR are effectively bound to \fIundefined-key\fR
+multi-key sequence.
+Binding a command to a multi-key sequence really creates
+two bindings: the first character to
+.Ic sequence-lead-in
+and the
+whole sequence to the command.
+All sequences beginning with a character
+bound to
+.Ic sequence-lead-in
+are effectively bound to
+.Ic undefined-key
unless bound to another command.
-.TP 8
-.B spell-line \fR(M-$)
+.
+.It Ic spell-line ( 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 `\e', `*' or `?', to avoid problems
-with switches, substitutions and the like.
-See \fBSpelling correction\fR.
-.TP 8
-.B spell-word \fR(M-s, M-S)
-Attempts to correct the spelling of the current word as described
-under \fBSpelling correction\fR.
+.Ic spell-word ,
+but ignores words whose first character is one of
+.Ql \- ,
+.Ql \&! ,
+.Ql ^ ,
+or
+.Ql % ,
+or which contain
+.Ql \e ,
+.Ql * ,
+or
+.Ql \&? ,
+to avoid problems with switches, substitutions and the like.
+See
+.Sx Spelling correction (+) .
+.
+.It Ic spell-word ( M-s , M-S )
+Attempts to correct the spelling of the current word as described under
+.Sx Spelling correction (+) .
Checks each component of a word which appears to be a pathname.
-.TP 8
-.B toggle-literal-history \fR(M-r, M-R)
-Expands or `unexpands' history substitutions in the input buffer.
-See also \fIexpand-history\fR and the \fBautoexpand\fR shell variable.
-.TP 8
-.B undefined-key \fR(any unbound key)
+.
+.It Ic toggle-literal-history ( M-r , M-R )
+Expands or
+unexpands
+history substitutions in the input buffer.
+See also
+.Ic expand-history
+and the
+.Ic autoexpand
+shell variable.
+.
+.It Ic undefined-key No (any unbound key)
Beeps.
-.TP 8
-.B up-history \fR(up-arrow, ^P)
+.
+.It Ic up-history ( up , ^P )
Copies the previous entry in the history list into the input buffer.
-If \fBhistlit\fR is set, uses the literal form of the entry.
+If
+.Ic histlit
+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)
+.
+.It Ic upcase-word ( 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)
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic vi-beginning-of-next-word No (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)
+Word boundary and cursor behavior modified by
+.Ic vimode .
+.
+.It Ic vi-eword No (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
-input buffer. The bell rings if no match is found.
+Word boundary behavior modified by
+.Ic vimode .
+.
+.It Ic vi-search-back ( \&? )
+Prompts with
+.Dl \&?
+for a search string (which may be a glob-pattern, as with
+.Ic history-search-backward ) ,
+searches for it and copies it into the input buffer.
+The bell rings if no match is found.
Hitting return ends the search and leaves the last match in the input
buffer.
Hitting escape ends the search and executes the match.
-\fIvi\fR mode only.
-.TP 8
-.B vi-search-fwd \fR(/)
-Like \fIvi-search-back\fR, but searches forward.
-.TP 8
-.B which-command \fR(M-?)
-Does a \fIwhich\fR (see the description of the builtin command) on the
+.Ic vi
+mode only.
+.
+.It Ic vi-search-fwd ( / )
+Like
+.Ic vi-search-back ,
+but searches forward.
+.
+.It Ic which-command ( M-\&? )
+Does a
+.Ic which
+(see the description of the builtin command) on the
first word of the input buffer.
-.TP 8
-.B yank-pop \fR(M-y)
-When executed immediately after a \fIyank\fR or another \fIyank-pop\fR,
+.
+.It Ic yank-pop ( M-y )
+When executed immediately after a
+.Ic yank
+or another
+.Ic yank-pop ,
replaces the yanked string with the next previous string from the
-killring. This also has the effect of rotating the killring, such that
+killring.
+This also has the effect of rotating the killring, such that
this string will be considered the most recently killed by a later
-\fIyank\fR command. Repeating \fIyank-pop\fR will cycle through the
+.Ic yank
+command.
+Repeating
+.Ic yank-pop
+will cycle through the
killring any number of times.
-.SS "Lexical structure"
-The shell splits input lines into words at blanks and tabs. The special
-characters `&', `|', `;', `<', `>', `(', and `)' and the doubled characters
-`&&', `||', `<<' and `>>' are always separate words, whether or not they are
+.El
+.
+.Ss Lexical structure
+The shell splits input lines into words at blanks and tabs.
+The special
+characters
+.Ql \&& ,
+.Ql | ,
+.Ql \&; ,
+.Ql < ,
+.Ql > ,
+.Ql \&( ,
+and
+.Ql \&) ,
+and the doubled characters
+.Ql && ,
+.Ql || ,
+.Ql << ,
+and
+.Ql >>
+are always separate words, whether or not they are
surrounded by whitespace.
-.PP
-When the shell's input is not a terminal, the character `#' is taken to begin a
-comment. Each `#' and the rest of the input line on which it appears is
+.Pp
+When the shell's input is not a terminal, the character
+.Ql #
+is taken to begin a
+comment.
+Each
+.Ql #
+and the rest of the input line on which it appears is
discarded before further parsing.
-.PP
+.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 (`\e') or enclosing it in single (`''), double (`"') or
-backward (`\`') quotes. When not otherwise quoted a newline preceded by a `\e'
+with a backslash
+.Pq Ql \e
+or enclosing it in single
+.Pq Ql \&' ,
+double
+.Pq Ql \&" ,
+or
+backward
+.Pq Ql \&`
+quotes.
+When not otherwise quoted a newline preceded by a
+.Ql \e
is equivalent to a blank, but inside quotes this sequence results in a
newline.
-.PP
-Furthermore, all \fBSubstitutions\fR (see below) except \fBHistory substitution\fR
+.Pp
+Furthermore, all
+.Sx Substitutions
+except
+.Sx History substitution
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 `\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
-backslashes but not by single quotes. Strings quoted with double or backward
-quotes undergo \fBVariable substitution\fR and \fBCommand substitution\fR, but other
-substitutions are prevented.
-.PP
+(e.g.,
+.Ql $
+or
+.Ql \&`
+for
+.Sx Variable substitution
+or
+.Sx Command substitution
+respectively)
+with
+.Ql \e .
+.Sx ( Alias substitution
+is no exception: quoting in any way any
+character of a word for which an
+.Ic alias
+has been defined prevents
+substitution of the alias.
+The usual way of quoting an alias is to precede it
+with a backslash.)
+.Sx History substitution
+is prevented by
+backslashes but not by single quotes.
+Strings quoted with double or backward
+quotes undergo
+.Sx Variable substitution
+and
+.Sx Command substitution ,
+but other substitutions are prevented.
+.Pp
Text inside single or double quotes becomes a single word (or part of one).
Metacharacters in these strings, including blanks and tabs, do not form
-separate words. Only in one special case (see \fBCommand substitution\fR
-below) can a double-quoted string yield parts of more than one word;
-single-quoted strings never do. Backward quotes are special: they signal
-\fBCommand substitution\fR (q.v.), which may result in more than one word.
-.PP
+separate words.
+Only in one special case (see
+.Sx Command substitution )
+can a double-quoted string yield parts of more than one word;
+single-quoted strings never do.
+Backward quotes are special: they signal
+.Sx Command substitution ,
+which may result in more than one word.
+.Pp
+C-style escape sequences can be used in single quoted strings by
+preceding the leading quote with
+.Ql $ .
+(+)
+See
+.Sx Escape sequences (+)
+for
+a complete list of recognized escape sequences.
+.Pp
Quoting complex strings, particularly strings which themselves contain quoting
-characters, can be confusing. Remember that quotes need not be used as they are
-in human writing! It may be easier to quote not an entire string, but only
+characters, can be confusing.
+Remember that quotes need not be used as they are
+in human writing!
+It may be easier to quote not an entire string, but only
those parts of the string which need quoting, using different types of quoting
to do so if appropriate.
-.PP
-The \fBbackslash_quote\fR shell variable (q.v.) can be set to make backslashes
-always quote `\e', `'', and `"'. (+) This may make complex quoting tasks
-easier, but it can cause syntax errors in \fIcsh\fR(1) scripts.
-.SS Substitutions
+.Pp
+The
+.Ic backslash_quote
+shell variable can be set to make backslashes
+always quote
+.Ql \e ,
+.Ql \&' ,
+and
+.Ql \&"
+(+).
+This may make complex quoting tasks
+easier, but it can cause syntax errors in
+.Xr csh 1
+scripts.
+.
+.Ss Escape sequences (+)
+The following escape sequences are always recognized inside a string
+constructed using
+.Ql $'' ,
+and optionally by the
+.Ic echo
+builtin command as
+controlled by the
+.Ic echo_style
+shell variable.
+.Pp
+Supported escape sequences are:
+.
+.Bl -tag -width ".Li \ex{ Ns Ar nnnnnnnn Ns Li }" -offset indent
+.It Sy Escape
+.Sy Description
+.
+.It Li \ea
+Bell.
+.It Li \eb
+Backspace.
+.It Li \ec Ns Ar c
+The control character denoted by
+.Ql ^ Ns Ar c
+in
+.Xr stty 1 .
+If
+.Ar c
+is a backslash, it must be doubled.
+.It Li \ee
+Escape.
+.It Li \ef
+Form feed.
+.It Li \en
+Newline.
+.It Li \er
+Carriage return.
+.It Li \et
+Horizontal tab.
+.It Li \ev
+Vertical tab.
+.It Li \e\e
+Literal backslash.
+.It Li \e\&'
+Literal single quote.
+.It Li \e\&"
+Literal double quote.
+.It Li \e Ns Ar nnn
+The character corresponding to the octal number
+.Ar nnn .
+.It Li \ex Ns Ar nn
+The character corresponding to the hexadecimal number
+.Ar nn
+(1\-2 hexadecimal digits).
+.It Li \ex{ Ns Ar nnnnnnnn Ns Li }
+The character corresponding to the hexadecimal number
+.Ar nnnnnnnn
+(1\-8 hexadecimal digits).
+.It Li \eu Ns Ar nnnn
+The Unicode code point
+.Ar nnnn
+(1\-4 hexadecimal digits).
+.It Li \eU Ns Ar nnnnnnnn
+The Unicode code point
+.Ar nnnnnnnn
+(1\-8 hexadecimal digits).
+.El
+.Pp
+The implementations of
+.Ql \ex ,
+.Ql \eu ,
+and
+.Ql \eU
+in other shells may take a varying number of digits.
+It is often safest
+to use leading zeros to provide the maximum expected number of digits.
+.
+.Ss Substitutions
We now describe the various transformations the shell performs on the input in
-the order in which they occur. We note in passing the data structures involved
-and the commands and variables which affect them. Remember that substitutions
-can be prevented by quoting as described under \fBLexical structure\fR.
-.SS "History substitution"
-Each command, or ``event'', input from the terminal is saved in the history
-list. The previous command is always saved, and the \fBhistory\fR shell
-variable can be set to a number to save that many commands. The \fBhistdup\fR
+the order in which they occur.
+We note in passing the data structures involved
+and the commands and variables which affect them.
+Remember that substitutions
+can be prevented by quoting as described under
+.Sx Lexical structure .
+.
+.Ss History substitution
+Each command, or
+.Dq event ,
+input from the terminal is saved in the history list.
+The previous command is always saved, and the
+.Ic history
+shell
+variable can be set to a number to save that many commands.
+The
+.Ic histdup
shell variable can be set to not save duplicate events or consecutive duplicate
events.
-.PP
+.Pp
Saved commands are numbered sequentially from 1 and stamped with the time.
It is not usually necessary to use event numbers, but the current event number
-can be made part of the prompt by placing an `!' in the \fBprompt\fR shell variable.
-.PP
+can be made part of the prompt by placing an
+.Ql \&!
+in the
+.Ic prompt
+shell variable.
+.Pp
By default history entries are displayed by printing each parsed token
-separated by space; thus the redirection operator `>&!' will be displayed as
-`> & !'.
-.PP
+separated by space; thus the redirection operator
+.Ql >\&&\&!
+will be displayed as
+.Ql >\0\&&\0\&! .
The shell actually saves history in expanded and literal (unexpanded) forms.
-If the \fBhistlit\fR shell variable is set, commands that display and store
+If the
+.Ic histlit
+shell variable is set, commands that display and store
history use the literal form.
-.PP
-The \fIhistory\fR builtin command can print, store in a file, restore
+.Pp
+The
+.Ic history
+builtin command can print, store in a file, restore
and clear the history list at any time,
-and the \fBsavehist\fR and \fBhistfile\fR shell variables can be set to
+and the
+.Ic savehist
+and
+.Ic histfile
+shell variables can be set to
store the history list automatically on logout and restore it on login.
-.PP
+.Pp
History substitutions introduce words from the history list into the input
stream, making it easy to repeat commands, repeat arguments of a previous
command in the current command, or fix spelling mistakes in the previous
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 `\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
-described later. The characters used to signal history substitution (`!' and
-`^') can be changed by setting the \fBhistchars\fR shell variable. Any input
+.Pp
+History substitutions begin with the character
+.Ql \&! .
+They may begin anywhere in
+the input stream, but they do not nest.
+The
+.Ql \&!
+may be preceded by a
+.Ql \e
+to
+prevent its special meaning; for convenience, a
+.Ql \&!
+is passed unchanged when it
+is followed by a blank, tab, newline,
+.Ql =
+or
+.Ql \&( .
+.Pp
+History substitutions also
+occur when an input line begins with
+.Ql ^ ;
+see
+.Sx History substitution abbreviation .
+.Pp
+The characters used to signal history substitution
+.Po
+.Ql \&!
+and
+.Ql ^
+.Pc
+can be changed by setting the
+.Ic histchars
+shell variable.
+Any input
line which contains a history substitution is printed before it is executed.
-.PP
-A history substitution may have an ``event specification'', which indicates
-the event from which words are to be taken, a ``word designator'',
-which selects particular words from the chosen event, and/or a ``modifier'',
+.Pp
+A history substitution may have an
+.Dq event specification
+(see
+.Sx History event specification ) ,
+which indicates the event from which words are to be taken, a
+.Dq word designator
+(see
+.Sx History word designators ) ,
+which selects particular words from the chosen event, and/or a
+.Dq word modifier
+(see
+.Sx History word modifiers ) ,
which manipulates the selected words.
-.PP
-An event specification can be
-.PP
-.PD 0
-.RS +4
-.TP 8
-.I n
-A number, referring to a particular event
-.TP 8
-\-\fIn\fR
-An offset, referring to the event \fIn\fR before the current event
-.TP 8
-#
+.
+.Ss History event specification
+A history event specification may be one of
+(with the history substitution character
+.Ql \&!
+shown):
+.
+.Bl -tag -width ".Sy \&!Event" -offset indent
+.It Sy \&!Event
+.Sy History event specification
+.
+.It Li \&! Ns Ar n
+A number, referring to a particular event.
+.
+.It Li \&!\- Ns Ar n
+An offset, referring to the event
+.Ar n
+before the current event.
+.
+.It Li \&!#
The current event.
-This should be used carefully in \fIcsh\fR(1), where there is no check for
-recursion. \fItcsh\fR allows 10 levels of recursion. (+)
-.TP 8
-!
-The previous event (equivalent to `\-1')
-.TP 8
-.I s
-The most recent event whose first word begins with the string \fIs\fR
-.TP 8
-?\fIs\fR?
-The most recent event which contains the string \fIs\fR.
-The second `?' can be omitted if it is immediately followed by a newline.
-.RE
-.PD
-.PP
+This should be used carefully in
+.Xr csh 1 ,
+where there is no check for recursion.
+.Nm
+allows 10 levels of recursion. (+)
+.
+.It Li \&!\&!
+The previous event, equivalent to
+.Ql \&!\-1 .
+.
+.It Li \&! Ns Ar s
+The most recent event whose first word begins with the string
+.Ar s .
+.
+.It Li \&!\&? Ns Ar s Ns Li \&?
+The most recent event which contains the string
+.Ar s .
+The second
+.Ql \&?
+can be omitted if it is immediately followed by a newline.
+.El
+.Pp
For example, consider this bit of someone's history list:
-.IP "" 4
-\ 9 8:30 nroff \-man wumpus.man
-.br
+.Bd -literal -offset indent
+ 9 8:30 nroff \-man wumpus.man
10 8:31 cp wumpus.man wumpus.man.old
-.br
11 8:36 vi wumpus.man
-.br
12 8:37 diff wumpus.man.old wumpus.man
-.PP
+.Ed
+.Pp
The commands are shown with their event numbers and time stamps.
The current event, which we haven't typed in yet, is event 13.
-`!11' and `!\-2' refer to event 11.
-`!!' refers to the previous event, 12. `!!' can be abbreviated `!' if it is
-followed by `:' (`:' is described below).
-`!n' refers to event 9, which begins with `n'.
-`!?old?' also refers to event 12, which contains `old'.
+.Pp
+Typing
+.Dl !11
+or
+.Dl !\-2
+refers to event 11.
+.Pp
+Typing
+.Dl \&!\&!
+refers to the previous event, 12.
+.Ql \&!\&!
+can be abbreviated
+.Ql \&!
+if it is
+followed by
+.Ql \&: ,
+which is described in
+.Sx History word designators
+and
+.Sx History word modifiers .
+.Pp
+Typing
+.Dl !n
+refers to event 9, which begins with
+.Ql n .
+.Pp
+Typing
+.Dl !\&?old\&?
+refers to event 12, which contains
+.Ql old .
+.Pp
Without word designators or modifiers history references simply expand to the
-entire event, so we might type `!cp' to redo the copy command or `!!|more'
-if the `diff' output scrolled off the top of the screen.
-.PP
+entire event, so we might type
+.Dl !cp
+to redo the
+.Ql cp
+command (event 10) or
+.Dl !!|more
+if the
+.Ql diff
+output in the previous event, 12, scrolled off the top of the screen.
+.Pp
History references may be insulated from the surrounding text with braces if
-necessary. For example, `!vdoc' would look for a command beginning with
-`vdoc', and, in this example, not find one, but `!{v}doc' would expand
-unambiguously to `vi wumpus.mandoc'.
+necessary.
+For example,
+.Dl !vdoc
+would look for a command beginning with
+.Ql vdoc ,
+and, in this example, not find one, but
+.Dl !{v}doc
+would expand
+unambiguously to
+.Ql vi wumpus.mandoc
+by matching event 11.
Even in braces, history substitutions do not nest.
-.PP
-(+) While \fIcsh\fR(1) expands, for example, `!3d' to event 3 with the
-letter `d' appended to it, \fItcsh\fR expands it to the last event beginning
-with `3d'; only completely numeric arguments are treated as event numbers.
+.Pp
+(+) While
+.Xr csh 1
+expands, for example,
+.Dl !3d
+to event 3 with the
+letter
+.Ql d
+appended to it,
+.Nm
+expands it to the last event beginning
+with
+.Ql 3d ;
+only completely numeric arguments are treated as event numbers.
This makes it possible to recall events beginning with numbers.
-To expand `!3d' as in \fIcsh\fR(1) say `!{3}d'.
-.PP
-To select words from an event we can follow the event specification by a `:'
-and a designator for the desired words. The words of an input line are
+To expand
+.Dl !3d
+as in
+.Xr csh 1
+type
+.Dl !{3}d
+.
+.Ss History word designators
+To select words from an event we can follow the event specification by a
+.Ql \&:
+and a designator for the desired words.
+The words of an input line are
numbered from 0, the first (usually command) word being 0, the second word
-(first argument) being 1, etc. The basic word designators are:
-.PP
-.PD 0
-.RS +4
-.TP 8
-0
-The first (command) word
-.TP 8
-.I n
-The \fIn\fRth argument
-.TP 8
-^
-The first argument, equivalent to `1'
-.TP 8
-$
-The last argument
-.TP 8
-%
-The word matched by an ?\fIs\fR? search
-.TP 8
-.I x\-y
-A range of words
-.TP 8
-.I \-y
-Equivalent to \fI`0\-y'\fR
-.TP 8
-*
-Equivalent to `^\-$', but returns nothing if the event contains only 1 word
-.TP 8
-.I x*
-Equivalent to \fI`x\-$'\fR
-.TP 8
-.I x\-
-Equivalent to \fI`x*'\fR, but omitting the last word (`$')
-.PD
-.RE
-.PP
+(first argument) being 1, etc.
+.Pp
+The basic word designators are, with columns for
+a leading
+.Ql \&:
+and a leading
+.Ql \&!
+(for the abbreviated word designators - see
+.Sx History substitution abbreviation ) :
+.
+.Bl -column -offset indent ".Sy \&:Word" ".Sy \&!Word" ""
+.It Sy \&:Word Ta Sy \&!Word Ta Sy History word designator
+.
+.Pp
+.It Li :0 Ta Ta
+The first (command) word.
+.
+.Pp
+.It Li \&: Ns Ar n Ta Ta
+The
+.Ar n Ns
+th argument.
+.
+.Pp
+.It Li :^ Ta Li !^ Ta
+The first argument, equivalent to
+.Sq Li :1 .
+.
+.Pp
+.It Li :$ Ta Li !$ Ta
+The last argument.
+.
+.Pp
+.It Li :% Ta Li !% Ta
+The word matched by an
+.Li \&? Ns Ar s Ns Li \&?
+search.
+.
+.Pp
+.It Li \&: Ns Ar x Ns Li \- Ns Ar y Ta Ta
+A range of words.
+.
+.Pp
+.It Li \&:\- Ns Ar y Ta Li \&!\- Ns Ar y Ta
+Equivalent to
+.Sq Li \&:0\- Ns Ar y .
+.
+.Pp
+.It Li \&:* Ta Li \&!* Ta
+Equivalent to
+.Sq Li \&:^\-$ ,
+but returns nothing if the event contains only 1 word.
+.
+.Pp
+.It Li \&: Ns Ar x Ns Li * Ta Ta
+Equivalent to
+.Sq Li \&: Ns Ar x Ns Li \-$ .
+.
+.Pp
+.It Li \&: Ns Ar x Ns Li \- Ta Ta
+Equivalent to
+.Sq Li \&: Ns Ar x Ns Li * ,
+but omitting the last word
+.Pq Ql $ .
+.
+.Pp
+.It Li \&:\- Ta Ta
+Equivalent to
+.Sq Li \&:0\- ;
+the command and all arguments except the last argument.
+.
+.El
+.Pp
Selected words are inserted into the command line separated by single blanks.
-For example, the `diff' command in the previous example might have been
-typed as `diff !!:1.old !!:1' (using `:1' to select the first argument
-from the previous event) or `diff !\-2:2 !\-2:1' to select and swap the
-arguments from the `cp' command. If we didn't care about the order of the
-`diff' we might have said `diff !\-2:1\-2' or simply `diff !\-2:*'.
-The `cp' command might have been written `cp wumpus.man !#:1.old', using `#'
+.Pp
+For example, the
+.Ql diff
+command (event 12) in the history list example in
+.Sx History event specification ,
+.Dl diff wumpus.man.old wumpus.man
+might have been typed as
+.Dl diff !!:1.old !!:1
+(using
+.Ql \&:1
+to select the first argument
+from the previous event) or
+.Dl diff !\-2:2 !\-2:1
+to select and swap the
+arguments from the
+.Ql cp
+command (event 10).
+If we didn't care about the order of the
+.Ql diff
+we might have typed
+.Dl diff !\-2:1\-2
+or simply
+.Dl diff !\-2:*
+.Pp
+The
+.Ql cp
+command (event 10) might have been typed
+.Dl cp wumpus.man !#:1.old
+using
+.Ql #
to refer to the current event.
-`!n:\- hurkle.man' would reuse the first two words from the `nroff' command
-to say `nroff \-man hurkle.man'.
-.PP
-The `:' separating the event specification from the word designator can be
-omitted if the argument selector begins with a `^', `$', `*', `%' or `\-'.
-For example, our `diff' command might have been `diff !!^.old !!^' or,
-equivalently, `diff !!$.old !!$'. However, if `!!' is abbreviated `!',
-an argument selector beginning with `\-' will be interpreted as an event
+.Pp
+Typing
+.Dl !n:\- hurkle.man
+would reuse the first two words from the
+.Ql nroff
+command (event 9) to expand to
+.Dl nroff \-man hurkle.man
+.Pp
+The
+.Ql \&:
+separating the event specification from the word designator can be
+omitted if the argument selector begins with a
+.Ql ^ ,
+.Ql $ ,
+.Ql % ,
+.Ql \- ,
+or
+.Ql * .
+.Pp
+For example, our
+.Ql diff
+command (event 12) might have been typed
+.Dl diff !!^.old !!^
+or,
+equivalently,
+.Dl diff !!$.old !!$
+However, if
+.Ql \&!\&!
+is abbreviated
+.Ql \&! ,
+an argument selector beginning with
+.Ql \-
+will be interpreted as an event
specification.
-.PP
+.Pp
A history reference may have a word designator but no event specification.
It then references the previous command.
-Continuing our `diff' example, we could have said simply `diff
-!^.old !^' or, to get the arguments in the opposite order, just `diff !*'.
-.PP
-The word or words in a history reference can be edited, or ``modified'',
-by following it with one or more modifiers, each preceded by a `:':
-.PP
-.PD 0
-.RS +4
-.TP 8
-h
+.Pp
+Continuing our
+.Ql diff
+command example (event 12), we could have typed simply
+.Dl diff !^.old !^
+or, to get the arguments in the opposite order, just
+.Dl diff !*
+.
+.Ss History word modifiers
+The word or words in a history reference can be edited, or
+.Dq modified ,
+by following it with one or more modifiers
+(with the leading
+.Ql \&:
+shown),
+each preceded by a
+.Ql \&: :
+.
+.Bl -tag -width ".Li \&:s/ Ns Ar l Ns Li / Ns Ar r Ns Li /" -offset indent
+.It Sy \&:Word
+.Sy History word modifier
+.
+.It Li \&:h
Remove a trailing pathname component, leaving the head.
-.TP 8
-t
+.
+.It Li \&:t
Remove all leading pathname components, leaving the tail.
-.TP 8
-r
-Remove a filename extension `.xxx', leaving the root name.
-.TP 8
-e
+.
+.It Li \&:r
+Remove a filename extension
+.Sq . Ns Ar xxx ,
+leaving the root name.
+.
+.It Li \&:e
Remove all but the extension.
-.TP 8
-u
+.
+.It Li \&:u
Uppercase the first lowercase letter.
-.TP 8
-l
+.
+.It Li \&:l
Lowercase the first uppercase letter.
-.TP 8
-s\fI/l/r/\fR
-Substitute \fIl\fR for \fIr\fR.
-\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 `\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.
-.TP 8
-&
+.
+.It Li \&:s/ Ns Ar l Ns Li / Ns Ar r Ns Li /
+Substitute
+.Ar l
+for
+.Ar r .
+.Ar l
+is simply a string like
+.Ar r ,
+not a regular expression as in
+the eponymous
+.Xr ed 1
+command.
+Any character may be used as the delimiter in place of
+.Ql / ;
+a
+.Ql \e
+can be used to quote the delimiter inside
+.Ar l
+and
+.Ar r .
+The character
+.Ql &
+in the
+.Ar r
+is replaced by
+.Ar l ;
+.Ql \e
+also quotes
+.Ql & .
+If
+.Ar l
+is empty
+.Sq ( \& ) ,
+the
+.Ar l
+from a previous substitution or the
+.Ar s
+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.
+.
+.It Li \&:\&&
Repeat the previous substitution.
-.TP 8
-g
+.
+.It Li \&:g
Apply the following modifier once to each word.
-.TP 8
-a (+)
+.
+.It Li \&:a No (+)
Apply the following modifier as many times as possible to a single word.
-`a' and `g' can be used together to apply a modifier globally.
-With the `s' modifier, only the patterns contained in the original word are
+.Ql \&:a
+and
+.Ql \&:g
+can be used together to apply a modifier globally.
+With the
+.Ql \&:s
+modifier, only the patterns contained in the original word are
substituted, not patterns that contain any substitution result.
-.TP 8
-p
+.
+.It Li \&:p
Print the new command line but do not execute it.
-.TP 8
-q
+.
+.It Li \&:q
Quote the substituted words, preventing further substitutions.
-.TP 8
-Q
-Same as q
+.
+.It Li \&:Q
+Same as
+.Ql \&:q
but in addition preserve empty variables as a string containing a NUL.
This is useful to preserve positional arguments for example:
-.IP "" 12
+.Bd -literal -offset indent -compact
> set args=('arg 1' '' 'arg 3')
-.br
> tcsh -f -c 'echo ${#argv}' $args:gQ
-.br
3
-.br
-.TP 8
-x
-Like q, but break into words at blanks, tabs and newlines.
-.PD
-.RE
-.PP
-Modifiers are applied to only the first modifiable word (unless `g' is used).
+.Ed
+.
+.It Li \&:x
+Like
+.Ql \&:q ,
+but break into words at blanks, tabs and newlines.
+.
+.El
+.Pp
+Modifiers are applied to only the first modifiable word (unless
+.Ql \&:g
+is used).
It is an error for no word to be modifiable.
-.PP
-For example, the `diff' command might have been written as `diff wumpus.man.old
-!#^:r', using `:r' to remove `.old' from the first argument on the same line
-(`!#^'). We could say `echo hello out there', then `echo !*:u' to capitalize
-`hello', `echo !*:au' to say it out loud, or `echo !*:agu' to really shout.
-We might follow `mail \-s "I forgot my password" rot' with `!:s/rot/root' to
-correct the spelling of `root' (but see \fBSpelling correction\fR for a
-different approach).
-.PP
-There is a special abbreviation for substitutions.
-`^', when it is the first character on an input line, is equivalent to `!:s^'.
-Thus we might have said `^rot^root' to make the spelling correction in the
-previous example.
-This is the only history substitution which does not explicitly begin with `!'.
-.PP
-(+) In \fIcsh\fR as such, only one modifier may be applied to each history
-or variable expansion. In \fItcsh\fR, more than one may be used, for example
-.IP "" 4
-% mv wumpus.man /usr/man/man1/wumpus.1
-.br
+.Pp
+For example, the
+.Ql diff
+command (event 12) in the history list example in
+.Sx History event specification ,
+.Dl diff wumpus.man.old wumpus.man
+might have been typed as
+.Dl diff wumpus.man.old !#^:r
+using
+.Ql \&:r
+to remove
+.Ql .old
+from the first argument on the same line
+.Pq Ql \&!#^ .
+.Pp
+We could type
+.Dl echo hello out there
+then
+.Dl echo !*:u
+to capitalize
+.Ql hello ,
+.Dl echo !*:au
+to upper case the first word to
+.Ql HELLO ,
+or
+.Dl echo !*:agu
+to upper case all words.
+.Pp
+We might follow
+.Dl mail \-s \&"I forgot my password\&" rot
+with
+.Dl !:s/rot/root
+to
+correct the spelling of
+.Ql root
+(see
+.Sx History word modifiers
+and
+.Sx Spelling correction (+)
+for
+different approaches).
+.Pp
+(+) In
+.Xr csh 1
+as such, only one modifier may be applied to each history
+or variable expansion.
+In
+.Nm ,
+more than one may be used, for example
+.Bd -literal -offset indent
+% mv wumpus.man /usr/share/man/man1/wumpus.1
% man !$:t:r
-.br
man wumpus
-.PP
-In \fIcsh\fR, the result would be `wumpus.1:r'. A substitution followed by a
+.Ed
+.Pp
+In
+.Xr csh 1 ,
+the result would be
+.Dl wumpus.1:r
+.Pp
+A substitution followed by a
colon may need to be insulated from it with braces:
-.IP "" 4
+.Bd -literal -offset indent
> mv a.out /usr/games/wumpus
-.br
> setenv PATH !$:h:$PATH
-.br
Bad ! modifier: $.
-.br
> setenv PATH !{\-2$:h}:$PATH
-.br
setenv PATH /usr/games:/bin:/usr/bin:.
-.PP
-The first attempt would succeed in \fIcsh\fR but fails in \fItcsh\fR,
-because \fItcsh\fR expects another modifier after the second colon
-rather than `$'.
-.PP
+.Ed
+.Pp
+The first attempt would succeed in
+.Xr csh 1
+but fails in
+.Nm ,
+because
+.Nm
+expects another modifier after the second colon
+rather than
+.Ql $ .
+.
+.Ss History substitution abbreviation
+There is a special abbreviation for substitutions;
+.Ql ^ ,
+when it is the first character on an input line, is equivalent to
+.Ql !:s^ .
+Thus, we might follow the example from
+.Sx History word modifiers
+.Dl mail \-s \&"I forgot my password\&" rot
+with
+.Dl ^rot^root
+to make the spelling correction.
+This is the only history substitution which does not explicitly begin with
+.Ql \&! .
+.
+.Ss History editor commands
Finally, history can be accessed through the editor as well as through
the substitutions just described.
-The \fIup-\fR and \fIdown-history\fR, \fIhistory-search-backward\fR and
-\fI-forward\fR, \fIi-search-back\fR and \fI-fwd\fR,
-\fIvi-search-back\fR and \fI-fwd\fR, \fIcopy-prev-word\fR
-and \fIinsert-last-word\fR editor commands search for
+The
+.Ic up-history
+and
+.Ic down-history ,
+.Ic history-search-backward
+and
+.Ic history-search-forward ,
+.Ic i-search-back
+and
+.Ic i-search-fwd ,
+.Ic vi-search-back
+and
+.Ic vi-search-fwd ,
+.Ic copy-prev-word
+and
+.Ic insert-last-word
+editor commands search for
events in the history list and copy them into the input buffer.
-The \fItoggle-literal-history\fR editor command switches between the
+The
+.Ic toggle-literal-history
+editor command switches between the
expanded and literal forms of history lines in the input buffer.
-\fIexpand-history\fR and \fIexpand-line\fR expand history substitutions
+.Ic expand-history
+and
+.Ic expand-line
+expand history substitutions
in the current word and in the entire input buffer respectively.
-.SS "Alias substitution"
+.
+.Ss Alias substitution
The shell maintains a list of aliases which can be set, unset and printed by
-the \fIalias\fR and \fIunalias\fR commands. After a command line is parsed
-into simple commands (see \fBCommands\fR) the first word of each command,
-left-to-right, is checked to see if it has an alias. If so, the first word is
-replaced by the alias. If the alias contains a history reference, it undergoes
-\fBHistory substitution\fR (q.v.) as though the original command were the
-previous input line. If the alias does not contain a history reference, the
+the
+.Ic alias
+and
+.Ic unalias
+commands.
+After a command line is parsed
+into simple commands (see
+.Sx Commands )
+the first word of each command,
+left-to-right, is checked to see if it has an alias.
+If so, the first word is
+replaced by the alias.
+If the alias contains a history reference, it undergoes
+.Sx History substitution
+as though the original command were the
+previous input line.
+If the alias does not contain a history reference, the
argument list is left untouched.
-.PP
-Thus if the alias for `ls' were `ls \-l' the command `ls /usr' would become `ls
-\-l /usr', the argument list here being undisturbed. If the alias for `lookup'
-were `grep !^ /etc/passwd' then `lookup bill' would become `grep bill
-/etc/passwd'. Aliases can be used to introduce parser metasyntax. For
-example, `alias print 'pr \e!* | lpr'' defines a ``command'' (`print') which
-\fIpr\fR(1)s its arguments to the line printer.
-.PP
+.Pp
+Thus if the alias for
+.Ql ls
+were
+.Dl ls \-l
+the command
+.Dl ls /usr
+would become
+.Dl ls \-l /usr
+the argument list here being undisturbed.
+.Pp
+If the alias for
+.Ql lookup
+were
+.Dl grep !^ /etc/passwd
+then
+.Dl lookup bill
+would become
+.Dl grep bill /etc/passwd
+.Pp
+Aliases can be used to introduce parser metasyntax.
+For example,
+.Dl alias print 'pr \e!* | lpr'
+defines a
+.Dq command
+.Pq Ql print
+which
+.Xr pr 1 Ns s
+its arguments to the line printer.
+.Pp
Alias substitution is repeated until the first word of the command has no
-alias. If an alias substitution does not change the first word (as in the
-previous example) it is flagged to prevent a loop. Other loops are detected and
+alias.
+If an alias substitution does not change the first word (as in the
+previous example) it is flagged to prevent a loop.
+Other loops are detected and
cause an error.
-.PP
-Some aliases are referred to by the shell; see \fBSpecial aliases\fR.
-.SS "Variable substitution"
+.Pp
+Some aliases are referred to by the shell; see
+.Sx Special aliases (+) .
+.
+.Ss Variable substitution
The shell maintains a list of variables, each of which has as value a list of
zero or more words.
The values of shell variables can be displayed and changed with the
-\fIset\fR and \fIunset\fR commands.
-The system maintains its own list of ``environment'' variables.
-These can be displayed and changed with \fIprintenv\fR, \fIsetenv\fR and
-\fIunsetenv\fR.
-.PP
-(+) Variables may be made read-only with `set \-r' (q.v.).
+.Ic set
+and
+.Ic unset
+commands.
+The system maintains its own list of
+.Dq environment
+variables.
+These can be displayed and changed with
+.Ic printenv ,
+.Ic setenv ,
+and
+.Ic unsetenv .
+.Pp
+(+) Variables may be made read-only with
+.Dl set \-r
Read-only variables may not be modified or unset;
attempting to do so will cause an error.
Once made read-only, a variable cannot be made writable,
-so `set \-r' should be used with caution.
+so
+.Dl set \-r
+should be used with caution.
Environment variables cannot be made read-only.
-.PP
+.Pp
Some variables are set by the shell or referred to by it.
-For instance, the \fBargv\fR variable is an image of the shell's argument
+For instance, the
+.Ic argv
+variable is an image of the shell's argument
list, and words of this variable's value are referred to in special ways.
Some of the variables referred to by the shell are toggles;
the shell does not care what their value is, only whether they are set or not.
-For instance, the \fBverbose\fR variable is a toggle which causes command
-input to be echoed. The \fB\-v\fR command line option sets this variable.
-\fBSpecial shell variables\fR lists all variables which are referred to by the shell.
-.PP
-Other operations treat variables numerically. The `@' command permits numeric
-calculations to be performed and the result assigned to a variable. Variable
-values are, however, always represented as (zero or more) strings. For the
+For instance, the
+.Ic verbose
+variable is a toggle which causes command
+input to be echoed.
+The
+.Fl v
+command line option sets this variable.
+.Sx Special shell variables
+lists all variables which are referred to by the shell.
+.Pp
+Other operations treat variables numerically.
+The
+.Sq Ic @
+command permits numeric
+calculations to be performed and the result assigned to a variable.
+Variable
+values are, however, always represented as (zero or more) strings.
+For the
purposes of numeric operations, the null string is considered to be zero, and
the second and subsequent words of multi-word values are ignored.
-.PP
+.Pp
After the input line is aliased and parsed, and before each command is
-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
-below) so `$' substitution does not occur there until later,
-if at all. A `$' is passed unchanged if followed by a blank, tab, or
+executed, variable substitution is performed keyed by
+.Ql $
+characters.
+This
+expansion can be prevented by preceding the
+.Ql $
+with a
+.Ql \e
+except within
+.Ql \&"
+pairs where it
+.Em always
+occurs, and within
+.Ql \&'
+pairs where it
+.Em never
+occurs.
+Strings quoted by
+.Ql \`
+are interpreted later (see
+.Sx Command substitution )
+so
+.Ql $
+substitution does not occur there until later,
+if at all.
+A
+.Ql $
+is passed unchanged if followed by a blank, tab, or
end-of-line.
-.PP
+.Pp
Input/output redirections are recognized before variable expansion, and are
-variable expanded separately. Otherwise, the command name and entire argument
-list are expanded together. It is thus possible for the first (command) word
+variable expanded separately.
+Otherwise, the command name and entire argument
+list are expanded together.
+It is thus possible for the first (command) word
(to this point) to generate more than one word, the first of which becomes the
command name, and the rest of which become arguments.
-.PP
-Unless enclosed in `"' or given the `:q' modifier the results of variable
-substitution may eventually be command and filename substituted. Within `"', a
+.Pp
+Unless enclosed in
+.Ql \&"
+or given the
+.Ql \&:q
+modifier the results of variable
+substitution may eventually be command and filename substituted.
+Within
+.Ql \&" ,
+a
variable whose value consists of multiple words expands to a (portion of a)
-single word, with the words of the variable's value separated by blanks. When
-the `:q' modifier is applied to a substitution the variable will expand to
+single word, with the words of the variable's value separated by blanks.
+When
+the
+.Ql \&:q
+modifier is applied to a substitution the variable will expand to
multiple words with each word separated by a blank and quoted to prevent later
command or filename substitution.
-.PP
+.Pp
+The editor command
+.Ic expand-variables ,
+normally bound to
+.Ic ^X-$ ,
+can be used to interactively expand individual variables.
+.
+.Ss Variable substitution metasequences
The following metasequences are provided for introducing variable values into
-the shell input. Except as noted, it is an error to reference a variable which
-is not set.
-.PP
-.PD 0
-$\fIname\fR
-.TP 8
-${\fIname\fR}
-Substitutes the words of the value of variable \fIname\fR, each separated
-by a blank. Braces insulate \fIname\fR from following characters which would
-otherwise be part of it. Shell variables have names consisting of
-letters and digits starting with a letter. The underscore character is
-considered a letter. If \fIname\fR is not a shell variable, but is set in the
+the shell input:
+.Pp
+.Bl -tag -width ".Li ${ Ns Ar number Ns Li }" -offset indent -compact
+.
+.It Li $ Ns Ar name
+.It Li ${ Ns Ar name Ns Li }
+Substitutes the words of the value of variable
+.Ar name ,
+each separated
+by a blank.
+Braces insulate
+.Ar name
+from following characters which would
+otherwise be part of it.
+Shell variables have names consisting of
+letters and digits starting with a letter.
+The underscore character is
+considered a letter.
+If
+.Ar name
+is not a shell variable, but is set in the
environment, then that value is returned (but some of the other forms
given below are not available in this case).
-.PP
-$\fIname\fR[\fIselector\fR]
-.TP 8
-${\fIname\fR[\fIselector\fR]}
-Substitutes only the selected words from the value of \fIname\fR.
-The \fIselector\fR is subjected to `$' substitution and may consist of
-a single number or two numbers separated by a `\-'.
-The first word of a variable's value is numbered `1'.
-If the first number of a range is omitted it defaults to `1'.
-If the last member of a range is omitted it defaults to `$#\fIname\fR'.
-The \fIselector\fR `*' selects all words.
+.
+.Pp
+.It Li $ Ns Ar name Ns Li \&[ Ns Ar selector Ns Li \&]
+.It Li ${ Ns Ar name Ns Li \&[ Ns Ar selector Ns Li ]}
+Substitutes only the selected words from the value of
+.Ar name .
+The
+.Ar selector
+is subjected to
+.Ql $
+substitution and may consist of
+a single number or two numbers separated by a
+.Ql \- .
+The first word of a variable's value is numbered
+.Ql 1 .
+If the first number of a range is omitted it defaults to
+.Ql 1 .
+If the last member of a range is omitted it defaults to
+.Ql $# Ns Ar name .
+The
+.Ar selector
+.Ql *
+selects all words.
It is not an error for a range to be empty if the
second argument is omitted or in range.
-.TP 8
-$0
+.
+.Pp
+.It Li $0
Substitutes the name of the file from which command input
-is being read. An error occurs if the name is not known.
-.PP
-$\fInumber\fR
-.TP 8
-${\fInumber\fR}
-Equivalent to `$argv[\fInumber\fR]'.
-.TP 8
-$*
-Equivalent to `$argv', which is equivalent to `$argv[*]'.
-.PD
-.PP
-The `:' modifiers described under \fBHistory substitution\fR, except for `:p',
-can be applied to the substitutions above. More than one may be used. (+)
+is being read.
+An error occurs if the name is not known.
+.
+.Pp
+.It Li $ Ns Ar number
+.It Li ${ Ns Ar number Ns Li }
+Equivalent to
+.Ql $argv[ Ns Ar number Ns Li \&] .
+.
+.Pp
+.It Li $*
+Equivalent to
+.Ql $argv ,
+which is equivalent to
+.Ql $argv[*] .
+.El
+.Pp
+Except as noted, it is an error to reference a variable which
+is not set.
+.Pp
+The
+.Ql \&:
+modifiers described under
+.Sx History word modifiers ,
+except for
+.Ql \&:p ,
+can be applied to the substitutions above.
+More than one may be used.
+(+)
Braces may be needed to insulate a variable substitution from a literal colon
-just as with \fBHistory substitution\fR (q.v.); any modifiers must appear
+just as with
+.Sx History word modifiers ;
+any modifiers must appear
within the braces.
-.PP
-The following substitutions can not be modified with `:' modifiers.
-.PP
-.PD 0
-$?\fIname\fR
-.TP 8
-${?\fIname\fR}
-Substitutes the string `1' if \fIname\fR is set, `0' if it is not.
-.TP 8
-$?0
-Substitutes `1' if the current input filename is known, `0' if it is not.
-Always `0' in interactive shells.
-.PP
-$#\fIname\fR
-.TP 8
-${#\fIname\fR}
-Substitutes the number of words in \fIname\fR.
-.TP 8
-$#
-Equivalent to `$#argv'. (+)
-.PP
-$%\fIname\fR
-.TP 8
-${%\fIname\fR}
-Substitutes the number of characters in \fIname\fR. (+)
-.PP
-$%\fInumber\fR
-.TP 8
-${%\fInumber\fR}
-Substitutes the number of characters in $argv[\fInumber\fR]. (+)
-.TP 8
-$?
-Equivalent to `$status'. (+)
-.TP 8
-$$
+.
+.Ss Variable substitution without modifiers
+The following substitutions cannot be modified with
+.Ql \&:
+modifiers:
+.Pp
+.Bl -tag -width ".Li ${% Ns Ar number Ns Li }" -offset indent -compact
+.
+.It Li $\&? Ns Ar name
+.It Li ${\&? Ns Ar name Ns Li }
+Substitutes the string
+.Ql 1
+if
+.Ar name
+is set,
+.Ql 0
+if it is not.
+.
+.Pp
+.It Li $?0
+Substitutes
+.Ql 1
+if the current input filename is known,
+.Ql 0
+if it is not.
+Always
+.Ql 0
+in interactive shells.
+.
+.Pp
+.It Li $# Ns Ar name
+.It Li ${# Ns Ar name Ns Li }
+Substitutes the number of words in
+.Ar name .
+.
+.Pp
+.It Li $#
+Equivalent to
+.Ql $#argv .
+(+)
+.
+.Pp
+.It Li $% Ns Ar name
+.It Li ${% Ns Ar name Ns Li }
+Substitutes the number of characters in
+.Ar name .
+(+)
+.
+.Pp
+.It Li $% Ns Ar number
+.It Li ${% Ns Ar number Ns Li }
+Substitutes the number of characters in
+.Ql $argv[ Ns Ar number Ns Li \&] .
+(+)
+.
+.Pp
+.It Li $?
+Equivalent to
+.Ql $status .
+(+)
+.
+.Pp
+.It Li $$
Substitutes the (decimal) process number of the (parent) shell.
-.TP 8
-$!
+.
+.Pp
+.It Li $!
Substitutes the (decimal) process number of the last
-background process started by this shell. (+)
-.TP 8
-$_
-Substitutes the command line of the last command executed. (+)
-.TP 8
-$<
+background process started by this shell.
+(+)
+.
+.Pp
+.It Li $_
+Substitutes the command line of the last command executed.
+(+)
+.
+.Pp
+.It Li $<
Substitutes a line from the standard input, with no further interpretation
-thereafter. It can be used to read from the keyboard in a shell script.
-(+) While \fIcsh\fR always quotes $<, as if it were equivalent to `$<:q',
-\fItcsh\fR does not. Furthermore, when \fItcsh\fR is waiting for a line to be
+thereafter.
+It can be used to read from the keyboard in a shell script.
+(+) While
+.Xr csh 1
+always quotes
+.Ql $< ,
+as if it were equivalent to
+.Ql $<:q ,
+.Nm
+does not.
+Furthermore, when
+.Nm
+is waiting for a line to be
typed the user may type an interrupt to interrupt the sequence into
-which the line is to be substituted, but \fIcsh\fR does not allow this.
-.PD
-.PP
-The editor command \fIexpand-variables\fR, normally bound to `^X-$',
-can be used to interactively expand individual variables.
-.SS "Command, filename and directory stack substitution"
-The remaining substitutions are applied selectively to the arguments of builtin
-commands. This means that portions of expressions which are not evaluated are
-not subjected to these expansions. For commands which are not internal to the
-shell, the command name is substituted separately from the argument list. This
-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
+which the line is to be substituted, but
+.Xr csh 1
+does not allow this.
+.El
+.
+.Ss Command, filename and directory stack substitution
+The remaining substitutions are applied selectively to the arguments
+of builtin commands.
+This means that portions of expressions which are not evaluated are
+not subjected to these expansions.
+For commands which are not internal to the
+shell, the command name is substituted separately from the argument list.
+This 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
+.Ql \&` .
+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 null words are discarded.
+The output is variable and command substituted
and put in place of the original string.
-.PP
+.Pp
Command substitutions inside double
-quotes (`"') retain blanks and tabs; only newlines force new words. The single
-final newline does not force a new word in any case. It is thus possible for a
+quotes
+.Pq Ql \&"
+retain blanks and tabs; only newlines force new words.
+The single
+final newline does not force a new word in any case.
+It is thus possible for a
command substitution to yield only part of a word, even if the command outputs
a complete line.
-.PP
-By default, the shell since version 6.12 replaces all newline and carriage
-return characters in the command by spaces. If this is switched off by
-unsetting \fBcsubstnonl\fR, newlines separate commands as usual.
-.SS "Filename substitution"
-If a word contains any of the characters `*', `?', `[' or `{' or begins with
-the character `~' it is a candidate for filename substitution, also known as
-``globbing''. This word is then regarded as a pattern (``glob-pattern''), and
+.Pp
+By default, the shell since version 6.12 replaces all newline and carriage
+return characters in the command by spaces.
+If this is switched off by
+unsetting
+.Ic csubstnonl ,
+newlines separate commands as usual.
+.
+.Ss Filename substitution
+If a word contains any of the characters
+.Ql * ,
+.Ql \&? ,
+.Ql \&[ ,
+or
+.Ql {
+or begins with
+the character
+.Ql ~
+it is a candidate for filename substitution, also known as
+.Dq globbing .
+This word is then regarded as a pattern
+.Dq ( glob-pattern ) ,
+and
replaced with an alphabetically sorted list of file names which match the
pattern.
-.PP
-In matching filenames, the character `.' at the beginning of a filename or
-immediately following a `/', as well as the character `/' must be matched
+.Pp
+In matching filenames, the character
+.Ql \&.
+at the beginning of a filename or
+immediately following a
+.Ql / ,
+as well as the character
+.Ql /
+must be matched
explicitly (unless either
-.B globdot
+.Ic globdot
or
-.B globstar
-or both are set(+)). The character `*' matches any string of characters,
-including the null string. The character `?' matches any single character.
-The sequence `[...]' matches any one of the characters enclosed.
-Within `[...]', a pair of
-characters separated by `\-' matches any character lexically between the two.
-.PP
+.Ic globstar
+or both are set (+)).
+The character
+.Ql *
+matches any string of characters,
+including the null string.
+The character
+.Ql \&?
+matches any single character.
+The sequence
+.Ql [...]
+matches any one of the characters enclosed.
+Within
+.Ql [...] ,
+a pair of
+characters separated by
+.Ql \-
+matches any character lexically between the two.
+.Pp
(+) Some glob-patterns can be negated:
-The sequence `[^...]' matches any single character \fInot\fR specified by the
+The sequence
+.Ql [^...]
+matches any single character
+.Em not
+specified by the
characters and/or ranges of characters in the braces.
-.PP
-An entire glob-pattern can also be negated with `^':
-.IP "" 4
+.Pp
+An entire glob-pattern can also be negated with
+.Ql ^ :
+.Bd -literal -offset indent
> echo *
-.br
bang crash crunch ouch
-.br
> echo ^cr*
-.br
bang ouch
-.PP
-Glob-patterns which do not use `?', `*', or `[]' or which use `{}' or `~'
+.Ed
+.Pp
+Glob-patterns which do not use
+.Ql \&? ,
+.Ql * ,
+or
+.Ql [] ,
+or which use
+.Ql {}
+or
+.Ql ~
(below) are not negated correctly.
-.PP
-The metanotation `a{b,c,d}e' is a shorthand for `abe ace ade'.
-Left-to-right order is preserved: `/usr/source/s1/{oldls,ls}.c' expands
-to `/usr/source/s1/oldls.c /usr/source/s1/ls.c'. The results of matches are
+.Pp
+The metanotation
+.Ql a{b,c,d}e
+is a shorthand for
+.Ql abe ace ade .
+Left-to-right order is preserved:
+.Dl /usr/source/s1/{oldls,ls}.c
+expands
+to
+.Dl /usr/source/s1/oldls.c /usr/source/s1/ls.c
+The results of matches are
sorted separately at a low level to preserve this order:
-`../{memo,*box}' might expand to `../memo ../box ../mbox'.
-(Note that `memo' was not sorted with the results of matching `*box'.)
+.Dl ../{memo,*box}
+might expand to
+.Dl ../memo ../box ../mbox
+(Note that
+.Ql memo
+was not sorted with the results of matching
+.Ql *box . )
It is not an error when this construct expands to files which do not exist,
but it is possible to get an error from a command to which the expanded list
is passed.
This construct may be nested.
-As a special case the words `{', `}' and `{}' are passed undisturbed.
-.PP
-The character `~' at the beginning of a filename refers to home directories.
-Standing alone, i.e., `~', it expands to the invoker's home directory as
-reflected in the value of the \fBhome\fR shell variable. When followed by a
-name consisting of letters, digits and `\-' characters the shell searches for a
-user with that name and substitutes their home directory; thus `~ken' might
-expand to `/usr/ken' and `~ken/chmach' to `/usr/ken/chmach'. If the character
-`~' is followed by a character other than a letter or `/' or appears elsewhere
+As a special case the words
+.Ql { ,
+.Ql } ,
+and
+.Ql {}
+are passed undisturbed.
+.Pp
+The character
+.Ql ~
+at the beginning of a filename refers to home directories.
+Standing alone, i.e.,
+.Ql ~ ,
+it expands to the invoker's home directory as
+reflected in the value of the
+.Ic home
+shell variable.
+When followed by a
+name consisting of letters, digits and
+.Ql \-
+characters the shell searches for a
+user with that name and substitutes their home directory; thus
+.Dl ~ken
+might
+expand to
+.Dl /usr/ken
+and
+.Dl ~ken/chmach
+might expand to
+.Dl /usr/ken/chmach
+If the character
+.Ql ~
+is followed by a character other than a letter or
+.Ql /
+or appears elsewhere
than at the beginning of a word, it is left undisturbed.
-A command like `setenv MANPATH /usr/man:/usr/local/man:~/lib/man' does not,
+A command like
+.Dl setenv MANPATH /usr/share/man:/usr/local/share/man:~/lib/man
+does not,
therefore, do home directory substitution as one might hope.
-.PP
-It is an error for a glob-pattern containing `*', `?', `[' or `~', with or
-without `^', not to match any files. However, only one pattern in a list of
-glob-patterns must match a file (so that, e.g., `rm *.a *.c *.o' would fail
-only if there were no files in the current directory ending in `.a', `.c', or
-`.o'), and if the \fBnonomatch\fR shell variable is set a pattern (or list
+.Pp
+It is an error for a glob-pattern containing
+.Ql * ,
+.Ql \&? ,
+.Ql \&[ ,
+or
+.Ql ~ ,
+with or
+without
+.Ql ^ ,
+not to match any files.
+However, only one pattern in a list of
+glob-patterns must match a file (so that, e.g.,
+.Dl rm *.a *.c *.o
+would fail
+only if there were no files in the current directory ending in
+.Ql .a ,
+.Ql .c ,
+or
+.Ql .o ) ,
+and if the
+.Ic nonomatch
+shell variable is set a pattern (or list
of patterns) which matches nothing is left unchanged rather than causing
an error.
-.PP
-The \fBglobstar\fR shell variable can be set to allow `**' or `***' as
-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 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
-`ls /usr/include/**time**.h' will match any .h file with `time' either
-in a subdirectory name or in the filename itself).
-To prevent problems with recursion, the `**' glob-pattern will not
-descend into a symbolic link containing a directory. To override this,
-use `***' (+)
-.PP
-The \fBnoglob\fR shell variable can be set to prevent filename substitution,
-and the \fIexpand-glob\fR editor command, normally bound to `^X-*', can be
+.Pp
+The
+.Ic globstar
+shell variable can be set to allow
+.Ql **
+or
+.Ql ***
+as
+a file glob pattern that matches any string of characters including
+.Ql / ,
+recursively traversing any existing sub-directories.
+For example,
+.Dl ls **.c
+will list all the .c files in the current directory tree.
+If used by itself, it will match zero or more sub-directories.
+For example
+.Dl ls /usr/include/**/time.h
+will list any file named
+.Ql time.h
+in the
+.Pa /usr/include
+directory tree;
+.Dl ls /usr/include/**time.h
+will match
+any file in the
+.Pa /usr/include
+directory tree ending in
+.Ql time.h ;
+and
+.Dl ls /usr/include/**time**.h
+will match any .h file with
+.Ql time
+either
+in a subdirectory name or in the filename itself.
+To prevent problems with recursion, the
+.Ql **
+glob-pattern will not
+descend into a symbolic link containing a directory.
+To override this,
+use
+.Ql ***
+(+)
+.Pp
+The
+.Ic noglob
+shell variable can be set to prevent filename substitution,
+and the
+.Ic expand-glob
+editor command, normally bound to
+.Ic ^X-* ,
+can be
used to interactively expand individual filename substitutions.
-.SS "Directory stack substitution (+)"
+.
+.Ss Directory stack substitution (+)
The directory stack is a list of directories, numbered from zero, used by the
-\fIpushd\fR, \fIpopd\fR and \fIdirs\fR builtin commands (q.v.).
-\fIdirs\fR can print, store in a file, restore and clear the directory stack
-at any time, and the \fBsavedirs\fR and \fBdirsfile\fR shell variables can be set to
+.Ic pushd ,
+.Ic popd ,
+and
+.Ic dirs
+builtin commands.
+.Ic dirs
+can print, store in a file, restore and clear the directory stack
+at any time, and the
+.Ic savedirs
+and
+.Ic dirsfile
+shell variables can be set to
store the directory stack automatically on logout and restore it on login.
-The \fBdirstack\fR shell variable can be examined to see the directory stack and
+The
+.Ic dirstack
+shell variable can be examined to see the directory stack and
set to put arbitrary directories into the directory stack.
-.PP
-The character `=' followed by one or more digits expands to an entry in
-the directory stack. The special case `=\-' expands to the last directory in
-the stack. For example,
-.IP "" 4
+.Pp
+The character
+.Ql =
+followed by one or more digits expands to an entry in
+the directory stack.
+The special case
+.Ql =-
+expands to the last directory in
+the stack.
+For example,
+.Bd -literal -offset indent
> dirs \-v
-.br
0 /usr/bin
-.br
1 /usr/spool/uucp
-.br
2 /usr/accts/sys
-.br
> echo =1
-.br
/usr/spool/uucp
-.br
> echo =0/calendar
-.br
/usr/bin/calendar
-.br
> echo =\-
-.br
/usr/accts/sys
-.PP
-The \fBnoglob\fR and \fBnonomatch\fR shell variables and the \fIexpand-glob\fR
+.Ed
+.Pp
+The
+.Ic noglob
+and
+.Ic nonomatch
+shell variables and the
+.Ic expand-glob
editor command apply to directory stack as well as filename substitutions.
-.SS "Other substitutions (+)"
+.
+.Ss Other substitutions (+)
There are several more transformations involving filenames, not strictly
related to the above but mentioned here for completeness.
-\fIAny\fR filename may be expanded to a full path when the
-\fBsymlinks\fR variable (q.v.) is set to `expand'.
+.Em Any
+filename may be expanded to a full path when the
+.Ic symlinks
+variable is set to
+.Ql expand .
Quoting prevents this expansion, and
-the \fInormalize-path\fR editor command does it on demand.
-The \fInormalize-command\fR editor command expands commands in PATH into
-full paths on demand.
-Finally, \fIcd\fR and \fIpushd\fR interpret `\-' as the old working directory
-(equivalent to the shell variable \fBowd\fR).
+the
+.Ic normalize-path
+editor command does it on demand.
+The
+.Ic normalize-command
+editor command expands commands in
+.Ev PATH
+into full paths on demand.
+Finally,
+.Ic cd
+and
+.Ic pushd
+interpret
+.Ql \-
+as the old working directory
+(equivalent to the shell variable
+.Ic owd ) .
This is not a substitution at all, but an abbreviation recognized by only
-those commands. Nonetheless, it too can be prevented by quoting.
-.SS Commands
+those commands.
+Nonetheless, it too can be prevented by quoting.
+.
+.Ss Commands
The next three sections describe how the shell executes commands and
deals with their input and output.
-.SS Simple commands, pipelines and sequences
+.
+.Ss Simple commands, pipelines and sequences
A simple command is a sequence of words, the first of which specifies the
-command to be executed. A series of simple commands joined by `|' characters
-forms a pipeline. The output of each command in a pipeline is connected to the
+command to be executed.
+A series of simple commands joined by
+.Ql \&|
+characters
+forms a pipeline.
+The output of each command in a pipeline is connected to the
input of the next.
-.PP
-Simple commands and pipelines may be joined into sequences with `;', and will
-be executed sequentially. Commands and pipelines can also be joined into
-sequences with `||' or `&&', indicating, as in the C language, that the second
+.Pp
+Simple commands and pipelines may be joined into sequences with
+.Ql \&; ,
+and will
+be executed sequentially.
+Commands and pipelines can also be joined into
+sequences with
+.Ql ||
+or
+.Ql && ,
+indicating, as in the C language, that the second
is to be executed only if the first fails or succeeds respectively.
-.PP
-A simple command, pipeline or sequence may be placed in parentheses, `()',
+.Pp
+A simple command, pipeline or sequence may be placed in parentheses,
+.Ql () ,
to form a simple command, which may in turn be a component of a pipeline or
-sequence. A command, pipeline or sequence can be executed
-without waiting for it to terminate by following it with an `&'.
-.SS "Builtin and non-builtin command execution"
-Builtin commands are executed within the shell. If any component of a
+sequence.
+A command, pipeline or sequence can be executed
+without waiting for it to terminate by following it with an
+.Ql \&& .
+.
+.Ss Builtin and non-builtin command execution
+Builtin commands are executed within the shell.
+If any component of a
pipeline except the last is a builtin command, the pipeline is executed
in a subshell.
-.PP
+.Pp
Parenthesized commands are always executed in a subshell.
-.IP "" 4
+.Bd -literal -offset indent
(cd; pwd); pwd
-.PP
-thus prints the \fBhome\fR directory, leaving you where you were
+.Ed
+.Pp
+thus prints the
+.Ic home
+directory, leaving you where you were
(printing this after the home directory), while
-.IP "" 4
+.Bd -literal -offset indent
cd; pwd
-.PP
-leaves you in the \fBhome\fR directory. Parenthesized commands are most often
-used to prevent \fIcd\fR from affecting the current shell.
-.PP
+.Ed
+.Pp
+leaves you in the
+.Ic home
+directory.
+Parenthesized commands are most often
+used to prevent
+.Ic cd
+from affecting the current shell.
+.Pp
When a command to be executed is found not to be a builtin command the shell
-attempts to execute the command via \fIexecve\fR(2). Each word in the variable
-\fBpath\fR names a directory in which the shell will look for the
-command. If the shell is not given a \fB\-f\fR option, the shell
+attempts to execute the command via
+.Xr execve 2 .
+Each word in the variable
+.Ic path
+names a directory in which the shell will look for the
+command.
+If the shell is not given a
+.Fl f
+option, the shell
hashes the names in these directories into an internal table so that it will
-try an \fIexecve\fR(2) in only a directory where there is a possibility that the
-command resides there. This greatly speeds command location when a large
-number of directories are present in the search path. This hashing mechanism is
+try an
+.Xr execve 2
+in only a directory where there is a possibility that the
+command resides there.
+This greatly speeds command location when a large
+number of directories are present in the search path.
+This hashing mechanism is
not used:
-.TP 4
-.B 1.
-If hashing is turned explicitly off via \fIunhash\fR.
-.TP 4
-.B 2.
-If the shell was given a \fB\-f\fR argument.
-.TP 4
-.B 3.
-For each directory component of \fBpath\fR which does not begin with a `/'.
-.TP 4
-.B 4.
-If the command contains a `/'.
-.PP
+.Bl -enum -offset indent
+.It
+If hashing is turned explicitly off via
+.Ic unhash .
+.It
+If the shell was given a
+.Fl f Ar argument .
+.It
+For each directory component of
+.Ic path
+which does not begin with a
+.Ql / .
+.It
+If the command contains a
+.Ql / .
+.El
+.Pp
In the above four cases the shell concatenates each component of the path
vector with the given command name to form a path name of a file which it
-then attempts to execute it. If execution is successful, the search stops.
-.PP
+then attempts to execute it.
+If execution is successful, the search stops.
+.Pp
If the file has execute permissions but is not an executable to the system
(i.e., it is neither an executable binary nor a script that specifies its
interpreter), then it is assumed to be a file containing shell commands and
-a new shell is spawned to read it. The \fIshell\fR special alias may be set
+a new shell is spawned to read it.
+The
+.Ic shell
+special alias may be set
to specify an interpreter other than the shell itself.
-.PP
-On systems which do not understand the `#!' script interpreter convention
-the shell may be compiled to emulate it; see the \fBversion\fR shell
-variable. If so, the shell checks the first line of the file to
-see if it is of the form `#!\fIinterpreter\fR \fIarg\fR ...'. If it is,
-the shell starts \fIinterpreter\fR with the given \fIarg\fRs and feeds the
+.Pp
+On systems which do not understand the
+.Ql #!
+script interpreter convention
+the shell may be compiled to emulate it; see the
+.Ic version
+shell
+variable.
+If so, the shell checks the first line of the file to
+see if it is of the form
+.Dl #! Ns Ar interpreter arg Li \&...
+If it is,
+the shell starts
+.Ar interpreter
+with the given
+.Ar arg Ns
+s and feeds the
file to it on standard input.
-.SS Input/output
+.
+.Ss Input/output
The standard input and standard output of a command may be redirected with the
following syntax:
-.PP
-.PD 0
-.TP 8
-< \fIname
-Open file \fIname\fR (which is first variable, command and filename
+.Pp
+.Bl -tag -width ".Li << Ar word" -offset indent -compact
+.
+.It Li < Ar name
+Open file
+.Ar name
+(which is first variable, command and filename
expanded) as the standard input.
-.TP 8
-<< \fIword
-Read the shell input up to a line which is identical to \fIword\fR. \fIword\fR
+.
+.Pp
+.It Li << Ar word
+Read the shell input up to a line which is identical to
+.Ar word .
+.Ar word
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
-command substitution is performed on the intervening lines, allowing `\e' to
-quote `$', `\e' and `\`'. Commands which are substituted have all blanks, tabs,
-and newlines preserved, except for the final newline which is dropped. The
+line is compared to
+.Ar word
+before any substitutions are done on this input
+line.
+Unless a quoting
+.Ql \e ,
+.Ql \&" ,
+.Ql \&' ,
+or
+.Ql \&`
+appears in
+.Ar word
+variable and
+command substitution is performed on the intervening lines, allowing
+.Ql \e
+to
+quote
+.Ql $ ,
+.Ql \e ,
+and
+.Ql \&` .
+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.
-.PP
-> \fIname
-.br
->! \fIname
-.br
->& \fIname
-.TP 8
->&! \fIname
-The file \fIname\fR is used as standard output. If the file does not exist
+.Pp
+.It Li > Ar name
+.It Li >\&! Ar name
+.It Li >& Ar name
+.It Li >&\&! Ar name
+The file
+.Ar name
+is used as standard output.
+If the file does not exist
then it is created; if the file exists, it is truncated, its previous contents
being lost.
-.RS +8
-.PD
-.PP
-If the shell variable \fBnoclobber\fR is set, then the file must not exist or be a
-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
+.Pp
+If the shell variable
+.Ic noclobber
+is set, then the file must not exist or be a
+character special file (e.g., a terminal or
+.Pa /dev/null )
+or an error results.
+This helps prevent accidental destruction of files.
+In this case the
+.Ql \&!
+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
+If
+.Ql notempty
+is given in
+.Ic noclobber ,
+.Ql >
+is allowed on empty files;
+if
+.Ql ask
+is given in
+.Ic noclobber ,
+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 `<'
+.Pp
+The forms involving
+.Ql \&&
+route the diagnostic output into the specified file as
+well as the standard output.
+.Ar name
+is expanded in the same way as
+.Ql <
input filenames are.
-.PD 0
-.RE
-.PP
->> \fIname
-.br
->>& \fIname
-.br
->>! \fIname
-.TP 8
->>&! \fIname
-Like `>', but appends output to the end of \fIname\fR.
-If the shell variable \fBnoclobber\fR is set, then it is an error for
-the file \fInot\fR to exist, unless one of the `!' forms is given.
-.PD
-.PP
+.Pp
+.It Li >> Ar name
+.It Li >>& Ar name
+.It Li >>\&! Ar name
+.It Li >>&\&! Ar name
+Like
+.Ql > ,
+but appends output to the end of
+.Ar name .
+If the shell variable
+.Ic noclobber
+is set, then it is an error for
+the file
+.Em not
+to exist, unless one of the
+.Ql \&!
+forms is given.
+.El
+.Pp
A command receives the environment in which the shell was invoked as modified
by the input-output parameters and the presence of the command in a pipeline.
Thus, unlike some previous shells, commands run from a file of shell commands
have no access to the text of the commands by default; rather they receive the
-original standard input of the shell. The `<<' mechanism should be used to
-present inline data. This permits shell command scripts to function as
-components of pipelines and allows the shell to block read its input. Note
-that the default standard input for a command run detached is \fInot\fR
-the empty file \fI/dev/null\fR, but the original standard input of the shell.
+original standard input of the shell.
+The
+.Ql <<
+mechanism should be used to
+present inline data.
+This permits shell command scripts to function as
+components of pipelines and allows the shell to block read its input.
+Note that the default standard input for a command run detached is
+.Em not
+the empty file
+.Pa /dev/null ,
+but the original standard input of the shell.
If this is a terminal and if the process attempts to read from the terminal,
-then the process will block and the user will be notified (see \fBJobs\fR).
-.PP
+then the process will block and the user will be notified (see
+.Sx Jobs ) .
+.Pp
Diagnostic output may be directed through a pipe with the standard output.
-Simply use the form `|&' rather than just `|'.
-.PP
+Simply use the form
+.Ql |&
+rather than just
+.Ql | .
+.Pp
The shell cannot presently redirect diagnostic output without also redirecting
-standard output, but `(\fIcommand\fR > \fIoutput-file\fR) >& \fIerror-file\fR'
-is often an acceptable workaround. Either \fIoutput-file\fR or
-\fIerror-file\fR may be `/dev/tty' to send output to the terminal.
-.SS Features
+standard output, but
+.Dl \&( Ar command Li > Ar output-file Li ) >& Ar error-file
+is often an acceptable workaround.
+Either
+.Ar output-file
+or
+.Ar error-file
+may be
+.Pa /dev/tty
+to send output to the terminal.
+.
+.Ss Features
Having described how the shell accepts, parses and executes
command lines, we now turn to a variety of its useful features.
-.SS "Control flow"
+.
+.Ss Control flow
The shell contains a number of commands which can be used to regulate the
flow of control in command files (shell scripts) and (in limited but
-useful ways) from terminal input. These commands all operate by forcing the
+useful ways) from terminal input.
+These commands all operate by forcing the
shell to reread or skip in its input and, due to the implementation,
restrict the placement of some of the commands.
-.PP
-The \fIforeach\fR, \fIswitch\fR, and \fIwhile\fR statements, as well as the
-\fIif-then-else\fR form of the \fIif\fR statement, require that the major
+.Pp
+The
+.Ic foreach ,
+.Ic switch ,
+and
+.Ic while
+statements, as well as the
+.Ic if \&... then \&... else
+form of the
+.Ic if
+statement, require that the major
keywords appear in a single simple command on an input line as shown below.
-.PP
+.Pp
If the shell's input is not seekable, the shell buffers up input whenever
a loop is being read and performs seeks in this internal buffer to
-accomplish the rereading implied by the loop. (To the extent that this
-allows, backward \fIgoto\fRs will succeed on non-seekable inputs.)
-.SS Expressions
-The \fIif\fR, \fIwhile\fR and \fIexit\fR builtin commands
-use expressions with a common syntax. The expressions can include any
-of the operators described in the next three sections. Note that the \fI@\fR
-builtin command (q.v.) has its own separate syntax.
-.SS "Logical, arithmetical and comparison operators"
+accomplish the rereading implied by the loop.
+(To the extent that this allows, backward
+.Ic goto Ns
+s will succeed on non-seekable inputs.)
+.
+.Ss Expressions
+The
+.Ic if ,
+.Ic while ,
+and
+.Ic exit
+builtin commands
+use expressions with a common syntax.
+The expressions can include any
+of the operators described in the next three sections.
+Note that the
+.Ic @
+builtin command has its own separate syntax.
+.
+.Ss Logical, arithmetical and comparison operators
These operators are similar to those of C and have the same precedence.
-They include
-.IP "" 4
-|| && | ^ & == != =~ !~ <= >=
-.br
-< > << >> + \- * / % ! ~ ( )
-.PP
-Here the precedence increases to the right, `==' `!=' `=~' and `!~', `<='
-`>=' `<' and `>', `<<' and `>>', `+' and `\-', `*' `/' and `%' being, in
-groups, at the same level. The `==' `!=' `=~' and `!~' operators compare
-their arguments as strings; all others operate on numbers. The operators
-`=~' and `!~' are like `!=' and `==' except that the right hand side is a
-glob-pattern (see \fBFilename substitution\fR) against which the left hand
-operand is matched. This reduces the need for use of the \fIswitch\fR
+.Pp
+The operators, in descending precedence, with equivalent precedence per line,
+are:
+.
+.Bl -column -offset indent ".Li <<" ".Li >>" ".Li <<" ".Li >>"
+.It Li \&( Ta Li \&) Ta Ta
+.It Li \&~ Ta Ta Ta
+.It Li \&! Ta Ta Ta
+.It Li * Ta Li / Ta Li % Ta
+.It Li + Ta Li \- Ta Ta
+.It Li << Ta Li >> Ta Ta
+.It Li <= Ta Li >= Ta Li < Ta Li >
+.It Li == Ta Li \&!= Ta Li =~ Ta Li \&!~
+.It Li & Ta Ta Ta
+.It Li ^ Ta Ta Ta
+.It Li \&| Ta Ta Ta
+.It Li && Ta Ta Ta
+.It Li || Ta Ta Ta
+.El
+.Pp
+The
+.Ql ==
+.Ql \&!=
+.Ql =~
+and
+.Ql \&!~
+operators compare
+their arguments as strings; all others operate on numbers.
+The operators
+.Ql =~
+and
+.Ql \&!~
+are like
+.Ql ==
+and
+.Ql \&!=
+except that the right hand side is a
+glob-pattern (see
+.Sx Filename substitution )
+against which the left hand operand is matched.
+This reduces the need for use of the
+.Ic switch
builtin command in shell scripts when all that is really needed is
pattern matching.
-.PP
+.Pp
Null or
-missing arguments are considered `0'. The results of all expressions are
-strings, which represent decimal numbers. It is important to note that
+missing arguments are considered
+.Ql 0 .
+The results of all expressions are
+strings, which represent decimal numbers.
+It is important to note that
no two components of an expression can appear in the same word; except
when adjacent to components of expressions which are syntactically
-significant to the parser (`&' `|' `<' `>' `(' `)') they should be
+significant to the parser
+.Po
+.Ql \&& ,
+.Ql | ,
+.Ql < ,
+.Ql > ,
+.Ql \&( ,
+.Ql \&)
+.Pc
+they should be
surrounded by spaces.
-.SS "Command exit status"
+.
+.Ss Command exit status
Commands can be executed in expressions and their exit status
-returned by enclosing them in braces (`{}'). Remember that the braces should
-be separated from the words of the command by spaces. Command executions
-succeed, returning true, i.e., `1', if the command exits with status 0,
-otherwise they fail, returning false, i.e., `0'. If more detailed status
+returned by enclosing them in braces
+.Pq Ql {} .
+Remember that the braces should
+be separated from the words of the command by spaces.
+Command executions
+succeed, returning true, i.e.,
+.Ql 1 ,
+if the command exits with status 0,
+otherwise they fail, returning false, i.e.,
+.Ql 0 .
+If more detailed status
information is required then the command should be executed outside of an
-expression and the \fBstatus\fR shell variable examined.
-.SS "File inquiry operators"
+expression and the
+.Ic status
+shell variable examined.
+.
+.Ss File inquiry operators
Some of these operators perform true/false tests on files and related
-objects. They are of the form \fB\-\fIop file\fR, where \fIop\fR is one of
-.PP
-.PD 0
-.RS +4
-.TP 4
-.B r
-Read access
-.TP 4
-.B w
-Write access
-.TP 4
-.B x
-Execute access
-.TP 4
-.B X
-Executable in the path or shell builtin, e.g., `\-X ls' and `\-X ls\-F' are
-generally true, but `\-X /bin/ls' is not (+)
-.TP 4
-.B e
-Existence
-.TP 4
-.B o
-Ownership
-.TP 4
-.B z
-Zero size
-.TP 4
-.B s
-Non-zero size (+)
-.TP 4
-.B f
-Plain file
-.TP 4
-.B d
-Directory
-.TP 4
-.B l
-Symbolic link (+) *
-.TP 4
-.B b
-Block special file (+)
-.TP 4
-.B c
-Character special file (+)
-.TP 4
-.B p
-Named pipe (fifo) (+) *
-.TP 4
-.B S
-Socket special file (+) *
-.TP 4
-.B u
-Set-user-ID bit is set (+)
-.TP 4
-.B g
-Set-group-ID bit is set (+)
-.TP 4
-.B k
-Sticky bit is set (+)
-.TP 4
-.B t
-\fIfile\fR (which must be a digit) is an open file descriptor
-for a terminal device (+)
-.TP 4
-.B R
-Has been migrated (Convex only) (+)
-.TP 4
-.B L
+objects.
+They are of the form
+.Fl Ar op file ,
+where
+.Fl Ar op
+is one of:
+.Pp
+.Bl -tag -width ".Fl P Ns Ar mode Ns Li \&:" -offset indent -compact
+.It Fl op
+.Sy True/false file inquiry operator
+.Pp
+.
+.It Fl r
+Read access.
+.
+.It Fl w
+Write access.
+.
+.It Fl x
+Execute access.
+.
+.It Fl X
+Executable in the path or shell builtin, e.g.,
+.Ql \-X ls
+and
+.Ql \-X ls\-F
+are
+generally true, but
+.Ql \-X /bin/ls
+is not. (+)
+.
+.It Fl e
+Existence.
+.
+.It Fl o
+Ownership.
+.
+.It Fl z
+Zero size.
+.
+.It Fl s
+Non-zero size. (+)
+.
+.It Fl f
+Plain file.
+.
+.It Fl d
+Directory.
+.
+.It Fl l
+Symbolic link. (+) *
+.
+.It Fl b
+Block special file. (+)
+.
+.It Fl c
+Character special file. (+)
+.
+.It Fl p
+Named pipe (fifo). (+) *
+.
+.It Fl S
+Socket special file. (+) *
+.
+.It Fl u
+Set-user-ID bit is set. (+)
+.
+.It Fl g
+Set-group-ID bit is set. (+)
+.
+.It Fl k
+Sticky bit is set. (+)
+.
+.It Fl t
+.Ar file
+(which must be a digit) is an open file descriptor
+for a terminal device. (+)
+.
+.It Fl R
+Has been migrated (Convex only). (+)
+.
+.It Fl L
Applies subsequent operators in a multiple-operator test to a symbolic link
-rather than to the file to which the link points (+) *
-.RE
-.PD
-.PP
-\fIfile\fR is command and filename expanded and then tested to
-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 `*',
+rather than to the file to which the link points. (+) *
+.
+.El
+.Pp
+.Ar file
+is command and filename expanded and then tested to
+see if it has the specified relationship to the real user.
+If
+.Ar file
+does not exist or is inaccessible or, for the operators indicated by
+.Sq * ,
if the specified file type does not exist on the current system,
-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
-(returns `1') for plain executable files, but not for directories.
-.PP
-\fBL\fR may be used in a multiple-operator test to apply subsequent operators
+then all inquiries return false, i.e.,
+.Ql 0 .
+.Pp
+These operators may be combined for conciseness:
+.Dl Fl Ns Ar xy file
+is
+equivalent to
+.Dl Fl Ar x file Li && Fl Ar y file
+(+) For example,
+.Ql \-fx
+is true
+(returns
+.Ql 1 )
+for plain executable files, but not for directories.
+.Pp
+.Fl L
+may be used in a multiple-operator test to apply subsequent operators
to a symbolic link rather than to the file to which the link points.
-For example, `\-lLo' is true for links owned by the invoking user.
-\fBLr\fR, \fBLw\fR and \fBLx\fR are always true for links and false for
-non-links. \fBL\fR has a different meaning when it is the last operator
+For example,
+.Fl lLo
+is true for links owned by the invoking user.
+.Fl Lr ,
+.Fl Lw ,
+and
+.Fl Lx
+are always true for links and false for
+non-links.
+.Fl L
+has a different meaning when it is the last operator
in a multiple-operator test; see below.
-.PP
+.Pp
It is possible but not useful, and sometimes misleading, to combine operators
-which expect \fIfile\fR to be a file with operators which do not
-(e.g., \fBX\fR and \fBt\fR). Following \fBL\fR with a non-file operator
+which expect
+.Ar file
+to be a file with operators which do not
+(e.g.,
+.Fl X
+and
+.Fl t ) .
+Following
+.Fl L
+with a non-file operator
can lead to particularly strange results.
-.PP
-Other operators return other information, i.e., not just `0' or `1'. (+)
-They have the same format as before; \fIop\fR may be one of
-.PP
-.PD 0
-.RS +4
-.TP 8
-.B A
-Last file access time, as the number of seconds since the epoch
-.TP 8
-.B A:
-Like \fBA\fR, but in timestamp format, e.g., `Fri May 14 16:36:10 1993'
-.TP 8
-.B M
-Last file modification time
-.TP 8
-.B M:
-Like \fBM\fR, but in timestamp format
-.TP 8
-.B C
-Last inode modification time
-.TP 8
-.B C:
-Like \fBC\fR, but in timestamp format
-.TP 8
-.B D
-Device number
-.TP 8
-.B I
-Inode number
-.TP 8
-.B F
-Composite \fBf\fRile identifier, in the form \fIdevice\fR:\fIinode\fR
-.TP 8
-.B L
-The name of the file pointed to by a symbolic link
-.TP 8
-.B N
-Number of (hard) links
-.TP 8
-.B P
-Permissions, in octal, without leading zero
-.TP 8
-.B P:
-Like \fBP\fR, with leading zero
-.TP 8
-.B P\fImode
-Equivalent to `\-P \fIfile\fR & \fImode\fR', e.g., `\-P22 \fIfile\fR' returns
-`22' if \fIfile\fR is writable by group and other, `20' if by group only,
-and `0' if by neither
-.TP 8
-.B P\fImode\fB:
-Like \fBP\fImode\fR, with leading zero
-.TP 8
-.B U
-Numeric userid
-.TP 8
-.B U:
-Username, or the numeric userid if the username is unknown
-.TP 8
-.B G
-Numeric groupid
-.TP 8
-.B G:
-Groupname, or the numeric groupid if the groupname is unknown
-.TP 8
-.B Z
-Size, in bytes
-.RE
-.PD
-.PP
+.Pp
+Other operators return other information, i.e., not just
+.Ql 0
+or
+.Ql 1 .
+(+)
+They have the same format as before;
+.Fl Ar op
+may be one of:
+.Pp
+.Bl -tag -width ".Fl P Ns Ar mode Ns Li \&:" -offset indent -compact
+.It Fl op
+.Sy Extended file inquiry operator
+.Pp
+.
+.It Fl A
+Last file access time, as the number of seconds since the epoch.
+.
+.It Fl A\&:
+Like
+.Ql A ,
+but in timestamp format, e.g.,
+.Sq Fri May 14 16:36:10 1993 .
+.
+.It Fl M
+Last file modification time.
+.
+.It Fl M\&:
+Like
+.Fl M ,
+but in timestamp format.
+.
+.It Fl C
+Last inode modification time.
+.
+.It Fl C\&:
+Like
+.Fl C ,
+but in timestamp format.
+.
+.It Fl D
+Device number.
+.
+.It Fl I
+Inode number.
+.
+.It Fl F
+Composite
+.Fl f Ns
+ile identifier, in the form
+.Ar device : Ns
+.Ar inode .
+.
+.It Fl L
+The name of the file pointed to by a symbolic link.
+.
+.It Fl N
+Number of (hard) links.
+.
+.It Fl P
+Permissions, in octal, without leading zero.
+.
+.It Fl P\&:
+Like
+.Fl P ,
+with leading zero.
+.
+.It Fl P Ns Ar mode
+Equivalent to
+.Dl Fl P Ar file Li & Ar mode
+For example,
+.Ql \-P22 Ar file
+returns
+.Sq 22
+if
+.Ar file
+is writable by group and other,
+.Sq 20
+if by group only,
+and
+.Sq 0
+if by neither.
+.
+.It Fl P Ns Ar mode Ns Li \&:
+Like
+.Fl P Ns Ar mode ,
+with leading zero.
+.
+.It Fl U
+Numeric userid.
+.
+.It Fl U\&:
+Username, or the numeric userid if the username is unknown.
+.
+.It Fl G
+Numeric groupid.
+.
+.It Fl G\&:
+Groupname, or the numeric groupid if the groupname is unknown.
+.
+.It Fl Z
+Size, in bytes.
+.
+.El
+.Pp
Only one of these operators may appear in a multiple-operator test, and it
-must be the last. Note that \fBL\fR has a different meaning at the end of and
-elsewhere in a multiple-operator test. Because `0' is a valid return value
-for many of these operators, they do not return `0' when they fail: most
-return `\-1', and \fBF\fR returns `:'.
-.PP
-If the shell is compiled with POSIX defined (see the \fBversion\fR shell
+must be the last.
+Note that
+.Ql L
+has a different meaning at the end of and
+elsewhere in a multiple-operator test.
+Because
+.Sq 0
+is a valid return value
+for many of these operators, they do not return
+.Sq 0
+when they fail: most
+return
+.Sq \-1 ,
+and
+.Ql F
+returns
+.Ql \&: .
+.Pp
+If the shell is compiled with POSIX defined (see the
+.Ic version
+shell
variable), the result of a file inquiry is based on the permission bits of
-the file and not on the result of the \fIaccess\fR(2) system call.
-For example, if one tests a file with \fB\-w\fR whose permissions would
+the file and not on the result of the
+.Xr access 2
+system call.
+For example, if one tests a file with
+.Fl w
+whose permissions would
ordinarily allow writing but which is on a file system mounted read-only,
the test will succeed in a POSIX shell but fail in a non-POSIX shell.
-.PP
-File inquiry operators can also be evaluated with the \fIfiletest\fR builtin
-command (q.v.) (+).
-.SS Jobs
-The shell associates a \fIjob\fR with each pipeline. It keeps a table of
-current jobs, printed by the \fIjobs\fR command, and assigns them small integer
-numbers. When a job is started asynchronously with `&', the shell prints a
+.Pp
+File inquiry operators can also be evaluated with the
+.Ic filetest
+builtin
+command (+).
+.
+.Ss Jobs
+The shell associates a
+.Ar job
+with each pipeline.
+It keeps a table of
+current jobs, printed by the
+.Ic jobs
+command, and assigns them small integer
+numbers.
+When a job is started asynchronously with
+.Ql & ,
+the shell prints a
line which looks like
-.IP "" 4
+.Bd -literal -offset indent
[1] 1234
-.PP
+.Ed
+.Pp
indicating that the job which was started asynchronously was job number 1 and
had one (top-level) process, whose process id was 1234.
-.PP
+.Pp
If you are running a job and wish to do something else you may hit the suspend
-key (usually `^Z'),
-which sends a STOP signal to the current job. The shell will then normally
-indicate that the job has been `Suspended' and print another prompt.
-If the \fBlistjobs\fR shell variable is set, all jobs will be listed
-like the \fIjobs\fR builtin command; if it is set to `long' the listing will
-be in long format, like `jobs \-l'.
+key (usually
+.Ic ^Z ) ,
+which sends a STOP signal to the current job.
+The shell will then normally
+indicate that the job has been
+.Dl Suspended
+and print another prompt.
+If the
+.Ic listjobs
+shell variable is set, all jobs will be listed
+like the
+.Ic jobs
+builtin command; if it is set to
+.Ql long
+the listing will
+be in long format, like
+.Ql jobs \-l .
You can then manipulate the state of the suspended job.
You can put it in the
-``background'' with the \fIbg\fR command or run some other commands and
-eventually bring the job back into the ``foreground'' with \fIfg\fR.
-(See also the \fIrun-fg-editor\fR editor command.)
-A `^Z' takes effect immediately and is like an interrupt
+.Dq background
+with the
+.Ic bg
+command or run some other commands and
+eventually bring the job back into the
+.Dq foreground
+with
+.Ic fg .
+(See also the
+.Ic run-fg-editor
+editor command.)
+A
+.Ic ^Z
+takes effect immediately and is like an interrupt
in that pending output and unread input are discarded when it is typed.
-The \fIwait\fR builtin command causes the shell to wait for all background
+The
+.Ic wait
+builtin command causes the shell to wait for all background
jobs to complete.
-.PP
-The `^]' key sends a delayed suspend signal, which does not generate a STOP
-signal until a program attempts to \fIread\fR(2) it, to the current job.
+.Pp
+The
+.Ic ^]
+key sends a delayed suspend signal, which does not generate a STOP
+signal until a program attempts to
+.Xr read 2
+it, to the current job.
This can usefully be typed ahead when you have prepared some commands for a
job which you wish to stop after it has read them.
-The `^Y' key performs this function in \fIcsh\fR(1); in \fItcsh\fR,
-`^Y' is an editing command. (+)
-.PP
+The
+.Ic ^Y
+key performs this function in
+.Xr csh 1 ;
+in
+.Nm ,
+.Ic ^Y
+is an editing command.
+(+)
+.Pp
A job being run in the background stops if it tries to read from the
-terminal. Background jobs are normally allowed to produce output, but this can
-be disabled by giving the command `stty tostop'. If you set this tty option,
+terminal.
+Background jobs are normally allowed to produce output, but this can
+be disabled by giving the command
+.Dl stty tostop
+If you set this tty option,
then background jobs will stop when they try to produce output like they do
when they try to read input.
-.PP
-There are several ways to refer to jobs in the shell. The character `%'
-introduces a job name. If you wish to refer to job number 1, you can name it
-as `%1'. Just naming a job brings it to the foreground; thus `%1' is a synonym
-for `fg %1', bringing job 1 back into the foreground. Similarly, saying `%1 &'
-resumes job 1 in the background, just like `bg %1'. A job can also be named
-by an unambiguous prefix of the string typed in to start it: `%ex' would
-normally restart a suspended \fIex\fR(1) job, if there were only one suspended
-job whose name began with the string `ex'. It is also possible to say
-`%?\fIstring\fR' to specify a job whose text contains \fIstring\fR, if there
-is only one such job.
-.PP
-The shell maintains a notion of the current and previous jobs. In output
-pertaining to jobs, the current job is marked with a `+' and the previous job
-with a `\-'. The abbreviations `%+', `%', and (by analogy with the syntax of
-the \fIhistory\fR mechanism) `%%' all refer to the current job, and `%\-' refers
+.Pp
+There are several ways to refer to jobs in the shell.
+The character
+.Ql %
+introduces a job name.
+If you wish to refer to job number 1, you can name it
+as
+.Dl %1
+Just naming a job brings it to the foreground; thus
+.Dl %1
+is a synonym for
+.Dl fg %1
+bringing job 1 back into the foreground.
+Similarly, typing
+.Dl %1 &
+resumes job 1 in the background, just like
+.Dl bg %1
+A job can also be named
+by an unambiguous prefix of the string typed in to start it:
+.Dl %ex
+would
+normally restart a suspended
+.Xr ex 1
+job, if there were only one suspended
+job whose name began with the string
+.Ql ex .
+It is also possible to type
+.Dl %? Ns Ar string
+to specify a job whose text contains
+.Ar string ,
+if there is only one such job.
+.Pp
+The shell maintains a notion of the current and previous jobs.
+In output
+pertaining to jobs, the current job is marked with a
+.Ql +
+and the previous job
+with a
+.Ql \- .
+The abbreviations
+.Ql %+ ,
+.Ql % ,
+and (by analogy with the syntax of
+the
+.Ic history
+mechanism)
+.Ql %%
+all refer to the current job, and
+.Ql %\-
+refers
to the previous job.
-.PP
-The job control mechanism requires that the \fIstty\fR(1) option `new' be set
-on some systems. It is an artifact from a `new' implementation of the tty
+.Pp
+The job control mechanism requires that the
+.Xr stty 1
+option
+.Ql new
+be set
+on some systems.
+It is an artifact from a
+.Dq new
+implementation of the tty
driver which allows generation of interrupt characters from the keyboard to
-tell jobs to stop. See \fIstty\fR(1) and the \fIsetty\fR builtin command for
+tell jobs to stop.
+See
+.Xr stty 1
+and the
+.Ic setty
+builtin command for
details on setting options in the new tty driver.
-.SS "Status reporting"
-The shell learns immediately whenever a process changes state. It normally
+.
+.Ss Status reporting
+The shell learns immediately whenever a process changes state.
+It normally
informs you whenever a job becomes blocked so that no further progress is
-possible, but only right before it prints a prompt. This is done so that it
-does not otherwise disturb your work. If, however, you set the shell variable
-\fBnotify\fR, the shell will notify you immediately of changes of status in
-background jobs. There is also a shell command \fInotify\fR which marks a
-single process so that its status changes will be immediately reported. By
-default \fInotify\fR marks the current process; simply say `notify' after
-starting a background job to mark it.
-.PP
+possible, but only right before it prints a prompt.
+This is done so that it
+does not otherwise disturb your work.
+If, however, you set the shell variable
+.Ic notify ,
+the shell will notify you immediately of changes of status in
+background jobs.
+There is also a builtin command
+.Ic notify
+which marks a
+single process so that its status changes will be immediately reported.
+By
+default
+.Ic notify
+marks the current process; simply enter
+.Dl notify
+after
+starting a background job to mark it for immediate status reporting.
+.Pp
When you try to leave the shell while jobs are stopped, you will be
-warned that `There are suspended jobs.' You may use the \fIjobs\fR command to
-see what they are. If you do this or immediately try to exit again, the shell
+warned that
+.Dl There are suspended jobs\&.
+.Pp
+You may use the
+.Ic jobs
+command to
+see what they are.
+If you do this or immediately try to exit again, the shell
will not warn you a second time, and the suspended jobs will be terminated.
-.SS "Automatic, periodic and timed events (+)"
+.
+.Ss Automatic, periodic and timed events (+)
There are various ways to run commands and take other actions automatically
-at various times in the ``life cycle'' of the shell. They are summarized here,
-and described in detail under the appropriate \fBBuiltin commands\fR,
-\fBSpecial shell variables\fR and \fBSpecial aliases\fR.
-.PP
-The \fIsched\fR builtin command puts commands in a scheduled-event list,
+at various times in the
+.Dq life cycle
+of the shell.
+They are summarized here,
+and described in detail under the appropriate
+.Sx Builtin commands ,
+.Sx Special shell variables ,
+and
+.Sx Special aliases (+) .
+.Pp
+The
+.Ic sched
+builtin command puts commands in a scheduled-event list,
to be executed by the shell at a given time.
-.PP
-The \fIbeepcmd\fR, \fIcwdcmd\fR, \fIperiodic\fR, \fIprecmd\fR, \fIpostcmd\fR,
-and \fIjobcmd\fR
-\fBSpecial aliases\fR can be set, respectively, to execute commands when the shell wants
-to ring the bell, when the working directory changes, every \fBtperiod\fR
-minutes, before each prompt, before each command gets executed, after each
-command gets executed, and when a job is started or is brought into the
-foreground.
-.PP
-The \fBautologout\fR shell variable can be set to log out or lock the shell
+.Pp
+The
+.Ic beepcmd ,
+.Ic cwdcmd ,
+.Ic jobcmd ,
+.Ic periodic ,
+.Ic precmd ,
+and
+.Ic postcmd
+.Sx Special aliases (+)
+can be set, respectively, to execute commands:
+when the shell wants to ring the bell,
+when the working directory changes,
+when a job is started or is brought into the foreground,
+every
+.Ic tperiod
+minutes,
+before each prompt,
+and before each command gets executed.
+.Pp
+The
+.Ic autologout
+shell variable can be set to log out or lock the shell
after a given number of minutes of inactivity.
-.PP
-The \fBmail\fR shell variable can be set to check for new mail periodically.
-.PP
-The \fBprintexitvalue\fR shell variable can be set to print the exit status
+.Pp
+The
+.Ic mail
+shell variable can be set to check for new mail periodically.
+.Pp
+The
+.Ic printexitvalue
+shell variable can be set to print the exit status
of commands which exit with a status other than zero.
-.PP
-The \fBrmstar\fR shell variable can be set to ask the user, when `rm *' is
+.Pp
+The
+.Ic rmstar
+shell variable can be set to ask the user, when
+.Dl rm *
+is
typed, if that is really what was meant.
-.PP
-The \fBtime\fR shell variable can be set to execute the \fItime\fR builtin
+.Pp
+The
+.Ic time
+shell variable can be set to execute the
+.Ic time
+builtin
command after the completion of any process that takes more than a given
number of CPU seconds.
-.PP
-The \fBwatch\fR and \fBwho\fR shell variables can be set to report when
-selected users log in or out, and the \fIlog\fR builtin command reports
+.Pp
+The
+.Ic watch
+and
+.Ic who
+shell variables can be set to report when
+selected users log in or out, and the
+.Ic log
+builtin command reports
on those users at any time.
-.SS "Native Language System support (+)"
+.
+.Ss Native Language System support (+)
The shell is eight bit clean
-(if so compiled; see the \fBversion\fR shell variable)
+(if so compiled; see the
+.Ic version
+shell variable)
and thus supports character sets needing this capability.
NLS support differs depending on whether or not
-the shell was compiled to use the system's NLS (again, see \fBversion\fR).
+the shell was compiled to use the system's NLS (again, see
+.Ic version ) .
In either case, 7-bit ASCII is the default character code
(e.g., the classification of which characters are printable) and sorting,
-and changing the \fBLANG\fR or \fBLC_CTYPE\fR environment variables
+and changing the
+.Ev LANG
+or
+.Ev LC_CTYPE
+environment variables
causes a check for possible changes in these respects.
-.PP
-When using the system's NLS, the \fIsetlocale\fR(3) function is called
+.Pp
+When using the system's NLS, the
+.Xr setlocale 3
+function is called
to determine appropriate character code/classification and sorting
-(e.g., a 'en_CA.UTF-8' would yield "UTF-8" as a character code).
-This function typically examines the \fBLANG\fR and \fBLC_CTYPE\fR
+(e.g.,
+.Sq en_CA.UTF-8
+would yield
+.Sq UTF-8
+as the character code).
+This function typically examines the
+.Ev LANG
+and
+.Ev LC_CTYPE
environment variables; refer to the system documentation for further details.
When not using the system's NLS, the shell simulates it by assuming that the
ISO 8859-1 character set is used
-whenever either of the \fBLANG\fR and \fBLC_CTYPE\fR variables are set, regardless of
-their values. Sorting is not affected for the simulated NLS.
-.PP
+whenever either of the
+.Ev LANG
+and
+.Ev LC_CTYPE
+variables are set, regardless of
+their values.
+Sorting is not affected for the simulated NLS.
+.Pp
In addition, with both real and simulated NLS, all printable
characters in the range \e200\-\e377, i.e., those that have
-M-\fIchar\fR bindings, are automatically rebound to \fIself-insert-command\fR.
-The corresponding binding for the escape-\fIchar\fR sequence, if any, is
+.Ic M- Ns Ar char
+bindings, are automatically rebound to
+.Ic self-insert-command .
+The corresponding binding for the
+.No escape- Ns Ar char
+sequence, if any, is
left alone.
-These characters are not rebound if the \fBNOREBIND\fR environment variable
-is set. This may be useful for the simulated NLS or a primitive real NLS
-which assumes full ISO 8859-1. Otherwise, all M-\fIchar\fR bindings in the
+These characters are not rebound if the
+.Ev NOREBIND
+environment variable
+is set.
+This may be useful for the simulated NLS or a primitive real NLS
+which assumes full ISO 8859-1.
+Otherwise, all
+.Ic M- Ns Ar char
+bindings in the
range \e240\-\e377 are effectively undone.
-Explicitly rebinding the relevant keys with \fIbindkey\fR
+Explicitly rebinding the relevant keys with
+.Ic bindkey
is of course still possible.
-.PP
+.Pp
Unknown characters (i.e., those that are neither printable nor control
characters) are printed in the format \ennn.
If the tty is not in 8 bit mode, other 8 bit characters are printed by
-converting them to ASCII and using standout mode. The shell
+converting them to ASCII and using standout mode.
+The shell
never changes the 7/8 bit mode of the tty and tracks user-initiated
-changes of 7/8 bit mode. NLS users (or, for that matter, those who want to
+changes of 7/8 bit mode.
+NLS users (or, for that matter, those who want to
use a meta key) may need to explicitly set
-the tty in 8 bit mode through the appropriate \fIstty\fR(1)
-command in, e.g., the \fI~/.login\fR file.
-.SS "OS variant support (+)"
+the tty in 8 bit mode through the appropriate
+.Xr stty 1
+command in, e.g., the
+.Pa ~/.login
+file.
+.
+.Ss OS variant support (+)
A number of new builtin commands are provided to support features in
-particular operating systems. All are described in detail in the
-\fBBuiltin commands\fR section.
-.PP
+particular operating systems.
+All are described in detail in the
+.Sx Builtin commands
+section.
+.Pp
On systems that support TCF (aix-ibm370, aix-ps2),
-\fIgetspath\fR and \fIsetspath\fR get and set the system execution path,
-\fIgetxvers\fR and \fIsetxvers\fR get and set the experimental version prefix
-and \fImigrate\fR migrates processes between sites. The \fIjobs\fR builtin
+.Ic getspath
+and
+.Ic setspath
+get and set the system execution path,
+.Ic getxvers
+and
+.Ic setxvers
+get and set the experimental version prefix
+and
+.Ic migrate
+migrates processes between sites.
+The
+.Ic jobs
+builtin
prints the site on which each job is executing.
-.PP
-Under BS2000, \fIbs2cmd\fR executes commands of the underlying BS2000/OSD
+.Pp
+Under BS2000,
+.Ic bs2cmd
+executes commands of the underlying BS2000/OSD
operating system.
-.PP
-Under Domain/OS, \fIinlib\fR adds shared libraries to the current environment,
-\fIrootnode\fR changes the rootnode and \fIver\fR changes the systype.
-.PP
-Under Mach, \fIsetpath\fR is equivalent to Mach's \fIsetpath\fR(1).
-.PP
-Under Masscomp/RTU and Harris CX/UX, \fIuniverse\fR sets the universe.
-.PP
-Under Harris CX/UX, \fIucb\fR or \fIatt\fR runs a command under the specified
+.Pp
+Under Domain/OS,
+.Ic inlib
+adds shared libraries to the current environment,
+.Ic rootnode
+changes the rootnode and
+.Ic ver
+changes the systype.
+.Pp
+Under Mach,
+.Ic setpath
+is equivalent to Mach's
+.Xr setpath 1 .
+.Pp
+Under Masscomp/RTU and Harris CX/UX,
+.Ic universe
+sets the universe.
+.Pp
+Under Harris CX/UX,
+.Ic ucb
+or
+.Ic att
+runs a command under the specified
universe.
-.PP
-Under Convex/OS, \fIwarp\fR prints or sets the universe.
-.PP
-The \fBVENDOR\fR, \fBOSTYPE\fR and \fBMACHTYPE\fR environment variables
+.Pp
+Under Convex/OS,
+.Ic warp
+prints or sets the universe.
+.Pp
+The
+.Ev VENDOR ,
+.Ev OSTYPE ,
+and
+.Ev MACHTYPE
+environment variables
indicate respectively the vendor, operating system and machine type
(microprocessor class or machine model) of the
system on which the shell thinks it is running.
These are particularly useful when sharing one's home directory between several
types of machines; one can, for example,
-.IP "" 4
+.Bd -literal -offset indent
set path = (~/bin.$MACHTYPE /usr/ucb /bin /usr/bin .)
-.PP
-in one's \fI~/.login\fR and put executables compiled for each machine in the
+.Ed
+.Pp
+in one's
+.Pa ~/.login
+and put executables compiled for each machine in the
appropriate directory.
-.PP
-The \fBversion\fR shell
+.Pp
+The
+.Ic version
+shell
variable indicates what options were chosen when the shell was compiled.
-.PP
-Note also the \fInewgrp\fR builtin, the \fBafsuser\fR and
-\fBecho_style\fR shell variables and the system-dependent locations of
-the shell's input files (see \fBFILES\fR).
-.SS "Signal handling"
-Login shells ignore interrupts when reading the file \fI~/.logout\fR.
-The shell ignores quit signals unless started with \fB\-q\fR.
+.Pp
+Note also the
+.Ic newgrp
+builtin, the
+.Ic afsuser
+and
+.Ic echo_style
+shell variables and the system-dependent locations of
+the shell's input files (see
+.Sx FILES ) .
+.
+.Ss Signal handling
+Login shells ignore interrupts when reading the file
+.Pa ~/.logout .
+The shell ignores quit signals unless started with
+.Fl q .
Login shells catch the terminate signal, but non-login shells inherit the
terminate behavior from their parents.
Other signals have the values which the shell inherited from its parent.
-.PP
+.Pp
In shell scripts, the shell's handling of interrupt and terminate signals
-can be controlled with \fIonintr\fR, and its handling of hangups can be
-controlled with \fIhup\fR and \fInohup\fR.
-.PP
-The shell exits on a hangup (see also the \fBlogout\fR shell variable). By
+can be controlled with
+.Ic onintr ,
+and its handling of hangups can be
+controlled with
+.Ic hup
+and
+.Ic nohup .
+.Pp
+The shell exits on a hangup (see also the
+.Ic logout
+shell variable).
+By
default, the shell's children do too, but the shell does not send them a
-hangup when it exits. \fIhup\fR arranges for the shell to send a hangup to
-a child when it exits, and \fInohup\fR sets a child to ignore hangups.
-.SS "Terminal management (+)"
-The shell uses three different sets of terminal (``tty'') modes:
-`edit', used when editing, `quote', used when quoting literal characters,
-and `execute', used when executing commands.
+hangup when it exits.
+.Ic hup
+arranges for the shell to send a hangup to
+a child when it exits, and
+.Ic nohup
+sets a child to ignore hangups.
+.
+.Ss Terminal management (+)
+The shell uses three different sets of terminal
+.Dq ( tty )
+modes:
+.Sq edit ,
+used when editing;
+.Sq quote ,
+used when quoting literal characters;
+and
+.Sq execute ,
+used when executing commands.
The shell holds some settings in each mode constant, so commands which leave
the tty in a confused state do not interfere with the shell.
The shell also matches changes in the speed and padding of the tty.
The list of tty modes that are kept constant
-can be examined and modified with the \fIsetty\fR builtin.
+can be examined and modified with the
+.Ic setty
+builtin.
Note that although the editor uses CBREAK mode (or its equivalent),
it takes typed-ahead characters anyway.
-.PP
-The \fIechotc\fR, \fIsettc\fR and \fItelltc\fR commands can be used to
+.Pp
+The
+.Ic echotc ,
+.Ic settc ,
+and
+.Ic telltc
+commands can be used to
manipulate and debug terminal capabilities from the command line.
-.PP
+.Pp
On systems that support SIGWINCH or SIGWINDOW, the shell
adapts to window resizing automatically and adjusts the environment
-variables \fBLINES\fR and \fBCOLUMNS\fR if set. If the environment
-variable \fBTERMCAP\fR contains li# and co# fields, the shell adjusts
+variables
+.Ev LINES
+and
+.Ev COLUMNS
+if set.
+If the environment
+variable
+.Ev TERMCAP
+contains
+.Ql li#
+and
+.Ql co#
+fields, the shell adjusts
them to reflect the new window size.
-.SH REFERENCE
+.
+.Sh REFERENCE
The next sections of this manual describe all of the available
-\fBBuiltin commands\fR, \fBSpecial aliases\fR and
-\fBSpecial shell variables\fR.
-.SS "Builtin commands"
-.TP 8
-.B %\fIjob
-A synonym for the \fIfg\fR builtin command.
-.TP 8
-.B %\fIjob \fB&
-A synonym for the \fIbg\fR builtin command.
-.TP 8
-.B :
+.Sx Builtin commands ,
+.Sx Special aliases (+) ,
+and
+.Sx Special shell variables .
+.
+.Ss Builtin commands
+.
+.Bl -tag -width 6n
+.
+.It Ic % Ns Ar job
+A synonym for the
+.Ic fg
+builtin command.
+.
+.It Ic % Ns Ar job Cm \&&
+A synonym for the
+.Ic bg
+builtin command.
+.
+.It Ic \&:
Does nothing, successfully.
-.PP
-.B @
-.br
-.B @ \fIname\fB = \fIexpr
-.br
-.B @ \fIname\fR[\fIindex\fR]\fB = \fIexpr
-.br
-.B @ \fIname\fB++\fR|\fB--
-.PD 0
-.TP 8
-.B @ \fIname\fR[\fIindex\fR]\fB++\fR|\fB--
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic @
+.It Ic @ Ar name Cm = Ar expr
+.It Ic @ Ar name Ns Cm \&[ Ns Ar index Ns Cm \&] = Ar expr
+.It Ic @ Ar name Ns Cm ++|--
+.It Ic @ Ar name Ns Cm \&[ Ns Ar index Ns Cm \&]++|--
The first form prints the values of all shell variables.
-.PD
-.RS +8
-.PP
-The second form assigns the value of \fIexpr\fR to \fIname\fR.
-The third form assigns the value of \fIexpr\fR to the \fIindex\fR'th
-component of \fIname\fR; both \fIname\fR and its \fIindex\fR'th component
+.Pp
+The second form assigns the value of
+.Ar expr
+to
+.Ar name .
+.Pp
+The third form assigns the value of
+.Ar expr
+to the
+.Ar index Ns
+\&'th
+component of
+.Ar name ;
+both
+.Ar name
+and its
+.Ar index Ns
+\&'th component
must already exist.
-.PP
-\fIexpr\fR may contain the operators `*', `+', etc., as in C.
-If \fIexpr\fR contains `<', `>', `&' or `' then at least that part of
-\fIexpr\fR must be placed within `()'.
-Note that the syntax of \fIexpr\fR has nothing to do with that described
-under \fBExpressions\fR.
-.PP
-The fourth and fifth forms increment (`++') or decrement (`\-\-') \fIname\fR
-or its \fIindex\fR'th component.
-.PP
-The space between `@' and \fIname\fR is required. The spaces between
-\fIname\fR and `=' and between `=' and \fIexpr\fR are optional. Components of
-\fIexpr\fR must be separated by spaces.
-.RE
-.PD
-.TP 8
-.B alias \fR[\fIname \fR[\fIwordlist\fR]]
+.Pp
+.Ar expr
+may contain the operators
+.Ql * ,
+.Ql + ,
+etc., as in C.
+If
+.Ar expr
+contains
+.Ql < ,
+.Ql > ,
+.Ql & ,
+or
+.Ql \&|
+then at least that part of
+.Ar expr
+must be placed within
+.Ql (
+and
+.Ql ) .
+Note that the syntax of
+.Ar expr
+has nothing to do with that described
+under
+.Sx Expressions .
+.Pp
+The fourth and fifth forms increment
+.Pq Sq Cm ++
+or decrement
+.Pq Sq Cm --
+.Ar name
+or its
+.Ar index Ns
+\&'th component.
+.Pp
+The space between
+.Sq Ic @
+and
+.Ar name
+is required.
+The spaces between
+.Ar name
+and
+.Sq Cm =
+and between
+.Sq Cm =
+and
+.Ar expr
+are optional.
+Components of
+.Ar expr
+must be separated by spaces.
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic alias Op Ar name Op Ar wordlist
Without arguments, prints all aliases.
-With \fIname\fR, prints the alias for name.
-With \fIname\fR and \fIwordlist\fR, assigns
-\fIwordlist\fR as the alias of \fIname\fR.
-\fIwordlist\fR is command and filename substituted.
-\fIname\fR may not be `alias' or `unalias'.
-See also the \fIunalias\fR builtin command.
-.TP 8
-.B alloc
+.Pp
+With
+.Ar name ,
+prints the alias for name.
+.Pp
+With
+.Ar name
+and
+.Ar wordlist ,
+assigns
+.Ar wordlist
+as the alias of
+.Ar name .
+.Ar wordlist
+is command and filename substituted.
+.Pp
+.Ar name
+may not be
+.Sq Ic alias
+or
+.Sq Ic unalias .
+See also the
+.Ic unalias
+builtin command.
+.
+.It Ic alloc
Shows the amount of dynamic memory acquired, broken down into used and free
-memory. With an argument shows the number of free and used blocks in each size
-category. The categories start at size 8 and double at each step. This
-command's output may vary across system types, because systems other than the VAX
-may use a different memory allocator.
-.TP 8
-.B bg \fR[\fB%\fIjob\fR ...]
+memory.
+With an argument shows the number of free and used blocks in each size
+category.
+The categories start at size 8 and double at each step.
+This command's output may vary across system types, because systems other
+than the VAX may use a different memory allocator.
+.
+.It Ic bg Op Cm % Ns Ar job No \&...
Puts the specified jobs (or, without arguments, the current job)
into the background, continuing each if it is stopped.
-\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
-under \fBJobs\fR.
-.PP
-.B bindkey \fR[\fB\-l\fR|\fB\-d\fR|\fB\-e\fR|\fB\-v\fR|\fB\-u\fR] (+)
-.br
-\fBbindkey \fR[\fB\-a\fR] [\fB\-b\fR] [\fB\-k\fR] [\fB\-r\fR] [\fB\-\-\fR] \fIkey \fR(+)
-.PD 0
-.TP 8
-\fBbindkey \fR[\fB\-a\fR] [\fB\-b\fR] [\fB\-k\fR] [\fB\-c\fR|\fB\-s\fR] [\fB\-\-\fR] \fIkey command \fR(+)
-.\" .B macro can't take too many words, so I used \fB in the previous tags
-Without options, the first form lists all bound keys and the editor command to which each is bound,
-the second form lists the editor command to which \fIkey\fR is bound and
-the third form binds the editor command \fIcommand\fR to \fIkey\fR.
-Options include:
-.PD
-.PP
-.PD 0
-.RS +8
-.TP 4
-.B \-l
-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,
-as per \fB-e\fR and \fB-v\fR below.
-.TP 4
-.B \-e
-Binds all keys to \fIemacs\fR(1)\-style bindings.
-Unsets \fBvimode\fR.
-.TP 4
-.B \-v
-Binds all keys to \fIvi\fR(1)\-style bindings.
-Sets \fBvimode\fR.
-.TP 4
-.B \-a
+.Ar job
+may be a number, a string,
+.Ql \& ,
+.Ql % ,
+.Ql + ,
+or
+.Ql \-
+as described under
+.Sx Jobs .
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic bindkey Oo Fl l Ns | Ns Fl d Ns | Ns Fl e Ns | Ns Fl v Ns | Ns Fl u Oc No (+)
+.It Ic bindkey Oo Fl a Oc Oo Fl b Oc Oo Fl k Oc Oo Fl r Oc Oo Fl \- Oc Ar key No (+)
+.It Ic bindkey Oo Fl a Oc Oo Fl b Oc Oo Fl k Oc Oo Fl c Ns | Ns Fl s Oc Oo Fl \- Oc Ar key command No (+)
+The first form either lists all bound keys and the editor
+command to which each is bound,
+lists a description of the commands,
+or binds all keys to a specific mode.
+.Pp
+The second form lists the editor command to which
+.Ar key
+is bound.
+.Pp
+The third form binds the editor command
+.Ar command
+to
+.Ar key .
+.Pp
+Supported
+.Ic bindkey
+options:
+.
+.Bl -tag -width ".Sy Option"
+.It Sy Option
+.Ic bindkey
+.Sy description
+.
+.It Fl a
Lists or changes key-bindings in the alternative key map.
-This is the key map used in \fBvimode\fR command mode.
-.TP 4
-.B \-b
-\fIkey\fR is interpreted as
-a control character written ^\fIcharacter\fR (e.g., `^A') or
-C-\fIcharacter\fR (e.g., `C-A'),
-a meta character written M-\fIcharacter\fR (e.g., `M-A'),
-a function key written F-\fIstring\fR (e.g., `F-string'),
-or an extended prefix key written X-\fIcharacter\fR (e.g., `X-A').
-.TP 4
-.B \-k
-\fIkey\fR is interpreted as a symbolic arrow key name, which may be one of
-`down', `up', `left' or `right'.
-.TP 4
-.B \-r
-Removes \fIkey\fR's binding.
-Be careful: `bindkey \-r' does \fInot\fR bind \fIkey\fR to
-\fIself-insert-command\fR (q.v.), it unbinds \fIkey\fR completely.
-.TP 4
-.B \-c
-\fIcommand\fR is interpreted as a builtin or external command instead of an
+This is the key map used in
+.Ic vimode
+command mode.
+.
+.It Fl b
+.Ar key
+is interpreted as
+a control character written
+.Ic ^ Ns Ar character
+(e.g.,
+.Ic ^A )
+or
+.Ic C- Ns Ar character
+(e.g.,
+.Ic C-A ) ,
+a meta character written
+.Ic M- Ns Ar character
+(e.g.,
+.Ic M-A ) ,
+a function key written
+.Ic F- Ns Ar string
+(e.g.,
+.Ic F-string ) ,
+or an extended prefix key written
+.Ic X- Ns Ar character
+(e.g.,
+.Ic X-A ) .
+.
+.It Fl c
+.Ar command
+is interpreted as a builtin or external command instead of an
editor command.
-.TP 4
-.B \-s
-\fIcommand\fR is taken as a literal string and treated as terminal input
-when \fIkey\fR is typed. Bound keys in \fIcommand\fR are themselves
+.
+.It Fl d
+Binds all keys to the standard bindings for the default editor,
+as per
+.Fl e
+and
+.Fl v .
+.
+.It Fl e
+Binds all keys to
+.Xr emacs 1 Ns
+\-style bindings.
+Unsets
+.Ic vimode .
+.
+.It Fl k
+.Ar key
+is interpreted as a symbolic arrow key name, which may be one of
+.Sq down ,
+.Sq up ,
+.Sq left ,
+or
+.Sq right .
+.
+.It Fl l
+Lists all editor commands and a short description of each.
+.
+.It Fl r
+Removes
+.Ar key Ns
+\&'s binding.
+Be careful:
+.Ql bindkey \-r
+does
+.Em not
+bind
+.Ar key
+to
+.Ic self-insert-command ,
+it unbinds
+.Ar key
+completely.
+.
+.It Fl s
+.Ar command
+is taken as a literal string and treated as terminal input when
+.Ar key
+is typed.
+Bound keys in
+.Ar command
+are themselves
reinterpreted, and this continues for ten levels of interpretation.
-.TP 4
-.B \-\-
-Forces a break from option processing, so the next word is taken as \fIkey\fR
-even if it begins with '\-'.
-.TP 4
-.B \-u \fR(or any invalid option)
+.
+.It Fl u No (or any invalid option)
Prints a usage message.
-.PD
-.PP
-\fIkey\fR may be a single character or a string.
+.
+.It Fl v
+Binds all keys to
+.Xr vi 1 Ns
+\-style bindings.
+Sets
+.Ic vimode .
+.
+.It Fl \-
+Forces a break from option processing, so the next word is taken as
+.Ar key
+even if it begins with
+.Ql \- .
+.
+.El
+.Pp
+.Ar key
+may be a single character or a string.
If a command is bound to a string, the first character of the string is bound to
-\fIsequence-lead-in\fR and the entire string is bound to the command.
-.PP
-Control characters in \fIkey\fR can be literal (they can be typed by preceding
-them with the editor command \fIquoted-insert\fR, normally bound to `^V') or
-written caret-character style, e.g., `^A'. Delete is written `^?'
-(caret-question mark). \fIkey\fR and \fIcommand\fR can contain backslashed
-escape sequences (in the style of System V \fIecho\fR(1)) as follows:
-.RS +4
-.TP 8
-.PD 0
-.B \ea
-Bell
-.TP 8
-.B \eb
-Backspace
-.TP 8
-.B \ee
-Escape
-.TP 8
-.B \ef
-Form feed
-.TP 8
-.B \en
-Newline
-.TP 8
-.B \er
-Carriage return
-.TP 8
-.B \et
-Horizontal tab
-.TP 8
-.B \ev
-Vertical tab
-.TP 8
-.B \e\fInnn
-The ASCII character corresponding to the octal number \fInnn\fR
-.PD
-.RE
-.PP
-`\e' nullifies the special meaning of the following character, if it has
-any, notably `\e' and `^'.
-.RE
-.TP 8
-.B bs2cmd \fIbs2000-command\fR (+)
-Passes \fIbs2000-command\fR to the BS2000 command interpreter for
-execution. Only non-interactive commands can be executed, and it is
+.Ic sequence-lead-in
+and the entire string is bound to the command.
+.Pp
+Control characters in
+.Ar key
+can be literal (they can be typed by preceding
+them with the editor command
+.Ic quoted-insert ,
+normally bound to
+.Ic ^V )
+or
+written caret-character style, e.g.,
+.Ic ^A .
+Delete is written
+.Ic ^?
+(caret-question mark).
+.Ar key
+and
+.Ar command
+can contain backslashed
+escape sequences (in the style of System V
+.Xr echo 1 )
+as follows:
+.
+.Bl -tag -width ".Sy Escape"
+.It Sy Escape
+.Sy Description
+.
+.It Li \ea
+Bell.
+.It Li \eb
+Backspace.
+.It Li \ee
+Escape.
+.It Li \ef
+Form feed.
+.It Li \en
+Newline.
+.It Li \er
+Carriage return.
+.It Li \et
+Horizontal tab.
+.It Li \ev
+Vertical tab.
+.It Li \e Ns Ar nnn
+The ASCII character corresponding to the octal number
+.Ar nnn .
+.El
+.Pp
+.Ql \e
+nullifies the special meaning of the following character, if it has
+any, notably
+.Ql \e
+and
+.Ql ^ .
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic bs2cmd Ar bs2000-command No (+)
+Passes
+.Ar bs2000-command
+to the BS2000 command interpreter for
+execution.
+Only non-interactive commands can be executed, and it is
not possible to execute any command that would overlay the image
of the current process, like /EXECUTE or /CALL-PROCEDURE. (BS2000 only)
-.TP 8
-.B break
-Causes execution to resume after the \fIend\fR of the nearest
-enclosing \fIforeach\fR or \fIwhile\fR. The remaining commands on the
-current line are executed. Multi-level breaks are thus
+.
+.It Ic break
+Causes execution to resume after the
+.Ic end
+of the nearest
+enclosing
+.Ic foreach
+or
+.Ic while .
+The remaining commands on the
+current line are executed.
+Multi-level breaks are thus
possible by writing them all on one line.
-.TP 8
-.B breaksw
-Causes a break from a \fIswitch\fR, resuming after the \fIendsw\fR.
-.TP 8
-.B builtins \fR(+)
+.
+.It Ic breaksw
+Causes a break from a
+.Ic switch ,
+resuming after the
+.Ic endsw .
+.
+.It Ic builtins No (+)
Prints the names of all builtin commands.
-.TP 8
-.B bye \fR(+)
-A synonym for the \fIlogout\fR builtin command.
+.
+.It Ic bye No (+)
+A synonym for the
+.Ic logout
+builtin command.
Available only if the shell was so compiled;
-see the \fBversion\fR shell variable.
-.TP 8
-.B case \fIlabel\fB:
-A label in a \fIswitch\fR statement as discussed below.
-.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, 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
-(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 `/' 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.
-The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIcd\fR
-as on \fIdirs\fR, and they imply \fB\-p\fR. (+)
-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 and \fBcdtohome\fR shell variables.
-.RE
-.TP 8
-.B chdir
-A synonym for the \fIcd\fR builtin command.
-.TP 8
-.B complete \fR[\fIcommand\fR [\fIword\fB/\fIpattern\fB/\fIlist\fR[\fB:\fIselect\fR]\fB/\fR[[\fIsuffix\fR]\fB/\fR] ...]] (+)
+see the
+.Ic version
+shell variable.
+.
+.It Ic case Ar label Ns Cm \&:
+A label in a
+.Ic switch
+statement as discussed below.
+.
+.It Ic cd Xo
+.Op Fl p
+.Op Fl l
+.Op Fl n Ns | Ns Fl v
+.Op Fl \-
+.Op Ar name
+.Xc
+If a directory
+.Ar name
+is given, changes the shell's working directory
+to
+.Ar name .
+If not, changes to
+.Ic home ,
+unless the
+.Ic cdtohome
+variable is not set, in which case a
+.Ar name
+is required.
+If
+.Ar name
+is
+.Ql \-
+it is interpreted as the previous working directory
+(see
+.Sx Other substitutions (+) ) .
+(+)
+If
+.Ar name
+is not a subdirectory of the current directory
+(and does not begin with
+.Ql / ,
+.Ql ./
+or
+.Ql ../ ) ,
+each component of the variable
+.Ic cdpath
+is checked to see if it has a subdirectory
+.Ar name .
+Finally, if
+all else fails but
+.Ar name
+is a shell variable whose value
+begins with
+.Ql /
+or
+.Ql \&. ,
+then this is tried to see if it is a directory, and the
+.Fl p
+option is implied.
+.Pp
+With
+.Fl p ,
+prints the final directory stack, just like
+.Ic dirs .
+The
+.Fl l ,
+.Fl n ,
+and
+.Fl v
+flags have the same effect on
+.Ic cd
+as on
+.Ic dirs ,
+and they imply
+.Fl p
+(+).
+Using
+.Fl \-
+forces a break from option processing so the next word
+is taken as the directory
+.Ar name
+even if it begins with
+.Ql \-
+(+).
+.Pp
+See also the
+.Ic implicitcd
+and
+.Ic cdtohome
+shell variables.
+.
+.It Ic chdir
+A synonym for the
+.Ic cd
+builtin command.
+.
+.It Ic complete Xo
+.Oo Ar command
+.Oo
+.Sm off
+.Ar word Cm / Ar pattern Cm / Ar list Oo Cm \&: Ar select Oc Cm / Oo
+.Op Ar suffix
+.Cm /
+.Oc
+.Sm on
+\&...
+.Oc
+.Oc
+(+)
+.Xc
Without arguments, lists all completions.
-With \fIcommand\fR, lists completions for \fIcommand\fR.
-With \fIcommand\fR and \fIword\fR etc., defines completions.
-.RS +8
-.PP
-\fIcommand\fR may be a full command name or a glob-pattern
-(see \fBFilename substitution\fR). It can begin with `\-' to indicate that
-completion should be used only when \fIcommand\fR is ambiguous.
-.PP
-\fIword\fR specifies which word relative to the current word
+.Pp
+With
+.Ar command ,
+lists completions for
+.Ar command .
+.Pp
+With
+.Ar command
+and
+.Ar word
+\&...,
+defines completions.
+.Pp
+.Ar command
+may be a full command name or a glob-pattern
+(see
+.Sx Filename substitution ) .
+It can begin with
+.Ql \-
+to indicate that
+completion should be used only when
+.Ic command
+is ambiguous.
+.Pp
+.Ar word
+specifies which word relative to the current word
is to be completed, and may be one of the following:
-.PP
-.PD 0
-.RS +4
-.TP 4
-.B c
+.
+.Bl -tag -width ".Li \`...\`" -offset indent
+.It Ar word
+.Sy Completion word
+.
+.It Li c
Current-word completion.
-\fIpattern\fR is a glob-pattern which must match the beginning of the current word on
-the command line. \fIpattern\fR is ignored when completing the current word.
-.TP 4
-.B C
-Like \fBc\fR, but includes \fIpattern\fR when completing the current word.
-.TP 4
-.B n
+.Ar pattern
+is a glob-pattern which must match the beginning of the current word on
+the command line.
+.Ar pattern
+is ignored when completing the current word.
+.
+.It Li C
+Like
+.Ql c ,
+but includes
+.Ar pattern
+when completing the current word.
+.
+.It Li n
Next-word completion.
-\fIpattern\fR is a glob-pattern which must match the beginning of the previous word on
+.Ar pattern
+is a glob-pattern which must match the beginning of the previous word on
the command line.
-.TP 4
-.B N
-Like \fBn\fR, but must match the beginning of the word two before the current word.
-.TP 4
-.B p
+.
+.It Li N
+Like
+.Ql n ,
+but must match the beginning of the word two before the current word.
+.
+.It Li p
Position-dependent completion.
-\fIpattern\fR is a numeric range, with the same syntax used to index shell
+.Ar pattern
+is a numeric range, with the same syntax used to index shell
variables, which must include the current word.
-.PD
-.RE
-.PP
-\fIlist\fR, the list of possible completions, may be one of the following:
-.PP
-.PD 0
-.RS +4
-.TP 8
-.B a
-Aliases
-.TP 8
-.B b
-Bindings (editor commands)
-.TP 8
-.B c
-Commands (builtin or external commands)
-.TP 8
-.B C
-External commands which begin with the supplied path prefix
-.TP 8
-.B d
-Directories
-.TP 8
-.B D
-Directories which begin with the supplied path prefix
-.TP 8
-.B e
-Environment variables
-.TP 8
-.B f
-Filenames
-.TP 8
-.B F
-Filenames which begin with the supplied path prefix
-.TP 8
-.B g
-Groupnames
-.TP 8
-.B j
-Jobs
-.TP 8
-.B l
-Limits
-.TP 8
-.B n
-Nothing
-.TP 8
-.B s
-Shell variables
-.TP 8
-.B S
-Signals
-.TP 8
-.B t
-Plain (``text'') files
-.TP 8
-.B T
-Plain (``text'') files which begin with the supplied path prefix
-.TP 8
-.B v
-Any variables
-.TP 8
-.B u
-Usernames
-.TP 8
-.B x
-Like \fBn\fR, but prints \fIselect\fR when \fIlist-choices\fR is used.
-.TP 8
-.B X
-Completions
-.TP 8
-$\fIvar\fR
-Words from the variable \fIvar\fR
-.TP 8
-(...)
-Words from the given list
-.TP 8
-\`...\`
-Words from the output of command
-.PD
-.RE
-.PP
-\fIselect\fR is an optional glob-pattern.
-If given, words from only \fIlist\fR that match \fIselect\fR are considered
-and the \fBfignore\fR shell variable is ignored.
-The last three types of completion may not have a \fIselect\fR
-pattern, and \fBx\fR uses \fIselect\fR as an explanatory message when
-the \fIlist-choices\fR editor command is used.
-.PP
-\fIsuffix\fR is a single character to be appended to a successful
-completion. If null, no character is appended. If omitted (in which
+.El
+.Pp
+.Ar list ,
+the list of possible completions, may be one of the following:
+.
+.Bl -tag -width ".Li \`...\`" -offset indent
+.It Ar list
+.Sy Completion item
+.
+.It Li a
+Aliases.
+.
+.It Li b
+Bindings (editor commands).
+.
+.It Li c
+Commands (builtin or external commands).
+.
+.It Li C
+External commands which begin with the supplied path prefix.
+.
+.It Li d
+Directories.
+.
+.It Li D
+Directories which begin with the supplied path prefix.
+.
+.It Li e
+Environment variables.
+.
+.It Li f
+Filenames.
+.
+.It Li F
+Filenames which begin with the supplied path prefix.
+.
+.It Li g
+Groupnames.
+.
+.It Li j
+Jobs.
+.
+.It Li l
+Limits.
+.
+.It Li n
+Nothing.
+.
+.It Li s
+Shell variables.
+.
+.It Li S
+Signals.
+.
+.It Li t
+Plain
+.Dq ( text )
+files.
+.
+.It Li T
+Plain
+.Dq ( text )
+files which begin with the supplied path prefix.
+.
+.It Li v
+Any variables.
+.
+.It Li u
+Usernames.
+.
+.It Li x
+Like
+.Ql n ,
+but prints
+.Ar select
+when
+.Ic list-choices
+is used.
+.
+.It Li X
+Completions.
+.
+.It Li $ Ns Ar var
+Words from the variable
+.Ar var .
+.
+.It Li (...)
+Words from the given list.
+.
+.It Li \`...\`
+Words from the output of command.
+.El
+.Pp
+.Ar select
+is an optional glob-pattern.
+If given, words from only
+.Ar list
+that match
+.Ar select
+are considered
+and the
+.Ic fignore
+shell variable is ignored.
+The
+.Ar list
+types
+.Ql $ Ns Ar var ,
+.Ql (...) ,
+and
+.Ql \`...\`
+may not have a
+.Ar select
+pattern, and
+.Ql x
+uses
+.Ar select
+as an explanatory message when the
+.Ic list-choices
+editor command is used.
+.Pp
+.Ar suffix
+is a single character to be appended to a successful
+completion.
+If null, no character is appended.
+If omitted (in which
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
-variable set, the variable name is \%\fBCOMMAND_LINE\fR\% and
+.Pp
+.Ar command
+invoked from
+.Ar list
+.Ql \`...\`
+has the additional environment variable
+.Ev COMMAND_LINE
+set, which
contains (as its name indicates) contents of the current (already
-typed in) command line. One can examine and use contents of the
-\%\fBCOMMAND_LINE\fR\% variable in her custom script to build more
-sophisticated completions (see completion for svn(1) included in
-this package).
-.PP
-Now for some examples. Some commands take only directories as arguments,
+typed in) command line.
+One can examine and use contents of the
+.Ev COMMAND_LINE
+environment variable in a custom script to build more
+sophisticated completions (see completion for
+.Xr svn 1
+included in this package).
+.Pp
+Now for some examples.
+Some commands take only directories as arguments,
so there's no point completing plain files.
-.IP "" 4
+.Bd -literal -offset indent
> complete cd 'p/1/d/'
-.PP
-completes only the first word following `cd' (`p/1') with a directory.
-\fBp\fR-type completion can also be used to narrow down command completion:
-.IP "" 4
+.Ed
+.Pp
+completes only the first word following
+.Ql cd
+.Pq Ql p/1
+with a directory.
+.Ql p Ns
+\-type completion can also be used to narrow down command completion:
+.Bd -literal -offset indent
> co[^D]
-.br
complete compress
-.br
> complete \-co* 'p/0/(compress)/'
-.br
> co[^D]
-.br
> compress
-.PP
-This completion completes commands (words in position 0, `p/0')
-which begin with `co' (thus matching `co*') to `compress' (the only
+.Ed
+.Pp
+This completion completes commands (words in position 0,
+.Ql p/0 )
+which begin with
+.Ql co
+(thus matching
+.Ql co* )
+to
+.Ql compress
+(the only
word in the list).
-The leading `\-' indicates that this completion is to be used with only
+The leading
+.Ql \-
+indicates that this completion is to be used with only
ambiguous commands.
-.IP "" 4
+.Bd -literal -offset indent
> complete find 'n/\-user/u/'
-.PP
-is an example of \fBn\fR-type completion. Any word following `find' and
-immediately following `\-user' is completed from the list of users.
-.IP "" 4
+.Ed
+.Pp
+is an example of
+.Ql n Ns
+\-type completion.
+Any word following
+.Ql find
+and
+immediately following
+.Ql \-user
+is completed from the list of users.
+.Bd -literal -offset indent
> complete cc 'c/\-I/d/'
-.PP
-demonstrates \fBc\fR-type completion. Any word following `cc' and beginning
-with `\-I' is completed as a directory. `\-I' is not taken as part of the
-directory because we used lowercase \fBc\fR.
-.PP
-Different \fIlist\fRs are useful with different commands.
-.IP "" 4
+.Ed
+.Pp
+demonstrates
+.Ql c Ns
+\-type completion.
+Any word following
+.Ql cc
+and beginning with
+.Ql \-I
+is completed as a directory.
+.Ql \-I
+is not taken as part of the
+directory because we used lowercase
+.Ql c .
+.Pp
+Different
+.Ar list Ns No s
+are useful with different commands.
+.Bd -literal -offset indent
> complete alias 'p/1/a/'
-.br
> complete man 'p/*/c/'
-.br
> complete set 'p/1/s/'
-.br
> complete true 'p/1/x:Truth has no options./'
-.PP
-These complete words following `alias' with aliases, `man' with commands,
-and `set' with shell variables.
-`true' doesn't have any options, so \fBx\fR does nothing when completion
-is attempted and prints `Truth has no options.' when completion choices are listed.
-.PP
-Note that the \fIman\fR example, and several other examples below, could
-just as well have used 'c/*' or 'n/*' as 'p/*'.
-.PP
+.Ed
+.Pp
+These complete words following
+.Ql alias
+with aliases,
+.Ql man
+with commands,
+and
+.Ql set
+with shell variables.
+.Ic true
+doesn't have any options, so
+.Ql x
+does nothing when completion
+is attempted and prints
+.Dl Truth has no options\&.
+when completion choices are listed.
+.Pp
+Note that the
+.Ql man
+example, and several other examples below, could
+just as well have used
+.Ql 'c/*'
+or
+.Ql 'n/*'
+as
+.Ql 'p/*' .
+.Pp
Words can be completed from a variable evaluated at completion time,
-.IP "" 4
+.Bd -literal -offset indent
> complete ftp 'p/1/$hostnames/'
-.br
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu)
-.br
> ftp [^D]
-.br
rtfm.mit.edu tesla.ee.cornell.edu
-.br
> ftp [^C]
-.br
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net)
-.br
> ftp [^D]
-.br
rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net
-.PP
+.Ed
+.Pp
or from a command run at completion time:
-.IP "" 4
+.Bd -literal -offset indent
> complete kill 'p/*/\`ps | awk \e{print\e \e$1\e}\`/'
-.br
> kill \-9 [^D]
-.br
23113 23377 23380 23406 23429 23529 23530 PID
-.PP
-Note that the \fIcomplete\fR command does not itself quote its arguments,
-so the braces, space and `$' in `{print $1}' must be quoted explicitly.
-.PP
+.Ed
+.Pp
+Note that the
+.Ic complete
+command does not itself quote its arguments,
+so the braces, space and
+.Ql $
+in
+.Ql {print $1}
+must be quoted explicitly.
+.Pp
One command can have multiple completions:
-.IP "" 4
+.Bd -literal -offset indent
> complete dbx 'p/2/(core)/' 'p/*/c/'
-.PP
-completes the second argument to `dbx' with the word `core' and all other
-arguments with commands. Note that the positional completion is specified
+.Ed
+.Pp
+completes the second argument to
+.Ql dbx
+with the word
+.Ql core
+and all other
+arguments with commands.
+Note that the positional completion is specified
before the next-word completion.
Because completions are evaluated from left to right, if
the next-word completion were specified first it would always match
-and the positional completion would never be executed. This is a
+and the positional completion would never be executed.
+This is a
common mistake when defining a completion.
-.PP
-The \fIselect\fR pattern is useful when a command takes files with only
-particular forms as arguments. For example,
-.IP "" 4
+.Pp
+The
+.Ar select
+pattern is useful when a command takes files with only
+particular forms as arguments.
+For example,
+.Bd -literal -offset indent
> complete cc 'p/*/f:*.[cao]/'
-.PP
-completes `cc' arguments to files ending in only `.c', `.a', or `.o'.
-\fIselect\fR can also exclude files, using negation of a glob-pattern as
-described under \fBFilename substitution\fR. One might use
-.IP "" 4
+.Ed
+.Pp
+completes
+.Ql cc
+arguments to files ending in only
+.Ql .c ,
+.Ql .a ,
+or
+.Ql .o .
+.Ar select
+can also exclude files, using negation of a glob-pattern as
+described under
+.Sx Filename substitution .
+One might use
+.Bd -literal -offset indent
> complete rm 'p/*/f:^*.{c,h,cc,C,tex,1,man,l,y}/'
-.PP
-to exclude precious source code from `rm' completion. Of course, one
+.Ed
+.Pp
+to exclude precious source code from
+.Ql rm
+completion.
+Of course, one
could still type excluded names manually or override the completion
-mechanism using the \fIcomplete-word-raw\fR or \fIlist-choices-raw\fR
-editor commands (q.v.).
-.PP
-The `C', `D', `F' and `T' \fIlist\fRs are like `c', `d', `f' and `t'
-respectively, but they use the \fIselect\fR argument in a different way: to
-restrict completion to files beginning with a particular path prefix. For
-example, the Elm mail program uses `=' as an abbreviation for one's mail
-directory. One might use
-.IP "" 4
+mechanism using the
+.Ic complete-word-raw
+or
+.Ic list-choices-raw
+editor commands.
+.Pp
+The
+.Ql C ,
+.Ql D ,
+.Ql F ,
+and
+.Ql T
+.Ar list Ns s
+are like
+.Ql c ,
+.Ql d ,
+.Ql f ,
+and
+.Ql t
+respectively, but they use the
+.Ar select
+argument in a different way: to
+restrict completion to files beginning with a particular path prefix.
+For
+example, the Elm mail program uses
+.Ql =
+as an abbreviation for one's mail
+directory.
+One might use
+.Bd -literal -offset indent
> complete elm c@=@F:$HOME/Mail/@
-.PP
-to complete `elm \-f =' as if it were `elm \-f ~/Mail/'. Note that we used `@'
-instead of `/' to avoid confusion with the \fIselect\fR argument, and we used
-`$HOME' instead of `~' because home directory substitution works at only the
+.Ed
+.Pp
+to complete
+.Dl elm \-f =
+as if it were
+.Dl elm \-f ~/Mail/
+Note that we used the separator
+.Ql @
+instead of
+.Ql /
+to avoid confusion with the
+.Ar select
+argument, and we used
+.Ql $HOME
+instead of
+.Ql ~
+because home directory substitution works at only the
beginning of a word.
-.PP
-\fIsuffix\fR is used to add a nonstandard suffix
-(not space or `/' for directories) to completed words.
-.IP "" 4
+.Pp
+.Ar suffix
+is used to add a nonstandard suffix
+(not space or
+.Ql /
+for directories) to completed words.
+.Bd -literal -offset indent
> complete finger 'c/*@/$hostnames/' 'p/1/u/@'
-.PP
-completes arguments to `finger' from the list of users, appends an `@',
-and then completes after the `@' from the `hostnames' variable. Note
+.Ed
+.Pp
+completes arguments to
+.Ql finger
+from the list of users, appends an
+.Ql @ ,
+and then completes after the
+.Ql @
+from the
+.Ql hostnames
+variable.
+Note
again the order in which the completions are specified.
-.PP
+.Pp
Finally, here's a complex example for inspiration:
-.IP "" 4
+.Bd -literal -offset indent
> complete find \e
-.br
\&'n/\-name/f/' 'n/\-newer/f/' 'n/\-{,n}cpio/f/' \e
-.br
\&\'n/\-exec/c/' 'n/\-ok/c/' 'n/\-user/u/' \e
-.br
\&'n/\-group/g/' 'n/\-fstype/(nfs 4.2)/' \e
-.br
\&'n/\-type/(b c d f l p s)/' \e
-.br
\'c/\-/(name newer cpio ncpio exec ok user \e
-.br
group fstype type atime ctime depth inum \e
-.br
ls mtime nogroup nouser perm print prune \e
-.br
size xdev)/' \e
-.br
\&'p/*/d/'
-.PP
-This completes words following `\-name', `\-newer', `\-cpio' or `ncpio'
+.Ed
+.Pp
+This completes words following
+.Ql \-name ,
+.Ql \-newer ,
+.Ql \-cpio ,
+or
+.Ql \-ncpio
(note the pattern which matches both) to files,
-words following `\-exec' or `\-ok' to commands, words following `user'
-and `group' to users and groups respectively
-and words following `\-fstype' or `\-type' to members of the
-given lists. It also completes the switches themselves from the given list
-(note the use of \fBc\fR-type completion)
-and completes anything not otherwise completed to a directory. Whew.
-.PP
+words following
+.Ql \-exec
+or
+.Ql \-ok
+to commands, words following
+.Ql \-user
+and
+.Ql \-group
+to users and groups respectively
+and words following
+.Ql \-fstype
+or
+.Ql \-type
+to members of the
+given lists.
+It also completes the switches themselves from the given list
+(note the use of
+.Ql c Ns
+\-type completion)
+and completes anything not otherwise completed to a directory.
+Whew.
+.Pp
Remember that programmed completions are ignored if the word being completed
-is a tilde substitution (beginning with `~') or a variable (beginning with `$').
-See also the \fIuncomplete\fR builtin command.
-.RE
-.TP 8
-.B continue
-Continues execution of the nearest enclosing \fIwhile\fR or \fIforeach\fR.
+is a tilde substitution (beginning with
+.Ql ~ )
+or a variable (beginning with
+.Ql $ ) .
+See also the
+.Ic uncomplete
+builtin command.
+.
+.It Ic continue
+Continues execution of the nearest enclosing
+.Ic while
+or
+.Ic foreach .
The rest of the commands on the current line are executed.
-.TP 8
-.B default:
-Labels the default case in a \fIswitch\fR statement.
-It should come after all \fIcase\fR labels.
-.PP
-.B dirs \fR[\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR]
-.br
-.B dirs \-S\fR|\fB\-L \fR[\fIfilename\fR] (+)
-.PD 0
-.TP 8
-.B dirs \-c \fR(+)
-The first form prints the directory stack. The top of the stack is at the
+.
+.It Ic default\&:
+Labels the default case in a
+.Ic switch
+statement.
+It should come after all
+.Ic case
+labels.
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic dirs Xo
+.Op Fl l
+.Op Fl n Ns | Ns Fl v
+.Xc
+.It Ic dirs Xo
+.Fl S Ns | Ns Fl L
+.Op Ar filename
+(+)
+.Xc
+.It Ic dirs Xo
+.Fl c
+(+)
+.Xc
+The first form prints the directory stack.
+The top of the stack is at the
left and the first directory in the stack is the current directory.
-With \fB\-l\fR, `~' or `~\fIname\fP' in the output is expanded explicitly
-to \fBhome\fR or the pathname of the home directory for user \fIname\fP. (+)
-With \fB\-n\fR, entries are wrapped before they reach the edge of the screen. (+)
-With \fB\-v\fR, entries are printed one per line, preceded by their stack positions. (+)
-If more than one of \fB\-n\fR or \fB\-v\fR is given, \fB\-v\fR takes precedence.
-\fB\-p\fR is accepted but does nothing.
-.PD
-.RS +8
-.PP
-With \fB\-S\fR, the second form saves the directory stack to \fIfilename\fR
-as a series of \fIcd\fR and \fIpushd\fR commands.
-With \fB\-L\fR, the shell sources \fIfilename\fR, which is presumably
-a directory stack file saved by the \fB\-S\fR option or the \fBsavedirs\fR
+With
+.Fl l ,
+.Ql ~
+or
+.Ql ~ Ns Ar name
+in the output is expanded explicitly
+to
+.Ic home
+or the pathname of the home directory for user
+.Ar name .
+(+)
+With
+.Fl n ,
+entries are wrapped before they reach the edge of the screen.
+(+)
+With
+.Fl v ,
+entries are printed one per line, preceded by their stack positions.
+(+)
+If more than one of
+.Fl n
+or
+.Fl v
+is given,
+.Fl v
+takes precedence.
+.Fl p
+is accepted but does nothing.
+.Pp
+The second form with
+.Fl S
+saves the directory stack to
+.Ar filename
+as a series of
+.Ic cd
+and
+.Ic pushd
+commands.
+The second form with
+.Fl L
+sources
+.Ar filename ,
+which is presumably
+a directory stack file saved by the
+.Fl S
+option or the
+.Ic savedirs
mechanism.
-In either case, \fBdirsfile\fR is used if \fIfilename\fR is not given and
-\fI~/.cshdirs\fR is used if \fBdirsfile\fR is unset.
-.PP
-Note that login shells do the equivalent of `dirs \-L' on startup
-and, if \fBsavedirs\fR is set, `dirs \-S' before exiting.
-Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.cshdirs\fR,
-\fBdirsfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
-.PP
-The last form clears the directory stack.
-.RE
-.TP 8
-.B echo \fR[\fB\-n\fR] \fIword\fR ...
-Writes each \fIword\fR to the shell's standard
+In either case,
+.Ic dirsfile
+is used if
+.Ar filename
+is not given and
+.Pa ~/.cshdirs
+is used if
+.Ic dirsfile
+is unset.
+.Pp
+Note that login shells do the equivalent of
+.Dl dirs \-L
+on startup
+and, if
+.Ic savedirs
+is set,
+.Dl dirs \-S
+before exiting.
+Because only
+.Pa ~/.tcshrc
+is normally sourced before
+.Pa ~/.cshdirs ,
+.Ic dirsfile
+should be set in
+.Pa ~/.tcshrc
+rather than
+.Pa ~/.login .
+.Pp
+The third form clears the directory stack.
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic echo Oo Fl n Oc Ar word No \&...
+Writes each
+.Ar word
+to the shell's standard
output, separated by spaces and terminated with a newline.
-The \fBecho_style\fR shell variable may be set to emulate (or not) the flags and escape
-sequences of the BSD and/or System V versions of \fIecho\fR; see \fIecho\fR(1).
-.TP 8
-.B echotc \fR[\fB\-sv\fR] \fIarg\fR ... (+)
-Exercises the terminal capabilities (see \fItermcap\fR(5)) in \fIargs\fR.
-For example, 'echotc home' sends the cursor to the home position,
-\&'echotc cm 3 10' sends it to column 3 and row 10, and
-\&'echotc ts 0; echo "This is a test."; echotc fs' prints "This is a test."
+The
+.Ic echo_style
+shell variable may be set to emulate (or not) the flags and escape
+sequences of the BSD and/or System V versions of
+.Xr echo 1 ;
+see
+.Sx Escape sequences (+)
+and
+.Xr echo 1 .
+.
+.It Ic echotc Oo Fl sv Oc Ar arg No \&... No (+)
+Exercises the terminal capabilities (see
+.Xr termcap 5 )
+in
+.Ar arg .
+For example,
+.Dl echotc home
+sends the cursor to the home position,
+.Dl echotc cm 3 10
+sends it to column 3 and row 10, and
+.Dl echotc ts 0; echo \&"This is a test.\&"; echotc fs
+prints
+.Dl This is a test\&.
in the status line.
-.RS +8
-.PP
-If \fIarg\fR is 'baud', 'cols', 'lines', 'meta' or 'tabs', prints the
-value of that capability ("yes" or "no" indicating that the terminal does
-or does not have that capability). One might use this to make the output
+.Pp
+If
+.Ar arg
+is
+.Ql baud ,
+.Ql cols ,
+.Ql lines ,
+.Ql meta ,
+or
+.Ql tabs ,
+prints the
+value of that capability
+.Dq ( yes
+or
+.Dq no
+indicating that the terminal does
+or does not have that capability).
+One might use this to make the output
from a shell script less verbose on slow terminals, or limit command
output to the number of lines on the screen:
-.IP "" 4
+.Bd -literal -offset indent
> set history=\`echotc lines\`
-.br
> @ history\-\-
-.PP
+.Ed
+.Pp
Termcap strings may contain wildcards which will not echo correctly.
One should use double quotes when setting a shell variable to a terminal
capability string, as in the following example that places the date in
the status line:
-.IP "" 4
+.Bd -literal -offset indent
> set tosl="\`echotc ts 0\`"
-.br
> set frsl="\`echotc fs\`"
-.br
> echo \-n "$tosl";date; echo \-n "$frsl"
-.PP
-With \fB\-s\fR, nonexistent capabilities return the empty string rather
+.Ed
+.Pp
+With
+.Fl s ,
+nonexistent capabilities return the empty string rather
than causing an error.
-With \fB\-v\fR, messages are verbose.
-.RE
-.PP
-.B else
-.br
-.B end
-.br
-.B endif
-.PD 0
-.TP 8
-.B endsw
-See the description of the \fIforeach\fR, \fIif\fR, \fIswitch\fR, and
-\fIwhile\fR statements below.
-.PD
-.TP 8
-.B eval \fIarg\fR ...
+With
+.Fl v ,
+messages are verbose.
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic else
+.It Ic end
+.It Ic endif
+.It Ic endsw
+See the description of the
+.Ic foreach ,
+.Ic if ,
+.Ic switch ,
+and
+.Ic while
+statements below.
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic eval Ar arg No \&...
Treats the arguments as input to the
shell and executes the resulting command(s) in the context
-of the current shell. This is usually used to execute commands
+of the current shell.
+This is usually used to execute commands
generated as the result of command or variable substitution,
because parsing occurs before these substitutions.
-See \fItset\fR(1) for a sample use of \fIeval\fR.
-.TP 8
-.B exec \fIcommand\fR
-Executes the specified command in place of the current shell.
-.TP 8
-.B exit \fR[\fIexpr\fR]
-The shell exits either with the value of the specified \fIexpr\fR
-(an expression, as described under \fBExpressions\fR)
-or, without \fIexpr\fR, with the value 0.
-.TP 8
-.B fg \fR[\fB%\fIjob\fR ...]
+See
+.Xr tset 1
+for a sample use of
+.Ic eval .
+.
+.It Ic exec Ar command No \&...
+Executes the specified
+.Ar command
+in place of the current shell.
+.
+.It Ic exit Op Ar expr
+The shell exits either with the value of the specified
+.Ar expr
+(an expression, as described under
+.Sx Expressions )
+or, without
+.Ar expr ,
+with the value 0.
+.
+.It Ic fg Op Cm % Ns Ar job No \&...
Brings the specified jobs (or, without arguments, the current job)
into the foreground, continuing each if it is stopped.
-\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
-under \fBJobs\fR.
-See also the \fIrun-fg-editor\fR editor command.
-.TP 8
-.B filetest \-\fIop file\fR ... (+)
-Applies \fIop\fR (which is a file inquiry operator as described under
-\fBFile inquiry operators\fR) to each \fIfile\fR and returns the results as a
+.Ar job
+may be a number, a string,
+.Ql \& ,
+.Ql % ,
+.Ql + ,
+or
+.Ql \-
+as described under
+.Sx Jobs .
+See also the
+.Ic run-fg-editor
+editor command.
+.
+.It Ic filetest \- Ns Ar op file No \&... No (+)
+Applies
+.Ar op
+(which is a file inquiry operator as described under
+.Sx File inquiry operators )
+to each
+.Ar file
+and returns the results as a
space-separated list.
-.PP
-.B foreach \fIname \fB(\fIwordlist\fB)
-.br
-\&...
-.PD 0
-.TP 8
-.B end
-Successively sets the variable \fIname\fR to each member of
-\fIwordlist\fR and executes the sequence of commands between this command
-and the matching \fIend\fR. (Both \fIforeach\fR and \fIend\fR
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic foreach Ar name Cm \&( Ns Ar wordlist Ns Cm \&)
+.It Ic \&...
+.It Ic end
+Successively sets the variable
+.Ar name
+to each member of
+.Ar wordlist
+and executes the sequence of commands between this command
+and the matching
+.Ic end .
+(Both
+.Ic foreach
+and
+.Ic end
must appear alone on separate lines.) The builtin command
-\fIcontinue\fR may be used to continue the loop prematurely and
-the builtin command \fIbreak\fR to terminate it prematurely.
+.Ic continue
+may be used to continue the loop prematurely and
+the builtin command
+.Ic break
+to terminate it prematurely.
When this command is read from the terminal, the loop is read once
-prompting with `foreach? ' (or \fBprompt2\fR) before any statements in
-the loop are executed. If you make a mistake typing in a
+prompting with
+.Dl foreach?\ \&
+(or
+.Ic prompt2 )
+before any statements in
+the loop are executed.
+If you make a mistake typing in a
loop at the terminal you can rub it out.
-.PD
-.TP 8
-.B getspath \fR(+)
-Prints the system execution path. (TCF only)
-.TP 8
-.B getxvers \fR(+)
-Prints the experimental version prefix. (TCF only)
-.TP 8
-.B glob \fIwordlist
-Like \fIecho\fR, but the `-n' parameter is not recognized and words are
-delimited by null characters in the output. Useful for
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic getspath No (+)
+Prints the system execution path.
+(TCF only)
+.
+.It Ic getxvers No (+)
+Prints the experimental version prefix.
+(TCF only)
+.
+.It Ic glob Ar word No \&...
+Like
+.Ic echo ,
+but the
+.Fl n
+parameter is not recognized and words are
+delimited by null characters in the output.
+Useful for
programs which wish to use the shell to filename expand a list of words.
-.TP 8
-.B goto \fIword
-\fIword\fR is filename and command-substituted to
-yield a string of the form `label'. The shell rewinds its
+.
+.It Ic goto Ar word
+.Ar word
+is filename and command-substituted to
+yield a string of the form
+.Sq Ar label .
+The shell rewinds its
input as much as possible, searches for a line of the
-form `label:', possibly preceded by blanks or tabs, and
+form
+.Dl Ar label Ns No \&:
+possibly preceded by blanks or tabs, and
continues execution after that line.
-.TP 8
-.B hashstat
+.
+.It Ic hashstat
Prints a statistics line indicating how effective the
internal hash table has been at locating commands (and avoiding
-\fIexec\fR's). An \fIexec\fR is attempted for each component of the
-\fBpath\fR where the hash function indicates a possible hit, and
-in each component which does not begin with a `/'.
-.IP
-On machines without \fIvfork\fR(2), prints only the number and size of
+.Ic exec Ns
+\&'s).
+An
+.Ic exec
+is attempted for each component of the
+.Ic path
+where the hash function indicates a possible hit, and
+in each component which does not begin with a
+.Ql / .
+.Pp
+On machines without
+.Xr vfork 2 ,
+prints only the number and size of
hash buckets.
-.PP
-.B history \fR[\fB\-hTr\fR] [\fIn\fR]
-.br
-.B history \-S\fR|\fB\-L|\fB\-M \fR[\fIfilename\fR] (+)
-.PD 0
-.TP 8
-.B history \-c \fR(+)
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic history Xo
+.Op Fl hTr
+.Op Ar n
+.Xc
+.It Ic history Xo
+.Fl S Ns | Ns Fl L Ns | Ns Fl M
+.Op Ar filename
+(+)
+.Xc
+.It Ic history Xo
+.Fl c
+(+)
+.Xc
The first form prints the history event list.
-If \fIn\fR is given only the \fIn\fR most recent events are printed or saved.
-With \fB\-h\fR, the history list is printed without leading numbers. If
-\fB-T\fR is specified, timestamps are printed also in comment form.
-(This can be used to
-produce files suitable for loading with 'history \-L' or 'source \-h'.)
-With \fB\-r\fR, the order of printing is most recent
+If
+.Ar n
+is given only the
+.Ar n
+most recent events are printed or saved.
+With
+.Fl h ,
+the history list is printed without leading numbers.
+If
+.Fl T
+is specified, timestamps are printed also in comment form.
+This can be used to
+produce files suitable for loading with
+.Dl history \-L
+or
+.Dl source \-h
+.Pp
+With
+.Fl r ,
+the order of printing is most recent
first rather than oldest first.
-.PD
-.RS +8
-.PP
-With \fB\-S\fR, the second form saves the history list to \fIfilename\fR.
-If the first word of the \fBsavehist\fR shell variable is set to a
-number, at most that many lines are saved. If the second word of
-\fBsavehist\fR is set to `merge', the history list is merged with the
+.Pp
+The second form with
+.Fl S
+saves the history list to
+.Ar filename .
+If the first word of the
+.Ic savehist
+shell variable is set to a
+number, at most that many lines are saved.
+If the second word of
+.Ic savehist
+is set to
+.Ql merge ,
+the history list is merged with the
existing history file instead of replacing it (if there is one) and
-sorted by time stamp. (+) Merging is intended for an environment like
+sorted by time stamp.
+(+) Merging is intended for an environment like
the X Window System
-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
+with several shells in simultaneous use.
+If the second word of
+.Ic savehist
+is
+.Ql merge
+and the third word is set to
+.Ql 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,
+.Pp
+The second form with
+.Fl L
+appends
+.Ar filename
+(which is presumably a
+history list saved by the
+.Fl S
+option or the
+.Ic savehist
+mechanism)
to the history list.
-\fB\-M\fR is like \fB\-L\fR, but the contents of \fIfilename\fR are merged
+.Fl M
+is like
+.Fl L ,
+but the contents of
+.Ar filename
+are merged
into the history list and sorted by timestamp.
-In either case, \fBhistfile\fR is used if \fIfilename\fR is not given and
-\fI~/.history\fR is used if \fBhistfile\fR is unset.
-`history \-L' is exactly like 'source \-h' except that it does not require a
-filename.
-.PP
-Note that login shells do the equivalent of `history \-L' on startup
-and, if \fBsavehist\fR is set, `history \-S' before exiting.
-Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.history\fR,
-\fBhistfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
-.PP
-If \fBhistlit\fR is set, the first and second forms print and save the literal
+In either case,
+.Ic histfile
+is used if
+.Ar filename
+is not given and
+.Pa ~/.history
+is used if
+.Ic histfile
+is unset.
+.Pp
+Note that
+.Dl history \-L
+is exactly like
+.Dl source \-h
+except that it does not require a filename.
+.Pp
+Note that login shells do the equivalent of
+.Dl history \-L
+on startup
+and, if
+.Ic savehist
+is set,
+.Dl history \-S
+before exiting.
+Because only
+.Pa ~/.tcshrc
+is normally sourced before
+.Pa ~/.history ,
+.Ic histfile
+should be set in
+.Pa ~/.tcshrc
+rather than
+.Pa ~/.login .
+.Pp
+If
+.Ic histlit
+is set, the first and second forms print and save the literal
(unexpanded) form of the history list.
-.PP
-The last form clears the history list.
-.RE
-.TP 8
-.B hup \fR[\fIcommand\fR] \fR(+)
-With \fIcommand\fR, runs \fIcommand\fR such that it will exit on a hangup
+.Pp
+The third form clears the history list.
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic hup Oo Ar command Oc No (+)
+With
+.Ar command ,
+runs
+.Ar command
+such that it will exit on a hangup
signal and arranges for the shell to send it a hangup signal when the shell
exits.
-Note that commands may set their own response to hangups, overriding \fIhup\fR.
+Note that commands may set their own response to hangups, overriding
+.Ic hup .
Without an argument, causes the non-interactive shell only to
exit on a hangup for the remainder of the script.
-See also \fBSignal handling\fR and the \fInohup\fR builtin command.
-.TP 8
-.B if (\fIexpr\fB) \fIcommand
-If \fIexpr\fR (an expression, as described under \fBExpressions\fR)
-evaluates true, then \fIcommand\fR is executed.
-Variable substitution on \fIcommand\fR happens early, at the same time it
-does for the rest of the \fIif\fR command.
-\fIcommand\fR must be a simple command, not an alias, a pipeline, a command list
+See also
+.Sx Signal handling
+and the
+.Ic nohup
+builtin command.
+.
+.It Ic if Cm \&( Ns Ar expr Ns Cm \&) Ar command
+If
+.Ar expr
+(an expression, as described under
+.Sx Expressions )
+evaluates true, then
+.Ar command
+is executed.
+Variable substitution on
+.Ar command
+happens early, at the same time it
+does for the rest of the
+.Ic if
+command.
+.Ar command
+must be a simple command, not an alias, a pipeline, a command list
or a parenthesized command list, but it may have arguments.
-Input/output redirection occurs even if \fIexpr\fR is
-false and \fIcommand\fR is thus \fInot\fR executed; this is a bug.
-.PP
-.B if (\fIexpr\fB) then
-.br
-\&...
-.br
-.B else if (\fIexpr2\fB) then
-.br
-\&...
-.br
-.B else
-.br
-\&...
-.PD 0
-.TP 8
-.B endif
-If the specified \fIexpr\fR is true then the commands to the
-first \fIelse\fR are executed; otherwise if \fIexpr2\fR is true then
-the commands to the second \fIelse\fR are executed, etc. Any
-number of \fIelse-if\fR pairs are possible; only one \fIendif\fR is
-needed. The \fIelse\fR part is likewise optional. (The words
-\fIelse\fR and \fIendif\fR must appear at the beginning of input lines;
-the \fIif\fR must appear alone on its input line or after an
-\fIelse\fR.)
-.PD
-.TP 8
-.B inlib \fIshared-library\fR ... (+)
-Adds each \fIshared-library\fR to the current environment. There is no way
-to remove a shared library. (Domain/OS only)
-.TP 8
-.B jobs \fR[\fB\-l\fR]
-Lists the active jobs. With \fB\-l\fR, lists process
-IDs in addition to the normal information. On TCF systems, prints
-the site on which each job is executing.
-.PP
-.PD 0
-.TP 8
-.B kill \fR[\fB\-s \fIsignal\fR] \fB%\fIjob\fR|\fIpid\fR ...
-.PD 0
-.TP 8
-.B kill \-l
-The first and second forms sends the specified \fIsignal\fR (or, if none
+Input/output redirection occurs even if
+.Ar expr
+is
+false and
+.Ar command
+is thus
+.Em not
+executed; this is a bug.
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic if Cm \&( Ns Ar expr Ns Cm \&) then
+.It Ic \&...
+.It Ic else if Cm \&( Ns Ar expr2 Ns Cm \&) then
+.It Ic \&...
+.It Ic else
+.It Ic \&...
+.It Ic endif
+If the specified
+.Ar expr
+is true then the commands to the
+first
+.Ic else
+are executed; otherwise if
+.Ar expr2
+is true then
+the commands to the second
+.Ic else
+are executed, etc.
+Any
+number of
+.Ic else if
+pairs are possible; only one
+.Ic endif
+is
+needed.
+The
+.Ic else
+part is likewise optional.
+(The words
+.Ic else
+and
+.Ic endif
+must appear at the beginning of input lines;
+the
+.Ic if
+must appear alone on its input line or after an
+.Ic else . )
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic inlib Ar shared-library No \&... No (+)
+Adds each
+.Ar shared-library
+to the current environment.
+There is no way
+to remove a shared library.
+(Domain/OS only)
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic jobs Op Fl l
+.It Ic jobs Fl Z Oo Ar title Oc No (+)
+The first form lists the active jobs.
+With
+.Fl l ,
+lists process IDs in addition to the normal information.
+On TCF systems, prints the site on which each job is executing.
+.Pp
+The second form with the
+.Fl Z
+option sets the process title to
+.Ar title
+using
+.Xr setproctitle 3
+where available.
+If no
+.Ar title
+is provided, the process title will be cleared.
+.
+.\" adjacant multi-tag items; add a blank
+.Pp
+.
+.It Ic kill Fl l
+.It Ic kill Xo
+.Op Fl s Ar signal
+.Cm % Ns Ar job Ns | Ns Ar pid No \&...
+.Xc
+The first form lists the signal names.
+.Pp
+The second form sends the specified
+.Ar signal
+(or, if none
is given, the TERM (terminate) signal) to the specified jobs or processes.
-\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
-under \fBJobs\fR.
+.Ar job
+may be a number, a string,
+.Ql \& ,
+.Ql % ,
+.Ql + ,
+or
+.Ql \-
+as described under
+.Sx Jobs .
Signals are either given by number or by name (as given in
-\fI/usr/include/signal.h\fR, stripped of the prefix `SIG').
-There is no default \fIjob\fR; saying just `kill' does not send a signal
-to the current job. If the signal being sent is TERM (terminate)
+.Pa /usr/include/signal.h ,
+stripped of the prefix
+.Sq SIG ) .
+.Pp
+There is no default
+.Ar job ;
+entering just
+.Dl kill
+does not send a signal
+to the current job.
+If the signal being sent is TERM (terminate)
or HUP (hangup), then the job or process is sent a
CONT (continue) signal as well.
-The third form lists the signal names.
-.PD
-.TP 8
-.B limit \fR[\fB\-h\fR] [\fIresource\fR [\fImaximum-use\fR]]
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic limit Oo Fl h Oc Op Ar resource Op Ar maximum-use
Limits the consumption by the current process and each
-process it creates to not individually exceed \fImaximum-use\fR on
-the specified \fIresource\fR. If no \fImaximum-use\fR is given, then
-the current limit is printed; if no \fIresource\fR is given, then
-all limitations are given. If the \fB\-h\fR flag is given, the
-hard limits are used instead of the current limits. The
+process it creates to not individually exceed
+.Ar maximum-use
+on
+the specified
+.Ar resource .
+.Pp
+If no
+.Ar maximum-use
+is given, then
+the current limit for
+.Ar resource
+is printed.
+.Pp
+If no
+.Ar resource
+is given, then
+all limitations are given.
+.Pp
+If the
+.Fl h
+flag is given, the
+hard limits are used instead of the current limits.
+The
hard limits impose a ceiling on the values of the current
-limits. Only the super-user may raise the hard limits, but
+limits.
+Only the super-user may raise the hard limits, but
a user may lower or raise the current limits within the legal range.
-.RS +8
-.PP
-Controllable resources currently include (if supported by the OS):
-.TP
-\fIcputime\fR
-the maximum number of cpu-seconds to be used by each process
-.TP
-\fIfilesize\fR
-the largest single file which can be created
-.TP
-\fIdatasize\fR
-the maximum growth of the data+stack region via sbrk(2) beyond
-the end of the program text
-.TP
-\fIstacksize\fR
-the maximum size of the automatically-extended stack region
-.TP
-\fIcoredumpsize\fR
-the size of the largest core dump that will be created
-.TP
-\fImemoryuse\fR
-the maximum amount of physical memory a process
-may have allocated to it at a given time
-.TP
-\fIvmemoryuse\fR
-the maximum amount of virtual memory a process
-may have allocated to it at a given time (address space)
-.TP
-\fIvmemoryuse\fR
-the maximum amount of virtual memory a process
-may have allocated to it at a given time
-.TP
-\fIheapsize\fR
-the maximum amount of memory a process
-may allocate per \fIbrk()\fR system call
-.TP
-\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
-\fImemorylocked\fR
-the maximum size which a process may lock into memory using mlock(2)
-.TP
-\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
-\fIswapsize\fR
-the maximum amount of swap space reserved or used for this user
-.TP
-\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
-\fImaxmessage\fR
-the maximum number of bytes in POSIX mqueues for this user
-.TP
-\fImaxnice\fR
-the maximum nice priority the user is allowed to raise mapped from [19...-20]
-to [0...39] for this user
-.TP
-\fImaxrtprio\fR
-the maximum realtime priority for this user
-\fImaxrttime\fR
-the timeout for RT tasks in microseconds for this user.
-.PP
-\fImaximum-use\fR may be given as a (floating point or
-integer) number followed by a scale factor. For all limits
-other than \fIcputime\fR the default scale is `k' or `kilobytes'
-(1024 bytes); a scale factor of `m' or `megabytes' or `g' or `gigabytes'
-may also be used. For \fIcputime\fR the default scaling is `seconds',
-while `m' for minutes or `h' for hours, or a time of the
-form `mm:ss' giving minutes and seconds may be used.
-.PP
-If \fImaximum-use\fR is `unlimited',
-then the limitation on the specified \fIresource\fR
-is removed (this is equivalent to the \fIunlimit\fR builtin command).
-.PP
-For both \fIresource\fR names and scale factors, unambiguous
+.Pp
+Controllable
+.Ar resource
+types currently include (if supported by the OS):
+.Bl -tag -width ".Ic coredumpsize" -offset indent
+.It Ar resource
+.Sy Resource description
+.
+.It Ic concurrency
+Maximum number of threads for this process.
+.
+.It Ic coredumpsize
+Size of the largest core dump that will be created.
+.
+.It Ic cputime
+Maximum number of cpu-seconds to be used by each process.
+.
+.It Ic datasize
+Maximum growth of the data+stack region via
+.Xr sbrk 2
+beyond the end of the program text.
+.
+.It Ic descriptors No or Ic openfiles
+Maximum number of open files for this process.
+.
+.It Ic filesize
+Largest single file which can be created.
+.
+.It Ic heapsize
+Maximum amount of memory a process
+may allocate per
+.Xr brk 2
+system call.
+.
+.It Ic kqueues
+Maximum number of kqueues allocated for this process.
+.
+.It Ic maxlocks
+Maximum number of locks for this user.
+.
+.It Ic maxmessage
+Maximum number of bytes in POSIX mqueues for this user.
+.
+.It Ic maxnice
+Maximum nice priority the user is allowed to raise mapped from [19...-20]
+to [0...39] for this user.
+.
+.It Ic maxproc
+Maximum number of simultaneous processes for this user id.
+.
+.It Ic maxrtprio
+Maximum realtime priority for this user.
+.
+.It Ic maxrttime
+Timeout for RT tasks in microseconds for this user.
+.
+.It Ic maxsignal
+Maximum number of pending signals for this user.
+.
+.It Ic maxthread
+Maximum number of simultaneous threads (lightweight processes) for this
+user id.
+.
+.It Ic memorylocked
+Maximum size which a process may lock into memory using
+.Xr mlock 2 .
+.
+.It Ic memoryuse
+Maximum amount of physical memory a process
+may have allocated to it at a given time.
+.
+.It Ic posixlocks
+Maximum number of POSIX advisory locks for this user.
+.
+.It Ic pseudoterminals
+Maximum number of pseudo-terminals for this user.
+.
+.It Ic sbsize
+Maximum size of socket buffer usage for this user.
+.
+.It Ic stacksize
+Maximum size of the automatically-extended stack region.
+.
+.It Ic swapsize
+Maximum amount of swap space reserved or used for this user.
+.
+.It Ic threads
+Maximum number of threads for this process.
+.
+.It Ic vmemoryuse
+Maximum amount of virtual memory a process
+may have allocated to it at a given time (address space).
+.
+.El
+.Pp
+.Ar maximum-use
+may be given as a (floating point or
+integer) number followed by a scale factor.
+For all limits
+other than
+.Ic cputime
+the default scale is
+.Ql k
+or
+.Ql kilobytes
+(1024 bytes); a scale factor of
+.Ql m
+or
+.Ql megabytes
+(1048576 bytes)
+or
+.Ql g
+or
+.Ql gigabytes
+(1073741824 bytes)
+may also be used.
+For
+.Ic cputime
+the default scaling is
+.Ql seconds ,
+while
+.Ql m
+for minutes or
+.Ql h
+for hours, or a time of the
+form
+.Sq Ar mm Ns Li \&: Ns Ar ss
+giving minutes and seconds may be used.
+.Pp
+If
+.Ar maximum-use
+is
+.Ql unlimited ,
+then the limitation on the specified
+.Ar resource
+is removed (this is equivalent to the
+.Ic unlimit
+builtin command).
+.Pp
+For both
+.Ar resource
+names and scale factors, unambiguous
prefixes of the names suffice.
-.RE
-.TP 8
-.B log \fR(+)
-Prints the \fBwatch\fR shell variable and reports on each user indicated
-in \fBwatch\fR who is logged in, regardless of when they last logged in.
-See also \fIwatchlog\fR.
-.TP 8
-.B login
+.
+.It Ic log No (+)
+Prints the
+.Ic watch
+shell variable and reports on each user indicated
+in
+.Ic watch
+who is logged in, regardless of when they last logged in.
+See also
+.Ic watchlog .
+.
+.It Ic login
Terminates a login shell, replacing it with an instance of
-\fI/bin/login\fR. This is one way to log off, included for
-compatibility with \fIsh\fR(1).
-.TP 8
-.B logout
-Terminates a login shell. Especially useful if \fBignoreeof\fR is set.
-.TP 8
-.B ls\-F \fR[\-\fIswitch\fR ...] [\fIfile\fR ...] (+)
-Lists files like `ls \-F', but much faster. It identifies each type of
-special file in the listing with a special character:
-.PP
-.RS +8
-.PD 0
-.TP 4
-/
-Directory
-.TP 4
-*
-Executable
-.TP 4
-#
-Block device
-.TP 4
-%
-Character device
-.TP 4
-|
-Named pipe (systems with named pipes only)
-.TP 4
-=
-Socket (systems with sockets only)
-.TP 4
-@
-Symbolic link (systems with symbolic links only)
-.TP 4
-+
-Hidden directory (AIX only) or context dependent (HP/UX only)
-.TP 4
-:
-Network special (HP/UX only)
-.PD
-.PP
-If the \fBlistlinks\fR shell variable is set, symbolic links are identified
+.Pa /bin/login .
+This is one way to log off, included for
+compatibility with
+.Xr sh 1 .
+.
+.It Ic logout
+Terminates a login shell.
+Especially useful if
+.Ic ignoreeof
+is set.
+.
+.It Ic ls\-F Xo
+.Op Fl Ar switch No \&...
+.Op Ar file No \&...
+(+)
+.Xc
+Lists files like
+.Dl ls \-F
+but much faster.
+.Pp
+.Ic ls\-F
+identifies each type of
+special file in the listing with a special character suffix:
+.Pp
+.Bl -tag -width ".Sy Suffix" -offset indent -compact
+.It Sy Suffix
+.Sy Special file type
+.Pp
+.It Li /
+Directory.
+.It Li *
+Executable.
+.It Li #
+Block device.
+.It Li %
+Character device.
+.It Li \&|
+Named pipe (systems with named pipes only).
+.It Li =
+Socket (systems with sockets only).
+.It Li @
+Symbolic link (systems with symbolic links only).
+.It Li +
+Hidden directory (AIX only) or context dependent (HP/UX only).
+.It Li \&:
+Network special (HP/UX only).
+.El
+.Pp
+If the
+.Ic listlinks
+shell variable is set, symbolic links are identified
in more detail (on only systems that have them, of course):
-.PP
-.PD 0
-.TP 4
-@
-Symbolic link to a non-directory
-.TP 4
->
-Symbolic link to a directory
-.TP 4
-&
-Symbolic link to nowhere
-.PD
-.PP
-\fBlistlinks\fR also slows down \fIls\-F\fR and causes partitions holding
+.Pp
+.Bl -tag -width ".Sy Suffix" -offset indent -compact
+.It Sy Suffix
+.Sy Symbolic link type
+.Pp
+.It Li @
+Symbolic link to a non-directory.
+.It Li >
+Symbolic link to a directory.
+.It Li &
+Symbolic link to nowhere.
+.El
+.Pp
+.Ic listlinks
+also slows down
+.Ic ls\-F
+and causes partitions holding
files pointed to by symbolic links to be mounted.
-.PP
-If the \fBlistflags\fR shell variable is set to `x', `a' or `A', or any
-combination thereof (e.g., `xA'), they are used as flags to \fIls\-F\fR,
-making it act like `ls \-xF', `ls \-Fa', `ls \-FA' or a combination
-(e.g., `ls \-FxA').
-On machines where `ls \-C' is not the default, \fIls\-F\fR acts like `ls \-CF',
-unless \fBlistflags\fR contains an `x', in which case it acts like `ls \-xF'.
-\fIls\-F\fR passes its arguments to \fIls\fR(1) if it is given any switches,
-so `alias ls ls\-F' generally does the right thing.
-.PP
-The \fBls\-F\fR builtin can list files using different colors depending on the
-filetype or extension. See the \fBcolor\fR shell variable and the
-\fBLS_COLORS\fR environment variable.
-.RE
-.PP
-.B migrate \fR[\fB\-\fIsite\fR] \fIpid\fR|\fB%\fIjobid\fR ... (+)
-.PD 0
-.TP 8
-.B migrate \-\fIsite\fR (+)
+.Pp
+If the
+.Ic listflags
+shell variable is set to
+.Ql x ,
+.Ql a ,
+or
+.Ql A ,
+or any combination thereof (e.g.,
+.Ql xA ) ,
+they are used as flags to
+.Ic ls\-F ,
+making it act like
+.Bd -literal -offset indent -compact
+ls \-xF
+ls \-Fa
+ls \-FA
+.Ed
+.Pp
+or a combination, for example
+.Dl ls \-FxA
+.Pp
+On machines where
+.Dl ls \-C
+is not the default,
+.Ic ls\-F
+acts like
+.Dl ls \-CF
+unless
+.Ic listflags
+contains an
+.Ql x ,
+in which case it acts like
+.Dl ls \-xF
+.Pp
+.Ic ls\-F
+passes its arguments to
+.Xr ls 1
+if it is given any switches,
+so
+.Dl alias ls ls\-F
+generally does the right thing.
+.Pp
+The
+.Ic ls\-F
+builtin can list files using different colors depending on the
+filetype or extension.
+See the
+.Ic color
+shell variable and the
+.Ev LS_COLORS
+environment variable.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic migrate Xo
+.Op Fl Ar site
+.Ar pid Ns | Ns Cm % Ns Ar jobid No \&... (+)
+.Xc
+.It Ic migrate Fl Ar site No (+)
The first form migrates the process or job to the site specified or the
default site determined by the system path.
-The second form is equivalent to `migrate \-\fIsite\fR $$': it migrates the
-current process to the specified site. Migrating the shell
+(TCF only)
+.Pp
+The second form is equivalent to
+.Dl migrate \- Ns Ar site Li $$
+in that it migrates the
+current process to the specified site.
+Migrating the shell
itself can cause unexpected behavior, because the shell
-does not like to lose its tty. (TCF only)
-.PD
-.TP 8
-.B newgrp \fR[\fB\-\fR] \fI[group]\fR (+)
-Equivalent to `exec newgrp'; see \fInewgrp\fR(1).
+does not like to lose its tty.
+(TCF only)
+.El
+.Bl -tag -width 6n
+.
+.It Ic newgrp Oo Cm \- Oc Oo Ar group Oc No (+)
+Equivalent to
+.Dl exec newgrp
+as per
+.Xr newgrp 1 .
Available only if the shell was so compiled;
-see the \fBversion\fR shell variable.
-.TP 8
-.B nice \fR[\fB+\fInumber\fR] [\fIcommand\fR]
-Sets the scheduling priority for the shell to \fInumber\fR, or, without
-\fInumber\fR, to 4. With \fIcommand\fR, runs \fIcommand\fR at the appropriate
+see the
+.Ic version
+shell variable.
+.
+.It Ic nice Oo Cm + Ns Ar number Oc Op Ar command
+Sets the scheduling priority for the shell to
+.Ar number ,
+or, without
+.Ar number ,
+to 4.
+With
+.Ar command ,
+runs
+.Ar command
+at the appropriate
priority.
-The greater the \fInumber\fR, the less cpu
-the process gets. The super-user may specify negative
-priority by using `nice \-number ...'. Command is always
-executed in a sub-shell, and the restrictions placed on
-commands in simple \fIif\fR statements apply.
-.TP 8
-.B nohup \fR[\fIcommand\fR]
-With \fIcommand\fR, runs \fIcommand\fR such that it will ignore hangup signals.
-Note that commands may set their own response to hangups, overriding \fInohup\fR.
+The greater the
+.Ar number ,
+the less cpu
+the process gets.
+The super-user may specify negative
+priority by using
+.Dl nice \- Ns Ar number Li \&...
+.Pp
+.Ar command
+is always executed in a sub-shell, and the restrictions placed on
+commands in simple
+.Ic if
+statements apply.
+.
+.It Ic nohup Op Ar command
+With
+.Ar command ,
+runs
+.Ar command
+such that it will ignore hangup signals.
+Note that commands may set their own response to hangups, overriding
+.Ic nohup .
+.Pp
Without an argument, causes the non-interactive shell only to
ignore hangups for the remainder of the script.
-See also \fBSignal handling\fR and the \fIhup\fR builtin command.
-.TP 8
-.B notify \fR[\fB%\fIjob\fR ...]
+See also
+.Sx Signal handling
+and the
+.Ic hup
+builtin command.
+.
+.It Ic notify Op Cm % Ns Ar job No \&...
Causes the shell to notify the user asynchronously when the status of any
-of the specified jobs (or, without %\fIjob\fR, the current job) changes,
+of the specified jobs (or, without
+.Cm % Ns Ar job ,
+the current job) changes,
instead of waiting until the next prompt as is usual.
-\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
-under \fBJobs\fR.
-See also the \fBnotify\fR shell variable.
-.TP 8
-.B onintr \fR[\fB\-\fR|\fIlabel\fR]
-Controls the action of the shell on interrupts. Without arguments,
+.Ar job
+may be a number, a string,
+.Ql \& ,
+.Ql % ,
+.Ql + ,
+or
+.Ql \-
+as described under
+.Sx Jobs .
+See also the
+.Ic notify
+shell variable.
+.
+.It Ic onintr Op Cm \- Ns | Ns Ar label
+Controls the action of the shell on interrupts.
+Without arguments,
restores the default action of the shell on interrupts,
which is to terminate shell scripts or to return to the
terminal command input level.
-With `\-', causes all interrupts to be ignored.
-With \fIlabel\fR, causes the shell to execute a `goto \fIlabel\fR'
+.Pp
+With
+.Ql \- ,
+causes all interrupts to be ignored.
+.Pp
+With
+.Ar label ,
+causes the shell to execute a
+.Dl goto Ar label
when an interrupt is received or a child process terminates because it was
interrupted.
-.IP "" 8
-\fIonintr\fR is ignored if the shell is running detached and in system
-startup files (see \fBFILES\fR), where interrupts are disabled anyway.
-.TP 8
-.B popd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] \fR[\fB+\fIn\fR]
-Without arguments, pops the directory stack and returns to the new top directory.
-With a number `+\fIn\fR', discards the \fIn\fR'th entry in the stack.
-.IP "" 8
-Finally, all forms of \fIpopd\fR print the final directory stack,
-just like \fIdirs\fR. The \fBpushdsilent\fR shell variable can be set to
-prevent this and the \fB\-p\fR flag can be given to override \fBpushdsilent\fR.
-The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIpopd\fR
-as on \fIdirs\fR. (+)
-.TP 8
-.B printenv \fR[\fIname\fR] (+)
+.Pp
+.Ic onintr
+is ignored if the shell is running detached and in system
+startup files (see
+.Sx FILES ) ,
+where interrupts are disabled anyway.
+.
+.It Ic popd Xo
+.Op Fl p
+.Op Fl l
+.Op Fl n Ns | Ns Fl v
+.Op Cm + Ns Ar n
+.Xc
+Without arguments, pops the directory stack and returns to the new top
+directory.
+.Pp
+With a number
+.Ql + Ns Ar n ,
+discards the
+.Ar n Ns
+th entry in the stack.
+.Pp
+Finally, all forms of
+.Ic popd
+print the final directory stack,
+just like
+.Ic dirs .
+The
+.Ic pushdsilent
+shell variable can be set to
+prevent this and the
+.Fl p
+flag can be given to override
+.Ic pushdsilent .
+The
+.Fl l ,
+.Fl n ,
+and
+.Fl v
+flags have the same effect on
+.Ic popd
+as on
+.Ic dirs .
+(+)
+.
+.It Ic printenv Oo Ar name Oc No (+)
Prints the names and values of all environment variables or,
-with \fIname\fR, the value of the environment variable \fIname\fR.
-.TP 8
-.B pushd \fR[\fB\-p\fR] [\fB\-l\fR] [\fB\-n\fR|\fB\-v\fR] [\fIname\fR|\fB+\fIn\fR]
+with
+.Ar name ,
+the value of the environment variable
+.Ar name .
+.
+.It Ic pushd Xo
+.Op Fl p
+.Op Fl l
+.Op Fl n Ns | Ns Fl v
+.Op Ar name Ns | Ns Cm + Ns Ar n
+.Xc
Without arguments, exchanges the top two elements of the directory stack.
-If \fBpushdtohome\fR is set, \fIpushd\fR without arguments does `pushd ~',
-like \fIcd\fR. (+)
-With \fIname\fR, pushes the current working directory onto the directory
-stack and changes to \fIname\fR.
-If \fIname\fR is `\-' it is interpreted as the previous working directory
-(see \fBFilename substitution\fR). (+)
-If \fBdunique\fR is set, \fIpushd\fR removes any instances of \fIname\fR
-from the stack before pushing it onto the stack. (+)
-With a number `+\fIn\fR', rotates the \fIn\fRth element of the
+If
+.Ic pushdtohome
+is set,
+.Ic pushd
+without arguments acts as
+.Dl pushd ~
+like
+.Ic cd .
+(+)
+.Pp
+With
+.Ar name ,
+pushes the current working directory onto the directory
+stack and changes to
+.Ar name .
+If
+.Ar name
+is
+.Ql \-
+it is interpreted as the previous working directory
+(see
+.Sx Filename substitution ) .
+(+)
+If
+.Ic dunique
+is set,
+.Ic pushd
+removes any instances of
+.Ar name
+from the stack before pushing it onto the stack.
+(+)
+.Pp
+With a number
+.Ql + Ns Ar n ,
+rotates the
+.Ar n Ns
+th element of the
directory stack around to be the top element and changes to it.
-If \fBdextract\fR is set, however, `pushd +\fIn\fR' extracts the \fIn\fRth
-directory, pushes it onto the top of the stack and changes to it. (+)
-.IP "" 8
-Finally, all forms of \fIpushd\fR print the final directory stack,
-just like \fIdirs\fR. The \fBpushdsilent\fR shell variable can be set to
-prevent this and the \fB\-p\fR flag can be given to override \fBpushdsilent\fR.
-The \fB\-l\fR, \fB\-n\fR and \fB\-v\fR flags have the same effect on \fIpushd\fR
-as on \fIdirs\fR. (+)
-.TP 8
-.B rehash
+If
+.Ic dextract
+is set, however,
+.Dl pushd + Ns Ar n
+extracts the
+.Ar n Ns
+th
+directory, pushes it onto the top of the stack and changes to it.
+(+)
+.Pp
+Finally, all forms of
+.Ic pushd
+print the final directory stack,
+just like
+.Ic dirs .
+The
+.Ic pushdsilent
+shell variable can be set to
+prevent this and the
+.Fl p
+flag can be given to override
+.Ic pushdsilent .
+The
+.Fl l ,
+.Fl n ,
+and
+.Fl v
+flags have the same effect on
+.Ic pushd
+as on
+.Ic dirs .
+(+)
+.
+.It Ic rehash
Causes the internal hash table of the contents of the
-directories in the \fBpath\fR variable to be recomputed. This is
-needed if the \fBautorehash\fR shell variable is not set and new
-commands are added to directories in \fBpath\fR while you are logged
-in. With \fBautorehash\fR, a new command will be found
+directories in the
+.Ic path
+variable to be recomputed.
+This is
+needed if the
+.Ic autorehash
+shell variable is not set and new
+commands are added to directories in
+.Ic path
+while you are logged
+in.
+With
+.Ic autorehash ,
+a new command will be found
automatically, except in the special case where another command of
the same name which is located in a different directory already
-exists in the hash table. Also flushes the cache of home directories
+exists in the hash table.
+Also flushes the cache of home directories
built by tilde expansion.
-.TP 8
-.B repeat \fIcount command
-The specified \fIcommand\fR,
-which is subject to the same restrictions as the \fIcommand\fR
-in the one line \fIif\fR statement above, is executed \fIcount\fR times.
-I/O redirections occur exactly once, even if \fIcount\fR is 0.
-.TP 8
-.B rootnode //\fInodename \fR(+)
-Changes the rootnode to //\fInodename\fR, so that `/' will be interpreted
-as `//\fInodename\fR'. (Domain/OS only)
-.PP
-.B sched \fR(+)
-.br
-.B sched \fR[\fB+\fR]\fIhh:mm command\fR \fR(+)
-.PD 0
-.TP 8
-.B sched \-\fIn\fR (+)
+.
+.It Ic repeat Ar count Ar command
+The specified
+.Ar command ,
+which is subject to the same restrictions as the
+.Ar command
+in the one line
+.Ic if
+statement above, is executed
+.Ar count
+times.
+I/O redirections occur exactly once, even if
+.Ar count
+is 0.
+.
+.It Ic rootnode Cm // Ns Ar nodename No (+)
+Changes the rootnode to
+.Pa // Ns Ar nodename ,
+so that
+.Ql /
+will be interpreted
+as
+.Ql // Ns Ar nodename .
+(Domain/OS only)
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic sched No (+)
+.It Ic sched Xo
+.Op Cm + Ns
+.Ar hh Ns Cm \&: Ns Ar mm
+.Ar command
+(+)
+.Xc
+.It Ic sched Cm \- Ns Ar n No (+)
The first form prints the scheduled-event list.
-The \fBsched\fR shell variable may be set to define the format in which
+The
+.Ic sched
+shell variable may be set to define the format in which
the scheduled-event list is printed.
-The second form adds \fIcommand\fR to the scheduled-event list.
+.Pp
+The second form adds
+.Ar command
+to the scheduled-event list.
For example,
-.PD
-.RS +8
-.IP "" 4
+.Bd -literal -offset indent
> 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.
+.Ed
+.Pp
+causes the shell to echo
+.Dl It's eleven o'clock\&.
+at 11 AM.
+.Pp
The time may be in 12-hour AM/PM format
-.IP "" 4
-.\" TODO
+.Bd -literal -offset indent
> sched 5pm set prompt='[%h] It\e's after 5; go home: >'
-.PP
+.Ed
+.Pp
or may be relative to the current time:
-.IP "" 4
+.Bd -literal -offset indent
> sched +2:15 /usr/lib/uucp/uucico \-r1 \-sother
-.PP
+.Ed
+.Pp
A relative time specification may not use AM/PM format.
-The third form removes item \fIn\fR from the event list:
-.IP "" 4
+.Pp
+The third form removes item
+.Ar n
+from the event list:
+.Bd -literal -offset indent
> sched
-.br
- 1 Wed Apr 4 15:42 /usr/lib/uucp/uucico \-r1 \-sother
-.br
- 2 Wed Apr 4 17:00 set prompt=[%h] It's after 5; go home: >
-.br
+1 Wed Apr 4 15:42 /usr/lib/uucp/uucico \-r1 \-sother
+2 Wed Apr 4 17:00 set prompt=[%h] It's after 5; go home: >
> sched \-2
-.br
> sched
-.br
- 1 Wed Apr 4 15:42 /usr/lib/uucp/uucico \-r1 \-sother
-.PP
+1 Wed Apr 4 15:42 /usr/lib/uucp/uucico \-r1 \-sother
+.Ed
+.Pp
A command in the scheduled-event list is executed just before the first
prompt is printed after the time when the command is scheduled.
It is possible to miss the exact time when the command is to be run, but
@@ -3350,2185 +6499,4001 @@ A command which comes due while the shell
is waiting for user input is executed immediately.
However, normal operation of an already-running command will not
be interrupted so that a scheduled-event list element may be run.
-.PP
-This mechanism is similar to, but not the same as, the \fIat\fR(1)
+.Pp
+This mechanism is similar to, but not the same as, the
+.Xr at 1
command on some Unix systems.
Its major disadvantage is that it may not run a command at exactly the
specified time.
-Its major advantage is that because \fIsched\fR runs directly from
+Its major advantage is that because
+.Ic sched
+runs directly from
the shell, it has access to shell variables and other structures.
This provides a mechanism for changing one's working environment
based on the time of day.
-.RE
-.PP
-.B set
-.br
-.B set \fIname\fR ...
-.br
-.B set \fIname\fR\fB=\fIword\fR ...
-.br
-.B set [\-r] [\-f|\-l] \fIname\fR\fB=(\fIwordlist\fB)\fR ... (+)
-.br
-.B set \fIname[index]\fR\fB=\fIword\fR ...
-.br
-.B set \-r \fR(+)
-.br
-.B set \-r \fIname\fR ... (+)
-.PD 0
-.TP 8
-.B set \-r \fIname\fR\fB=\fIword\fR ... (+)
+.
+.\" adjacant multi-tag items; add a blank
+.Pp
+.
+.It Ic set
+.It Ic set Ar name No \&...
+.It Ic set Ar name Ns Cm = Ns Ar word No \&...
+.It Ic set Xo
+.Op Fl r
+.Op Fl f Ns | Ns Fl l
+.Ar name Ns Cm =\&( Ns Ar wordlist Ns Cm \&) No \&...
+(+)
+.Xc
+.It Ic set Ar name Ns Cm \&[ Ns Ar index Ns Cm ]= Ns Ar word No \&...
+.It Ic set Fl r No (+)
+.It Ic set Fl r Ar name No \&... No (+)
+.It Ic set Fl r Ar name Ns Cm = Ns Ar word No \&... No (+)
The first form of the command prints the value of all shell variables.
Variables which contain more than a single word print as a
parenthesized word list.
-The second form sets \fIname\fR to the null string.
-The third form sets \fIname\fR to the single \fIword\fR.
-The fourth form sets \fIname\fR to the list of words in
-\fIwordlist\fR. In all cases the value is command and filename expanded.
-If \fB\-r\fR is specified, the value is set read-only. If \fB\-f\fR or
-\fB\-l\fR are specified, set only unique words keeping their order.
-\fB\-f\fR prefers the first occurrence of a word, and \fB\-l\fR the last.
-The fifth form sets the \fIindex\fR'th component of \fIname\fR to \fIword\fR;
+.Pp
+The second form sets
+.Ar name
+to the null string.
+.Pp
+The third form sets
+.Ar name
+to the single
+.Ar word .
+.Pp
+The fourth form sets
+.Ar name
+to the list of words in
+.Ar wordlist .
+.Pp
+In all cases the value is command and filename expanded.
+If
+.Fl r
+is specified, the value is set read-only.
+If
+.Fl f
+or
+.Fl l
+are specified, set only unique words keeping their order.
+.Fl f
+prefers the first occurrence of a word, and
+.Fl l
+the last.
+.Pp
+The fifth form sets the
+.Ar index Ns
+\&'th component of
+.Ar name
+to
+.Ar word ;
this component must already exist.
+.Pp
The sixth form lists only the names of all shell variables that are read-only.
-The seventh form makes \fIname\fR read-only, whether or not it has a value.
+.Pp
+The seventh form makes
+.Ar name
+read-only, whether or not it has a value.
+.Pp
The eighth form is the same as the third form, but
-make \fIname\fR read-only at the same time.
-.PD
-.IP "" 8
+make
+.Ar name
+read-only at the same time.
+.Pp
These arguments can be repeated to set and/or make read-only multiple variables
-in a single set command. Note, however, that variable expansion
-happens for all arguments before any setting occurs. Note also that `=' can
-be adjacent to both \fIname\fR and \fIword\fR or separated from both by
+in a single set command.
+Note, however, that variable expansion
+happens for all arguments before any setting occurs.
+Note also that
+.Ql =
+can
+be adjacent to both
+.Ar name
+and
+.Ar word
+or separated from both by
whitespace, but cannot be adjacent to only one or the other.
-See also the \fIunset\fR builtin command.
-.TP 8
-.B setenv \fR[\fIname \fR[\fIvalue\fR]]
+See also the
+.Ic unset
+builtin command.
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic setenv Op Ar name Op Ar value
Without arguments, prints the names and values of all environment variables.
-Given \fIname\fR, sets the environment variable \fIname\fR to \fIvalue\fR
-or, without \fIvalue\fR, to the null string.
-.TP 8
-.B setpath \fIpath \fR(+)
-Equivalent to \fIsetpath\fR(1). (Mach only)
-.TP 8
-.B setspath\fR LOCAL|\fIsite\fR|\fIcpu\fR ... (+)
-Sets the system execution path. (TCF only)
-.TP 8
-.B settc \fIcap value \fR(+)
-Tells the shell to believe that the terminal capability \fIcap\fR
-(as defined in \fItermcap\fR(5)) has the value \fIvalue\fR.
+.Pp
+With
+.Ar name ,
+sets the environment variable
+.Ar name
+to
+.Ar value
+or, without
+.Ar value ,
+to the null string.
+.
+.It Ic setpath Ar path No (+)
+Equivalent to
+.Xr setpath 1 .
+(Mach only)
+.
+.It Ic setspath Cm LOCAL Ns | Ns Ar site Ns | Ns Ar cpu No \&... No (+)
+Sets the system execution path.
+(TCF only)
+.
+.It Ic settc Ar cap value No (+)
+Tells the shell to believe that the terminal capability
+.Ar cap
+(as defined in
+.Xr termcap 5 )
+has the value
+.Ar value .
No sanity checking is done.
-Concept terminal users may have to `settc xn no' to get proper
+Concept terminal users may have to
+.Dl settc xn no
+to get proper
wrapping at the rightmost column.
-.TP 8
-.B setty \fR[\fB\-d\fR|\fB\-q\fR|\fB\-x\fR] [\fB\-a\fR] [[\fB+\fR|\fB\-\fR]\fImode\fR] (+)
-Controls which tty modes (see \fBTerminal management\fR)
+.
+.It Ic setty Xo
+.Op Fl d Ns | Ns Fl q Ns | Ns Fl x
+.Op Fl a
+.Op Oo Cm + Ns | Ns Cm \- Oc Ns Ar mode
+(+)
+.Xc
+Controls which tty modes (see
+.Sx Terminal management (+) )
the shell does not allow to change.
-\fB\-d\fR, \fB\-q\fR or \fB\-x\fR tells \fIsetty\fR to act
-on the `edit', `quote' or `execute' set of tty modes respectively; without
-\fB\-d\fR, \fB\-q\fR or \fB\-x\fR, `execute' is used.
-.IP "" 8
-Without other arguments, \fIsetty\fR lists the modes in the chosen set
-which are fixed on (`+mode') or off (`\-mode').
+.Fl d ,
+.Fl q ,
+or
+.Fl x
+tells
+.Ic setty
+to act
+on the
+.Sq edit ,
+.Sq quote ,
+or
+.Sq execute
+set of tty modes respectively; without
+.Fl d ,
+.Fl q ,
+or
+.Fl x ,
+.Sq execute
+is used.
+.Pp
+Without other arguments,
+.Ic setty
+lists the modes in the chosen set
+which are fixed on
+.Pq Sq Cm + Ns Ar mode
+or off
+.Pq Sq Cm - Ns Ar mode .
The available modes, and thus the display, vary from system to system.
-With \fB\-a\fR, lists all tty modes in the chosen set
+With
+.Fl a ,
+lists all tty modes in the chosen set
whether or not they are fixed.
-With \fB+\fImode\fR, \fB\-\fImode\fR or \fImode\fR, fixes \fImode\fR on or off
-or removes control from \fImode\fR in the chosen set.
-For example, `setty +echok echoe' fixes `echok' mode on and allows commands
-to turn `echoe' mode on or off, both when the shell is executing commands.
-.TP 8
-.B setxvers\fR [\fIstring\fR] (+)
-Set the experimental version prefix to \fIstring\fR, or removes it
-if \fIstring\fR is omitted. (TCF only)
-.TP 8
-.B shift \fR[\fIvariable\fR]
-Without arguments, discards \fBargv\fR[1] and shifts the members of
-\fBargv\fR to the left. It is an error for \fBargv\fR not to be set or to have
-less than one word as value. With \fIvariable\fR, performs the
-same function on \fIvariable\fR.
-.TP 8
-.B source \fR[\fB\-h\fR] \fIname\fR [\fIargs\fR ...]
-The shell reads and executes commands from \fIname\fR.
+With
+.Cm + Ns Ar mode ,
+.Cm - Ns Ar mode ,
+or
+.Ar mode ,
+fixes
+.Ar mode
+on or off
+or removes control from
+.Ar mode
+in the chosen set.
+For example,
+.Dl setty +echok echoe
+fixes
+.Ql echok
+mode on and allows commands
+to turn
+.Ql echoe
+mode on or off, both when the shell is executing commands.
+.
+.It Ic setxvers Oo Ar string Oc No (+)
+Set the experimental version prefix to
+.Ar string ,
+or removes it
+if
+.Ar string
+is omitted.
+(TCF only)
+.
+.It Ic shift Op Ar variable
+Without arguments, discards
+.Ic argv Ns [1]
+and shifts the members of
+.Ic argv
+to the left.
+It is an error for
+.Ic argv
+not to be set or to have
+less than one word as value.
+.Pp
+With
+.Ar variable ,
+performs the
+same function on
+.Ar variable .
+.
+.It Ic source Oo Fl h Oc Ar name Op Ar args No \&...
+The shell reads and executes commands from
+.Ar name .
The commands are not placed on the history list.
-If any \fIargs\fR are given, they are placed in \fBargv\fR. (+)
-\fIsource\fR commands may be nested;
+If any
+.Ar args
+are given, they are placed in
+.Ic argv .
+(+)
+.Ic source
+commands may be nested;
if they are nested too deeply the shell may run out of file descriptors.
-An error in a \fIsource\fR at any level terminates all nested
-\fIsource\fR commands.
-With \fB\-h\fR, commands are placed on the history list instead of being
-executed, much like `history \-L'.
-.TP 8
-.B stop \fB%\fIjob\fR|\fIpid\fR ...
+An error in a
+.Ic source
+at any level terminates all nested
+.Ic source
+commands.
+.Pp
+With
+.Fl h ,
+commands are placed on the history list instead of being
+executed, much like
+.Dl history \-L
+.
+.It Ic stop % Ns Ar job Ns | Ns Ar pid No \&...
Stops the specified jobs or processes which are executing in the background.
-\fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described
-under \fBJobs\fR.
-There is no default \fIjob\fR; saying just `stop' does not stop
+.Ar job
+may be a number, a string,
+.Ql \& ,
+.Ql % ,
+.Ql + ,
+or
+.Ql \-
+as described under
+.Sx Jobs .
+.Pp
+There is no default
+.Ar job ;
+entering just
+.Dl stop
+does not stop
the current job.
-.TP 8
-.B suspend
+.
+.It Ic suspend
Causes the shell to stop in its tracks, much as if it had
-been sent a stop signal with \fB^Z\fR. This is most often used to
-stop shells started by \fIsu\fR(1).
-.PP
-.B switch (\fIstring\fB)
-.br
-.B case \fIstr1\fB:
-.PD 0
-.IP "" 4
-\&...
-.br
-.B breaksw
-.PP
-\&...
-.PP
-.B default:
-.IP "" 4
-\&...
-.br
-.B breaksw
-.TP 8
-.B endsw
+been sent a stop signal with
+.Ic ^Z .
+This is most often used to
+stop shells started by
+.Xr su 1 .
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic switch Cm \&( Ns Ar string Ns Cm \&)
+.It Ic case Ar str1 Ns \&:
+.It Ic \ \ \ \ \&...
+.It Ic \ \ \ \ breaksw
+.It Ic \&...
+.It Ic default\&:
+.It Ic \ \ \ \ \&...
+.It Ic \ \ \ \ breaksw
+.It Ic endsw
Each case label is successively matched, against the
-specified \fIstring\fR which is first command and filename expanded.
-The file metacharacters `*', `?' and `[...]' may be used
-in the case labels, which are variable expanded. If none
-of the labels match before a `default' label is found, then
-the execution begins after the default label. Each case
-label and the default label must appear at the beginning of
-a line. The command \fIbreaksw\fR causes execution to continue
-after the \fIendsw\fR. Otherwise control may fall through case
-labels and default labels as in C. If no label matches and
-there is no default, execution continues after the \fIendsw\fR.
-.PD
-.TP 8
-.B telltc \fR(+)
-Lists the values of all terminal capabilities (see \fItermcap\fR(5)).
-.TP 8
-.B termname \fR[\fIterminal type\fR] \fR(+)
-Tests if \fIterminal type\fR (or the current value of \fBTERM\fR if no
-\fIterminal type\fR is given) has an entry in the hosts termcap(5) or
-terminfo(5) database. Prints the terminal type to stdout and returns 0
+specified
+.Ar string
+which is first command and filename expanded.
+The file metacharacters
+.Ql * ,
+.Ql \&? ,
+and
+.Ql [...]
+may be used
+in the case labels, which are variable expanded.
+If none
+of the labels match before a
+.Ic default
+label is found, then
+the execution begins after the
+.Ic default
+label.
+Each case
+label and the
+.Ic default
+label must appear at the beginning of
+a line.
+The command
+.Ic breaksw
+causes execution to continue
+after the
+.Ic endsw .
+Otherwise control may fall through case
+labels and default labels as in C.
+If no label matches and
+there is no default, execution continues after the
+.Ic endsw .
+.
+.El
+.Bl -tag -width 6n
+.
+.It Ic telltc No (+)
+Lists the values of all terminal capabilities (see
+.Xr termcap 5 ) .
+.
+.It Ic termname Oo Ar termtype Oc No (+)
+Tests if
+.Ar termtype
+(or the current value of
+.Ev TERM
+if no
+.Ar termtype
+is given) has an entry in the hosts
+.Xr termcap 5
+or
+.Xr terminfo 5
+database.
+Prints the terminal type to stdout and returns 0
if an entry is present otherwise returns 1.
-.TP 8
-.B time \fR[\fIcommand\fR]
-Executes \fIcommand\fR (which must be a simple command, not an alias,
+.
+.It Ic time Op Ar command
+Executes
+.Ar command
+(which must be a simple command, not an alias,
a pipeline, a command list or a parenthesized command list)
-and prints a time summary as described under the \fBtime\fR variable.
+and prints a time summary as described under the
+.Ic time
+variable.
If necessary, an extra shell is created to print the time statistic when
the command completes.
-Without \fIcommand\fR, prints a time summary for the current shell and its
+.Pp
+Without
+.Ar command ,
+prints a time summary for the current shell and its
children.
-.TP 8
-.B umask \fR[\fIvalue\fR]
-Sets the file creation mask to \fIvalue\fR, which is given in octal.
+.
+.It Ic umask Op Ar value
+Sets the file creation mask to
+.Ar value ,
+which is given in octal.
Common values for the mask are
002, giving all access to the group and read and execute access to others, and
022, giving read and execute access to the group and others.
-Without \fIvalue\fR, prints the current file creation mask.
-.TP 8
-.B unalias \fIpattern\fR
-.br
-Removes all aliases whose names match \fIpattern\fR.
-`unalias *' thus removes all aliases.
-It is not an error for nothing to be \fIunalias\fRed.
-.TP 8
-.B uncomplete \fIpattern\fR (+)
-Removes all completions whose names match \fIpattern\fR.
-`uncomplete *' thus removes all completions.
-It is not an error for nothing to be \fIuncomplete\fRd.
-.TP 8
-.B unhash
+.Pp
+Without
+.Ar value ,
+prints the current file creation mask.
+.
+.It Ic unalias Ar pattern
+Removes all aliases whose names match
+.Ar pattern .
+Thus
+.Dl unalias *
+removes all aliases.
+It is not an error for nothing to be
+.Ic unalias Ns
+ed.
+.
+.It Ic uncomplete Ar pattern No (+)
+Removes all completions whose names match
+.Ar pattern .
+Thus
+.Dl uncomplete *
+removes all completions.
+It is not an error for nothing to be
+.Ic uncomplete Ns
+d.
+.
+.It Ic unhash
Disables use of the internal hash table to speed location of
executed programs.
-.TP 8
-.B universe \fIuniverse\fR (+)
-Sets the universe to \fIuniverse\fR. (Masscomp/RTU only)
-.TP 8
-.B unlimit \fR[\fB\-hf\fR] [\fIresource\fR]
-Removes the limitation on \fIresource\fR or, if no \fIresource\fR is
-specified, all \fIresource\fR limitations.
-With \fB\-h\fR, the corresponding hard limits are removed.
+.
+.It Ic universe Ar universe No (+)
+Sets the universe to
+.Ar universe .
+(Masscomp/RTU only)
+.
+.It Ic unlimit Oo Fl hf Oc Op Ar resource
+Removes the limitation on
+.Ar resource
+or, if no
+.Ar resource
+is
+specified, all
+.Ar resource
+limitations.
+.Pp
+With
+.Fl h ,
+the corresponding hard limits are removed.
Only the super-user may do this.
-Note that \fBunlimit\fR may not exit successful, since most systems
-do not allow \fIdescriptors\fR to be unlimited.
-With \fB\-f\fR errors are ignored.
-.TP 8
-.B unset \fIpattern
-Removes all variables whose names match \fIpattern\fR, unless they are read-only.
-`unset *' thus removes all variables unless they are read-only;
+.Pp
+Note that
+.Ic unlimit
+may not exit successful, since most systems
+do not allow
+.Ic descriptors
+to be unlimited.
+.Pp
+With
+.Fl f
+errors are ignored.
+.
+.It Ic unset Ar pattern
+Removes all variables whose names match
+.Ar pattern ,
+unless they are read-only.
+Thus
+.Dl unset *
+removes all variables unless they are read-only;
this is a bad idea.
-It is not an error for nothing to be \fIunset\fR.
-.TP 8
-.B unsetenv \fIpattern
-Removes all environment variables whose names match \fIpattern\fR.
-`unsetenv *' thus removes all environment variables;
+.Pp
+It is not an error for nothing to be
+.Ic unset .
+.
+.It Ic unsetenv Ar pattern
+Removes all environment variables whose names match
+.Ar pattern .
+Thus
+.Dl unsetenv *
+removes all environment variables;
this is a bad idea.
-It is not an error for nothing to be \fIunsetenv\fRed.
-.TP 8
-.B ver \fR[\fIsystype\fR [\fIcommand\fR]] (+)
-Without arguments, prints \fBSYSTYPE\fR. With \fIsystype\fR, sets \fBSYSTYPE\fR
-to \fIsystype\fR. With \fIsystype\fR and \fIcommand\fR, executes \fIcommand\fR
-under \fIsystype\fR. \fIsystype\fR may be `bsd4.3' or `sys5.3'.
+.Pp
+It is not an error for nothing to be
+.Ic unsetenv Ns
+ed.
+.
+.It Ic ver Oo Ar systype Oo Ar command Oc Oc No (+)
+Without arguments, prints
+.Ev SYSTYPE .
+.Pp
+With
+.Ar systype ,
+sets
+.Ev SYSTYPE
+to
+.Ar systype .
+.Pp
+With
+.Ar systype
+and
+.Ar command ,
+executes
+.Ar command
+under
+.Ar systype .
+.Ar systype
+may be
+.Ql bsd4.3
+or
+.Ql sys5.3 .
+.Pp
(Domain/OS only)
-.TP 8
-.B wait
-The shell waits for all background jobs. If the shell is interactive, an
+.
+.It Ic wait
+The shell waits for all background jobs.
+If the shell is interactive, an
interrupt will disrupt the wait and cause the shell to print the names and job
numbers of all outstanding jobs.
-.TP 8
-.B warp \fIuniverse\fR (+)
-Sets the universe to \fIuniverse\fR. (Convex/OS only)
-.TP 8
-.B watchlog \fR(+)
-An alternate name for the \fIlog\fR builtin command (q.v.).
+.
+.It Ic warp Ar universe No (+)
+Sets the universe to
+.Ar universe .
+(Convex/OS only)
+.
+.It Ic watchlog No (+)
+An alternate name for the
+.Ic log
+builtin command.
Available only if the shell was so compiled;
-see the \fBversion\fR shell variable.
-.TP 8
-.B where \fIcommand\fR (+)
-Reports all known instances of \fIcommand\fR, including aliases, builtins and
-executables in \fBpath\fR.
-.TP 8
-.B which\fR \fIcommand\fR (+)
+see the
+.Ic version
+shell variable.
+.
+.It Ic where Ar command No (+)
+Reports all known instances of
+.Ar command ,
+including aliases, builtins and
+executables in
+.Ic path .
+.
+.It Ic which Ar command No (+)
Displays the command that will be executed by the shell after substitutions,
-\fBpath\fR searching, etc.
-The builtin command is just like \fIwhich\fR(1), but it correctly reports
-\fItcsh\fR aliases and builtins and is 10 to 100 times faster.
-See also the \fIwhich-command\fR editor command.
-.PP
-.B while (\fIexpr\fB)\fR
-.br
-\&...
-.PD 0
-.TP 8
-.B end
-Executes the commands between the \fIwhile\fR and the matching \fIend\fR
-while \fIexpr\fR (an expression, as described under \fBExpressions\fR)
+.Ic path
+searching, etc.
+The builtin command is just like
+.Xr which 1 ,
+but it correctly reports
+.Nm
+aliases and builtins and is 10 to 100 times faster.
+See also the
+.Ic which-command
+editor command.
+.
+.El
+.Pp
+.Bl -tag -width 6n -compact
+.
+.It Ic while Cm \&( Ns Ar expr Ns Cm \&)
+.It Ic \&...
+.It Ic end
+Executes the commands between the
+.Ic while
+and the matching
+.Ic end
+while
+.Ar expr
+(an expression, as described under
+.Sx Expressions )
evaluates non-zero.
-\fIwhile\fR and \fIend\fR must appear alone on their input lines.
-\fIbreak\fR and \fIcontinue\fR may be used to terminate or continue the
+.Ic while
+and
+.Ic end
+must appear alone on their input lines.
+.Ic break
+and
+.Ic continue
+may be used to terminate or continue the
loop prematurely.
If the input is a terminal, the user is prompted the first time
-through the loop as with \fIforeach\fR.
-.PD
-.SS "Special aliases (+)"
+through the loop as with
+.Ic foreach .
+.El
+.
+.Ss Special aliases (+)
If set, each of these aliases executes automatically at the indicated time.
They are all initially undefined.
-.TP 8
-.B beepcmd
+.Pp
+Supported special aliases are:
+.
+.Bl -tag -width 6n
+.
+.It Ic beepcmd
Runs when the shell wants to ring the terminal bell.
-.TP 8
-.B cwdcmd
-Runs after every change of working directory. For example, if the user is
-working on an X window system using \fIxterm\fR(1) and a re-parenting window
-manager that supports title bars such as \fItwm\fR(1) and does
-.RS +8
-.IP "" 4
+.
+.It Ic cwdcmd
+Runs after every change of working directory.
+For example, if the user is
+working on an X window system using
+.Xr xterm 1
+and a re-parenting window
+manager that supports title bars such as
+.Xr twm 1
+and does
+.Bd -literal -offset indent
> alias cwdcmd 'echo \-n "^[]2;${HOST}:$cwd ^G"'
-.PP
-then the shell will change the title of the running \fIxterm\fR(1)
+.Ed
+.Pp
+then the shell will change the title of the running
+.Xr xterm 1
to be the name of the host, a colon, and the full current working directory.
A fancier way to do that is
-.IP "" 4
+.Bd -literal -offset indent
> alias cwdcmd 'echo \-n "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'
-.PP
+.Ed
+.Pp
This will put the hostname and working directory on the title bar but
only the hostname in the icon manager menu.
-.PP
-Note that putting a \fIcd\fR, \fIpushd\fR or \fIpopd\fR in \fIcwdcmd\fR
-may cause an infinite loop. It is the author's opinion that anyone doing
+.Pp
+Note that putting a
+.Ic cd ,
+.Ic pushd ,
+or
+.Ic popd
+in
+.Ic cwdcmd
+may cause an infinite loop.
+It is the author's opinion that anyone doing
so will get what they deserve.
-.RE
-.TP 8
-.B jobcmd
+.
+.It Ic jobcmd
Runs before each command gets executed, or when the command changes state.
-This is similar to \fIpostcmd\fR, but it does not print builtins.
-.RS +8
-.IP "" 4
+This is similar to
+.Ic postcmd ,
+but it does not print builtins.
+.Bd -literal -offset indent
> alias jobcmd 'echo \-n "^[]2\e;\e!#:q^G"'
-.PP
-then executing \fIvi foo.c\fR will put the command string in the xterm title bar.
-.RE
-.TP 8
-.B helpcommand
-Invoked by the \fBrun-help\fR editor command. The command name for which help
+.Ed
+.Pp
+then executing
+.Dl vi foo.c
+will put the command string in the xterm title bar.
+.
+.It Ic helpcommand
+Invoked by the
+.Ic run-help
+editor command.
+The command name for which help
is sought is passed as sole argument.
For example, if one does
-.RS +8
-.IP "" 4
+.Bd -literal -offset indent
> alias helpcommand '\e!:1 --help'
-.PP
+.Ed
+.Pp
then the help display of the command itself will be invoked, using the GNU
help calling convention.
+.Pp
Currently there is no easy way to account for various calling conventions (e.g.,
-the customary Unix `-h'), except by using a table of many commands.
-.RE
-.TP 8
-.B periodic
-Runs every \fBtperiod\fR minutes. This provides a convenient means for
-checking on common but infrequent changes such as new mail. For example,
+the customary Unix
+.Ql -h ) ,
+except by using a table of many commands.
+.
+.It Ic periodic
+Runs every
+.Ic tperiod
+minutes.
+This provides a convenient means for
+checking on common but infrequent changes such as new mail.
+For example,
if one does
-.RS +8
-.IP "" 4
+.Bd -literal -offset indent
> set tperiod = 30
-.br
> alias periodic checknews
-.PP
-then the \fIchecknews\fR(1) program runs every 30 minutes.
-If \fIperiodic\fR is set but \fBtperiod\fR is unset or set to 0,
-\fIperiodic\fR behaves like \fIprecmd\fR.
-.RE
-.TP 8
-.B precmd
-Runs just before each prompt is printed. For example, if one does
-.RS +8
-.IP "" 4
+.Ed
+.Pp
+then the
+.Xr checknews 1
+program runs every 30 minutes.
+.Pp
+If
+.Ic periodic
+is set but
+.Ic tperiod
+is unset or set to 0,
+.Ic periodic
+behaves like
+.Ic precmd .
+.
+.It Ic precmd
+Runs just before each prompt is printed.
+For example, if one does
+.Bd -literal -offset indent
> alias precmd date
-.PP
-then \fIdate\fR(1) runs just before the shell prompts for each command.
-There are no limits on what \fIprecmd\fR can be set to do, but discretion
+.Ed
+.Pp
+then
+.Xr date 1
+runs just before the shell prompts for each command.
+.Pp
+There are no limits on what
+.Ic precmd
+can be set to do, but discretion
should be used.
-.RE
-.TP 8
-.B postcmd
+.
+.It Ic postcmd
Runs before each command gets executed.
-.RS +8
-.IP "" 4
+.Bd -literal -offset indent
> alias postcmd 'echo \-n "^[]2\e;\e!#:q^G"'
-.PP
-then executing \fIvi foo.c\fR will put the command string in the xterm title bar.
-.RE
-.TP 8
-.B shell
+.Ed
+.Pp
+then executing
+.Dl vi foo.c
+will put the command string in the xterm title bar.
+.
+.It Ic shell
Specifies the interpreter for executable scripts which do not themselves
-specify an interpreter. The first word should be a full path name to the
-desired interpreter (e.g., `/bin/csh' or `/usr/local/bin/tcsh').
-.SS "Special shell variables"
+specify an interpreter.
+The first word should be a full path name to the
+desired interpreter (e.g.,
+.Ql /bin/csh
+or
+.Ql /usr/local/bin/tcsh ) .
+.
+.El
+.
+.Ss Special shell variables
The variables described in this section have special meaning to the shell.
-.PP
-The shell sets \fBaddsuffix\fR, \fBargv\fR, \fBautologout\fR, \fBcsubstnonl\fR, \fBcommand\fR, \fBecho_style\fR,
-\fBedit\fR, \fBgid\fR, \fBgroup\fR, \fBhome\fR, \fBloginsh\fR, \fBoid\fR, \fBpath\fR,
-\fBprompt\fR, \fBprompt2\fR, \fBprompt3\fR, \fBshell\fR, \fBshlvl\fR,
-\fBtcsh\fR, \fBterm\fR, \fBtty\fR, \fBuid\fR, \fBuser\fR and \fBversion\fR at
-startup; they do not change thereafter unless changed by the user. The shell
-updates \fBcwd\fR, \fBdirstack\fR, \fBowd\fR and \fBstatus\fR when necessary,
-and sets \fBlogout\fR on logout.
-.PP
-The shell synchronizes \fBgroup\fR, \fBhome\fR, \fBpath\fR, \fBshlvl\fR,
-\fBterm\fR and \fBuser\fR with the environment variables of the same names:
+.Pp
+The shell sets
+.Ic addsuffix ,
+.Ic argv ,
+.Ic autologout ,
+.Ic csubstnonl ,
+.Ic command ,
+.Ic echo_style ,
+.Ic edit ,
+.Ic gid ,
+.Ic group ,
+.Ic home ,
+.Ic loginsh ,
+.Ic oid ,
+.Ic path ,
+.Ic prompt ,
+.Ic prompt2 ,
+.Ic prompt3 ,
+.Ic shell ,
+.Ic shlvl ,
+.Ic tcsh ,
+.Ic term ,
+.Ic tty ,
+.Ic uid ,
+.Ic user ,
+and
+.Ic version
+at
+startup; they do not change thereafter unless changed by the user.
+The shell updates
+.Ic cwd ,
+.Ic dirstack ,
+.Ic owd ,
+and
+.Ic status
+when necessary,
+and sets
+.Ic logout
+on logout.
+.Pp
+The shell synchronizes
+.Ic group ,
+.Ic home ,
+.Ic path ,
+.Ic shlvl ,
+.Ic term ,
+and
+.Ic user
+with the environment variables of the same names:
whenever the environment variable changes the shell changes the corresponding
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
+versa.
+Note that although
+.Ic cwd
+and
+.Ev PWD
+have identical meanings, they
are not synchronized in this manner, and that the shell automatically
-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
+converts between the different formats of
+.Ic path
+and
+.Ev PATH .
+.
+.Pp
+Supported special shell variables are:
+.
+.Bl -tag -width 6n
+.
+.It Ic addsuffix No (+)
+If set, filename completion adds
+.Ql /
+to the end of directories and a space
to the end of normal files when they are matched exactly.
Set by default.
-.TP 8
-.B afsuser \fR(+)
-If set, \fBautologout\fR's autolock feature uses its value instead of
+.
+.It Ic afsuser No (+)
+If set,
+.Ic autologout Ns
+\&'s autolock feature uses its value instead of
the local username for kerberos authentication.
-.TP 8
-.B ampm \fR(+)
+.
+.It Ic ampm No (+)
If set, all times are shown in 12-hour AM/PM format.
-.TP 8
-.B anyerror \fR(+)
+.
+.It Ic anyerror No (+)
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.
+.Ic status
+variable.
+For more information see the description of the
+.Ic status
+variable below.
+.
+.It Ic argv
+The arguments to the shell.
+Positional parameters are taken from
+.Ic argv ,
+i.e.,
+.Ql $1
+is replaced by
+.Ql $argv[1] ,
+etc.
Set by default, but usually empty in interactive shells.
-.TP 8
-.B autocorrect \fR(+)
-If set, the \fIspell-word\fR editor command is invoked automatically before
+.
+.It Ic autocorrect No (+)
+If set, the
+.Ic spell-word
+editor command is invoked automatically before
each completion attempt.
-.TP 8
-.B autoexpand \fR(+)
-If set, the \fIexpand-history\fR editor command is invoked automatically
-before each completion attempt. If this is set to \fIonlyhistory\fR, then
+.
+.It Ic autoexpand No (+)
+If set, the
+.Ic expand-history
+editor command is invoked automatically before each completion attempt.
+.Pp
+If this is set to
+.Ql onlyhistory ,
+then
only history will be expanded and a second completion will expand filenames.
-.TP 8
-.B autolist \fR(+)
+.
+.It Ic autolist No (+)
If set, possibilities are listed after an ambiguous completion.
-If set to `ambiguous', possibilities are listed only when no new
+.Pp
+If set to
+.Ql ambiguous ,
+possibilities are listed only when no new
characters are added by completion.
-.TP 8
-.B autologout \fR(+)
+.
+.It Ic autologout No (+)
The first word is the number of minutes of inactivity before automatic
-logout. The optional second word is the number of minutes of inactivity
+logout.
+The optional second word is the number of minutes of inactivity
before automatic locking.
-When the shell automatically logs out, it prints `auto-logout', sets the
-variable \fBlogout\fR to `automatic' and exits.
-When the shell automatically locks, the user is required to enter his password
-to continue working. Five incorrect attempts result in automatic logout.
-Set to `60' (automatic logout after 60 minutes, and no locking) by default
+When the shell automatically logs out, it prints
+.Dl auto-logout
+sets the
+variable
+.Ic logout
+to
+.Ql automatic
+and exits.
+When the shell automatically locks, the user is required to enter their password
+to continue working.
+Five incorrect attempts result in automatic logout.
+.Pp
+Set to
+.Ql 60
+(automatic logout after 60 minutes, and no locking) by default
in login and superuser shells, but not if the shell thinks it is running
-under a window system (i.e., the \fBDISPLAY\fR environment variable is set),
+under a window system (i.e., the
+.Ev DISPLAY
+environment variable is set),
the tty is a pseudo-tty (pty) or the shell was not so compiled (see the
-\fBversion\fR shell variable).
-Unset or set to `0' to disable automatic logout.
-See also the \fBafsuser\fR and \fBlogout\fR shell variables.
-.TP 8
-.B autorehash \fR(+)
+.Ic version
+shell variable).
+.Pp
+Unset
+.Ic autologout
+or set it to
+.Ql 0
+to disable automatic logout.
+See also the
+.Ic afsuser
+and
+.Ic logout
+shell variables.
+.
+.It Ic autorehash No (+)
If set, the internal hash table of the contents of the directories in the
-\fBpath\fR variable will be recomputed if a command is not found in the hash
-table. In addition, the list of available commands will be rebuilt for each
-command completion or spelling correction attempt if set to `complete' or
-`correct' respectively; if set to `always', this will be done for both
+.Ic path
+variable will be recomputed if a command is not found in the hash
+table.
+In addition, the list of available commands will be rebuilt for each
+command completion or spelling correction attempt if set to
+.Ql complete
+or
+.Ql correct
+respectively; if set to
+.Ql always ,
+this will be done for both
cases.
-.TP 8
-.B backslash_quote \fR(+)
-.\" 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)
+.
+.It Ic backslash_quote No (+)
+If set, backslashes (`\e') always quote
+.Ql \e ,
+.Ql \&' ,
+and
+.Ql \&" .
+This may make
+complex quoting tasks easier, but it can cause syntax errors in
+.Xr csh 1
scripts.
-.TP 8
-.B catalog
+.
+.It Ic catalog
The file name of the message catalog.
-If set, tcsh use `tcsh.${catalog}' as a message catalog instead of
-default `tcsh'.
-.TP 8
-.B cdpath
-A list of directories in which \fIcd\fR should search for
+If set,
+.Nm
+uses
+.Pa tcsh.${catalog}
+as a message catalog instead of
+default
+.Pa tcsh .
+.
+.It Ic cdpath
+A list of directories in which
+.Ic cd
+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.
+.
+.It Ic cdtohome No (+)
+If not set,
+.Ic cd
+requires a directory
+.Ar name ,
+and will not go to the
+.Ic home
+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
-\fBls\-F\fR or only \fBls\fR to enable color to only one command. Setting
-it to nothing is equivalent to setting it to \fB(ls\-F ls)\fR.
-.TP 8
-.B colorcat
-If set, it enables color escape sequence for NLS message files.
-And display colorful NLS messages.
-.TP 8
-.B command \fR(+)
-If set, the command which was passed to the shell with the \fB-c\fR flag (q.v.).
-.TP 8
-.B compat_expr \fR(+)
+.
+.It Ic color
+If set, it enables color display for the builtin
+.Ic ls\-F
+and it passes
+.Fl \-color=auto
+to
+.Xr ls 1 .
+Alternatively, it can be set to only
+.Ql ls\-F
+or only
+.Ql ls
+to enable color to only one command.
+Setting
+it to nothing is equivalent to setting it to
+.Ql (ls\-F ls) .
+.
+.It Ic colorcat
+If set, it enables color escape sequence for NLS message files,
+and display colorful NLS messages.
+.
+.It Ic command No (+)
+If set, the command which was passed to the shell with the
+.Fl c
+flag.
+.
+.It Ic compat_expr No (+)
If set, the shell will evaluate expressions right to left, like the original
-\fIcsh\fR.
-.TP 8
-.B complete \fR(+)
-If set to `igncase', the completion becomes case insensitive.
-If set to `enhance', completion ignores case and considers
+.Xr csh 1 .
+.
+.It Ic complete No (+)
+If set to
+.Ql igncase ,
+the completion becomes case insensitive.
+.Pp
+If set to
+.Ql enhance ,
+completion ignores case and considers
hyphens and underscores to be equivalent; it will also treat
-periods, hyphens and underscores (`.', `\-' and `_') as word
+periods, hyphens and underscores
+.Po
+.Ql \&. ,
+.Ql \- ,
+and
+.Ql _
+.Pc
+as word
separators.
-If set to `Enhance', completion matches uppercase and underscore
+.Pp
+If set to
+.Ql Enhance ,
+completion matches uppercase and underscore
characters explicitly and matches lowercase and hyphens in a
case-insensitive manner; it will treat periods, hyphens and underscores
as word separators.
-.TP 8
-.B continue \fR(+)
+.
+.It Ic continue No (+)
If set to a list of commands, the shell will continue the listed
commands, instead of starting a new one.
-.TP 8
-.B continue_args \fR(+)
+.
+.It Ic continue_args No (+)
Same as continue, but the shell will execute:
-.RS +8
-.IP "" 4
+.Bd -literal -offset indent
echo \`pwd\` $argv > ~/.<cmd>_pause; %<cmd>
-.RE
-.TP 8
-.B correct \fR(+)
-If set to `cmd', commands are automatically spelling-corrected.
-If set to `complete', commands are automatically completed.
-If set to `all', the entire command line is corrected.
-.TP 8
-.B csubstnonl \fR(+)
+.Ed
+.
+.It Ic correct No (+)
+If set to
+.Ql cmd ,
+commands are automatically spelling-corrected.
+.Pp
+If set to
+.Ql complete ,
+commands are automatically completed.
+.Pp
+If set to
+.Ql all ,
+the entire command line is corrected.
+.
+.It Ic csubstnonl No (+)
If set, newlines and carriage returns in command substitution are
-replaced by spaces. Set by default.
-.TP 8
-.B cwd
+replaced by spaces.
+Set by default.
+.
+.It Ic cwd
The full pathname of the current directory.
-See also the \fBdirstack\fR and \fBowd\fR shell variables.
-.TP 8
-.B dextract \fR(+)
-If set, `pushd +\fIn\fR' extracts the \fIn\fRth directory from the directory
+See also the
+.Ic dirstack
+and
+.Ic owd
+shell variables.
+.
+.It Ic dextract No (+)
+If set,
+.Dl pushd + Ns Ar n
+extracts the
+.Ar n Ns
+th directory from the directory
stack rather than rotating it to the top.
-.TP 8
-.B dirsfile \fR(+)
-The default location in which `dirs \-S' and `dirs \-L' look for
-a history file. If unset, \fI~/.cshdirs\fR is used.
-Because only \fI~/.tcshrc\fR is normally sourced before \fI~/.cshdirs\fR,
-\fBdirsfile\fR should be set in \fI~/.tcshrc\fR rather than \fI~/.login\fR.
-.TP 8
-.B dirstack \fR(+)
+.
+.It Ic dirsfile No (+)
+The default location in which
+.Dl dirs \-S
+and
+.Dl dirs \-L
+look for
+a history file.
+If unset,
+.Pa ~/.cshdirs
+is used.
+Because only
+.Pa ~/.tcshrc
+is normally sourced before
+.Pa ~/.cshdirs ,
+.Ic dirsfile
+should be set in
+.Pa ~/.tcshrc
+rather than
+.Pa ~/.login .
+.
+.It Ic dirstack No (+)
An array of all the directories on the directory stack.
-`$dirstack[1]' is the current working directory, `$dirstack[2]'
+.Sq $dirstack[1]
+is the current working directory,
+.Sq $dirstack[2]
the first directory on the stack, etc.
-Note that the current working directory is `$dirstack[1]' but `=0' in
+Note that the current working directory is
+.Sq $dirstack[1]
+but
+.Ql =0
+in
directory stack substitutions, etc.
-One can change the stack arbitrarily by setting \fBdirstack\fR,
+One can change the stack arbitrarily by setting
+.Ic dirstack ,
but the first element (the current working directory) is always correct.
-See also the \fBcwd\fR and \fBowd\fR shell variables.
-.TP 8
-.B dspmbyte \fR(+)
-Has an effect iff 'dspm' is listed as part of the \fBversion\fR shell variable.
-If set to `euc', it enables display and editing EUC-kanji(Japanese) code.
-If set to `sjis', it enables display and editing Shift-JIS(Japanese) code.
-If set to `big5', it enables display and editing Big5(Chinese) code.
-If set to `utf8', it enables display and editing Utf8(Unicode) code.
-If set to the following format, it enables display and editing of original
-multi-byte code format:
-.RS +8
-.IP "" 4
-> set dspmbyte = 0000....(256 bytes)....0000
-.PP
-The table requires \fBjust\fR 256 bytes. Each character of 256 characters
-corresponds (from left to right) to the ASCII codes 0x00, 0x01, ... 0xff. Each
-character
-.\" (position in this table?)
-is set to number 0,1,2 and 3. Each number has the following meaning:
-.br
- 0 ... not used for multi-byte characters.
-.br
- 1 ... used for the first byte of a multi-byte character.
-.br
- 2 ... used for the second byte of a multi-byte character.
-.br
- 3 ... used for both the first byte and second byte of a multi-byte character.
-.\" SHK: I tried my best to get the following to be grammatically correct.
-.\" However, I still don't understand what's going on here. In the
-.\" following example, there are three bytes, but the text seems to refer to
-.\" each nybble as a character. What's going on here? It this 3-byte code
-.\" in the table? The text above seems to imply that there are 256
-.\" characters/bytes in the table. If I get some more info on this (perhaps
-.\" a complete example), I could fix the text to be grammatically correct.
-.\" (steve.kelem@xilinx.com 1999/09/13)
-.PP
- Example:
-.br
-If set to `001322', the first character (means 0x00 of the ASCII code) and
-second character (means 0x01 of ASCII code) are set to `0'. Then, it is not
-used for multi-byte characters. The 3rd character (0x02) is set to '1',
-indicating that it is used for the first byte of a multi-byte character.
-The 4th character(0x03) is set '3'. It is used for both the first byte and
-the second byte of a multi-byte character. The 5th and 6th characters
-(0x04,0x05) are set to '2', indicating that they are used for the second
-byte of a multi-byte character.
-.PP
+See also the
+.Ic cwd
+and
+.Ic owd
+shell variables.
+.
+.It Ic dspmbyte No (+)
+Has an effect only if
+.Ql dspm
+is listed as part of the
+.Ic version
+shell variable.
+.Pp
+If set to
+.Ql euc ,
+it enables display and editing EUC-kanji(Japanese) code.
+.Pp
+If set to
+.Ql sjis ,
+it enables display and editing Shift-JIS(Japanese) code.
+.Pp
+If set to
+.Ql big5 ,
+it enables display and editing Big5(Chinese) code.
+.Pp
+If set to
+.Ql utf8 ,
+it enables display and editing Utf8(Unicode) code.
+.Pp
+If set to
+.Em exactly
+256 characters in the following format,
+it enables display and editing of original multi-byte code format:
+.Pp
+.Dl > set dspmbyte = Ar NNN Ns No \&... Ns Em \&[250 characters\&] Ns No \&... Ns Ar NNN
+.Pp
+Each character
+.Ar N
+in the 256 character value
+corresponds (from left to right) to the ASCII codes
+0x00, 0x01, 0x02, ..., 0xfd, 0xfe, 0xff
+at the same index.
+Each character is set to number 0, 1, 2 or 3, with the meaning:
+.Pp
+.Bl -tag -width ".Sy Number" -offset indent -compact
+.It Sy Number
+.Sy Multi-byte purpose
+.Pp
+.It Li 0
+Not used for multi-byte characters.
+.It Li 1
+Used for the first byte of a multi-byte character.
+.It Li 2
+Used for the second byte of a multi-byte character.
+.It Li 3
+Used for both the first byte and second byte of a multi-byte character.
+.El
+.Pp
+For example, if set to 256 characters starting with
+.Ql 001322 ,
+the value is interpreted as:
+.
+.Bl -column -offset indent ".Sy Character" ".Sy ASCII" ""
+.It Sy Character Ta Sy ASCII Ta Sy Multi-byte character use
+.Pp
+.It Li 0 Ta 0x00 Ta Not used.
+.It Li 0 Ta 0x01 Ta Not used.
+.It Li 1 Ta 0x02 Ta First byte.
+.It Li 3 Ta 0x03 Ta First byte and second byte.
+.It Li 2 Ta 0x04 Ta Second byte.
+.It Li 2 Ta 0x05 Ta Second byte.
+.El
+.Pp
The GNU fileutils version of ls cannot display multi-byte
-filenames without the -N ( --literal ) option. If you are using
-this version, set the second word of dspmbyte to "ls". If not, for
-example, "ls-F -l" cannot display multi-byte filenames.
-.PP
- Note:
-.br
-This variable can only be used if KANJI and DSPMBYTE has been defined at
+filenames without the
+.Fl N
+.Pq Fl -literal
+option.
+If you are using
+this version, set the second word of dspmbyte to
+.Ql ls .
+If not, for
+example,
+.Dl ls-F -l
+cannot display multi-byte filenames.
+.Pp
+Note that
+this variable can only be used if KANJI and DSPMBYTE has been defined at
compile time.
-.RE
-.TP 8
-.B dunique \fR(+)
-If set, \fIpushd\fR removes any instances of \fIname\fR
+.
+.It Ic dunique No (+)
+If set,
+.Ic pushd
+removes any instances of
+.Ar name
from the stack before pushing it onto the stack.
-.TP 8
-.B echo
+.
+.It Ic echo
If set, each command with its arguments is echoed just before it is
-executed. For non-builtin commands all expansions occur before
-echoing. Builtin commands are echoed before command and filename
+executed.
+For non-builtin commands all expansions occur before
+echoing.
+Builtin commands are echoed before command and filename
substitution, because these substitutions are then done selectively.
-Set by the \fB\-x\fR command line option.
-.TP 8
-.B echo_style \fR(+)
-The style of the \fIecho\fR builtin. May be set to
-.PP
-.RS +8
-.PD 0
-.TP 8
-bsd
-Don't echo a newline if the first argument is `\-n'; the default for \fIcsh\fR.
-.TP 8
-sysv
+Set by the
+.Fl x
+command line option.
+.
+.It Ic echo_style No (+)
+The style of the
+.Ic echo
+builtin.
+May be set to:
+.
+.Bl -tag -width ".Sy Value" -offset indent
+.It Sy Value
+.Ic echo
+.Sy style
+.It Li bsd
+Don't echo a newline if the first argument is
+.Fl n ;
+the default for
+.Xr csh 1 .
+.
+.It Li sysv
Recognize backslashed escape sequences in echo strings.
-.TP 8
-both
-Recognize both the `\-n' flag and backslashed escape sequences; the default
-for \fItcsh\fR.
-.TP 8
-none
+.
+.It Li both
+Recognize both the
+.Fl n
+flag and backslashed escape sequences; the default
+for
+.Nm .
+.
+.It Li none
Recognize neither.
-.PD
-.PP
-Set by default to the local system default. The BSD and System V
-options are described in the \fIecho\fR(1) man pages on the appropriate
+.El
+.Pp
+Set by default to the local system default.
+The BSD and System V
+options are described in the
+.Xr echo 1
+man pages on the appropriate
systems.
-.RE
-.TP 8
-.B edit \fR(+)
-If set, the command-line editor is used. Set by default in interactive
+.
+.It Ic edit No (+)
+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)
+.
+.It Ic editors No (+)
+A list of command names for the
+.Ic run-fg-editor
+editor command to match.
+If not set, the
+.Ev EDITOR
+.Ql ( ed
+if unset) and
+.Ev VISUAL
+.Ql ( 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 (`...')
-instead of `/<skipped>'.
-.TP 8
-.B euid \fR(+)
+.
+.It Ic ellipsis No (+)
+If set, the
+.Ql %c ,
+.Ql %. ,
+and
+.Ql \&%C
+prompt sequences (see the
+.Ic prompt
+shell variable) indicate skipped directories with an ellipsis
+.Pq Ql \&...
+instead of
+.Ql /< Ns Ar skipped Ns Li > .
+.
+.It Ic euid No (+)
The user's effective user ID.
-.TP 8
-.B euser \fR(+)
+.
+.It Ic euser No (+)
The first matching passwd entry name corresponding to the effective user ID.
-.TP 8
-.B fignore \fR(+)
+.
+.It Ic fignore No (+)
Lists file name suffixes to be ignored by completion.
-.TP 8
-.B filec
-In \fItcsh\fR, completion is always used and this variable is ignored
-by default. If
-.B edit
-is unset, then the traditional \fIcsh\fR completion is used.
-If set in \fIcsh\fR, filename completion is used.
-.TP 8
-.B gid \fR(+)
+.
+.It Ic filec
+In
+.Nm ,
+completion is always used and this variable is ignored by default.
+.Pp
+If
+.Ic edit
+is unset, then the traditional
+.Xr csh 1
+completion is used.
+.Pp
+If set in
+.Xr csh 1 ,
+filename completion is used.
+.
+.It Ic gid No (+)
The user's real group ID.
-.TP 8
-.B globdot \fR(+)
+.
+.It Ic globdot No (+)
If set, wild-card glob patterns will match files and directories beginning
-with `.' except for `.' and `..'
-.TP 8
-.B globstar \fR(+)
-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 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').
-To prevent problems with recursion, the `**' glob-pattern will not
-descend into a symbolic link containing a directory. To override this,
-use `***'
-.TP 8
-.B group \fR(+)
+with
+.Ql \&.
+except for
+.Sq Pa \&.
+and
+.Sq Pa \&.. .
+.
+.It Ic globstar No (+)
+If set, the
+.Ql **
+and
+.Ql ***
+file glob patterns will match any string of
+characters including
+.Ql /
+traversing any existing sub-directories.
+For example,
+.Dl ls **.c
+will list all the .c files in the current directory tree.
+.Pp
+If used by itself, it will match zero or more sub-directories.
+For example,
+.Dl ls /usr/include/**/time.h
+will list any file named
+.Ql time.h
+in the
+.Pa /usr/include
+directory tree; whereas
+.Dl ls /usr/include/**time.h
+will match any file in the
+.Pa /usr/include
+directory tree ending in
+.Ql time.h .
+.Pp
+To prevent problems with recursion, the
+.Ql **
+glob-pattern will not
+descend into a symbolic link containing a directory.
+To override this,
+use
+.Ql *** .
+.
+.It Ic group No (+)
The user's group name.
-.TP 8
-.B highlight
-If set, the incremental search match (in \fIi-search-back\fR and
-\fIi-search-fwd\fR) and the region between the mark and the cursor are
+.
+.It Ic highlight
+If set, the incremental search match (in
+.Ic i-search-back
+and
+.Ic i-search-fwd )
+and the region between the mark and the cursor are
highlighted in reverse video.
-.IP "" 8
+.Pp
Highlighting requires more frequent terminal writes, which introduces extra
-overhead. If you care about terminal performance, you may want to leave this
-unset.
-.TP 8
-.B histchars
-A string value determining the characters used in \fBHistory
-substitution\fR (q.v.). The first character of its value is used as
+overhead.
+If you care about terminal performance, you may want to leave this unset.
+.
+.It Ic histchars
+A string value determining the characters used in
+.Sx History substitution .
+.Pp
+The first character of its value is used as
the history substitution character, replacing the default character
-`!'. The second character of its value replaces the character `^' in
+.Ql \&! .
+.Pp
+The second character of its value replaces the character
+.Ql ^
+in
quick substitutions.
-.TP 8
-.B histdup \fR(+)
-Controls handling of duplicate entries in the history list. If set to
-`all' only unique history events are entered in the history list. If
-set to `prev' and the last history event is the same as the current
-command, then the current command is not entered in the history. If
-set to `erase' and the same event is found in the history list, that
-old event gets erased and the current one gets inserted. Note that the
-`prev' and `all' options renumber history events so there are no gaps.
-.TP 8
-.B histfile \fR(+)
-The default location in which `history \-S' and `history \-L' look for
-a history file. If unset, \fI~/.history\fR is used. \fBhistfile\fR is
+.
+.It Ic histdup No (+)
+Controls handling of duplicate entries in the history list.
+.Pp
+If set to
+.Ql all
+only unique history events are entered in the history list.
+.Pp
+If
+set to
+.Ql prev
+and the last history event is the same as the current
+command, then the current command is not entered in the history.
+.Pp
+If
+set to
+.Ql erase
+and the same event is found in the history list, that
+old event gets erased and the current one gets inserted.
+.Pp
+Note that the
+.Ql prev
+and
+.Ql all
+options renumber history events so there are no gaps.
+.
+.It Ic histfile No (+)
+The default location in which
+.Dl history \-S
+and
+.Dl history \-L
+look for
+a history file.
+.Pp
+If unset,
+.Pa ~/.history
+is used.
+.Pp
+.Ic histfile
+is
useful when sharing the same home directory between different machines,
-or when saving separate histories on different terminals. Because only
-\fI~/.tcshrc\fR is normally sourced before \fI~/.history\fR,
-\fBhistfile\fR should be set in \fI~/.tcshrc\fR rather than
-\fI~/.login\fR.
-.TP 8
-.B histlit \fR(+)
-If set, builtin and editor commands and the \fBsavehist\fR mechanism
-use the literal (unexpanded) form of lines in the history list. See
-also the \fItoggle-literal-history\fR editor command.
-.TP 8
-.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\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
-.B home
-Initialized to the home directory of the invoker. The filename
-expansion of `\fI~\fR' refers to this variable.
-.TP 8
-.B ignoreeof
-If set to the empty string or `0' and the input device is a terminal,
-the \fIend-of-file\fR command (usually generated by the user by typing
-`^D' on an empty line) causes the shell to print `Use "exit" to leave
-tcsh.' instead of exiting. This prevents the shell from accidentally
-being killed. Historically this setting exited after 26 successive
-EOF's to avoid infinite loops. If set to a number \fIn\fR, the shell
-ignores \fIn - 1\fR consecutive \fIend-of-file\fRs and exits on the
-\fIn\fRth. (+) If unset, `1' is used, i.e., the shell exits on a
-single `^D'.
-.TP 8
-.B implicitcd \fR(+)
+or when saving separate histories on different terminals.
+Because only
+.Pa ~/.tcshrc
+is normally sourced before
+.Pa ~/.history ,
+.Ic histfile
+should be set in
+.Pa ~/.tcshrc
+rather than
+.Pa ~/.login .
+.
+.It Ic histlit No (+)
+If set, builtin and editor commands and the
+.Ic savehist
+mechanism
+use the literal (unexpanded) form of lines in the history list.
+See
+also the
+.Ic toggle-literal-history
+editor command.
+.
+.It Ic history
+The first word indicates the number of history events to save.
+.Pp
+The optional second word (+) indicates the format in which history is
+printed; if not given,
+.Ql %h\et%T\et%R\en
+is used.
+The format sequences
+are described below under
+.Ic prompt ;
+note the variable meaning of
+.Ql \&%R .
+.Pp
+Set to
+.Ql 100
+by default.
+.
+.It Ic home
+Initialized to the home directory of the invoker.
+The filename
+expansion of
+.Ql ~
+refers to this variable.
+.
+.It Ic ignoreeof
+If set to the empty string or
+.Ql 0
+and the input device is a terminal,
+the
+.Ic end-of-file
+command (usually generated by the user by typing
+.Ic ^D
+on an empty line) causes the shell to print
+.Dl Use \&"exit\&" to leave tcsh\&.
+instead of exiting.
+This prevents the shell from accidentally
+being killed.
+Historically this setting exited after 26 successive
+EOF's to avoid infinite loops.
+.Pp
+If set to a number
+.Sq Em n ,
+the shell
+ignores
+.Em n
+\- 1
+consecutive
+.Ic end-of-file Ns
+s and exits on the
+.Em n Ns
+th (+).
+.Pp
+If unset,
+.Ql 1
+is used, i.e., the shell exits on a
+single
+.Ic ^D .
+.
+.It Ic implicitcd No (+)
If set, the shell treats a directory name typed as a command as though
-it were a request to change to that directory. If set to \fIverbose\fR,
-the change of directory is echoed to the standard output. This behavior
+it were a request to change to that directory.
+.Pp
+If set to
+.Ic verbose ,
+the change of directory is echoed to the standard output.
+.Pp
+This behavior
is inhibited in non-interactive shell scripts, or for command strings
-with more than one word. Changing directory takes precedence over
+with more than one word.
+Changing directory takes precedence over
executing a like-named command, but it is done after alias
-substitutions. Tilde and variable expansions work as expected.
-.TP 8
-.B inputmode \fR(+)
-If set to `insert' or `overwrite', puts the editor into that input mode
+substitutions.
+Tilde and variable expansions work as expected.
+.
+.It Ic inputmode No (+)
+If set to
+.Ql insert
+or
+.Ql overwrite ,
+puts the editor into that input mode
at the beginning of each line.
-.TP 8
-.B killdup \fR(+)
-Controls handling of duplicate entries in the kill ring. If set to
-`all' only unique strings are entered in the kill ring. If set to
-`prev' and the last killed string is the same as the current killed
-string, then the current string is not entered in the ring. If set
-to `erase' and the same string is found in the kill ring, the old
+.
+.It Ic killdup No (+)
+Controls handling of duplicate entries in the kill ring.
+.Pp
+If set to
+.Ql all
+only unique strings are entered in the kill ring.
+.Pp
+If set to
+.Ql prev
+and the last killed string is the same as the current killed
+string, then the current string is not entered in the ring.
+.Pp
+If set
+to
+.Ql erase
+and the same string is found in the kill ring, the old
string is erased and the current one is inserted.
-.TP 8
-.B killring \fR(+)
-Indicates the number of killed strings to keep in memory. Set to `30'
-by default. If unset or set to less than `2', the shell will only
+.
+.It Ic killring No (+)
+Indicates the number of killed strings to keep in memory.
+.Pp
+Set to
+.Ql 30
+by default.
+.Pp
+If unset or set to less than
+.Ql 2 ,
+the shell will only
keep the most recently killed string.
+.Pp
Strings are put in the killring by the editor commands that delete
-(kill) strings of text, e.g. \fIbackward-delete-word\fR,
-\fIkill-line\fR, etc, as well as the \fIcopy-region-as-kill\fR command.
-The \fIyank\fR editor command will yank the most recently killed string
-into the command-line, while \fIyank-pop\fR (see \fBEditor commands\fR)
+(kill) strings of text, e.g.
+.Ic backward-delete-word ,
+.Ic kill-line ,
+etc, as well as the
+.Ic copy-region-as-kill
+command.
+The
+.Ic yank
+editor command will yank the most recently killed string
+into the command-line, while
+.Ic yank-pop
+(see
+.Sx Editor commands (+) )
can be used to yank earlier killed strings.
-.TP 8
-.B listflags \fR(+)
-If set to `x', `a' or `A', or any combination thereof (e.g., `xA'), they
-are used as flags to \fIls\-F\fR, making it act like `ls \-xF', `ls
-\-Fa', `ls \-FA' or a combination (e.g., `ls \-FxA'): `a' shows all
-files (even if they start with a `.'), `A' shows all files but `.' and
-`..', and `x' sorts across instead of down. If the second word of
-\fBlistflags\fR is set, it is used as the path to `ls(1)'.
-.TP 8
-.B listjobs \fR(+)
-If set, all jobs are listed when a job is suspended. If set to `long',
+.
+.It Ic listflags No (+)
+If set to
+.Ql x ,
+.Ql a ,
+or
+.Ql A ,
+or any combination thereof (e.g.,
+.Ql xA ) ,
+they are used as flags to
+.Ic ls\-F ,
+making it act like
+.Bd -literal -offset indent -compact
+ls \-xF
+ls \-Fa
+ls \-FA
+.Ed
+.Pp
+or a combination, for example
+.Dl ls \-FxA
+.Pp
+If the first word contains
+.Ql a ,
+shows all
+files (even if they start with a
+.Ql \&. ) .
+.Pp
+If the first word contains
+.Ql A ,
+shows all files but
+.Ql \&.
+and
+.Ql \&.. .
+.Pp
+If the first word contains
+.Ql x ,
+sorts across instead of down.
+.Pp
+If the second word of
+.Ic listflags
+is set, it is used as the path to
+.Xr ls 1 .
+.
+.It Ic listjobs No (+)
+If set, all jobs are listed when a job is suspended.
+.Pp
+If set to
+.Ql long ,
the listing is in long format.
-.TP 8
-.B listlinks \fR(+)
-If set, the \fIls\-F\fR builtin command shows the type of file to which
+.
+.It Ic listlinks No (+)
+If set, the
+.Ic ls\-F
+builtin command shows the type of file to which
each symbolic link points.
-.TP 8
-.B listmax \fR(+)
-The maximum number of items which the \fIlist-choices\fR editor command
+.
+.It Ic listmax No (+)
+The maximum number of items which the
+.Ic list-choices
+editor command
will list without asking first.
-.TP 8
-.B listmaxrows \fR(+)
-The maximum number of rows of items which the \fIlist-choices\fR editor
+.
+.It Ic listmaxrows No (+)
+The maximum number of rows of items which the
+.Ic list-choices
+editor
command will list without asking first.
-.TP 8
-.B loginsh \fR(+)
-Set by the shell if it is a login shell. Setting or unsetting it
-within a shell has no effect. See also \fBshlvl\fR.
-.TP 8
-.B logout \fR(+)
-Set by the shell to `normal' before a normal logout, `automatic' before
-an automatic logout, and `hangup' if the shell was killed by a hangup
-signal (see \fBSignal handling\fR). See also the \fBautologout\fR
+.
+.It Ic loginsh No (+)
+Set by the shell if it is a login shell.
+Setting or unsetting it
+within a shell has no effect.
+See also
+.Ic shlvl .
+.
+.It Ic logout No (+)
+Set by the shell to
+.Ql normal
+before a normal logout,
+.Ql automatic
+before
+an automatic logout, and
+.Ql hangup
+if the shell was killed by a hangup
+signal (see
+.Sx Signal handling ) .
+See also the
+.Ic autologout
shell variable.
-.TP 8
-.B mail
+.
+.It Ic mail
A list of files and directories to check for incoming mail, optionally
-preceded by a numeric word. Before each prompt, if 10 minutes have
-passed since the last check, the shell checks each file and says `You
-have new mail.' (or, if \fBmail\fR contains multiple files, `You have
-new mail in \fIname\fR.') if the filesize is greater than zero in size
+preceded by a numeric word.
+Before each prompt, if 10 minutes have
+passed since the last check, the shell checks each file and displays
+.Dl You have new mail\&.
+(or, if
+.Ic mail
+contains multiple files,
+.Dl You have new mail in Ar name Ns \&. )
+if the filesize is greater than zero in size
and has a modification time greater than its access time.
-.PP
-.RS +8
-.PD
-.PP
+.Pp
If you are in a login shell, then no mail file is reported unless it has
been modified after the time the shell has started up, to prevent
-redundant notifications. Most login programs will tell you whether or not
+redundant notifications.
+Most login programs will tell you whether or not
you have mail when you log in.
-.PP
-If a file specified in \fBmail\fR is a directory, the shell will count each
-file within that directory as a separate message, and will report `You have
-\fIn\fR mails.' or `You have \fIn\fR mails in \fIname\fR.' as appropriate.
+.Pp
+If a file specified in
+.Ic mail
+is a directory, the shell will count each
+file within that directory as a separate message, and will report
+.Dl You have Ar n No mails\&.
+or
+.Dl You have Ar n No mails in Ar name Ns No \&.
+as appropriate.
This functionality is provided primarily for those systems which store mail
in this manner, such as the Andrew Mail System.
-.PP
-If the first word of \fBmail\fR is numeric it is taken as a different mail
+.Pp
+If the first word of
+.Ic mail
+is numeric it is taken as a different mail
checking interval, in seconds.
-.PP
-Under very rare circumstances, the shell may report `You have mail.' instead
-of `You have new mail.'
-.RE
-.TP 8
-.B matchbeep \fR(+)
-If set to `never', completion never beeps.
-If set to `nomatch', it beeps only when there is no match.
-If set to `ambiguous', it beeps when there are multiple matches.
-If set to `notunique', it beeps when there is one exact and other longer matches.
-If unset, `ambiguous' is used.
-.TP 8
-.B nobeep \fR(+)
+.Pp
+Under very rare circumstances, the shell may report
+.Dl You have mail\&.
+instead of
+.Dl You have new mail\&.
+.
+.It Ic matchbeep No (+)
+If set to
+.Ql never ,
+completion never beeps.
+.Pp
+If set to
+.Ql nomatch ,
+it beeps only when there is no match.
+.Pp
+If set to
+.Ql ambiguous ,
+it beeps when there are multiple matches.
+.Pp
+If set to
+.Ql notunique ,
+it beeps when there is one exact and other longer matches.
+.Pp
+If unset,
+.Ql ambiguous
+is used.
+.
+.It Ic nobeep No (+)
If set, beeping is completely disabled.
-See also \fBvisiblebell\fR.
-.TP 8
-.B noclobber
+See also
+.Ic visiblebell .
+.
+.It Ic noclobber
If set, restrictions are placed on output redirection to insure that files
-are not accidentally destroyed and that `>>' redirections refer to existing
-files, as described in the \fBInput/output\fR section.
-.TP 8
-.B noding
-If set, disable the printing of `DING!' in the \fBprompt\fR time
-specifiers at the change of hour.
-.TP 8
-.B noglob
-If set, \fBFilename substitution\fR and \fBDirectory stack substitution\fR
-(q.v.) are inhibited. This is most useful in shell scripts which do not deal
+are not accidentally destroyed and that
+.Ql >>
+redirections refer to existing
+files, as described in the
+.Sx Input/output
+section.
+.Pp
+If contains
+.Ql ask ,
+an interacive confirmation is presented, rather than an
+error.
+.Pp
+If contains
+.Ql notempty ,
+.Ql >
+is allowed on empty files.
+.
+.It Ic noding
+If set, disable the printing of
+.Dl DING\&!
+in the
+.Ic prompt
+time specifiers at the change of hour.
+.
+.It Ic noglob
+If set,
+.Sx Filename substitution
+and
+.Sx Directory stack substitution (+)
+are inhibited.
+This is most useful in shell scripts which do not deal
with filenames, or after a list of filenames has been obtained and further
expansions are not desirable.
-.TP 8
-.B nokanji \fR(+)
-If set and the shell supports Kanji (see the \fBversion\fR shell variable),
+.
+.It Ic nokanji No (+)
+If set and the shell supports Kanji (see the
+.Ic version
+shell variable),
it is disabled so that the meta key can be used.
-.TP 8
-.B nonomatch
-If set, a \fBFilename substitution\fR or \fBDirectory stack substitution\fR
-(q.v.) which does not match any
+.
+.It Ic nonomatch
+If set, a
+.Sx Filename substitution
+or
+.Sx Directory stack substitution (+)
+which does not match any
existing files is left untouched rather than causing an error.
It is still an error for the substitution to be
-malformed, e.g., `echo [' still gives an error.
-.TP 8
-.B nostat \fR(+)
+malformed.
+For example,
+.Dl echo \&[
+still gives an error.
+.
+.It Ic nostat No (+)
A list of directories (or glob-patterns which match directories; see
-\fBFilename substitution\fR) that should not be \fIstat\fR(2)ed during a
-completion operation. This is usually used to exclude directories which
-take too much time to \fIstat\fR(2), for example \fI/afs\fR.
-.TP 8
-.B notify
+.Sx Filename substitution )
+that should not be
+.Xr stat 2 Ns ed
+during a
+completion operation.
+This is usually used to exclude directories which
+take too much time to
+.Xr stat 2 ,
+for example
+.Pa /afs .
+.
+.It Ic notify
If set, the shell announces job completions asynchronously.
The default is to present job completions just before printing a prompt.
-.TP 8
-.B oid \fR(+)
-The user's real organization ID. (Domain/OS only)
-.TP 8
-.B owd \fR(+)
-The old working directory, equivalent to the `\-' used by \fIcd\fR and \fIpushd\fR.
-See also the \fBcwd\fR and \fBdirstack\fR shell variables.
-.TP 8
-.B padhour
+.
+.It Ic oid No (+)
+The user's real organization ID.
+(Domain/OS only)
+.
+.It Ic owd No (+)
+The old working directory, equivalent to the
+.Ql \-
+used by
+.Ic cd
+and
+.Ic pushd .
+See also the
+.Ic cwd
+and
+.Ic dirstack
+shell variables.
+.
+.It Ic padhour
If set, enable the printing of padding '0' for hours, in 24 and 12 hour
-formats. E.G.: 07:45:42 vs. 7:45:42.
-.TP 8
-.B parseoctal
+formats.
+E.g.,
+.Sq 07:45:42
+versus
+.Sq 7:45:42 .
+.
+.It Ic parseoctal
To retain compatibily with older versions numeric variables starting with
-0 are not interpreted as octal. Setting this variable enables proper octal
+0 are not interpreted as octal.
+Setting this variable enables proper octal
parsing.
-.TP 8
-.B path
+.
+.It Ic path
A list of directories in which to look for executable commands.
+.Pp
A null word specifies the current directory.
-If there is no \fBpath\fR variable then only full path names will execute.
-\fBpath\fR is set by the shell at startup from the \fBPATH\fR environment
-variable or, if \fBPATH\fR does not exist, to a system-dependent default
-something like `(/usr/local/bin /usr/bsd /bin /usr/bin .)'.
-The shell may put `.' first or last in \fBpath\fR or omit it entirely
-depending on how it was compiled; see the \fBversion\fR shell variable.
-A shell which is given neither the \fB\-c\fR nor the \fB\-t\fR option
-hashes the contents of the directories in \fBpath\fR after
-reading \fI~/.tcshrc\fR and each time \fBpath\fR is reset.
-If one adds a new command to a directory in \fBpath\fR while the shell
-is active, one may need to do a \fIrehash\fR for the shell to find it.
-.TP 8
-.B printexitvalue \fR(+)
+.Pp
+If there is no
+.Ic path
+variable then only full path names will execute.
+.Pp
+.Ic path
+is set by the shell at startup from the
+.Ev PATH
+environment
+variable or, if
+.Ev PATH
+does not exist, to a system-dependent default,
+such as
+.Dl (/usr/local/bin /usr/bsd /bin /usr/bin .)
+.Pp
+The shell may put
+.Ql \&.
+first or last in
+.Ic path
+or omit it entirely
+depending on how it was compiled; see the
+.Ic version
+shell variable.
+.Pp
+A shell which is given neither the
+.Fl c
+nor the
+.Fl t
+option
+hashes the contents of the directories in
+.Ic path
+after
+reading
+.Pa ~/.tcshrc
+and each time
+.Ic path
+is reset.
+.Pp
+If one adds a new command to a directory in
+.Ic path
+while the shell
+is active, one may need to do a
+.Ic rehash
+for the shell to find it.
+.
+.It Ic printexitvalue No (+)
If set and an interactive program exits with a non-zero status, the shell
-prints `Exit \fBstatus\fR'.
-.TP 8
-.B prompt
+prints
+.Dl Exit Ar status
+.
+.It Ic prompt
The string which is printed before reading each command from the terminal.
-\fBprompt\fR may include any of the following formatting sequences (+), which
+.Pp
+.Ic prompt
+may include any of the following formatting sequences (+), which
are replaced by the given information:
-.PP
-.RS +8
-.PD 0
-.TP 4
-%/
+.
+.Bl -tag -width ".Sy Format" -offset indent
+.It Sy Format
+.Sy Prompt information
+.
+.It Li %/
The current working directory.
-.TP 4
-%~
+.
+.It Li %~
The current working directory, but with one's home directory
-represented by `~' and other users' home directories represented by
-`~user' as per \fBFilename substitution\fR. `~user' substitution
-happens only if the shell has already used `~\fIuser\fR' in a pathname
+represented by
+.Ql ~
+and other users' home directories represented by
+.Ql ~ Ns Ar user
+as per
+.Sx Filename substitution .
+.Ql ~ Ns Ar user
+substitution
+happens only if the shell has already used
+.Ql ~ Ns Ar user
+in a pathname
in the current session.
-.TP 4
-%c[[0]\fIn\fR], %.[[0]\fIn\fR]
-The trailing component of the current working directory, or \fIn\fR
-trailing components if a digit \fIn\fR is given.
-If \fIn\fR begins with `0', the number of skipped components precede
-the trailing component(s) in the format `/<\fIskipped\fR>trailing'.
-If the \fBellipsis\fR shell variable is set, skipped components
-are represented by an ellipsis so the whole becomes `...trailing'.
-`~' substitution is done as in `%~' above, but the `~' component
+.
+.It Xo
+.Li %c[[0] Ns Ar n Ns Li \&] ,
+.Li %.[[0] Ns Ar n Ns Li \&]
+.Xc
+The trailing component of the current working directory, or
+.Ar n
+trailing components if a digit
+.Ar n
+is given.
+If
+.Ar n
+begins with
+.Ql 0 ,
+the number of skipped components precede
+the trailing component(s) in the format
+.Ql /< Ns Ar skipped Ns Li >trailing .
+If the
+.Ic ellipsis
+shell variable is set, skipped components
+are represented by an ellipsis so the whole becomes
+.Ql \&...trailing .
+.Ql ~
+substitution is done as in
+.Ql %~
+above, but the
+.Ql ~
+component
is ignored when counting trailing components.
-.TP 4
-%C
-Like %c, but without `~' substitution.
-.TP 4
-%h, %!, !
+.
+.It Li \&%C
+Like
+.Ql %c ,
+but without
+.Ql ~
+substitution.
+.
+.It Li %h , %! , \&!
The current history event number.
-.TP 4
-%M
+.
+.It Li \&%M
The full hostname.
-.TP 4
-%m
-The hostname up to the first `.'.
-.TP 4
-%S (%s)
+.
+.It Li %m
+The hostname up to the first
+.Ql \&. .
+.
+.It Li \&%S Pq Li %s
Start (stop) standout mode.
-.TP 4
-%B (%b)
+.
+.It Li \&%B Pq Li %b
Start (stop) boldfacing mode.
-.TP 4
-%U (%u)
+.
+.It Li \&%U (%u)
Start (stop) underline mode.
-.TP 4
-%t, %@
+.
+.It Li %t , %@
The time of day in 12-hour AM/PM format.
-.TP 4
-%T
-Like `%t', but in 24-hour format (but see the \fBampm\fR shell variable).
-.TP 4
-%p
-The `precise' time of day in 12-hour AM/PM format, with seconds.
-.TP 4
-%P
-Like `%p', but in 24-hour format (but see the \fBampm\fR shell variable).
-.TP 4
-\e\fIc\fR
-\fIc\fR is parsed as in \fIbindkey\fR.
-.TP 4
-^\fIc\fR
-\fIc\fR is parsed as in \fIbindkey\fR.
-.TP 4
-%%
-A single `%'.
-.TP 4
-%n
+.
+.It Li \&%T
+Like
+.Ql %t ,
+but in 24-hour format (but see the
+.Ic ampm
+shell variable).
+.
+.It Li %p
+The
+.Sq precise
+time of day in 12-hour AM/PM format, with seconds.
+.
+.It Li \&%P
+Like
+.Ql %p ,
+but in 24-hour format (but see the
+.Ic ampm
+shell variable).
+.
+.It Li \e Ns Ar c
+.Ar c
+is parsed as in
+.Ic bindkey .
+.
+.It Li ^ Ns Ar c
+.Ar c
+is parsed as in
+.Ic bindkey .
+.
+.It Li %%
+A single
+.Ql % .
+.
+.It Li %n
The user name.
-.TP 4
-%N
+.
+.It Li \&%N
The effective user name.
-.TP 4
-%j
+.
+.It Li %j
The number of jobs.
-.TP 4
-%d
-The weekday in `Day' format.
-.TP 4
-%D
-The day in `dd' format.
-.TP 4
-%w
-The month in `Mon' format.
-.TP 4
-%W
-The month in `mm' format.
-.TP 4
-%y
-The year in `yy' format.
-.TP 4
-%Y
-The year in `yyyy' format.
-.TP 4
-%l
+.
+.It Li %d
+The weekday in
+.Sq Day
+format.
+.
+.It Li \&%D
+The day in
+.Sq dd
+format.
+.
+.It Li %w
+The month in
+.Sq Mon
+format.
+.
+.It Li \&%W
+The month in
+.Sq mm
+format.
+.
+.It Li %y
+The year in
+.Sq yy
+format.
+.
+.It Li \&%Y
+The year in
+.Sq yyyy
+format.
+.
+.It Li %l
The shell's tty.
-.TP 4
-%L
+.
+.It Li \&%L
Clears from the end of the prompt to end of the display or the end of the line.
-.TP 4
-%$
-Expands the shell or environment variable name immediately after the `$'.
-.TP 4
-%#
-`>' (or the first character of the \fBpromptchars\fR shell variable)
-for normal users, `#' (or the second character of \fBpromptchars\fR)
+.
+.It Li %$
+Expands the shell or environment variable name immediately after the
+.Ql $ .
+.
+.It Li %#
+.Ql >
+(or the first character of the
+.Ic promptchars
+shell variable)
+for normal users,
+.Ql #
+(or the second character of
+.Ic promptchars )
for the superuser.
-.TP 4
-%{\fIstring\fR%}
-Includes \fIstring\fR as a literal escape sequence.
+.
+.It Li %{ Ns Ar string Ns Li %}
+Includes
+.Ic string
+as a literal escape sequence.
It should be used only to change terminal attributes and
-should not move the cursor location. This
-cannot be the last sequence in \fBprompt\fR.
-.TP 4
-%?
+should not move the cursor location.
+This
+cannot be the last sequence in
+.Ic prompt .
+.
+.It Li %?
The return code of the command executed just before the prompt.
-.TP 4
-%R
-In \fBprompt2\fR, the status of the parser.
-In \fBprompt3\fR, the corrected string.
-In \fBhistory\fR, the history string.
-.PD
-.PP
-`%B', `%S', `%U' and `%{\fIstring\fR%}' are available in only
-eight-bit-clean shells; see the \fBversion\fR shell variable.
-.PP
+.
+.It Li \&%R
+In
+.Ic prompt2 ,
+the status of the parser.
+In
+.Ic prompt3 ,
+the corrected string.
+In
+.Ic history ,
+the history string.
+.
+.El
+.
+.Pp
+.Ql \&%B ,
+.Ql \&%S ,
+.Ql \&%U ,
+and
+.Ql %{ Ns Ar string Ns Li %}
+are available in only
+eight-bit-clean shells; see the
+.Ic version
+shell variable.
+.Pp
The bold, standout and underline sequences are often used to distinguish a
-superuser shell. For example,
-.IP "" 4
-> set prompt = "%m [%h] %B[%@]%b [%/] you rang? "
-.br
-tut [37] \fB[2:54pm]\fR [/usr/accts/sys] you rang? _
-.PP
-If `%t', `%@', `%T', `%p', or `%P' is used, and \fBnoding\fR is not set,
-then print `DING!' on the change of hour (i.e, `:00' minutes) instead of
+superuser shell.
+For example,
+.Pp
+.\" Using Bl not Bd to allow bold formatting in the second line
+.Bl -tag -width 20n -offset indent -compact
+.It Li > set prompt = \&"%m [%h] \&%B[%@]%b [%/] you rang? \&"
+.It Li tut [37] Cm [2:54pm] Li [/usr/accts/sys] you rang? _
+.El
+.Pp
+If
+.Ql %t ,
+.Ql %@ ,
+.Ql \&%T ,
+.Ql %p ,
+or
+.Ql \&%P
+is used, and
+.Ic noding
+is not set,
+then print
+.Dl DING\&!
+on the change of hour (i.e,
+.Sq \&:00
+minutes) instead of
the actual time.
-.PP
-Set by default to `%# ' in interactive shells.
-.RE
-.TP 8
-.B prompt2 \fR(+)
-The string with which to prompt in \fIwhile\fR and \fIforeach\fR loops and
-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.
-.TP 8
-.B prompt3 \fR(+)
+.Pp
+Set by default to
+.Sq Li %#\ \&
+in interactive shells.
+.
+.It Ic prompt2 No (+)
+The string with which to prompt in
+.Ic while
+and
+.Ic foreach
+loops and
+after lines ending in
+.Ql \e .
+The same format sequences may be used as in
+.Ic prompt ;
+note the variable meaning of
+.Ql \&%R .
+.Pp
+Set by default to
+.Sq Li \&%R?\ \&
+in interactive shells.
+.
+.It Ic prompt3 No (+)
The string with which to prompt when confirming automatic spelling correction.
-The same format sequences may be used as in \fBprompt\fR (q.v.);
-note the variable meaning of `%R'.
-Set by default to `CORRECT>%R (y|n|e|a)? ' in interactive shells.
-.TP 8
-.B promptchars \fR(+)
-If set (to a two-character string), the `%#' formatting sequence in the
-\fBprompt\fR shell variable is replaced with the first character for
+The same format sequences may be used as in
+.Ic prompt ;
+note the variable meaning of
+.Ql \&%R .
+.Pp
+Set by default to
+.Sq Li CORRECT>%R (y|n|e|a)?\ \&
+in interactive shells.
+.
+.It Ic promptchars No (+)
+If set (to a two-character string), the
+.Ql %#
+formatting sequence in the
+.Ic prompt
+shell variable is replaced with the first character for
normal users and the second character for the superuser.
-.TP 8
-.B pushdtohome \fR(+)
-If set, \fIpushd\fR without arguments does `pushd ~', like \fIcd\fR.
-.TP 8
-.B pushdsilent \fR(+)
-If set, \fIpushd\fR and \fIpopd\fR do not print the directory stack.
-.TP 8
-.B recexact \fR(+)
+.
+.It Ic pushdtohome No (+)
+If set,
+.Ic pushd
+without arguments does
+.Dl pushd ~
+like
+.Ic cd .
+.
+.It Ic pushdsilent No (+)
+If set,
+.Ic pushd
+and
+.Ic popd
+do not print the directory stack.
+.
+.It Ic recexact No (+)
If set, completion completes on an exact match even if a longer match is
possible.
-.TP 8
-.B recognize_only_executables \fR(+)
+.
+.It Ic recognize_only_executables No (+)
If set, command listing displays only files in the path that are
-executable. Slow.
-.TP 8
-.B rmstar \fR(+)
-If set, the user is prompted before `rm *' is executed.
-.TP 8
-.B rprompt \fR(+)
+executable.
+Slow.
+.
+.It Ic rmstar No (+)
+If set, the user is prompted before
+.Dl rm *
+is executed.
+.
+.It Ic rprompt No (+)
The string to print on the right-hand side of the screen (after
the command input) when the prompt is being displayed on the left.
-It recognizes the same formatting characters as \fBprompt\fR.
+It recognizes the same formatting characters as
+.Ic prompt .
It will automatically disappear and reappear as necessary, to ensure that
command input isn't obscured, and will appear only if the prompt,
command input, and itself will fit together on the first line.
-If \fBedit\fR isn't set, then \fBrprompt\fR will be printed after
+.Pp
+If
+.Ic edit
+isn't set, then
+.Ic rprompt
+will be printed after
the prompt and before the command input.
-.TP 8
-.B savedirs \fR(+)
-If set, the shell does `dirs \-S' before exiting.
+.
+.It Ic savedirs No (+)
+If set, the shell does
+.Dl dirs \-S
+before exiting.
+.Pp
If the first word is set to a number, at most that many directory stack
entries are saved.
-.TP 8
-.B savehist
-If set, the shell does `history \-S' before exiting.
+.
+.It Ic savehist
+If set, the shell does
+.Dl history \-S
+before exiting.
+.Pp
If the first word is set to a number, at most that many lines are saved.
-(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 number should be less than or equal to the number
+.Ic history
+entries;
+if it is set to greater than the number of
+.Ic history
+settings, only
+.Ic history
+entries will be saved.)
+.Pp
+If the second word is set to
+.Ql 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.
-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
+.Pp
+If the second word is set to
+.Ql merge
+and the third word is set to
+.Ql 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\et%T\et%R\en' is used.
-The format sequences are described above under \fBprompt\fR;
-note the variable meaning of `%R'.
-.TP 8
-.B shell
-The file in which the shell resides. This is used in forking
+.
+.It Ic sched No (+)
+The format in which the
+.Ic sched
+builtin command prints scheduled events;
+if not given,
+.Sq Li %h\et%T\et%R\en
+is used.
+The format sequences are described above under
+.Ic prompt ;
+note the variable meaning of
+.Ql \&%R .
+.
+.It Ic shell
+The file in which the shell resides.
+This is used in forking
shells to interpret files which have execute bits set, but
-which are not executable by the system. (See the description
-of \fBBuiltin and non-builtin command execution\fR.) Initialized to the
+which are not executable by the system.
+(See the description
+of
+.Sx Builtin and non-builtin command execution . )
+Initialized to the
(system-dependent) home of the shell.
-.TP 8
-.B shlvl \fR(+)
+.
+.It Ic shlvl No (+)
The number of nested shells.
Reset to 1 in login shells.
-See also \fBloginsh\fR.
-.TP 8
-.B status
+See also
+.Ic loginsh .
+.
+.It Ic status
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.)
+command in a pipeline is propagated to
+.Ic status .
+(This is also the
+default
+.Xr csh 1
+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
+to unset
+.Ic anyerror .
+.Pp
+If the
+.Ic anyerror
+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
+status of a backquote expansion is
+.Em not
+propagated to
+.Ic status .
+.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')
+Builtin commands which fail return exit status
+.Ql 1 ,
+all other builtin
+commands return status
+.Ql 0 .
+.
+.It Ic symlinks No (+)
+Can be set to several different values to control symbolic link
+.Pq Sq symlink
resolution:
-.RS +8
-.PP
-If set to `chase', whenever the current directory changes to a directory
+.Pp
+If set to
+.Ql chase ,
+whenever the current directory changes to a directory
containing a symbolic link, it is expanded to the real name of the directory
-to which the link points. This does not work for the user's home directory;
+to which the link points.
+This does not work for the user's home directory;
this is a bug.
-.PP
-If set to `ignore', the shell tries to construct a current directory
+.Pp
+If set to
+.Ql ignore ,
+the shell tries to construct a current directory
relative to the current directory before the link was crossed.
-This means that \fIcd\fRing through a symbolic link and then `cd ..'ing
-returns one to the original directory. This affects only builtin commands
+This means that
+.Dl cd
+through a symbolic link and then
+.Dl cd \&..
+returns one to the original directory.
+This affects only builtin commands
and filename completion.
-.PP
-If set to `expand', the shell tries to fix symbolic links by actually expanding
-arguments which look like path names. This affects any command, not just
-builtins. Unfortunately, this does not work for hard-to-recognize filenames,
-such as those embedded in command options. Expansion may be prevented by
-quoting. While this setting is usually the most convenient, it is sometimes
+.Pp
+If set to
+.Ql expand ,
+the shell tries to fix symbolic links by actually expanding
+arguments which look like path names.
+This affects any command, not just
+builtins.
+Unfortunately, this does not work for hard-to-recognize filenames,
+such as those embedded in command options.
+Expansion may be prevented by
+quoting.
+While this setting is usually the most convenient, it is sometimes
misleading and sometimes confusing when it fails to recognize an argument
-which should be expanded. A compromise is to use `ignore' and use the
-editor command \fInormalize-path\fR (bound by default to ^X-n) when necessary.
-.PP
-Some examples are in order. First, let's set up some play directories:
-.IP "" 4
+which should be expanded.
+A compromise is to use
+.Ql ignore
+and use the
+editor command
+.Ic normalize-path
+(bound by default to
+.Ic ^X-n )
+when necessary.
+.Pp
+Some examples are in order.
+First, let's set up some play directories:
+.Bd -literal -offset indent
> cd /tmp
-.br
> mkdir from from/src to
-.br
> ln \-s from/src to/dst
-.PP
-Here's the behavior with \fBsymlinks\fR unset,
-.IP "" 4
+.Ed
+.Pp
+Here's the behavior with
+.Ic symlinks
+unset,
+.Bd -literal -offset indent
> cd /tmp/to/dst; echo $cwd
-.br
/tmp/to/dst
-.br
> cd ..; echo $cwd
-.br
/tmp/from
-.PP
-here's the behavior with \fBsymlinks\fR set to `chase',
-.IP "" 4
+.Ed
+.Pp
+Here's the behavior with
+.Ic symlinks
+set to
+.Ql chase ,
+.Bd -literal -offset indent
> cd /tmp/to/dst; echo $cwd
-.br
/tmp/from/src
-.br
> cd ..; echo $cwd
-.br
/tmp/from
-.PP
-here's the behavior with \fBsymlinks\fR set to `ignore',
-.IP "" 4
+.Ed
+.Pp
+Here's the behavior with
+.Ic symlinks
+set to
+.Ql ignore ,
+.Bd -literal -offset indent
> cd /tmp/to/dst; echo $cwd
-.br
/tmp/to/dst
-.br
> cd ..; echo $cwd
-.br
/tmp/to
-.PP
-and here's the behavior with \fBsymlinks\fR set to `expand'.
-.IP "" 4
+.Ed
+.Pp
+Here's the behavior with
+.Ic symlinks
+set to
+.Ql expand .
+.Bd -literal -offset indent
> cd /tmp/to/dst; echo $cwd
-.br
/tmp/to/dst
-.br
> cd ..; echo $cwd
-.br
/tmp/to
-.br
> cd /tmp/to/dst; echo $cwd
-.br
/tmp/to/dst
-.br
> cd ".."; echo $cwd
-.br
/tmp/from
-.br
> /bin/echo ..
-.br
/tmp/to
-.br
> /bin/echo ".."
-.br
\&..
-.PP
-Note that `expand' expansion 1) works just like `ignore' for builtins
-like \fIcd\fR, 2) is prevented by quoting, and 3) happens before
+.Ed
+.Pp
+Note that
+.Ql expand
+expansion:
+.Bl -enum -offset indent -compact
+.
+.It
+Works just like
+.Ql ignore
+for builtins
+like
+.Ic cd .
+.
+.It
+Is prevented by quoting.
+.
+.It
+Happens before
filenames are passed to non-builtin commands.
-.RE
-.TP 8
-.B tcsh \fR(+)
-The version number of the shell in the format `R.VV.PP',
-where `R' is the major release number, `VV' the current version
-and `PP' the patchlevel.
-.TP 8
-.B term
-The terminal type. Usually set in \fI~/.login\fR as described under
-\fBStartup and shutdown\fR.
-.TP 8
-.B time
-If set to a number, then the \fItime\fR builtin (q.v.) executes automatically
+.El
+.
+.It Ic tcsh No (+)
+The version number of the shell in the format
+.Sq Ar R Ns No \&. Ns Ar VV Ns No \&. Ns Ar PP ,
+where
+.Sq Ar R
+is the major release number,
+.Sq Ar VV
+the current version,
+and
+.Sq Ar PP
+the patchlevel.
+.
+.It Ic term
+The terminal type.
+Usually set in
+.Pa ~/.login
+as described under
+.Sx Startup and shutdown .
+.
+.It Ic time
+If set to a number, then the
+.Ic time
+builtin executes automatically
after each command which takes more than that many CPU seconds.
+.Pp
If there is a second word, it is used as a format string for the output
-of the \fItime\fR builtin. (u) The following sequences may be used in the
+of the
+.Ic time
+builtin.
+.Pp
+(u) The following sequences may be used in the
+.Ic time
format string:
-.PP
-.RS +8
-.PD 0
-.TP 4
-%U
+.
+.Bl -tag -width ".Sy Format" -offset indent
+.It Sy Format
+.Sy Time information
+.
+.It Li \&%U
The time the process spent in user mode in cpu seconds.
-.TP 4
-%S
+.
+.It Li \&%S
The time the process spent in kernel mode in cpu seconds.
-.TP 4
-%E
+.
+.It Li \&%E
The elapsed (wall clock) time in seconds.
-.TP 4
-%P
-The CPU percentage computed as (%U + %S) / %E.
-.TP 4
-%W
+.
+.It Li \&%P
+The CPU percentage computed as (\&%U + \&%S) / \&%E.
+.
+.It Li \&%W
Number of times the process was swapped.
-.TP 4
-%X
+.
+.It Li \&%X
The average amount in (shared) text space used in Kbytes.
-.TP 4
-%D
+.
+.It Li \&%D
The average amount in (unshared) data/stack space used in Kbytes.
-.TP 4
-%K
-The total space used (%X + %D) in Kbytes.
-.TP 4
-%M
+.
+.It Li \&%K
+The total space used (\&%X + \&%D) in Kbytes.
+.
+.It Li \&%M
The maximum memory the process had in use at any time in Kbytes.
-.TP 4
-%F
+.
+.It Li \&%F
The number of major page faults (page needed to be brought from disk).
-.TP 4
-%R
+.
+.It Li \&%R
The number of minor page faults.
-.TP 4
-%I
+.
+.It Li \&%I
The number of input operations.
-.TP 4
-%O
+.
+.It Li \&%O
The number of output operations.
-.TP 4
-%r
+.
+.It Li %r
The number of socket messages received.
-.TP 4
-%s
+.
+.It Li %s
The number of socket messages sent.
-.TP 4
-%k
+.
+.It Li %k
The number of signals received.
-.TP 4
-%w
+.
+.It Li %w
The number of voluntary context switches (waits).
-.TP 4
-%c
+.
+.It Li %c
The number of involuntary context switches.
-.PD
-.PP
+.
+.El
+.Pp
Only the first four sequences are supported on systems without BSD resource
limit functions.
-The default time format is `%Uu %Ss %E %P %X+%Dk %I+%Oio %Fpf+%Ww' for
-systems that support resource usage reporting and `%Uu %Ss %E %P' for
+The default time format is
+.Sq Li \&%Uu \&%Ss \&%E \&%P \&%X+%Dk \&%I+%Oio \&%Fpf+%Ww
+for
+systems that support resource usage reporting and
+.Sq Li \&%Uu \&%Ss \&%E \&%P
+for
systems that do not.
-.PP
-Under Sequent's DYNIX/ptx, %X, %D, %K, %r and %s are not
+.Pp
+Under Sequent's DYNIX/ptx,
+.Ql \&%X ,
+.Ql \&%D ,
+.Ql \&%K ,
+.Ql %r ,
+and
+.Ql %s
+are not
available, but the following additional sequences are:
-.PP
-.PD 0
-.TP 4
-%Y
+.
+.Bl -tag -width ".Sy Format" -offset indent
+.It Sy Format
+.Sy Description
+.Sy Sequent DYNIX/ptx time information
+.
+.It Li \&%Y
The number of system calls performed.
-.TP 4
-%Z
+.
+.It Li \&%Z
The number of pages which are zero-filled on demand.
-.TP 4
-%i
+.
+.It Li %i
The number of times a process's resident set size was increased by the kernel.
-.TP 4
-%d
+.
+.It Li %d
The number of times a process's resident set size was decreased by the kernel.
-.TP 4
-%l
+.
+.It Li %l
The number of read system calls performed.
-.TP 4
-%m
+.
+.It Li %m
The number of write system calls performed.
-.TP 4
-%p
+.
+.It Li %p
The number of reads from raw disk devices.
-.TP 4
-%q
+.
+.It Li %q
The number of writes to raw disk devices.
-.PD
-.PP
-and the default time format is `%Uu %Ss %E %P %I+%Oio %Fpf+%Ww'.
+.
+.El
+.Pp
+and the default time format is
+.Sq Li \&%Uu \&%Ss \&%E \&%P \&%I+%Oio \&%Fpf+%Ww .
+.Pp
Note that the CPU percentage can be higher than 100% on multi-processors.
-.RE
-.TP 8
-.B tperiod \fR(+)
-The period, in minutes, between executions of the \fIperiodic\fR special alias.
-.TP 8
-.B tty \fR(+)
+.
+.It Ic tperiod No (+)
+The period, in minutes, between executions of the
+.Ic periodic
+special alias.
+.
+.It Ic tty No (+)
The name of the tty, or empty if not attached to one.
-.TP 8
-.B uid \fR(+)
+.
+.It Ic uid No (+)
The user's real user ID.
-.TP 8
-.B user
+.
+.It Ic user
The user's login name.
-.TP 8
-.B verbose
+.
+.It Ic verbose
If set, causes the words of each
command to be printed, after history substitution (if any).
-Set by the \fB\-v\fR command line option.
-.TP 8
-.B version \fR(+)
-The version ID stamp. It contains the shell's version number (see \fBtcsh\fR),
-origin, release date, vendor, operating system and machine (see \fBVENDOR\fR,
-\fBOSTYPE\fR and \fBMACHTYPE\fR) and a comma-separated
+Set by the
+.Fl v
+command line option.
+.
+.It Ic version No (+)
+The version ID stamp.
+It contains the shell's version number (see
+.Ic tcsh ) ,
+origin, release date, vendor, operating system and machine (see
+.Ev VENDOR ,
+.Ev OSTYPE ,
+and
+.Ev MACHTYPE )
+and a comma-separated
list of options which were set at compile time.
Options which are set by default in the distribution are noted.
-.PP
-.RS +8
-.PD 0
-.TP 6
-8b
-The shell is eight bit clean; default
-.TP 6
-7b
-The shell is not eight bit clean
-.TP 6
-wide
-The shell is multibyte encoding clean (like UTF-8)
-.TP 6
-nls
-The system's NLS is used; default for systems with NLS
-.TP 6
-lf
-Login shells execute \fI/etc/csh.login\fR before instead of after
-\fI/etc/csh.cshrc\fR and \fI~/.login\fR before instead of after
-\fI~/.tcshrc\fR and \fI~/.history\fR.
-.TP 6
-dl
-`.' is put last in \fBpath\fR for security; default
-.TP 6
-nd
-`.' is omitted from \fBpath\fR for security
-.TP 6
-vi
-\fIvi\fR(1)\-style editing is the default rather than \fIemacs\fR(1)\-style
-.TP 6
-dtr
-Login shells drop DTR when exiting
-.TP 6
-bye
-\fIbye\fR is a synonym for \fIlogout\fR and \fIlog\fR
-is an alternate name for \fIwatchlog\fR
-.TP 6
-al
-\fBautologout\fR is enabled; default
-.TP 6
-kan
+.Pp
+Supported
+.Ic version
+options include:
+.
+.Bl -tag -width ".Sy Option" -offset indent
+.
+.It Sy Option
+.Sy Description
+.
+.It Li 8b
+The shell is eight bit clean; default.
+.
+.It Li 7b
+The shell is not eight bit clean.
+.
+.It Li wide
+The shell is multi-byte encoding clean (like UTF-8).
+.
+.It Li nls
+The system's NLS is used; default for systems with NLS.
+.
+.It Li lf
+Login shells execute
+.Pa /etc/csh.login
+before instead of after
+.Pa /etc/csh.cshrc
+and
+.Pa ~/.login
+before instead of after
+.Pa ~/.tcshrc
+and
+.Pa ~/.history .
+.
+.It Li dl
+.Ql \&.
+is put last in
+.Ic path
+for security; default.
+.
+.It Li nd
+.Ql \&.
+is omitted from
+.Ic path
+for security.
+.
+.It Li vi
+.Xr vi 1 Ns
+\-style editing is the default rather than
+.Xr emacs 1 Ns
+\-style.
+.
+.It Li dtr
+Login shells drop DTR when exiting.
+.
+.It Li bye
+.Ic bye
+is a synonym for
+.Ic logout
+and
+.Ic log
+is an alternate name for
+.Ic watchlog .
+.
+.It Li al
+.Ic autologout
+is enabled; default.
+.
+.It Li kan
Kanji is used if appropriate according to locale settings,
-unless the \fBnokanji\fR shell variable is set
-.TP 6
-sm
-The system's \fImalloc\fR(3) is used
-.TP 6
-hb
-The `#!<program> <args>' convention is emulated when executing shell scripts
-.TP 6
-ng
-The \fInewgrp\fR builtin is available
-.TP 6
-rh
-The shell attempts to set the \fBREMOTEHOST\fR environment variable
-.TP 6
-afs
+unless the
+.Ic nokanji
+shell variable is set.
+.
+.It Li sm
+The system's
+.Xr malloc 3
+is used.
+.
+.It Li hb
+The
+.Dl #! Ns Ar interpreter arg Li \&...
+convention is emulated when executing shell scripts.
+.
+.It Li ng
+The
+.Ic newgrp
+builtin is available.
+.
+.It Li rh
+The shell attempts to set the
+.Ev REMOTEHOST
+environment variable.
+.
+.It Li afs
The shell verifies your password with the kerberos server if local
-authentication fails. The \fBafsuser\fR shell variable or the
-\fBAFSUSER\fR environment variable override your local username if set.
-.PD
-.PP
+authentication fails.
+The
+.Ic afsuser
+shell variable or the
+.Ev AFSUSER
+environment variable override your local username if set.
+.
+.El
+.Pp
An administrator may enter additional strings to indicate differences
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
+.
+.It Ic vimode No (+)
+If unset, various key bindings change behavior to be more
+.Xr emacs 1 Ns
+\-style:
+word boundaries are determined by
+.Ic wordchars
+versus other characters.
+.Pp
+If set, various key bindings change behavior to be more
+.Xr vi 1 Ns
+\-style:
+word boundaries are determined by
+.Ic wordchars
+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
+.Pp
+This variable is unset by
+.Ic bindkey Fl e
+and
+set by
+.Ic bindkey Fl v .
+.Ic vimode
+may be explicitly set or unset by the user after those
+.Ic bindkey
operations if required.
-.RE
-.TP 8
-.B visiblebell \fR(+)
+.
+.It Ic visiblebell No (+)
If set, a screen flash is used rather than the audible bell.
-See also \fBnobeep\fR.
-.TP 8
-.B watch \fR(+)
+See also
+.Ic nobeep .
+.
+.It Ic watch No (+)
A list of user/terminal pairs to watch for logins and logouts.
-If either the user is `any' all terminals are watched for the given user
+If either the user is
+.Ql any
+all terminals are watched for the given user
and vice versa.
-Setting \fBwatch\fR to `(any any)' watches all users and terminals.
+Setting
+.Ic watch
+to
+.Dl (any any)
+watches all users and terminals.
For example,
-.RS +8
-.IP "" 4
+.Bd -literal -offset indent
set watch = (george ttyd1 any console $user any)
-.PP
-reports activity of the user `george' on ttyd1, any user on the console, and
+.Ed
+.Pp
+reports activity of the user
+.Ql george
+on
+.Ql ttyd1 ,
+any user on the console, and
oneself (or a trespasser) on any terminal.
-.PP
+.Pp
Logins and logouts are checked every 10 minutes by default, but the first
-word of \fBwatch\fR can be set to a number to check every so many minutes.
+word of
+.Ic watch
+can be set to a number to check every so many minutes.
For example,
-.IP "" 4
+.Bd -literal -offset indent
set watch = (1 any any)
-.PP
-reports any login/logout once every minute. For the impatient, the \fIlog\fR
-builtin command triggers a \fBwatch\fR report at any time. All current logins
-are reported (as with the \fIlog\fR builtin) when \fBwatch\fR is first set.
-.PP
-The \fBwho\fR shell variable controls the format of \fBwatch\fR reports.
-.RE
-.TP 8
-.B who \fR(+)
-The format string for \fBwatch\fR messages. The following sequences
+.Ed
+.Pp
+reports any login/logout once every minute.
+For the impatient, the
+.Ic log
+builtin command triggers a
+.Ic watch
+report at any time.
+All current logins
+are reported (as with the
+.Ic log
+builtin) when
+.Ic watch
+is first set.
+.Pp
+The
+.Ic who
+shell variable controls the format of
+.Ic watch
+reports.
+.
+.It Ic who No (+)
+The format string for
+.Ic watch
+messages.
+The following sequences
are replaced by the given information:
-.PP
-.RS +8
-.PD 0
-.TP 4
-%n
+.
+.Bl -tag -width ".Sy Format" -offset indent
+.It Sy Format
+.Sy Who information
+.
+.It Li %n
The name of the user who logged in/out.
-.TP 4
-%a
-The observed action, i.e., `logged on', `logged off' or `replaced \fIolduser\fR on'.
-.TP 4
-%l
+.
+.It Li %a
+The observed action, i.e.,
+.Sq logged on ,
+.Sq logged off ,
+or
+.Sq replaced Ar olduser No on .
+.
+.It Li %l
The terminal (tty) on which the user logged in/out.
-.TP 4
-%M
-The full hostname of the remote host, or `local' if the login/logout was
+.
+.It Li \&%M
+The full hostname of the remote host, or
+.Sq local
+if the login/logout was
from the local host.
-.TP 4
-%m
-The hostname of the remote host up to the first `.'.
+.
+.It Li %m
+The hostname of the remote host up to the first
+.Sq \&. .
The full name is printed if it is an IP address or an X Window System display.
-.PD
-.PP
-%M and %m are available on only systems that store the remote hostname in
-\fI/etc/utmp\fR.
-If unset, `%n has %a %l from %m.' is used, or `%n has %a %l.' on systems
+.
+.El
+.Pp
+.Ql \&%M
+and
+.Ql %m
+are available on only systems that store the remote hostname in
+.Pa /etc/utmp .
+.Pp
+If unset,
+.Dl %n has %a %l from %m\&.
+is used, or
+.Dl %n has %a %l\&.
+on systems
which don't store the remote hostname.
-.RE
-.TP 8
-.B wordchars \fR(+)
+.
+.It Ic wordchars No (+)
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, 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(+)
-Equivalent to the \fBafsuser\fR shell variable.
-.TP 8
-.B COLUMNS
-The number of columns in the terminal. See \fBTerminal management\fR.
-.TP 8
-.B DISPLAY
-Used by X Window System (see \fIX\fR(1)).
-If set, the shell does not set \fBautologout\fR (q.v.).
-.TP 8
-.B EDITOR
+.Ic forward-word ,
+.Ic backward-word ,
+etc., editor commands.
+.Pp
+If unset, the default value is determined based on the state of
+.Ic vimode :
+if
+.Ic vimode
+is unset,
+.Sq Li *?_\-.[]~=
+is used as the default;
+if
+.Ic vimode
+is set,
+.Ql _
+is used as the default.
+.
+.El
+.
+.Sh ENVIRONMENT
+.Bl -tag -width 6n
+.
+.It Ev AFSUSER No (+)
+Equivalent to the
+.Ic afsuser
+shell variable.
+.
+.It Ev COMMAND_LINE
+Set by
+.Nm
+to the current command line when invoking programs
+for the
+.Ic complete
+.Ar list
+mode
+.Ql \`...\` .
+See
+.Ic complete
+in
+.Sx Builtin commands .
+.
+.It Ev COLUMNS
+The number of columns in the terminal.
+See
+.Sx Terminal management (+) .
+.
+.It Ev DISPLAY
+Used by X Window System (see
+.Xr X 1 ) .
+If set, the shell does not set
+.Ic autologout .
+.
+.It Ev EDITOR
The pathname to a default editor.
-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.
-.TP 8
-.B HOME
-Equivalent to the \fBhome\fR shell variable.
-.TP 8
-.B HOST \fR(+)
+Used by the
+.Ic run-fg-editor
+editor command if the
+the
+.Ic editors
+shell variable is unset.
+See also the
+.Ev VISUAL
+environment variable.
+.
+.It Ev GROUP No (+)
+Equivalent to the
+.Ic group
+shell variable.
+.
+.It Ev HOME
+Equivalent to the
+.Ic home
+shell variable.
+.
+.It Ev HOST No (+)
Initialized to the name of the machine on which the shell
-is running, as determined by the \fIgethostname\fR(2) system call.
-.TP 8
-.B HOSTTYPE \fR(+)
+is running, as determined by the
+.Xr gethostname 2
+system call.
+.
+.It Ev HOSTTYPE No (+)
Initialized to the type of machine on which the shell
-is running, as determined at compile time. This variable is obsolete and
+is running, as determined at compile time.
+This variable is obsolete and
will be removed in a future version.
-.TP 8
-.B HPATH \fR(+)
-A colon-separated list of directories in which the \fIrun-help\fR editor
+.
+.It Ev HPATH No (+)
+A colon-separated list of directories in which the
+.Ic run-help
+editor
command looks for command documentation.
-.TP 8
-.B LANG
+.
+.It Ev LANG
Gives the preferred character environment.
-See \fBNative Language System support\fR.
-.TP 8
-.B LC_CTYPE
+See
+.Sx Native Language System support (+) .
+.
+.It Ev LC_CTYPE
If set, only ctype character handling is changed.
-See \fBNative Language System support\fR.
-.TP 8
-.B LINES
-The number of lines in the terminal. See \fBTerminal management\fR.
-.TP 8
-.B LS_COLORS
-The format of this variable is reminiscent of the \fBtermcap(5)\fR
+See
+.Sx Native Language System support (+) .
+.
+.It Ev LINES
+The number of lines in the terminal.
+See
+.Sx Terminal management (+) .
+.
+.It Ev LS_COLORS
+The format of this variable is reminiscent of the
+.Xr termcap 5
file format; a colon-separated list of expressions of the form
-"\fIxx=string\fR", where "\fIxx\fR" is a two-character variable name. The
-variables with their associated defaults are:
-.PP
-.RS +8
-.RS +4
-.PD 0
-.TP 12
-no 0
-Normal (non-filename) text
-.TP 12
-fi 0
-Regular file
-.TP 12
-di 01;34
-Directory
-.TP 12
-ln 01;36
-Symbolic link
-.TP 12
-pi 33
-Named pipe (FIFO)
-.TP 12
-so 01;35
-Socket
-.TP 12
-do 01;35
-Door
-.TP 12
-bd 01;33
-Block device
-.TP 12
-cd 01;32
-Character device
-.TP 12
-ex 01;32
-Executable file
-.TP 12
-mi (none)
-Missing file (defaults to fi)
-.TP 12
-or (none)
-Orphaned symbolic link (defaults to ln)
-.TP 12
-lc ^[[
-Left code
-.TP 12
-rc m
-Right code
-.TP 12
-ec (none)
-End code (replaces lc+no+rc)
-.PD
-.RE
-.PP
+.Li \&" Ns Ar xx Ns Li = Ns Ar string Ns Li \&" ,
+where
+.Li \&" Ns Ar xx Ns Li \&"
+is a two-character variable name.
+.Pp
+The variables with their associated defaults are:
+.
+.Bl -column -offset indent ".Sy Var" ".Sy Default" ""
+.
+.It Sy Var Ta Sy Default Ta Sy File type
+.Pp
+.
+.It Li no Ta Li 0 Ta Normal (non-filename) text.
+.
+.It Li fi Ta Li 0 Ta Regular file.
+.
+.It Li di Ta Li 01;34 Ta Directory.
+.
+.It Li ln Ta Li 01;36 Ta Symbolic link.
+.
+.It Li pi Ta Li 33 Ta Named pipe (FIFO).
+.
+.It Li so Ta Li 01;35 Ta Socket.
+.
+.It Li do Ta Li 01;35 Ta Door.
+.
+.It Li bd Ta Li 01;33 Ta Block device.
+.
+.It Li cd Ta Li 01;32 Ta Character device.
+.
+.It Li ex Ta Li 01;32 Ta Executable file.
+.
+.It Li mi Ta (none) Ta Missing file (defaults to Li fi ) .
+.
+.It Li or Ta (none) Ta Orphaned symbolic link (defaults to Li ln ) .
+.
+.It Li lc Ta Li ^[[ Ta Left code.
+.
+.It Li rc Ta Li m Ta Right code.
+.
+.It Li ec Ta (none) Ta End code (replaces Li lc Ns + Ns Li no Ns + Ns Li rc ) .
+.
+.El
+.Pp
You need to include only the variables you want to change from
the default.
-.PP
+.Pp
File names can also be colorized based on filename extension.
-This is specified in the \fBLS_COLORS\fR variable using the syntax
-\fB"*ext=string"\fR. For example, using ISO 6429 codes, to color
-all C\-language source files blue you would specify \fB"*.c=34"\fR.
-This would color all files ending in \fB.c\fR in blue (34) color.
-.PP
+This is specified in the
+.Ev LS_COLORS
+variable using the syntax
+.Li \&"* Ns Ar ext Ns Li = Ns Ar string Ns Li \&" .
+For example, using ISO 6429 codes, to color
+all C\-language source files blue you would specify
+.Li \&"*.c=34\&" .
+This would color all files ending in
+.Ql .c
+in blue (34) color.
+.Pp
Control characters can be written either in C\-style\-escaped
-notation, or in stty\-like ^\-notation. The C\-style notation
-adds \fB^[\fR for Escape, \fB\_\fR for a normal space character,
-and \fB?\fR for Delete. In addition, the \fB^[\fR escape character
-can be used to override the default interpretation of \fB^[\fR,
-\fB^\fR, \fB:\fR and \fB=\fR.
-.PP
-Each file will be written as \fB<lc>\fR \fB<color-code>\fR
-\fB<rc>\fR \fB<filename>\fR \fB<ec>\fR. If the \fB<ec>\fR
-code is undefined, the sequence \fB<lc>\fR \fB<no>
-\fB<rc>\fR will be used instead. This is generally more convenient
-to use, but less general. The left, right and end codes are
+notation, or in stty\-like ^\-notation.
+The C\-style notation
+adds
+.Ql ^[
+for Escape,
+.Ql \_
+for a normal space character,
+and
+.Ql \&?
+for Delete.
+In addition, the
+.Ql ^[
+escape character
+can be used to override the default interpretation of
+.Ql ^[ ,
+.Ql ^ ,
+.Ql \&: ,
+and
+.Ql = .
+.Pp
+Each file will be written as
+.Dl lc Ar color-code Li rc Ar filename Li ec
+.Pp
+If the
+.Ql ec
+code is undefined, the sequence
+.Dl lc no rc
+will be used instead.
+This is generally more convenient
+to use, but less general.
+.Pp
+The left code
+.Pq Ql lc ,
+right code
+.Pq Ql rc ,
+and end codes
+.Pq Ql ec
+are
provided so you don't have to type common parts over and over
again and to support weird terminals; you will generally not
need to change them at all unless your terminal does not use
ISO 6429 color sequences but a different system.
-.PP
+.Pp
If your terminal does use ISO 6429 color codes, you can
-compose the type codes (i.e., all except the \fBlc\fR, \fBrc\fR,
-and \fBec\fR codes) from numerical commands separated by semicolons. The
-most common commands are:
-.PP
-.RS +8
-.PD 0
-.TP 4
-0
-to restore default color
-.TP 4
-1
-for brighter colors
-.TP 4
-4
-for underlined text
-.TP 4
-5
-for flashing text
-.TP 4
-30
-for black foreground
-.TP 4
-31
-for red foreground
-.TP 4
-32
-for green foreground
-.TP 4
-33
-for yellow (or brown) foreground
-.TP 4
-34
-for blue foreground
-.TP 4
-35
-for purple foreground
-.TP 4
-36
-for cyan foreground
-.TP 4
-37
-for white (or gray) foreground
-.TP 4
-40
-for black background
-.TP 4
-41
-for red background
-.TP 4
-42
-for green background
-.TP 4
-43
-for yellow (or brown) background
-.TP 4
-44
-for blue background
-.TP 4
-45
-for purple background
-.TP 4
-46
-for cyan background
-.TP 4
-47
-for white (or gray) background
-.PD
-.RE
-.PP
+compose the type codes (i.e., all except the
+.Ql lc ,
+.Ql rc ,
+and
+.Ql ec
+codes) from numerical commands separated by semicolons.
+.Pp
+The
+most common color commands are:
+.Pp
+.Bl -tag -width ".Sy Color" -offset indent -compact
+.
+.It Sy Color
+.Sy Description
+.Pp
+.
+.It Li 0
+To restore default color.
+.
+.It Li 1
+For brighter colors.
+.
+.It Li 4
+For underlined text.
+.
+.It Li 5
+For flashing text.
+.
+.It Li 30
+For black foreground.
+.
+.It Li 31
+For red foreground.
+.
+.It Li 32
+For green foreground.
+.
+.It Li 33
+For yellow (or brown) foreground.
+.
+.It Li 34
+For blue foreground.
+.
+.It Li 35
+For purple foreground.
+.
+.It Li 36
+For cyan foreground.
+.
+.It Li 37
+For white (or gray) foreground.
+.
+.It Li 40
+For black background.
+.
+.It Li 41
+For red background.
+.
+.It Li 42
+For green background.
+.
+.It Li 43
+For yellow (or brown) background.
+.
+.It Li 44
+For blue background.
+.
+.It Li 45
+For purple background.
+.
+.It Li 46
+For cyan background.
+.
+.It Li 47
+For white (or gray) background.
+.
+.El
+.Pp
Not all commands will work on all systems or display devices.
-.PP
+.Pp
A few terminal programs do not recognize the default end code
-properly. If all text gets colorized after you do a directory
-listing, try changing the \fBno\fR and \fBfi\fR codes from 0 to the
+properly.
+If all text gets colorized after you do a directory
+listing, try changing the
+.Ql no
+and
+.Ql fi
+codes from 0 to the
numerical codes for your standard fore- and background colors.
-.RE
-.TP 8
-.B MACHTYPE \fR(+)
-The machine type (microprocessor class or machine model), as determined at compile time.
-.TP 8
-.B NOREBIND \fR(+)
-If set, printable characters are not rebound to \fIself-insert-command\fR.
-See \fBNative Language System support\fR.
-.TP 8
-.B OSTYPE \fR(+)
+.Pp
+For symbolic links the
+.Ql ln
+keyword can be set to
+.Ql target ,
+which makes
+the file color the same as the color of the link target.
+.
+.It Ev MACHTYPE No (+)
+The machine type (microprocessor class or machine model),
+as determined at compile time.
+.
+.It Ev NOREBIND No (+)
+If set, printable characters are not rebound to
+.Ic self-insert-command .
+See
+.Sx Native Language System support (+) .
+.
+.It Ev OSTYPE No (+)
The operating system, as determined at compile time.
-.TP 8
-.B PATH
+.
+.It Ev PATH
A colon-separated list of directories in which to look for executables.
-Equivalent to the \fBpath\fR shell variable, but in a different format.
-.TP 8
-.B PWD \fR(+)
-Equivalent to the \fBcwd\fR shell variable, but not synchronized to it;
+Equivalent to the
+.Ic path
+shell variable, but in a different format.
+.
+.It Ev PWD No (+)
+Equivalent to the
+.Ic cwd
+shell variable, but not synchronized to it;
updated only after an actual directory change.
-.TP 8
-.B REMOTEHOST \fR(+)
+.
+.It Ev REMOTEHOST No (+)
The host from which the user has logged in remotely, if this is the case and
-the shell is able to determine it. Set only if the shell was so compiled;
-see the \fBversion\fR shell variable.
-.TP 8
-.B SHLVL \fR(+)
-Equivalent to the \fBshlvl\fR shell variable.
-.TP 8
-.B SYSTYPE \fR(+)
-The current system type. (Domain/OS only)
-.TP 8
-.B TERM
-Equivalent to the \fBterm\fR shell variable.
-.TP 8
-.B TERMCAP
-The terminal capability string. See \fBTerminal management\fR.
-.TP 8
-.B USER
-Equivalent to the \fBuser\fR shell variable.
-.TP 8
-.B VENDOR \fR(+)
+the shell is able to determine it.
+Set only if the shell was so compiled;
+see the
+.Ic version
+shell variable.
+.
+.It Ev SHLVL No (+)
+Equivalent to the
+.Ic shlvl
+shell variable.
+.
+.It Ev SYSTYPE No (+)
+The current system type.
+(Domain/OS only)
+.
+.It Ev TERM
+Equivalent to the
+.Ic term
+shell variable.
+.
+.It Ev TERMCAP
+The terminal capability string.
+See
+.Sx Terminal management (+) .
+.
+.It Ev USER
+Equivalent to the
+.Ic user
+shell variable.
+.
+.It Ev VENDOR No (+)
The vendor, as determined at compile time.
-.TP 8
-.B VISUAL
+.
+.It Ev VISUAL
The pathname to a default full-screen editor.
-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
-.I /etc/csh.cshrc
+Used by the
+.Ic run-fg-editor
+editor command if the
+the
+.Ic editors
+shell variable is unset.
+See also the
+.Ev EDITOR
+environment variable.
+.
+.El
+.
+.Sh FILES
+.Bl -tag -width 6n
+.
+.It Pa /etc/csh.cshrc
Read first by every shell.
-ConvexOS, Stellix and Intel use \fI/etc/cshrc\fR and
-NeXTs use \fI/etc/cshrc.std\fR.
-A/UX, AMIX, Cray and IRIX have no equivalent in \fIcsh\fR(1),
-but read this file in \fItcsh\fR anyway.
-Solaris 2.x does not have it either, but \fItcsh\fR reads \fI/etc/.cshrc\fR. (+)
-.TP 16
-.I /etc/csh.login
-Read by login shells after \fI/etc/csh.cshrc\fR.
-ConvexOS, Stellix and Intel use \fI/etc/login\fR,
-NeXTs use \fI/etc/login.std\fR, Solaris 2.x uses \fI/etc/.login\fR and
-A/UX, AMIX, Cray and IRIX use \fI/etc/cshrc\fR.
-.TP 16
-.I ~/.tcshrc \fR(+)
-Read by every shell after \fI/etc/csh.cshrc\fR or its equivalent.
-.TP 16
-.I ~/.cshrc
-Read by every shell, if \fI~/.tcshrc\fR doesn't exist,
-after \fI/etc/csh.cshrc\fR or its equivalent.
-This manual uses `\fI~/.tcshrc\fR' to mean `\fI~/.tcshrc\fR or,
-if \fI~/.tcshrc\fR is not found, \fI~/.cshrc\fR'.
-.TP 16
-.I ~/.history
-Read by login shells after \fI~/.tcshrc\fR
-if \fBsavehist\fR is set, but see also \fBhistfile\fR.
-.TP 16
-.I ~/.login
-Read by login shells after \fI~/.tcshrc\fR or \fI~/.history\fR.
-The shell may be compiled to read \fI~/.login\fR before instead of after
-\fI~/.tcshrc\fR and \fI~/.history\fR; see the \fBversion\fR shell variable.
-.TP 16
-.I ~/.cshdirs \fR(+)
-Read by login shells after \fI~/.login\fR
-if \fBsavedirs\fR is set, but see also \fBdirsfile\fR.
-.TP 16
-.I /etc/csh.logout
+.Pp
+ConvexOS, Stellix and Intel use
+.Pa /etc/cshrc .
+.Pp
+NeXTs use
+.Pa /etc/cshrc.std .
+.Pp
+A/UX, AMIX, Cray and IRIX have no equivalent in
+.Xr csh 1 ,
+but read this file in
+.Nm
+anyway.
+.Pp
+Solaris 2.x does not have it either, but
+.Nm
+reads
+.Pa /etc/.cshrc .
+.Pp
+(+)
+.
+.It Pa /etc/csh.login
+Read by login shells after
+.Pa /etc/csh.cshrc .
+.Pp
+ConvexOS, Stellix and Intel use
+.Pa /etc/login .
+.Pp
+NeXTs use
+.Pa /etc/login.std .
+.Pp
+Solaris 2.x uses
+.Pa /etc/.login .
+.Pp
+A/UX, AMIX, Cray and IRIX use
+.Pa /etc/cshrc .
+.
+.It Pa ~/.tcshrc No (+)
+Read by every shell after
+.Pa /etc/csh.cshrc
+or its equivalent.
+.
+.It Pa ~/.cshrc
+Read by every shell, if
+.Pa ~/.tcshrc
+doesn't exist,
+after
+.Pa /etc/csh.cshrc
+or its equivalent.
+.Pp
+This manual uses
+.Sq Pa ~/.tcshrc
+to mean
+.Do
+.Pa ~/.tcshrc
+or,
+if
+.Pa ~/.tcshrc
+is not found,
+.Pa ~/.cshrc
+.Dc .
+.
+.It Pa ~/.history
+Read by login shells after
+.Pa ~/.tcshrc
+if
+.Ic savehist
+is set, but see also
+.Ic histfile .
+.
+.It Pa ~/.login
+Read by login shells after
+.Pa ~/.tcshrc
+or
+.Pa ~/.history .
+.Pp
+The shell may be compiled to read
+.Pa ~/.login
+before instead of after
+.Pa ~/.tcshrc
+and
+.Pa ~/.history ;
+see the
+.Ic version
+shell variable.
+.
+.It Pa ~/.cshdirs No (+)
+Read by login shells after
+.Pa ~/.login
+if
+.Ic savedirs
+is set, but see also
+.Ic dirsfile .
+.
+.It Pa /etc/csh.logout
Read by login shells at logout.
-ConvexOS, Stellix and Intel use \fI/etc/logout\fR and
-NeXTs use \fI/etc/logout.std\fR.
-A/UX, AMIX, Cray and IRIX have no equivalent in \fIcsh\fR(1),
-but read this file in \fItcsh\fR anyway.
-Solaris 2.x does not have it either, but \fItcsh\fR reads \fI/etc/.logout\fR. (+)
-.TP 16
-.I ~/.logout
-Read by login shells at logout after \fI/etc/csh.logout\fR or its equivalent.
-.TP 16
-.I /bin/sh
-Used to interpret shell scripts not starting with a `#'.
-.TP 16
-.I /tmp/sh*
-Temporary file for `<<'.
-.TP 16
-.I /etc/passwd
-Source of home directories for `~name' substitutions.
-.PD
-.PP
+.Pp
+ConvexOS, Stellix and Intel use
+.Pa /etc/logout .
+NeXTs use
+.Pa /etc/logout.std .
+.Pp
+A/UX, AMIX, Cray and IRIX have no equivalent in
+.Xr csh 1 ,
+but read this file in
+.Nm
+anyway.
+.Pp
+Solaris 2.x does not have it either, but
+.Nm
+reads
+.Pa /etc/.logout .
+(+)
+.
+.It Pa ~/.logout
+Read by login shells at logout after
+.Pa /etc/csh.logout
+or its equivalent.
+.
+.It Pa /bin/sh
+Used to interpret shell scripts not starting with a
+.Ql # .
+.
+.It Pa /tmp/sh*
+Temporary file for
+.Ql << .
+.
+.It Pa /etc/passwd
+Source of home directories for
+.Sq ~name
+substitutions.
+.
+.El
+.Pp
The order in which startup files are read may differ if the shell was so
-compiled; see \fBStartup and shutdown\fR and the \fBversion\fR shell variable.
-.SH "NEW FEATURES (+)"
-This manual describes \fItcsh\fR as a single entity,
-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 \fIemacs\fR(1)\-style
-or \fIvi\fR(1)\-style key bindings.
-See \fBThe command-line editor\fR and \fBEditor commands\fR.
-.PP
+compiled; see
+.Sx Startup and shutdown
+and the
+.Ic version
+shell variable.
+.
+.Sh NEW FEATURES (+)
+This manual describes
+.Nm
+as a single entity,
+but experienced
+.Xr csh 1
+users will want to pay special attention to
+.Nm Ns
+\&'s new features.
+.Pp
+A command-line editor, which supports
+.Xr emacs 1 Ns
+\-style
+or
+.Xr vi 1 Ns
+\-style key bindings.
+See
+.Sx The command-line editor (+)
+and
+.Sx Editor commands (+) .
+.Pp
Programmable, interactive word completion and listing.
-See \fBCompletion and listing\fR and the \fIcomplete\fR and \fIuncomplete\fR
+See
+.Sx Completion and listing (+)
+and the
+.Ic complete
+and
+.Ic uncomplete
builtin commands.
-.PP
-\fBSpelling correction\fR (q.v.) of filenames, commands and variables.
-.PP
-\fBEditor commands\fR (q.v.) which perform other useful functions in the middle of
-typed commands, including documentation lookup (\fIrun-help\fR),
-quick editor restarting (\fIrun-fg-editor\fR) and
-command resolution (\fIwhich-command\fR).
-.PP
-An enhanced history mechanism. Events in the history list are time-stamped.
-See also the \fIhistory\fR command and its associated shell variables,
-the previously undocumented `#' event specifier and new modifiers
-under \fBHistory substitution\fR,
-the \fI*-history\fR, \fIhistory-search-*\fR, \fIi-search-*\fR, \fIvi-search-*\fR and
-\fItoggle-literal-history\fR editor commands
-and the \fBhistlit\fR shell variable.
-.PP
+.Pp
+.Sx Spelling correction (+)
+of filenames, commands and variables.
+.Pp
+.Sx Editor commands (+)
+which perform other useful functions in the middle of
+typed commands, including documentation lookup
+.Ic ( run-help ) ,
+quick editor restarting
+.Ic ( run-fg-editor ) ,
+and
+command resolution
+.Ic ( which-command ) .
+.Pp
+An enhanced history mechanism.
+Events in the history list are time-stamped.
+See also the
+.Ic history
+command and its associated shell variables,
+the previously undocumented
+.Ql #
+event specifier and new modifiers
+under
+.Sx History substitution ,
+the
+.Ic down-history ,
+.Ic expand-history ,
+.Ic history-search-backward ,
+.Ic history-search-forward ,
+.Ic i-search-back ,
+.Ic i-search-fwd ,
+.Ic toggle-literal-history ,
+.Ic vi-search-back ,
+.Ic vi-search-fwd ,
+and
+.Ic up-history
+editor commands
+and the
+.Ic histlit
+shell variable.
+.Pp
Enhanced directory parsing and directory stack handling.
-See the \fIcd\fR, \fIpushd\fR, \fIpopd\fR and \fIdirs\fR commands and their associated
-shell variables, the description of \fBDirectory stack substitution\fR,
-the \fBdirstack\fR, \fBowd\fR and \fBsymlinks\fR shell variables and
-the \fInormalize-command\fR and \fInormalize-path\fR editor commands.
-.PP
-Negation in glob-patterns. See \fBFilename substitution\fR.
-.PP
-New \fBFile inquiry operators\fR (q.v.) and a \fIfiletest\fR
+See the
+.Ic cd ,
+.Ic pushd ,
+.Ic popd ,
+and
+.Ic dirs
+commands and their associated
+shell variables, the description of
+.Sx Directory stack substitution (+) ,
+the
+.Ic dirstack ,
+.Ic owd ,
+and
+.Ic symlinks
+shell variables and
+the
+.Ic normalize-command
+and
+.Ic normalize-path
+editor commands.
+.Pp
+Negation in glob-patterns.
+See
+.Sx Filename substitution .
+.Pp
+New
+.Sx File inquiry operators
+and a
+.Ic filetest
builtin which uses them.
-.PP
-A variety of \fBAutomatic, periodic and timed events\fR (q.v.) including
+.Pp
+A variety of
+.Sx Automatic, periodic and timed events (+)
+including
scheduled events, special aliases, automatic logout and terminal locking,
command timing and watching for logins and logouts.
-.PP
+.Pp
Support for the Native Language System
-(see \fBNative Language System support\fR),
+(see
+.Sx Native Language System support (+) ) ,
OS variant features
-(see \fBOS variant support\fR and the \fBecho_style\fR shell variable)
-and system-dependent file locations (see \fBFILES\fR).
-.PP
-Extensive terminal-management capabilities. See \fBTerminal management\fR.
-.PP
-New builtin commands including \fIbuiltins\fR, \fIhup\fR, \fIls\-F\fR,
-\fInewgrp\fR, \fIprintenv\fR, \fIwhich\fR and \fIwhere\fR (q.v.).
-.PP
+(see
+.Sx OS variant support (+)
+and the
+.Ic echo_style
+shell variable)
+and system-dependent file locations (see
+.Sx FILES ) .
+.Pp
+Extensive terminal-management capabilities.
+See
+.Sx Terminal management (+) .
+.Pp
+New builtin commands including
+.Ic builtins ,
+.Ic hup ,
+.Ic ls\-F ,
+.Ic newgrp ,
+.Ic printenv ,
+.Ic which ,
+and
+.Ic where .
+.Pp
New variables that make useful information easily available to the shell.
-See the \fBgid\fR, \fBloginsh\fR, \fBoid\fR, \fBshlvl\fR, \fBtcsh\fR,
-\fBtty\fR, \fBuid\fR and \fBversion\fR shell variables and the \fBHOST\fR,
-\fBREMOTEHOST\fR, \fBVENDOR\fR, \fBOSTYPE\fR and \fBMACHTYPE\fR environment
+See the
+.Ic gid ,
+.Ic loginsh ,
+.Ic oid ,
+.Ic shlvl ,
+.Ic tcsh ,
+.Ic tty ,
+.Ic uid ,
+and
+.Ic version
+shell variables and the
+.Ev HOST ,
+.Ev REMOTEHOST ,
+.Ev VENDOR ,
+.Ev OSTYPE ,
+and
+.Ev MACHTYPE
+environment
variables.
-.PP
+.Pp
A new syntax for including useful information in the prompt string
-(see \fBprompt\fR),
+(see
+.Ic prompt ) ,
and special prompts for loops and spelling correction
-(see \fBprompt2\fR and \fBprompt3\fR).
-.PP
-Read-only variables. See \fBVariable substitution\fR.
-.SH BUGS
-When a suspended command is restarted, the shell prints the directory
-it started in if this is different from the current directory. This can
-be misleading (i.e., wrong) as the job may have changed directories internally.
-.PP
-Shell builtin functions are not stoppable/restartable. Command sequences
-of the form `a ; b ; c' are also not handled gracefully when stopping is
-attempted. If you suspend `b', the shell will then immediately execute
-`c'. This is especially noticeable if this expansion results from an
-\fIalias\fR. It suffices to place the sequence of commands in ()'s to force it
-to a subshell, i.e., `( a ; b ; c )'.
-.PP
-Control over tty output after processes are started is primitive; perhaps
-this will inspire someone to work on a good virtual terminal interface.
-In a virtual terminal interface much more interesting things could be
-done with output control.
-.PP
-Alias substitution is most often used to clumsily simulate shell procedures;
-shell procedures should be provided rather than aliases.
-.PP
-Control structures should be parsed rather than being recognized as
-built-in commands. This would allow control commands to be placed anywhere,
-to be combined with `|', and to be used with `&' and `;' metasyntax.
-.PP
-\fIforeach\fR doesn't ignore here documents when looking for its \fIend\fR.
-.PP
-It should be possible to use the `:' modifiers on the output of command
-substitutions.
-.PP
-The screen update for lines longer than the screen width is very poor
-if the terminal cannot move the cursor up (i.e., terminal type `dumb').
-.PP
-\fBHPATH\fR and \fBNOREBIND\fR don't need to be environment variables.
-.PP
-Glob-patterns which do not use `?', `*' or `[]' or which use `{}' or `~'
-are not negated correctly.
-.PP
-The single-command form of \fIif\fR does output redirection even if
-the expression is false and the command is not executed.
-.PP
-\fIls\-F\fR includes file identification characters when sorting filenames
-and does not handle control characters in filenames well. It cannot be
-interrupted.
-.PP
-Command substitution supports multiple commands and conditions, but not
-cycles or backward \fIgoto\fRs.
-.PP
-Report bugs at https://bugs.astron.com/, preferably with fixes. If you want to
-help maintain and test tcsh, add yourself to the mailing list in
-https://mailman.astron.com/.
-.SH THE T IN TCSH
-In 1964, DEC produced the PDP-6. The PDP-10 was a later re-implementation. It
+(see
+.Ic prompt2
+and
+.Ic prompt3 ) .
+.Pp
+Read-only variables.
+See
+.Sx Variable substitution .
+.
+.Sh THE T IN TCSH
+In 1964, DEC produced the PDP-6.
+The PDP-10 was a later re-implementation.
+It
was re-christened the DECsystem-10 in 1970 or so when DEC brought out the
second model, the KI10.
-.PP
+.Pp
TENEX was created at Bolt, Beranek & Newman (a Cambridge, Massachusetts
think tank) in
-1972 as an experiment in demand-paged virtual memory operating systems. They
-built a new pager for the DEC PDP-10 and created the OS to go with it. It was
+1972 as an experiment in demand-paged virtual memory operating systems.
+They
+built a new pager for the DEC PDP-10 and created the OS to go with it.
+It was
extremely successful in academia.
-.PP
+.Pp
In 1975, DEC brought out a new model of the PDP-10, the KL10; they intended to
have only a version of TENEX, which they had licensed from BBN, for the new
-box. They called their version TOPS-20 (their capitalization is trademarked).
+box.
+They called their version TOPS-20 (their capitalization is trademarked).
A lot of TOPS-10 users (`The OPerating System for PDP-10') objected; thus DEC
found themselves supporting two incompatible systems on the same hardware--but
then there were 6 on the PDP-11!
-.PP
+.Pp
TENEX, and TOPS-20 to version 3, had command completion
-via a user-code-level subroutine library called ULTCMD. With version 3, DEC
+via a user-code-level subroutine library called ULTCMD.
+With version 3, DEC
moved all that capability and more into the monitor (`kernel' for you Unix
types), accessed by the COMND% JSYS (`Jump to SYStem' instruction, the
supervisor call mechanism [are my IBM roots also showing?]).
-.PP
+.Pp
The creator of tcsh was impressed by this feature and several others of TENEX
and TOPS-20, and created a version of csh which mimicked them.
-.SH LIMITATIONS
+.
+.Sh LIMITATIONS
The system limits argument lists to ARG_MAX characters.
-.PP
+.Pp
The number of arguments to a command which involves filename expansion is
limited to 1/6th the number of characters allowed in an argument list.
-.PP
+.Pp
Command substitutions may substitute no more characters than are allowed in
an argument list.
-.PP
-To detect looping, the shell restricts the number of \fIalias\fR
+.Pp
+To detect looping, the shell restricts the number of
+.Ic alias
substitutions on a single line to 20.
-.SH "SEE ALSO"
-csh(1), emacs(1), ls(1), newgrp(1), sh(1), setpath(1), stty(1), su(1),
-tset(1), vi(1), x(1), access(2), execve(2), fork(2), killpg(2),
-pipe(2), setrlimit(2), sigvec(2), stat(2), umask(2), vfork(2), wait(2),
-malloc(3), setlocale(3), tty(4), a.out(5), termcap(5), environ(7),
-termio(7), Introduction to the C Shell
-.SH VERSION
-This manual documents tcsh 6.22.04 (Astron) 2021-04-26.
-.SH AUTHORS
-.PD 0
-.TP 2
-William Joy
-Original author of \fIcsh\fR(1)
-.TP 2
-J.E. Kulp, IIASA, Laxenburg, Austria
-Job control and directory stack features
-.TP 2
-Ken Greer, HP Labs, 1981
-File name completion
-.TP 2
-Mike Ellis, Fairchild, 1983
-Command name recognition/completion
-.TP 2
-Paul Placeway, Ohio State CIS Dept., 1983-1993
+.
+.Sh SEE ALSO
+.Xr csh 1 ,
+.Xr emacs 1 ,
+.Xr ls 1 ,
+.Xr newgrp 1 ,
+.Xr setpath 1 ,
+.Xr sh 1 ,
+.Xr stty 1 ,
+.Xr su 1 ,
+.Xr tset 1 ,
+.Xr vi 1 ,
+.Xr x 1 ,
+.Xr access 2 ,
+.Xr execve 2 ,
+.Xr fork 2 ,
+.Xr killpg 2 ,
+.Xr pipe 2 ,
+.Xr setrlimit 2 ,
+.Xr sigvec 2 ,
+.Xr stat 2 ,
+.Xr umask 2 ,
+.Xr vfork 2 ,
+.Xr wait 2 ,
+.Xr malloc 3 ,
+.Xr setlocale 3 ,
+.Xr tty 4 ,
+.Xr a.out 5 ,
+.Xr termcap 5 ,
+.Xr environ 7 ,
+.Xr termio 7 ,
+.Em Introduction to the C Shell
+.
+.Sh VERSION
+This manual documents tcsh 6.24.07
+(Astron) 2022-12-21.
+.
+.Sh AUTHORS
+.
+.An -nosplit
+.Bl -hang -width 2n -compact
+.
+.It An William Joy .
+.br
+Original author of
+.Xr csh 1 .
+.
+.It An J.E. Kulp ,
+IIASA, Laxenburg, Austria.
+.br
+Job control and directory stack features.
+.
+.It An Ken Greer ,
+HP Labs, 1981.
+.br
+File name completion.
+.
+.It An Mike Ellis ,
+Fairchild, 1983.
+.br
+Command name recognition/completion.
+.
+.It An Paul Placeway ,
+Ohio State CIS Dept., 1983-1993.
+.br
Command line editor, prompt routines, new glob syntax and numerous fixes
-and speedups
-.TP 2
-Karl Kleinpaste, CCI 1983-4
+and speedups.
+.
+.It An Karl Kleinpaste ,
+CCI, 1983-4.
+.br
Special aliases, directory stack extraction stuff, login/logout watch,
-scheduled events, and the idea of the new prompt format
-.TP 2
-Rayan Zachariassen, University of Toronto, 1984
-\fIls\-F\fR and \fIwhich\fR builtins and numerous bug fixes, modifications
-and speedups
-.TP 2
-Chris Kingsley, Caltech
-Fast storage allocator routines
-.TP 2
-Chris Grevstad, TRW, 1987
-Incorporated 4.3BSD \fIcsh\fR into \fItcsh\fR
-.TP 2
-Christos S. Zoulas, Cornell U. EE Dept., 1987-94
+scheduled events, and the idea of the new prompt format.
+.
+.It An Rayan Zachariassen ,
+University of Toronto, 1984.
+.br
+.Ic ls\-F
+and
+.Ic which
+builtins and numerous bug fixes, modifications
+and speedups.
+.
+.It An Chris Kingsley ,
+Caltech.
+.br
+Fast storage allocator routines.
+.
+.It An Chris Grevstad ,
+TRW, 1987.
+.br
+Incorporated 4.3BSD
+.Xr csh 1
+into
+.Nm .
+.
+.It An Christos S. Zoulas ,
+Cornell U. EE Dept., 1987-94.
+.br
Ports to HPUX, SVR2 and SVR3, a SysV version of getwd.c, SHORT_STRINGS support
-and a new version of sh.glob.c
-.TP 2
-James J Dempsey, BBN, and Paul Placeway, OSU, 1988
-A/UX port
-.TP 2
-Daniel Long, NNSC, 1988
-\fBwordchars\fR
-.TP 2
-Patrick Wolfe, Kuck and Associates, Inc., 1988
-\fIvi\fR mode cleanup
-.TP 2
-David C Lawrence, Rensselaer Polytechnic Institute, 1989
-\fBautolist\fR and ambiguous completion listing
-.TP 2
-Alec Wolman, DEC, 1989
-Newlines in the prompt
-.TP 2
-Matt Landau, BBN, 1989
-\fI~/.tcshrc\fR
-.TP 2
-Ray Moody, Purdue Physics, 1989
-Magic space bar history expansion
-.TP 2
-Mordechai ????, Intel, 1989
-printprompt() fixes and additions
-.TP 2
-Kazuhiro Honda, Dept. of Computer Science, Keio University, 1989
-Automatic spelling correction and \fBprompt3\fR
-.TP 2
-Per Hedeland, Ellemtel, Sweden, 1990-
-Various bugfixes, improvements and manual updates
-.TP 2
-Hans J. Albertsson (Sun Sweden)
-\fBampm\fR, \fIsettc\fR and \fItelltc\fR
-.TP 2
-Michael Bloom
-Interrupt handling fixes
-.TP 2
-Michael Fine, Digital Equipment Corp
-Extended key support
-.TP 2
-Eric Schnoebelen, Convex, 1990
-Convex support, lots of \fIcsh\fR bug fixes,
-save and restore of directory stack
-.TP 2
-Ron Flax, Apple, 1990
-A/UX 2.0 (re)port
-.TP 2
-Dan Oscarsson, LTH Sweden, 1990
-NLS support and simulated NLS support for non NLS sites, fixes
-.TP 2
-Johan Widen, SICS Sweden, 1990
-\fBshlvl\fR, Mach support, \fIcorrect-line\fR, 8-bit printing
-.TP 2
-Matt Day, Sanyo Icon, 1990
-POSIX termio support, SysV limit fixes
-.TP 2
-Jaap Vermeulen, Sequent, 1990-91
-Vi mode fixes, expand-line, window change fixes, Symmetry port
-.TP 2
-Martin Boyer, Institut de recherche d'Hydro-Quebec, 1991
-\fBautolist\fR beeping options, modified the history search to search for
+and a new version of sh.glob.c.
+.
+.It An James J Dempsey ,
+BBN, and
+.An Paul Placeway ,
+OSU, 1988.
+.br
+A/UX port.
+.
+.It An Daniel Long ,
+NNSC, 1988.
+.br
+.Ic wordchars .
+.
+.It An Patrick Wolfe ,
+Kuck and Associates, Inc., 1988.
+.br
+.Ic vi
+mode cleanup.
+.
+.It An David C Lawrence ,
+Rensselaer Polytechnic Institute, 1989.
+.br
+.Ic autolist
+and ambiguous completion listing.
+.
+.It An Alec Wolman ,
+DEC, 1989.
+.br
+Newlines in the prompt.
+.
+.It An Matt Landau ,
+BBN, 1989.
+.br
+.Pa ~/.tcshrc .
+.
+.It An Ray Moody ,
+Purdue Physics, 1989.
+.br
+Magic space bar history expansion.
+.
+.It An Mordechai ???? ,
+Intel, 1989.
+.br
+.Fn printprompt
+fixes and additions.
+.
+.It An Kazuhiro Honda ,
+Dept. of Computer Science, Keio University, 1989.
+.br
+Automatic spelling correction and
+.Ic prompt3 .
+.
+.It An Per Hedeland ,
+Ellemtel, Sweden, 1990-.
+.br
+Various bugfixes, improvements and manual updates.
+.
+.It An Hans J. Albertsson ,
+Sun Sweden.
+.br
+.Ic ampm ,
+.Ic settc ,
+and
+.Ic telltc .
+.
+.It An Michael Bloom .
+.br
+Interrupt handling fixes.
+.
+.It An Michael Fine ,
+Digital Equipment Corp.
+.br
+Extended key support.
+.
+.It An Eric Schnoebelen ,
+Convex, 1990.
+.br
+Convex support, lots of
+.Xr csh 1
+bug fixes,
+save and restore of directory stack.
+.
+.It An Ron Flax ,
+Apple, 1990.
+.br
+A/UX 2.0 (re)port.
+.
+.It An Dan Oscarsson ,
+LTH Sweden, 1990.
+.br
+NLS support and simulated NLS support for non NLS sites, fixes.
+.
+.It An Johan Widen ,
+SICS Sweden, 1990.
+.br
+.Ic shlvl ,
+Mach support,
+.Ic correct-line ,
+8-bit printing.
+.
+.It An Matt Day ,
+Sanyo Icon, 1990.
+.br
+POSIX termio support, SysV limit fixes.
+.
+.It An Jaap Vermeulen ,
+Sequent, 1990-91.
+.br
+Vi mode fixes, expand-line, window change fixes, Symmetry port.
+.
+.It An Martin Boyer ,
+Institut de recherche d'Hydro-Quebec, 1991.
+.br
+.Ic autolist
+beeping options, modified the history search to search for
the whole string from the beginning of the line to the cursor.
-.TP 2
-Scott Krotz, Motorola, 1991
-Minix port
-.TP 2
-David Dawes, Sydney U. Australia, Physics Dept., 1991
-SVR4 job control fixes
-.TP 2
-Jose Sousa, Interactive Systems Corp., 1991
-Extended \fIvi\fR fixes and \fIvi\fR delete command
-.TP 2
-Marc Horowitz, MIT, 1991
-ANSIfication fixes, new exec hashing code, imake fixes, \fIwhere\fR
-.TP 2
-Bruce Sterling Woodcock, sterling@netcom.com, 1991-1995
-ETA and Pyramid port, Makefile and lint fixes, \fBignoreeof\fR=n addition, and
-various other portability changes and bug fixes
-.TP 2
-Jeff Fink, 1992
-\fIcomplete-word-fwd\fR and \fIcomplete-word-back\fR
-.TP 2
-Harry C. Pulley, 1992
-Coherent port
-.TP 2
-Andy Phillips, Mullard Space Science Lab U.K., 1992
-VMS-POSIX port
-.TP 2
-Beto Appleton, IBM Corp., 1992
-Walking process group fixes, \fIcsh\fR bug fixes,
-POSIX file tests, POSIX SIGHUP
-.TP 2
-Scott Bolte, Cray Computer Corp., 1992
-CSOS port
-.TP 2
-Kaveh R. Ghazi, Rutgers University, 1992
-Tek, m88k, Titan and Masscomp ports and fixes. Added autoconf support.
-.TP 2
-Mark Linderman, Cornell University, 1992
-OS/2 port
-.TP 2
-Mika Liljeberg, liljeber@kruuna.Helsinki.FI, 1992
-Linux port
-.TP 2
-Tim P. Starrin, NASA Langley Research Center Operations, 1993
-Read-only variables
-.TP 2
-Dave Schweisguth, Yale University, 1993-4
-New man page and tcsh.man2html
-.TP 2
-Larry Schwimmer, Stanford University, 1993
-AFS and HESIOD patches
-.TP 2
-Luke Mewburn, RMIT University, 1994-6
-Enhanced directory printing in prompt,
-added \fBellipsis\fR and \fBrprompt\fR.
-.TP 2
-Edward Hutchins, Silicon Graphics Inc., 1996
+.
+.It An Scott Krotz ,
+Motorola, 1991.
+.br
+Minix port.
+.
+.It An David Dawes ,
+Sydney U. Australia, Physics Dept., 1991.
+.br
+SVR4 job control fixes.
+.
+.It An Kimmo Suominen ,
+1991-.
+.br
+Various portability and other fixes.
+Added
+.Ql $''
+(dollar-single-quotes).
+.
+.It An Jose Sousa ,
+Interactive Systems Corp., 1991.
+.br
+Extended
+.Ic vi
+fixes and
+.Ic vi
+delete command.
+.
+.It An Marc Horowitz ,
+MIT, 1991.
+.br
+ANSIfication fixes, new exec hashing code, imake fixes,
+.Ic where .
+.
+.It An Luke Mewburn ,
+1991-.
+.br
+Enhanced directory printing in
+.Ic prompt .
+Added
+.Ic ellipsis
+and
+.Ic rprompt .
+.Ic vimode
+improvements.
+Manual page improvements.
+.
+.It An Bruce Sterling Woodcock ,
+sterling@netcom.com, 1991-1995.
+.br
+ETA and Pyramid port, Makefile and lint fixes,
+.Ic ignoreeof= Ns Ar n
+addition, and
+various other portability changes and bug fixes.
+.
+.It An Jeff Fink ,
+1992.
+.br
+.Ic complete-word-fwd
+and
+.Ic complete-word-back .
+.
+.It An Harry C. Pulley ,
+1992.
+.br
+Coherent port.
+.
+.It An Andy Phillips ,
+Mullard Space Science Lab U.K., 1992.
+.br
+VMS-POSIX port.
+.
+.It An Beto Appleton ,
+IBM Corp., 1992.
+.br
+Walking process group fixes,
+.Xr csh 1
+bug fixes,
+POSIX file tests, POSIX SIGHUP.
+.
+.It An Scott Bolte ,
+Cray Computer Corp., 1992.
+.br
+CSOS port.
+.
+.It An Kaveh R. Ghazi ,
+Rutgers University, 1992.
+.br
+Tek, m88k, Titan and Masscomp ports and fixes.
+Added autoconf support.
+.
+.It An Mark Linderman ,
+Cornell University, 1992.
+.br
+OS/2 port.
+.
+.It An Mika Liljeberg ,
+liljeber@kruuna.Helsinki.FI, 1992.
+.br
+Linux port.
+.
+.It An Tim P. Starrin ,
+NASA Langley Research Center Operations, 1993.
+.br
+Read-only variables.
+.
+.It An Dave Schweisguth ,
+Yale University, 1993-4.
+.br
+New man page and tcsh.man2html.
+.
+.It An Larry Schwimmer ,
+Stanford University, 1993.
+.br
+AFS and HESIOD patches.
+.
+.It An Edward Hutchins ,
+Silicon Graphics Inc., 1996.
+.br
Added implicit cd.
-.TP 2
-Martin Kraemer, 1997
-Ported to Siemens Nixdorf EBCDIC machine
-.TP 2
-Amol Deshpande, Microsoft, 1997
+.
+.It An Martin Kraemer ,
+1997.
+.br
+Ported to Siemens Nixdorf EBCDIC machine.
+.
+.It An Amol Deshpande ,
+Microsoft, 1997.
+.br
Ported to WIN32 (Windows/95 and Windows/NT); wrote all the missing library
and message catalog code to interface to Windows.
-.TP 2
-Taga Nayuta, 1998
+.
+.It An Taga Nayuta ,
+1998.
+.br
Color ls additions.
-.PD
-.PP
-.SH "THANKS TO"
+.
+.El
+.
+.Sh THANKS TO
Bryan Dunlap, Clayton Elwell, Karl Kleinpaste, Bob Manson, Steve Romig,
Diana Smetters, Bob Sutterfield, Mark Verber, Elizabeth Zwicky and all
the other people at Ohio State for suggestions and encouragement
-.PP
+.Pp
All the people on the net, for putting up with,
reporting bugs in, and suggesting new additions to each and every version
-.PP
-Richard M. Alderson III, for writing the `T in tcsh' section
+.Pp
+Richard M. Alderson III, for writing the
+.Sx T in tcsh
+section
+.
+.Sh BUGS
+When a suspended command is restarted, the shell prints the directory
+it started in if this is different from the current directory.
+This can
+be misleading (i.e., wrong) as the job may have changed directories internally.
+.Pp
+Shell builtin functions are not stoppable/restartable.
+Command sequences
+of the form
+.Dl a \&; b \&; c
+are also not handled gracefully when stopping is
+attempted.
+If you suspend
+.Ql b ,
+the shell will then immediately execute
+.Ql c .
+This is especially noticeable if this expansion results from an
+.Ic alias .
+It suffices to place the sequence of commands in
+.Ql () Ns
+\&'s to force it
+to a subshell, i.e.,
+.Dl \&( a \&; b \&; c \&)
+.Pp
+Control over tty output after processes are started is primitive; perhaps
+this will inspire someone to work on a good virtual terminal interface.
+In a virtual terminal interface much more interesting things could be
+done with output control.
+.Pp
+Alias substitution is most often used to clumsily simulate shell procedures;
+shell procedures should be provided rather than aliases.
+.Pp
+Control structures should be parsed rather than being recognized as
+built-in commands.
+This would allow control commands to be placed anywhere,
+to be combined with
+.Ql | ,
+and to be used with
+.Ql &
+and
+.Ql \&;
+metasyntax.
+.Pp
+.Ic foreach
+doesn't ignore here documents when looking for its
+.Ic end .
+.Pp
+It should be possible to use the
+.Ql \&:
+modifiers on the output of command
+substitutions.
+.Pp
+The screen update for lines longer than the screen width is very poor
+if the terminal cannot move the cursor up (i.e., terminal type
+.Ql dumb ) .
+.Pp
+.Ev HPATH
+and
+.Ev NOREBIND
+don't need to be environment variables.
+.Pp
+Glob-patterns which do not use
+.Ql \&? ,
+.Ql * ,
+or
+.Ql [] ,
+or which use
+.Ql {}
+or
+.Ql ~
+are not negated correctly.
+.Pp
+The single-command form of
+.Ic if
+does output redirection even if
+the expression is false and the command is not executed.
+.Pp
+.Ic ls\-F
+includes file identification characters when sorting filenames
+and does not handle control characters in filenames well.
+It cannot be
+interrupted.
+.Pp
+Command substitution supports multiple commands and conditions, but not
+cycles or backward
+.Ic goto Ns
+s.
+.Pp
+Report bugs at
+.Lk https://bugs.astron.com/
+preferably with fixes.
+If you want to
+help maintain and test tcsh, add yourself to the mailing list in
+.Lk https://mailman.astron.com/mailman/listinfo/tcsh
diff --git a/tests/aliases.at b/tests/aliases.at
index 019af85cb833..0ba872e56350 100644
--- a/tests/aliases.at
+++ b/tests/aliases.at
@@ -1,4 +1,5 @@
-# Special aliases
+AT_BANNER([Special aliases])
+
TCSH_UNTESTED([beepcmd])
@@ -13,12 +14,15 @@ AT_CHECK([tcsh -f cwdcmd.csh], ,
[>> /
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([jobcmd])
+
TCSH_UNTESTED([helpcommand])
+
TCSH_UNTESTED([periodic])
+
TCSH_UNTESTED([precmd])
@@ -36,7 +40,7 @@ foo
foo
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([shell])
@@ -53,4 +57,4 @@ AT_CHECK([tcsh -f shell.csh], ,
[OK
])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/arguments.at b/tests/arguments.at
index 562fd831c9d2..13f007a7f2eb 100644
--- a/tests/arguments.at
+++ b/tests/arguments.at
@@ -1,4 +1,5 @@
-# Command-line argument handling
+AT_BANNER([Command-line argument handling])
+
AT_SETUP([-b])
@@ -8,7 +9,7 @@ AT_DATA([-script.csh],
AT_CHECK([tcsh -f -b -script.csh --version], , [--version
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([-c])
@@ -28,7 +29,7 @@ AT_CHECK([tcsh -f -c 'echo \\'], ,
AT_CHECK([tcsh -f -c])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([-d])
@@ -40,7 +41,7 @@ AT_SETUP([-e])
AT_CHECK([tcsh -f -e -c 'echo 1; (exit 3); echo 2'], 3, [1
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([-f])
@@ -53,7 +54,7 @@ AT_CHECK([echo 'echo $1' | tcsh -f -q -i foo], ,
> exit
]])
-AT_CLEANUP
+AT_CLEANUP()
# Warning message contains strerror(EBADF), libc-dependent; can't be turned
@@ -69,12 +70,13 @@ TCSH_UNTESTED([-m])
TCSH_UNTESTED([-q])
+
#AT_SETUP([-q])
# Nested to make the SIGQUIT reporting predictable
#AT_CHECK([tcsh -f -q -c 'kill -QUIT $$'], 131, ,)
-#AT_CLEANUP
+#AT_CLEANUP()
AT_SETUP([-s])
@@ -82,7 +84,7 @@ AT_SETUP([-s])
AT_CHECK([echo 'echo $1' | tcsh -f -s foo], , [foo
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([-t])
@@ -94,7 +96,7 @@ AT_DATA([input.csh],
AT_CHECK([tcsh -f -t < input.csh], , [1 2
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([-v])
@@ -106,7 +108,7 @@ OK
[repeat 2 echo OK
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([-x])
@@ -120,14 +122,15 @@ echo OK
echo OK
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([-V])
-TCSH_UNTESTED([-X])
+TCSH_UNTESTED([-X])
TCSH_UNTESTED([--help])
+
TCSH_UNTESTED([--version])
@@ -138,8 +141,7 @@ AT_CHECK([tcsh -f -Z], 1, ,
Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
]])
-AT_CLEANUP
-
+AT_CLEANUP()
AT_SETUP([non-option arguments])
@@ -163,4 +165,4 @@ AT_DATA([unreadable.csh],
chmod 0 unreadable.csh
AT_CHECK([tcsh -f unreadable.csh], 1, [], [ignore])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/commands.at b/tests/commands.at
index cf0fcf03ec40..211ee5a6f918 100644
--- a/tests/commands.at
+++ b/tests/commands.at
@@ -1,4 +1,5 @@
-# Individual built-in commands
+AT_BANNER([Individual built-in commands])
+
TCSH_UNTESTED([%])
@@ -7,17 +8,17 @@ AT_SETUP([:])
AT_CHECK([tcsh -f -c ': foo'])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([@])
# Not testing much...
AT_CHECK([tcsh -f -c 'set' > out1 && tcsh -f -c '@' > out2])
-AT_CHECK([diff out1 out2 | tail -n +2], ,
-[< command set
----
-> command @
+AT_CHECK([diff -U0 out1 out2 | tail -n +3], [], [dnl
+@@ -5 +5 @@
+-command set
++command @
])
AT_CHECK([tcsh -f -c '@ var=2 * 3; echo $var'], ,
@@ -39,7 +40,7 @@ AT_CHECK([[tcsh -f -c \
0 1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([alias])
@@ -74,13 +75,16 @@ AT_CHECK([tcsh -f alias.csh 2>&1], ,
bar
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([alloc])
+
TCSH_UNTESTED([bg])
+
TCSH_UNTESTED([bindkey])
-#TCSH_UNTESTED([bs2cmd])
+
+dnl TCSH_UNTESTED([bs2cmd])
AT_SETUP([break])
@@ -127,7 +131,7 @@ AT_CHECK([tcsh -f break2.csh], ,
Line 2
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([builtins])
@@ -200,7 +204,7 @@ AT_CHECK([tcsh -f chdir.csh], , [expout],
Usage: chdir [-plvn][-|<dir>].
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([complete])
@@ -217,7 +221,7 @@ AT_CHECK([tcsh -f complete.csh], ,
'n/A/t:*/_' 'n/[^A]/t:*/_'
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([continue])
@@ -263,7 +267,7 @@ AT_CHECK([tcsh -f continue2.csh], ,
Line 2
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([dirs])
@@ -331,8 +335,7 @@ AT_CHECK([echo x"`/bin/pwd`"x > /tmp/x && sed "s,`/bin/pwd`,CWD,g" < saved], ,
pushd CWD/a
])
-AT_CLEANUP
-
+AT_CLEANUP()
AT_SETUP([echo])
@@ -342,7 +345,7 @@ AT_CHECK([tcsh -f -c 'echo OK'], ,
[OK
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([echotc])
@@ -354,7 +357,7 @@ AT_CHECK([tcsh -f -c 'set cmd="echo OK"; eval $cmd'], ,
[OK
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([exec])
@@ -363,7 +366,7 @@ AT_CHECK([tcsh -f -c 'exec echo OK'], ,
[OK
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([exit])
@@ -372,7 +375,7 @@ AT_CHECK([tcsh -f -c 'exit (50 * 4)'], 200)
AT_CHECK([tcsh -f -c '(exit 50); exit'], 0)
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([fg])
@@ -380,7 +383,7 @@ TCSH_UNTESTED([fg])
AT_SETUP([filetest])
-touch file1 file2
+touch file1 file2 'b{c'
chmod 6777 file1
chmod 000 file2
@@ -417,6 +420,10 @@ AT_CHECK([tcsh -f -c 'filetest -s file1 nonempty'], ,
[0 1
])
+AT_CHECK([tcsh -f -c 'filetest -f "b{c"'], ,
+[1
+])
+
mkdir dir
chmod +t dir
ln -s file2 link
@@ -498,7 +505,7 @@ AT_CHECK([tcsh -f -c 'filetest -N unknown'], ,
[-1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([foreach])
@@ -514,10 +521,11 @@ b
c
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([getspath])
+
TCSH_UNTESTED([getxvers])
@@ -529,7 +537,7 @@ AT_CHECK([[tcsh -f -c 'glob a b c' | od -c] dnl
0000005
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([goto])
@@ -554,7 +562,7 @@ Here
OK
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([hashstat])
@@ -687,7 +695,7 @@ set savehist= ( 5 merge )
history -S hist3
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([hup])
@@ -709,7 +717,7 @@ AT_CHECK([tcsh -f -c 'onintr -; nohup tcsh -f hup.csh' < /dev/null], ignore,
# The prefix form requires job control and is not tested
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([if])
@@ -768,10 +776,11 @@ OK
OK
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([inlib])
+
TCSH_UNTESTED([jobs])
@@ -789,7 +798,7 @@ AT_CHECK([tcsh -f -c 'tcsh -f -i -q < kill.csh'], ignore,
# kill %job, kill -l untested untested
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([limit])
@@ -803,7 +812,7 @@ log
]])
AT_CHECK([tcsh -f log.csh])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([login])
@@ -815,7 +824,7 @@ AT_CHECK([tcsh -f -c 'logout'], 1, [],
[Not a login shell.
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([ls-F])
@@ -883,7 +892,7 @@ lnowhere@
pipe|
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([migrate])
@@ -898,7 +907,7 @@ AT_CHECK([tcsh -f -c 'nice set var=1; echo $?var'], ,
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([nohup])
@@ -915,7 +924,7 @@ AT_CHECK([tcsh -f -c 'onintr -; nohup tcsh -f nohup.csh' < /dev/null], ,
[OK
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([notify])
@@ -940,7 +949,7 @@ AT_CHECK([tcsh -f onintr.csh], ,
OK
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([popd])
@@ -985,7 +994,7 @@ CWD @&t@
Usage: popd [-plvn] [-|+<n>].
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([printenv])
@@ -998,7 +1007,7 @@ AT_CHECK([env_var=value tcsh -f -c 'printenv' | grep env_var], ,
[env_var=value
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([pushd])
@@ -1065,14 +1074,14 @@ CWD / @&t@
Usage: pushd [-plvn] [-|<dir>|+<n>].
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([rehash])
AT_CHECK([tcsh -f -c 'rehash'])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([repeat])
@@ -1085,10 +1094,11 @@ OK
AT_CHECK([tcsh -f -c 'repeat 0 echo > file' && test -f file -a ! -s file])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([rootnode])
+
TCSH_UNTESTED([sched]) # We don't want to wait for minutes, so ...
@@ -1129,7 +1139,7 @@ val2a val2x
[set: $my_var4 is read-only.
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([setenv])
@@ -1150,13 +1160,17 @@ AT_CHECK([tcsh -f -c 'setenv env_var value; ./output.sh'], ,
[value
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([setpath])
+
TCSH_UNTESTED([setspath])
+
TCSH_UNTESTED([settc])
+
TCSH_UNTESTED([setty])
+
TCSH_UNTESTED([setxvers])
@@ -1197,7 +1211,7 @@ shift: No more words.
4]
)
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([source])
@@ -1236,10 +1250,11 @@ AT_DATA([unreadable.csh],
chmod 000 unreadable.csh
AT_CHECK([tcsh -f -c 'source unreadable.csh'], 1, [], [ignore])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([stop])
+
TCSH_UNTESTED([suspend])
@@ -1296,7 +1311,7 @@ OK2
OK3
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([telltc])
@@ -1323,7 +1338,7 @@ AT_CHECK([tcsh -f umask.csh], ,
2
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([unalias])
@@ -1336,7 +1351,7 @@ alias
]])
AT_CHECK([tcsh -f unalias.csh])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([uncomplete])
@@ -1349,17 +1364,18 @@ complete
]])
AT_CHECK([tcsh -f uncomplete.csh])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([unhash])
AT_CHECK([tcsh -f -c 'unhash'])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([universe])
+
TCSH_UNTESTED([unlimit])
@@ -1375,7 +1391,7 @@ AT_CHECK([tcsh -f unset.csh], ,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([unsetenv])
@@ -1389,7 +1405,7 @@ AT_CHECK([env_bar=value tcsh -f unsetenv.csh], ,
[
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([ver])
@@ -1400,10 +1416,11 @@ AT_SETUP([wait])
# Not really...
AT_CHECK([tcsh -f -c 'wait'])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([warp])
+
TCSH_UNTESTED([watchlog])
@@ -1423,7 +1440,7 @@ ls-F is a shell built-in
CWD/ls-F
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([which])
@@ -1448,7 +1465,7 @@ this_does_not_exist: Command not found.
echo: aliased to echo_alias
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([while])
@@ -1468,7 +1485,7 @@ AT_CHECK([tcsh -f while.csh], ,
OK
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([jobs output])
@@ -1487,10 +1504,10 @@ endif
]])
AT_CHECK([tcsh -f jobs_stdout.csh], 0, [ignore])
-AT_CLEANUP
+AT_CLEANUP()
-AT_SETUP([time output])
+AT_SETUP([time output])
AT_DATA([time_output.csh],
[[
@@ -1506,4 +1523,4 @@ endif
]])
AT_CHECK([tcsh -f time_output.csh], 0, [ignore])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/expr.at b/tests/expr.at
index fa373c8fcb4d..bf9d7ba5f642 100644
--- a/tests/expr.at
+++ b/tests/expr.at
@@ -1,4 +1,5 @@
-# Expression evaluation
+AT_BANNER([Expression evaluation])
+
AT_SETUP([Arithmetic operators])
@@ -70,7 +71,7 @@ AT_CHECK([tcsh -f -c 'exit (~ 254)'], 1)
AT_CHECK([tcsh -f -c 'exit ((3))'], 3)
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Primary expressions])
@@ -163,5 +164,5 @@ AT_CHECK([tcsh -f -c 'exit ( -Z nonempty )'], 1)
AT_CHECK([tcsh -f -c 'exit ( -N unknown )'], 255)
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/history.at b/tests/history.at
index 2eb8e318b49d..ee04832cd3d8 100644
--- a/tests/history.at
+++ b/tests/history.at
@@ -1,12 +1,15 @@
# Test of the history functions. Some of these are already tested in
# variables and commands.
+AT_BANNER([history])
+
+
AT_SETUP([history])
# Check history duplicate erase
AT_DATA([hist-base.csh],
[[set histdup=erase history=( 5 "%h TIME %R\n")
-echo $histdup $history
+printf "'%s' %s\n" "$histdup" "$history"
: 1
: 2
: 3
@@ -15,8 +18,7 @@ echo $histdup $history
]])
AT_CHECK([{ cat hist-base.csh; echo "!4"; } > hist.csh; \
tcsh -f -q -i < hist.csh], 1,
-[> erase 5 %h TIME %R
-
+[> 'erase' 5 %h TIME %R\n
> exit
],
[4: Event not found.
@@ -25,8 +27,7 @@ AT_CHECK([{ cat hist-base.csh; echo "!4"; } > hist.csh; \
# Try all four variants with different values of histdup.
AT_CHECK([{ cat hist-base.csh; echo : 4; echo history 9; } > hist.csh; ] dnl
[tcsh -f -q -i < hist.csh], ,
-[> erase 5 %h TIME %R
-
+[> 'erase' 5 %h TIME %R\n
3 TIME : 1
5 TIME : 3
6 TIME : 2
@@ -36,8 +37,7 @@ AT_CHECK([{ cat hist-base.csh; echo : 4; echo history 9; } > hist.csh; ] dnl
],)
AT_CHECK([{ sed 's/erase/all/' hist-base.csh; echo : 4; echo history 9;}] dnl
[> hist.csh; tcsh -f -q -i < hist.csh], ,
-[> all 5 %h TIME %R
-
+[> 'all' 5 %h TIME %R\n
3 TIME : 1
4 TIME : 2
5 TIME : 3
@@ -47,8 +47,7 @@ AT_CHECK([{ sed 's/erase/all/' hist-base.csh; echo : 4; echo history 9;}] dnl
],)
AT_CHECK([{ sed 's/erase/prev/' hist-base.csh; echo : 4; echo history 9; }] dnl
[> hist.csh; tcsh -f -q -i < hist.csh], ,
-[> prev 5 %h TIME %R
-
+[> 'prev' 5 %h TIME %R\n
4 TIME : 2
5 TIME : 3
6 TIME : 2
@@ -58,8 +57,7 @@ AT_CHECK([{ sed 's/erase/prev/' hist-base.csh; echo : 4; echo history 9; }] dnl
],)
AT_CHECK([{ sed 's/erase//' hist-base.csh; echo : 4; echo history 9;}] dnl
[> hist.csh; tcsh -f -q -i < hist.csh], ,
-[> 5 %h TIME %R
-
+[> '' 5 %h TIME %R\n
5 TIME : 3
6 TIME : 2
7 TIME : 4
@@ -80,8 +78,7 @@ history 9
]])
AT_CHECK([[cat hist-base.csh hist-ev.csh > hist.csh; ] dnl
[ tcsh -f -q -i < hist.csh ]], ,
-[> erase 5 %h TIME %R
-
+[> 'erase' 5 %h TIME %R\n
3 TIME : 1
6 TIME : 2
8 TIME : : 1
@@ -102,8 +99,7 @@ AT_CHECK([[cat hist-base.csh hist-ev.csh > hist.csh; ] dnl
# erase mode.
AT_CHECK([[{ cat hist-base.csh; sed 's/x !6/: !6/' hist-ev.csh;}] dnl
[> hist.csh; tcsh -f -q -i < hist.csh ]], ,
-[> erase 5 %h TIME %R
-
+[> 'erase' 5 %h TIME %R\n
3 TIME : 1
6 TIME : 2
8 TIME : : 1
@@ -123,7 +119,8 @@ AT_CHECK([[{ cat hist-base.csh; sed 's/x !6/: !6/' hist-ev.csh;}] dnl
# + 7 TIME : 4
# 8 TIME : : 1
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([history performance])
@@ -157,7 +154,7 @@ set histSize=$1
set usedup=$2
set usemerge=$3
-: echo in tcshrc with history size $histSize at `date +%F\ %T.%N`
+: echo in tcshrc with history size $histSize at `date +%F\ %T`
set histfile=test.history
echo Generating
@ len = `wc -l < $histfile` / 2
@@ -174,15 +171,15 @@ else
endif
: echo "savehist=$savehist" "history=$history"
: # Cannot use the time built-in because history is a shell function
-echo Loading at `date +%F\ %T.%N`
+echo Loading at `date +%F\ %T`
history -L
: 'wc -l $histfile; history | wc -l; history | head -2; history | tail -2'
-echo Saving at `date +%F\ %T.%N`
+echo Saving at `date +%F\ %T`
history -S
-echo Done at `date +%F\ %T.%N`
+echo Done at `date +%F\ %T`
]])
AT_CHECK([[ tcsh -f -q -i 5000 erase 1 < hist-load-save.csh] dnl
- [ | sed 's/ at [-: 0-9.]*/ at TIME/' ]], 0,
+ [ | sed 's/ at [-: 0-9]*/ at TIME/' ]], 0,
[> Generating
Loading at TIME
Saving at TIME
@@ -191,7 +188,7 @@ Done at TIME
], [])
AT_CHECK([[ tcsh -f -q -i 4096 erase 1 < hist-load-save.csh] dnl
- [ | sed 's/ at [-: 0-9.]*/ at TIME/' ]], 0,
+ [ | sed 's/ at [-: 0-9]*/ at TIME/' ]], 0,
[> Generating
Loading at TIME
Saving at TIME
@@ -203,32 +200,38 @@ Done at TIME
# different histdup settings ("all", "prev", or "") and with merge (for
# savehist) set to 0 instead of 1.
-AT_CLEANUP
-
-AT_SETUP([history faults])
+AT_CLEANUP()
+
+
+### AT_SETUP([history faults])
+###
+### # Try some things that have caused failures before
+### #
+### # XXX: I guess previously setting the history shell variable to a string
+### # XXX: worked and then history would barf. But now set barfs already.
+### #
+### AT_DATA([hist-err.csh],
+### [[set histfile=test.history histdup=erase history=0
+### set savehist = (4096 merge)
+### echo next
+### set history="(5 %h %R\n)"
+### ]])
+###
+### AT_CHECK([[ tcsh -f -q -i < hist-err.csh]], 0,
+### [> next
+### > exit
+### ], [])
+###
+### AT_CHECK([[ ( cat hist-err.csh; echo history; echo echo done ) | ] dnl
+### [ tcsh -f -q -i ]], 1,
+### [> next
+### > exit
+### ],
+### [history: Badly formed number.
+### ])
+###
+### AT_CLEANUP()
-# Try some things that have caused failures before
-AT_DATA([hist-err.csh],
-[[set histfile=test.history histdup=erase history=0
-set savehist = (4096 merge)
-echo next
-set history="(5 %h TIME %R\n)"
-]])
-
-AT_CHECK([[ tcsh -f -q -i < hist-err.csh]], 0,
-[> next
-> exit
-], [])
-
-AT_CHECK([[ ( cat hist-err.csh; echo history; echo echo done ) | ] dnl
- [ tcsh -f -q -i ]], 1,
-[> next
-> exit
-],
-[history: Badly formed number.
-])
-
-AT_CLEANUP
AT_SETUP([history hup])
@@ -250,33 +253,37 @@ echo Using $program "($progpath)" to run tcsh inside a pty
set -e
-saveHistfile=
+# Don't clobber ~/.history and also avoid loading it.
+# A large ~/.history might take >1s to load causing a timeout.
+HOME=$PWD
+export HOME
+
histfile=$PWD/test.history
# Initialize the history file to something small but non-zero.
{ echo "#+1234567890"; echo echo dummy history; } > $histfile
setHistSize() {
- histsize=`stat -c %s $histfile`
+ histsize=`ls -l $histfile | awk '{print $5}'`
[ $histsize -gt 0 ] || exit 3 # should never happen
- histdate=`stat -c %Y $histfile`
- ls -l --full-time $histfile
- echo size is $histsize date is $histdate at `date`
+ histinode=`ls -i $histfile | awk '{print $1}'`
+ ls -li $histfile
+ echo size is $histsize inode is $histinode at `date`
}
checkHistSize () {
local oldS=$1
- local oldD=$2
- local newHistsize=`stat -c %s $histfile`
- local newHistdate=`stat -c %Y $histfile`
- ls -l --full-time $histfile
- echo size is now $newHistsize date is now $newHistdate at `date`
- # if the size not zero while the date and size are not both unchanged then
+ local oldI=$2
+ local newHistsize=`ls -l $histfile | awk '{print $5}'`
+ local newHistinode=`ls -i $histfile | awk '{print $1}'`
+ ls -li $histfile
+ echo size is now $newHistsize inode is now $newHistinode at `date`
+ # if the size not zero while the inode and size are not both unchanged then
# the test is successful
- [ $newHistsize -eq 0 ] && \
+ [ $newHistsize -le 0 ] && \
{ echo FAILED: history file truncated; return 66; }
- [ $newHistsize -gt 0 -a \
- \( $oldS -ne $newHistsize -o $oldD -ne $newHistdate \) ] || \
- { echo check hist size/date failed, try rerunning test; return 66; }
+ [ $oldS -eq $newHistsize ] && [ $oldI -eq $newHistinode ] && \
+ { echo check hist size/inode failed, try rerunning test; return 66; }
+ return 0
}
tcshPath=`which tcsh`
@@ -284,13 +291,6 @@ tcshPath=`which tcsh`
tcshInput=hist-kill.csh
[ -e $tcshInput ] || exit 2
-# To avoid the problem of large history files that may take more than 1 second
-# to read, replace the user's history file with the small one created above.
-saveHistfile=$PWD/save.history.$$
-origHistfile=$HOME/.history
-mv $origHistfile $saveHistfile
-cp $histfile $origHistfile # initialize contents created above
-
if [ $program = script ]; then
# use script to create the pty
( echo 'set histfile='$histfile; cat $tcshInput ; sleep 2; echo exit ) | \
@@ -298,6 +298,7 @@ if [ $program = script ]; then
sleep 1
setHistSize
# Not sure if there is a more standard way to do this.
+ # XXX: non-portable use of ps(1) -- could we kill script(1) instead?
childScript=`ps --ppid $scriptPid --no-headers --format pid`
[ -n $childScript -a $childScript -gt 1 ] && kill $childScript
elif [ $program = xterm ]; then
@@ -320,10 +321,7 @@ else
echo unsupported program $program
fi
sleep 1
-checkHistSize $histsize $histdate || rc=$?
-# Restore original history file, if necessary
-[ -n "$saveHistfile" ] && mv $saveHistfile $origHistfile
-[ -z "$rc" ] || exit $rc
+checkHistSize $histsize $histdate || exit $rc
echo Done testing tcsh with $program successfully
]])
@@ -332,13 +330,13 @@ AT_DATA([hist-kill.csh],
set savehist=(20 merge)
history -S
echo $version pid=$$
-/bin/ls -l --full-time ~/.hi* ./*history*
+ls -li ~/.hi* ./*history*
]])
# Try both variants of this script, then the C version.
-AT_CHECK([sh hist-kill.sh script], 0, stdout, stderr)
-AT_CHECK([[if [ -n "$DISPLAY" ]; then sh hist-kill.sh xterm; ] dnl
- [ else echo Skip xterm test: no display; fi]], 0, stdout, stderr)
+### AT_CHECK([sh hist-kill.sh script], 0, stdout, stderr)
+### AT_CHECK([[if [ -n "$DISPLAY" ]; then sh hist-kill.sh xterm; ] dnl
+### [ else echo Skip xterm test: no display; fi]], 0, stdout, stderr)
AT_DATA([hist-kill.c],
[[/* Test tcsh response to loss of pseudo-terminal (pty) master. Creates a pty
@@ -441,4 +439,4 @@ AT_CHECK([if cc -o hist-kill hist-kill.c -lutil; ] dnl
[ else echo C compiler failed, skipping this approach; fi],
0, stdout, stderr)
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/lexical.at b/tests/lexical.at
index d42d3ea15aed..fd941150445b 100644
--- a/tests/lexical.at
+++ b/tests/lexical.at
@@ -1,4 +1,5 @@
-# Lexical analysis and substitutions
+AT_BANNER([Lexical analysis and substitutions])
+
AT_SETUP([Word splitting])
@@ -25,7 +26,7 @@ AT_CHECK([tcsh -f oneword.csh], ,
[&|;<>()&||<<>>space tab end
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Comments])
@@ -47,7 +48,7 @@ AT_CHECK([tcsh -f comment2.csh], ,
[testing... OK
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Escaping special characters])
@@ -78,7 +79,7 @@ dnl " Pacify emacs
AT_CHECK([tcsh -f -c "echo 'foo\'bar'"], 1, , [Unmatched '''.
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Preventing substitution])
@@ -149,7 +150,7 @@ AT_CHECK([tcsh -f noalias.csh])
AT_CHECK([tcsh -f -c 'echo "g?*b"'], , [g?*b
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([History basics])
@@ -199,7 +200,7 @@ AT_CHECK([tcsh -f nohist.csh], ,
[[! space ! tab != !( newline !
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Event specification])
@@ -341,7 +342,7 @@ numberx
echo numberx
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Word selection])
@@ -390,7 +391,7 @@ echo 2 3 4
echo 1 2 3 4 5
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([History modifiers])
@@ -465,7 +466,7 @@ set var= ( foo b r b z quux )
set var= ( foo b r b z quux )
]])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Alias substitution])
@@ -493,7 +494,7 @@ no bug
[Alias loop.
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Variable substitution])
@@ -545,7 +546,7 @@ arg1 arg2
`"{}$@'
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Quoting of expansions in `...`])
@@ -604,7 +605,8 @@ endif
AT_CHECK([tcsh -f uniformity_test.csh], 0,[OK])
AT_CHECK([tcsh -f quoting_result_test.csh], 0, [OK])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([\echo for git_tcsh_completion])
@@ -625,7 +627,8 @@ AT_CHECK([tcsh -f escape_echo.csh], 0,
3
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([:gas work as described in the man pages])
@@ -647,7 +650,8 @@ qq we qq wb
QQ we QQ wb
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([avoid infinite loop in :gas])
@@ -661,7 +665,8 @@ AT_CHECK([tcsh -f replace_all.csh], 0,
[baba
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([/a.b/c:r doesn't remove path elements])
@@ -675,7 +680,8 @@ AT_CHECK([tcsh -f colon_r_no_extension.csh], 0,
[/a.b/c
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([$x:q:h does not cause out of memory crash and yields the full string])
@@ -689,7 +695,8 @@ AT_CHECK([tcsh -f x_colon_q_colon_h.csh], 0,
[a/b c/d.e
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([$x:q:t does not cause out of memory crash and yields the full string])
@@ -703,7 +710,8 @@ AT_CHECK([tcsh -f x_colon_q_colon_h.csh], 0,
[a/b c/d.e
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([$x:q:r yields the full string])
@@ -717,7 +725,8 @@ AT_CHECK([tcsh -f x_colon_q_colon_r.csh], 0,
[a/b c/d.e
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([$x:q:e yields nothing])
@@ -731,5 +740,4 @@ AT_CHECK([tcsh -f x_colon_q_colon_e.csh], 0,
[
])
-AT_CLEANUP
-
+AT_CLEANUP()
diff --git a/tests/mb-eucjp.at b/tests/mb-eucjp.at
index 473437b7e069..de60cbbb8843 100644
--- a/tests/mb-eucjp.at
+++ b/tests/mb-eucjp.at
@@ -1,5 +1,8 @@
# EUC-JP multibyte handling test case. This file uses the EUC-JP encoding.
+AT_BANNER([EUC-JP multibyte])
+
+
AT_SETUP([EUC-JP multibyte test])
AT_DATA([input.csh],
@@ -94,4 +97,4 @@ AT_CHECK([LC_ALL=en_US.UTF-8 tcsh -f input.csh], ,
[AAA
])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/mb-utf8.at b/tests/mb-utf8.at
index 0433e4647108..3c893645192c 100644
--- a/tests/mb-utf8.at
+++ b/tests/mb-utf8.at
@@ -1,5 +1,8 @@
# UTF-8 multibyte handling test case. This file uses the UTF-8 encoding.
+AT_BANNER([UTF-8 multibyte])
+
+
AT_SETUP([UTF-8 multibyte test])
AT_DATA([input.csh],
@@ -94,4 +97,4 @@ AT_CHECK([LC_ALL=ja_JP.eucjp tcsh -f input.csh], ,
[AAA
])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/noexec.at b/tests/noexec.at
index 02a92d92ba54..ed9b838cf632 100644
--- a/tests/noexec.at
+++ b/tests/noexec.at
@@ -1,4 +1,5 @@
-# '-n' handling
+AT_BANNER([-n handling])
+
AT_SETUP([-n])
@@ -138,4 +139,4 @@ end
AT_CHECK([tcsh -f -n continuenoskip.csh], 1, [], [Missing name for redirect.
])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/parenthesis.at b/tests/parenthesis.at
index 2832b503e794..246f71813e26 100644
--- a/tests/parenthesis.at
+++ b/tests/parenthesis.at
@@ -1,6 +1,8 @@
-# Parenthesis handling
+AT_BANNER([Parenthesis handling])
+
AT_SETUP([Parenthesis no space])
+
AT_DATA([no-space.csh],
[[
if(1 == 1) then
@@ -12,12 +14,15 @@ else
echo 3
endif
]])
+
AT_CHECK([tcsh -f < no-space.csh], ,[1
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([Parenthesis space])
+
AT_DATA([space.csh],
[[
if (1 == 1) then
@@ -29,12 +34,15 @@ else
echo 3
endif
]])
+
AT_CHECK([tcsh -f < space.csh], ,[1
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([Parenthesis space escaped])
+
AT_DATA([space-escaped.csh],
[[
if (1 == 1) then
@@ -46,18 +54,23 @@ else
echo 3
endif
]])
+
AT_CHECK([tcsh -f < space-escaped.csh], ,[1
])
-AT_CLEANUP
+
+AT_CLEANUP()
+
AT_SETUP([Parenthesis escaped])
+
AT_DATA([parenthesis-escaped.csh],
[[
if ( ')' == \) ) then
echo 1
endif
]])
+
AT_CHECK([tcsh -f < parenthesis-escaped.csh], ,[1
])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/sh.dol.at b/tests/sh.dol.at
index 46e8ad714d8d..6eec783dfc75 100644
--- a/tests/sh.dol.at
+++ b/tests/sh.dol.at
@@ -1,4 +1,5 @@
-# $... substitution handling
+AT_BANNER([$... substitution handling])
+
AT_SETUP([$<])
@@ -11,10 +12,12 @@ end
END:
exit 0
]])
+
AT_DATA([input],
[[foo
!@#$%^&*()_+-=[]{};':"\|,./<>?`~
]])
+
AT_CHECK([tcsh -f cat.csh < input | cmp -s input -])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/subst.at b/tests/subst.at
index 40f5d85f1da2..8056f74a7b18 100644
--- a/tests/subst.at
+++ b/tests/subst.at
@@ -1,4 +1,5 @@
-# Optional substitutions
+AT_BANNER([Optional substitutions])
+
AT_SETUP([Command substitution])
@@ -14,6 +15,7 @@ set csubstnonl
echo `echo 1; \\
echo 2`
]])
+
AT_CHECK([tcsh -f backq.csh], 1,
[4
2
@@ -23,7 +25,7 @@ AT_CHECK([tcsh -f backq.csh], 1,
[ : Command not found.
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Filename substitution])
@@ -31,7 +33,7 @@ AT_SETUP([Filename substitution])
AT_DATA([files.csh],
[[mkdir d
cd d
-touch foo baz bar .quux '*'
+touch Fiz foo baz bar .quux '*'
echo *a* *[ox] [f.]* .q* ./*[ox] ./[f.]* ./.q* \*
echo [a-g]* [^b]* ^b?r
echo { ba{z,r} } {}
@@ -41,9 +43,10 @@ echo nothing*
set noglob
echo foo* ab{c,d} ^fo*
]])
+
AT_CHECK([tcsh -f files.csh], ,
[bar baz foo foo .quux ./foo ./foo ./.quux *
-bar baz foo * foo * baz foo
+bar baz foo * Fiz foo * Fiz baz foo
{ baz bar } {}
foo
nothing*
@@ -80,7 +83,7 @@ echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
], , [1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Directory stack substitution])
@@ -115,4 +118,4 @@ Directory stack not that deep.
2
])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/syntax.at b/tests/syntax.at
index eeaacc66c618..80634267317e 100644
--- a/tests/syntax.at
+++ b/tests/syntax.at
@@ -1,4 +1,5 @@
-# Command syntax
+AT_BANNER([Command syntax])
+
AT_SETUP([Command combinations])
@@ -36,7 +37,7 @@ async
[[[1] Done ( sleep 1; echo async )]]
)
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([Command execution])
@@ -81,6 +82,7 @@ cat << `EOF`
$var
`EOF`
]])
+
AT_CHECK([tcsh -f heredoc.csh], ,
[[$\`
abc
@@ -191,4 +193,4 @@ dnl touch output
dnl AT_CHECK([tcsh -f -c 'set noclobber=(notempty ask); echo OK >& output'])
-AT_CLEANUP
+AT_CLEANUP()
diff --git a/tests/testsuite.at b/tests/testsuite.at
index d358a7f8ab09..c52ac1bb9ef4 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,27 +1,28 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
-AT_INIT
+AT_INIT([tcsh])
+
+AT_COLOR_TESTS()
+
AT_TESTED([tcsh])
-m4_define([TCSH_UNTESTED],
-[AT_SETUP([$1])
+m4_define([TCSH_UNTESTED], [dnl
+AT_SETUP([$1])
AT_CHECK([exit 77])
-AT_CLEANUP
+AT_CLEANUP()
])
m4_include([aliases.at])
m4_include([arguments.at])
m4_include([commands.at])
m4_include([expr.at])
-# Disabled because of non-portable use of stat
-#m4_include([history.at])
+m4_include([history.at])
m4_include([lexical.at])
m4_include([mb-eucjp.at])
m4_include([mb-utf8.at])
+m4_include([noexec.at])
m4_include([parenthesis.at])
+m4_include([sh.dol.at])
m4_include([subst.at])
m4_include([syntax.at])
m4_include([variables.at])
-
-m4_include([noexec.at])
-m4_include([sh.dol.at])
diff --git a/tests/variables.at b/tests/variables.at
index 9db088665753..cb796569c12a 100644
--- a/tests/variables.at
+++ b/tests/variables.at
@@ -1,27 +1,34 @@
-# Special shell variables
+AT_BANNER([Special shell variables])
+
# The space after $ is to avoid expanding the variables in testsuite output,
-# to work-around a bug in autotest
+# and to allow the variable names to be used as a testsuite keyword
+# (e.g., "-k time").
+# If the space is not desired, use "$[]foo" instead of "$ foo".
+
-# Not testing any functionality
-m4_define([VAR_UNSET],
-[AT_SETUP([$ $1])
+dnl VAR_UNSET - Not testing any specific functionality for variable
+dnl
+m4_define([VAR_UNSET], [dnl
+AT_SETUP([$ $1])
AT_CHECK([tcsh -f -c 'echo $?$1'], ,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
])
-m4_define([ENV_SET],
-[AT_SETUP([$ $1])
+
+m4_define([ENV_SET], [dnl
+AT_SETUP([$ $1])
AT_CHECK([tcsh -f -c 'printenv $1'], 0, [ignore])
-AT_CLEANUP
+AT_CLEANUP()
])
-m4_define([ENV_UNSET],
-[AT_SETUP([$ $1])
+
+m4_define([ENV_UNSET], [dnl
+AT_SETUP([$ $1])
AT_CHECK([tcsh -f -c 'printenv $1'], 1,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
])
@@ -32,10 +39,11 @@ AT_CHECK([tcsh -f -c 'echo $?addsuffix'], ,
])
# Nothing more
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([afsuser])
+
VAR_UNSET([ampm])
@@ -61,7 +69,7 @@ AT_CHECK([tcsh -f exit_status.csh],,
1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ argv])
@@ -71,12 +79,15 @@ AT_CHECK([tcsh -f -c 'echo $argv; echo $2' foo bar baz], ,
bar
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([autocorrect])
+
VAR_UNSET([autoexpand])
+
VAR_UNSET([autolist])
+
TCSH_UNTESTED([$ autologout])
@@ -115,7 +126,7 @@ foo\bar
foo\bar
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([catalog])
@@ -137,10 +148,11 @@ AT_CHECK([tcsh -f cdpath.csh], ,
~/tcsh_test_dir @&t@
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([color])
+
VAR_UNSET([colorcat])
@@ -157,12 +169,15 @@ AT_CHECK([tcsh -f command.csh], ,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([complete])
+
VAR_UNSET([continue])
+
VAR_UNSET([continue_args])
+
VAR_UNSET([correct])
@@ -211,7 +226,7 @@ Invalid null command.
4
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ cwd])
@@ -244,10 +259,11 @@ CWD
foo
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([dextract]) # Behavior tested with pushd
+
VAR_UNSET([dirsfile])
@@ -273,10 +289,11 @@ AT_CHECK([tcsh -f dirstack.csh | sed "s,$PWD,CWD,g"], ,
/dev CWD
])
-AT_CLEANUP
+AT_CLEANUP()
TCSH_UNTESTED([$ dspmbyte])
+
VAR_UNSET([dunique]) # Behavior tested with pushd
@@ -309,7 +326,7 @@ some_file
echo some_*
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ echo_style])
@@ -339,7 +356,40 @@ foob r
b\tr
])
-AT_CLEANUP
+AT_CLEANUP()
+
+
+AT_SETUP([$ echo_hex])
+
+AT_DATA([echo_hex.csh],
+[[set echo_style=sysv
+echo '\x'
+echo '\xg'
+echo '\x61'
+echo '\x61g'
+echo '\x{61}'
+echo '\x{61}g'
+echo '\x{61g'
+echo '\u'
+echo '\ug'
+echo '\u61'
+echo '\u61g'
+]])
+AT_CHECK([tcsh -f echo_hex.csh], ,
+[\x
+\xg
+a
+ag
+a
+ag
+\x{61g
+\u
+\ug
+a
+ag
+])
+
+AT_CLEANUP()
AT_SETUP([$ edit])
@@ -354,7 +404,7 @@ AT_CHECK([TERM=dumb tcsh -f -c 'echo $?edit'], ,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ ellipsis])
@@ -382,10 +432,11 @@ AT_CHECK([tcsh -f -i -q < ellipsis0.csh], ,
[> ~...b exit
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([fignore])
+
VAR_UNSET([filec])
@@ -395,7 +446,7 @@ AT_CHECK([(tcsh -f -c 'echo $gid'; id -gr) | uniq | wc -l | tr -d ' \t'], ,
[1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ group])
@@ -413,7 +464,7 @@ foo
bar
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ histchars])
@@ -436,7 +487,7 @@ Ok
echo Ok
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ histdup])
@@ -490,7 +541,7 @@ AT_CHECK([[tcsh -f -q -i < histdup.csh] dnl
> exit
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([histfile])
@@ -559,7 +610,7 @@ history
history -S hist2
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ history])
@@ -578,7 +629,7 @@ CWD,~, 6, 6, 6,%,0,value,>,history
> exit
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ home])
@@ -613,7 +664,7 @@ AT_CHECK([(unset HOME; tcsh -f -c 'echo $?home; printenv HOME')], 1,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([ignoreeof])
@@ -654,10 +705,11 @@ cd ~/subdir
> exit
], [experr])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([inputmode])
+
VAR_UNSET([killdup])
@@ -668,7 +720,7 @@ AT_CHECK([tcsh -f -c 'echo $killring'], ,
])
# Nothing more
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ listflags])
@@ -688,14 +740,20 @@ AT_CHECK([tcsh -f listflags.csh], ,
-xFA -something .
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([listjobs])
-VAR_UNSET([listlinks]) # Functionality tested with ls-F
+
+# Functionality tested with ls-F
+VAR_UNSET([listlinks])
+
VAR_UNSET([listmax])
+
VAR_UNSET([listmaxrows])
-VAR_UNSET([loginsh]) # Can't test the other case
+
+VAR_UNSET([loginsh]) dnl Can't test the other case
+
VAR_UNSET([logout])
@@ -715,7 +773,7 @@ AT_CHECK([tcsh -f mail.csh], ,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ cdtohome])
@@ -731,22 +789,34 @@ esac;
export HOME;
tcsh -f -c 'cd'
], 0)
-AT_CLEANUP
+AT_CLEANUP()
+
+
AT_SETUP([$ noimplicithome])
+
AT_CHECK([tcsh -f -c 'unset cdtohome; cd'], 1, , [cd: Too few arguments.
])
-AT_CLEANUP
+
+AT_CLEANUP()
VAR_UNSET([matchbeep])
+
VAR_UNSET([nobeep])
-VAR_UNSET([noclobber]) # Functionality tested with "Command execution"
+
+# Functionality tested with "Command execution"
+VAR_UNSET([noclobber])
+
VAR_UNSET([noding])
+
# Functionality tested with "Filename substitution" and
# "Directory stack substitution"
VAR_UNSET([noglob])
+
VAR_UNSET([nostat])
+
VAR_UNSET([notify])
+
TCSH_UNTESTED([$ oid])
@@ -770,7 +840,7 @@ CWD
/bin
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ path])
@@ -801,7 +871,7 @@ subdir:.
. foo . bar .
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ printexitvalue])
@@ -822,7 +892,7 @@ Exit 1
Exit 3
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ prompt])
@@ -841,7 +911,7 @@ AT_CHECK([tcsh -f -i -q < prompt.csh | sed "s,$PWD,CWD,"], ,
CWD/a/b,~/a/b,b,b,~/a/b,~/a/b,~/<1>b,~/<1>b,b,8,8,8,%,0,value,>,50 exit
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ prompt2])
@@ -850,7 +920,7 @@ AT_CHECK([echo 'echo "$prompt2"' | tcsh -f], ,
[%R? @&t@
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ prompt3])
@@ -859,7 +929,8 @@ AT_CHECK([echo 'echo "$prompt3"' | tcsh -f], ,
[CORRECT>%R (y|n|e|a)? @&t@
])
-AT_CLEANUP
+AT_CLEANUP()
+
AT_SETUP([$ promptchars])
@@ -872,13 +943,19 @@ AT_CHECK([tcsh -f -i -q < promptchars.csh], ,
_ exit
])
-AT_CLEANUP
+AT_CLEANUP()
+
+# Functionality tested with pushd
+VAR_UNSET([pushdtohome])
+
+# Functionality tested with pushd
+VAR_UNSET([pushdsilent])
-VAR_UNSET([pushdtohome]) # Functionality tested with pushd
-VAR_UNSET([pushdsilent]) # Functionality tested with pushd
VAR_UNSET([recexact])
+
VAR_UNSET([recognize_only_executablers])
+
VAR_UNSET([rmstar])
@@ -898,11 +975,13 @@ AT_CHECK([tcsh -f -i -q < rprompt.csh | sed "s,$PWD,CWD,"], ,
> CWD/a/b,~/a/b,b,b,~/a/b,~/a/b,~/<1>b,~/<1>b,b,8,8,8,%,0,value,>,50 exit
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([savedirs])
+
VAR_UNSET([savehist])
+
VAR_UNSET([sched])
@@ -916,7 +995,7 @@ AT_CHECK([SHELL=foo/tcsh tcsh -f -c 'echo $shell'], ,
[foo/tcsh
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ shlvl])
@@ -932,7 +1011,7 @@ tcsh -f -c 'tcsh -f -c "printenv SHLVL"'
tcsh -f -c 'exec tcsh -f -c "printenv SHLVL"'
tcsh -f -c '(exec tcsh -f -c "printenv SHLVL")'
]])
-AT_CHECK([SHLVL=5 tcsh -f shlvl.csh], ,
+AT_CHECK([env SHLVL=5 tcsh -f shlvl.csh], ,
[6
8
2
@@ -942,7 +1021,7 @@ AT_CHECK([SHLVL=5 tcsh -f shlvl.csh], ,
4
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ status])
@@ -954,14 +1033,14 @@ if ( $status > 128 ) echo OK
true
echo $status
]])
-AT_CHECK([tcsh -f status.csh 2>&1 | sed 's/Abort (core dumped)/Abort/'], ,
+AT_CHECK([tcsh -f status.csh 2>&1 | sed 's/Abort *(core dumped)/Abort/'], ,
[0
Abort
OK
0
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ symlinks])
@@ -992,7 +1071,7 @@ CWD
1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ tcsh])
@@ -1001,7 +1080,7 @@ AT_CHECK([tcsh -f -c 'echo $?tcsh'], ,
[1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ term])
@@ -1023,10 +1102,11 @@ AT_CHECK([(unset TERM; tcsh -f -c 'echo $?term; printenv TERM')], 1,
[0
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([time])
+
VAR_UNSET([tperiod])
@@ -1036,7 +1116,7 @@ AT_CHECK([tcsh -f -c 'echo ">$tty<"' < /dev/null], ,
[><
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ uid])
@@ -1045,7 +1125,7 @@ AT_CHECK([(tcsh -f -c 'echo $uid'; id -ru) | uniq | wc -l | tr -d ' \t'], ,
[1
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ user])
@@ -1074,7 +1154,7 @@ AT_CHECK([(unset LOGNAME; USER=foo tcsh -f -c 'echo $user; printenv LOGNAME')],
foo
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ verbose])
@@ -1100,7 +1180,7 @@ AT_CHECK([tcsh -f -i -q < verbose.csh], ,
echo $verbose
])
-AT_CLEANUP
+AT_CLEANUP()
AT_SETUP([$ version])
@@ -1109,12 +1189,15 @@ AT_CHECK([tcsh -f -c 'echo $?version'], ,
[1
])
-AT_CLEANUP
+AT_CLEANUP()
VAR_UNSET([visiblebell])
+
VAR_UNSET([watch])
+
VAR_UNSET([who])
+
VAR_UNSET([wordchars])
diff --git a/tw.color.c b/tw.color.c
index 9f12c36f160c..6a12b458f8b6 100644
--- a/tw.color.c
+++ b/tw.color.c
@@ -157,7 +157,8 @@ static size_t nextensions = 0;
static char *colors = NULL;
int color_context_ls = FALSE; /* do colored ls */
-static int color_context_lsmF = FALSE; /* do colored ls-F */
+static int color_context_lsmF = FALSE; /* do colored ls-F */
+int color_as_referent = FALSE; /* ln=target in LS_COLORS */
static int getstring (char **, const Char **, Str *, int);
static void put_color (const Str *);
@@ -201,7 +202,7 @@ getstring(char **dp, const Char **sp, Str *pd, int f)
while (*s && (*s & CHAR) != (Char)f && (*s & CHAR) != ':') {
if ((*s & CHAR) == '\\' || (*s & CHAR) == '^') {
- if ((sc = parseescape(&s)) == CHAR_ERR)
+ if ((sc = parseescape(&s, TRUE)) == CHAR_ERR)
return 0;
}
else
@@ -383,6 +384,9 @@ parseLS_COLORS(const Char *value)
if (i < nvariables) {
v += 3;
getstring(&c, &v, &variables[i].color, ':');
+ if (i == VSym)
+ color_as_referent = strcasecmp(
+ variables[VSym].color.s, "target") == 0;
continue;
}
else
@@ -471,8 +475,28 @@ print_with_color(const Char *filename, size_t len, Char suffix)
if (color_context_lsmF &&
(haderr ? (didfds ? is2atty : isdiagatty) :
(didfds ? is1atty : isoutatty))) {
- print_color(filename, len, suffix);
- xprintf("%S", filename);
+
+ if (suffix == '@' && color_as_referent) {
+ char *f = short2str(filename);
+ Char c = suffix;
+ char buf[MAXPATHLEN + 1];
+
+ while (c == '@') {
+ ssize_t b = readlink(f, buf, MAXPATHLEN);
+ if (b == -1) {
+ c = '&';
+ break;
+ }
+ buf[b] = '\0';
+
+ c = filetype(STRNULL, str2short(buf));
+ f = buf;
+ }
+
+ print_color(filename, len, c);
+ } else
+ print_color(filename, len, suffix);
+ xprintf("%" TCSH_S, filename);
if (0 < variables[VEnd].color.len)
put_color(&variables[VEnd].color);
else {
@@ -480,9 +504,8 @@ print_with_color(const Char *filename, size_t len, Char suffix)
put_color(&variables[VNormal].color);
put_color(&variables[VRight].color);
}
- }
- else
- xprintf("%S", filename);
+ } else
+ xprintf("%" TCSH_S, filename);
xputwchar(suffix);
}
diff --git a/tw.decls.h b/tw.decls.h
index e699f60fbc65..bd4baae127a1 100644
--- a/tw.decls.h
+++ b/tw.decls.h
@@ -125,6 +125,9 @@ 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 *);
+
+extern int color_as_referent;
+extern Char filetype (const Char *, const Char *);
#endif /* COLOR_LS_F */
#endif /* _h_tw_decls */
diff --git a/tw.h b/tw.h
index f297e869b922..c0e83ee70036 100644
--- a/tw.h
+++ b/tw.h
@@ -78,7 +78,7 @@
#define ismetahash(a) (ismeta(a) && (a) != '#')
#define SEARCHLIST "HPATH" /* Env. param for helpfile searchlist */
-#define DEFAULTLIST ":/usr/man/cat1:/usr/man/cat8:/usr/man/cat6:/usr/local/man/cat1:/usr/local/man/cat8:/usr/local/man/cat6" /* if no HPATH */
+#define DEFAULTLIST ":/usr/share/man/cat1:/usr/share/man/cat8:/usr/share/man/cat6:/usr/local/share/man/cat1:/usr/local/share/man/cat8:/usr/local/share/man/cat6" /* if no HPATH */
typedef enum {
LIST, LIST_ALL, RECOGNIZE, RECOGNIZE_ALL, RECOGNIZE_SCROLL,
diff --git a/tw.parse.c b/tw.parse.c
index 366a704c5915..8be498d2cbbd 100644
--- a/tw.parse.c
+++ b/tw.parse.c
@@ -103,8 +103,7 @@ static int insert_meta (const Char *, const Char *,
static int tilde (struct Strbuf *, Char *);
static int expand_dir (const Char *, struct Strbuf *, DIR **,
COMMAND);
-static int nostat (Char *);
-static Char filetype (Char *, Char *);
+static int nostat (const Char *);
static int t_glob (Char ***, int);
static int c_glob (Char ***);
static int is_prefix (Char *, Char *);
@@ -235,13 +234,13 @@ tenematch(Char *inputline, int num_read, COMMAND command)
const Char *p;
xprintf(CGETS(30, 1, "starting_a_command %d\n"), looking);
- xprintf("\ncmd_start:%S:\n", qline.s + cmd_start);
- xprintf("qline:%S:\n", qline.s);
+ xprintf("\ncmd_start:%" TCSH_S ":\n", qline.s + cmd_start);
+ xprintf("qline:%" TCSH_S ":\n", qline.s);
xprintf("qline:");
for (p = qline.s; *p; p++)
xprintf("%c", *p & QUOTE ? '-' : ' ');
xprintf(":\n");
- xprintf("word:%S:\n", qline.s + word);
+ xprintf("word:%" TCSH_S ":\n", qline.s + word);
xprintf("word:");
for (p = qline.s + word; *p; p++)
xprintf("%c", *p & QUOTE ? '-' : ' ');
@@ -261,7 +260,7 @@ tenematch(Char *inputline, int num_read, COMMAND command)
looking = tw_complete(qline.s + cmd_start, &p, &pat, looking, &suf);
wordp = p - qline.s;
#ifdef TDEBUG
- xprintf(CGETS(30, 3, "complete %d %S\n"), looking, pat);
+ xprintf(CGETS(30, 3, "complete %d %" TCSH_S "\n"), looking, pat);
#endif
}
@@ -982,7 +981,7 @@ tw_collect_items(COMMAND command, int looking, struct Strbuf *exp_dir,
tw_next_entry[looking](&item, exp_dir, &flags) != 0)) {
Strbuf_terminate(&item);
#ifdef TDEBUG
- xprintf("item = %S\n", item.s);
+ xprintf("item = %" TCSH_S "\n", item.s);
#endif
switch (looking) {
case TW_FILE:
@@ -1198,7 +1197,7 @@ tw_collect_items(COMMAND command, int looking, struct Strbuf *exp_dir,
break;
}
#ifdef TDEBUG
- xprintf("done item = %S\n", item.s);
+ xprintf("done item = %" TCSH_S "\n", item.s);
#endif
}
cleanup_until(&item);
@@ -1350,7 +1349,7 @@ tw_collect(COMMAND command, int looking, struct Strbuf *exp_dir,
jmp_buf_t osetexit;
#ifdef TDEBUG
- xprintf("target = %S\n", target);
+ xprintf("target = %" TCSH_S "\n", target);
#endif
ni = 0;
getexit(osetexit);
@@ -1488,7 +1487,7 @@ tw_list_items(int looking, int numitems, int list_max)
Char **w = tw_item_get();
for (i = 0; i < numitems; i++) {
- xprintf("%S", w[i]);
+ xprintf("%" TCSH_S "", w[i]);
if (Tty_raw_mode)
xputchar('\r');
xputchar('\n');
@@ -1600,7 +1599,7 @@ t_search(struct Strbuf *word, COMMAND command, int looking, int list_max,
case TW_EXPLAIN:
if (command == LIST && pat != NULL) {
- xprintf("%S", pat);
+ xprintf("%" TCSH_S "", pat);
if (Tty_raw_mode)
xputchar('\r');
xputchar('\n');
@@ -1696,7 +1695,7 @@ t_search(struct Strbuf *word, COMMAND command, int looking, int list_max,
if ((dir_fd = opendir(short2str(exp_dir.s))) == NULL) {
if (command == RECOGNIZE)
xprintf("\n");
- xprintf("%S: %s", exp_dir.s, strerror(errno));
+ xprintf("%" TCSH_S ": %s", exp_dir.s, strerror(errno));
if (command != RECOGNIZE)
xprintf("\n");
NeedsRedraw = 1;
@@ -1957,7 +1956,7 @@ expand_dir(const Char *dir, struct Strbuf *edir, DIR **dfd, COMMAND cmd)
* From: Amos Shapira <amoss@cs.huji.ac.il>
* Print a better message when completion fails
*/
- xprintf("\n%S %s\n", edir->len ? edir->s : (tdir ? tdir : dir),
+ xprintf("\n%" TCSH_S " %s\n", edir->len ? edir->s : (tdir ? tdir : dir),
(errno == ENOTDIR ? CGETS(30, 10, "not a directory") :
(errno == ENOENT ? CGETS(30, 11, "not found") :
CGETS(30, 12, "unreadable"))));
@@ -1993,7 +1992,7 @@ expand_dir(const Char *dir, struct Strbuf *edir, DIR **dfd, COMMAND cmd)
* or very large directories.
*/
static int
-nostat(Char *dir)
+nostat(const Char *dir)
{
struct varent *vp;
Char **cp;
@@ -2014,81 +2013,82 @@ nostat(Char *dir)
* Return a character that signifies a filetype
* symbology from 4.3 ls command.
*/
-static Char
-filetype(Char *dir, Char *file)
+Char
+filetype(const Char *dir, const Char *file)
{
- if (dir) {
- Char *path;
- char *ptr;
- struct stat statb;
+ Char *path;
+ char *ptr;
+ struct stat statb;
- if (nostat(dir)) return(' ');
+ if (!dir || nostat(dir))
+ goto out;
- path = Strspl(dir, file);
- ptr = short2str(path);
- xfree(path);
+ path = Strspl(dir, file);
+ ptr = short2str(path);
+ xfree(path);
+
+ if (lstat(ptr, &statb) == -1)
+ goto out;
- if (lstat(ptr, &statb) != -1) {
#ifdef S_ISLNK
- if (S_ISLNK(statb.st_mode)) { /* Symbolic link */
- if (adrof(STRlistlinks)) {
- if (stat(ptr, &statb) == -1)
- return ('&');
- else if (S_ISDIR(statb.st_mode))
- return ('>');
- else
- return ('@');
- }
- else
- return ('@');
- }
+ if (S_ISLNK(statb.st_mode)) { /* Symbolic link */
+ if (adrof(STRlistlinks)) {
+ if (stat(ptr, &statb) == -1)
+ return '&';
+ else if (S_ISDIR(statb.st_mode))
+ return '>';
+ else
+ return '@';
+ }
+ else
+ return '@';
+ }
#endif
#ifdef S_ISSOCK
- if (S_ISSOCK(statb.st_mode)) /* Socket */
- return ('=');
+ if (S_ISSOCK(statb.st_mode)) /* Socket */
+ return '=';
#endif
#ifdef S_ISFIFO
- if (S_ISFIFO(statb.st_mode)) /* Named Pipe */
- return ('|');
+ if (S_ISFIFO(statb.st_mode)) /* Named Pipe */
+ return '|';
#endif
#ifdef S_ISHIDDEN
- if (S_ISHIDDEN(statb.st_mode)) /* Hidden Directory [aix] */
- return ('+');
+ if (S_ISHIDDEN(statb.st_mode)) /* Hidden Directory [aix] */
+ return '+';
#endif
#ifdef S_ISCDF
- {
- struct stat hpstatb;
- char *p2;
+ {
+ struct stat hpstatb;
+ char *p2;
- p2 = strspl(ptr, "+"); /* Must append a '+' and re-stat(). */
- if ((stat(p2, &hpstatb) != -1) && S_ISCDF(hpstatb.st_mode)) {
- xfree(p2);
- return ('+'); /* Context Dependent Files [hpux] */
- }
- xfree(p2);
- }
+ p2 = strspl(ptr, "+"); /* Must append a '+' and re-stat(). */
+ if ((stat(p2, &hpstatb) != -1) && S_ISCDF(hpstatb.st_mode)) {
+ xfree(p2);
+ return '+'; /* Context Dependent Files [hpux] */
+ }
+ xfree(p2);
+ }
#endif
#ifdef S_ISNWK
- if (S_ISNWK(statb.st_mode)) /* Network Special [hpux] */
- return (':');
+ if (S_ISNWK(statb.st_mode)) /* Network Special [hpux] */
+ return ':';
#endif
#ifdef S_ISCHR
- if (S_ISCHR(statb.st_mode)) /* char device */
- return ('%');
+ if (S_ISCHR(statb.st_mode)) /* char device */
+ return '%';
#endif
#ifdef S_ISBLK
- if (S_ISBLK(statb.st_mode)) /* block device */
- return ('#');
+ if (S_ISBLK(statb.st_mode)) /* block device */
+ return '#';
#endif
#ifdef S_ISDIR
- if (S_ISDIR(statb.st_mode)) /* normal Directory */
- return ('/');
+ if (S_ISDIR(statb.st_mode)) /* normal Directory */
+ return '/';
#endif
- if (statb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))
- return ('*');
- }
- }
- return (' ');
+ if (statb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))
+ return '*';
+out:
+ return ' ';
} /* end filetype */
@@ -2203,11 +2203,12 @@ print_by_column(Char *dir, Char *items[], int count, int no_file_suffix)
#else /* ifndef COLOR_LS_F */
if (no_file_suffix) {
/* Print the command name */
- xprintf("%S", items[i]);
+ xprintf("%" TCSH_S, items[i]);
}
else {
/* Print filename followed by '/' or '*' or ' ' */
- xprintf("%-S%c", items[i], filetype(dir, items[i]));
+ xprintf("%-" TCSH_S "%c", items[i],
+ filetype(dir, items[i]));
wx++;
}
#endif /* COLOR_LS_F */
diff --git a/win32/README.NT b/win32/README.NT
index e17cb9c10a8f..47ccea081066 100644
--- a/win32/README.NT
+++ b/win32/README.NT
@@ -18,7 +18,7 @@ Compiling:
---------
tcsh currently only compiles with Microsoft Visual C++ (2.0 and greater) on
-x86 or Alpha platforms. Simply copy config/win32 to config.h and
+x86 or Alpha platforms. Simply copy system/win32 to config.h and
win32/makefile.win32 to the base directory.
run nmake -f makefile.win32