Commit Graph

283 Commits

Author SHA1 Message Date
martin ea9288bf30 Fix the build for variants that do not define EDIT. 2022-09-15 11:35:06 +00:00
christos e473cf6a19 Update editing before prompt printing. 2022-09-14 17:06:16 +00:00
christos d0aa7ee82f defer editing setup/cleanup to when we are interactive. 2022-09-14 16:15:51 +00:00
hgutch ec184f3bfb Change back various occurrences of \*[Le], \*[Ge] (less/greater equal)
and \*(ua (upwards arrow) to literal "<=", ">=" and "^" whenever
appropriate (e.g., in code examples).
2022-08-28 10:48:15 +00:00
uwe e7d7b85e33 csh(1): fix punctuation at the end of an .Xr line 2022-07-09 21:19:44 +00:00
andvar 2fa7e14158 fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
andvar 715cc6e2dc s/backgound/background/ 2021-12-19 21:02:49 +00:00
msaitoh 22b6bc1f53 s/commmand/command/ in comment. 2021-12-05 04:35:38 +00:00
christos e79ccca6dc provide a way to reset setproctitle. 2021-09-16 19:34:21 +00:00
christos a902e362a3 like zsh, have jobs -Z do setproctitle 2021-09-11 20:55:03 +00:00
christos 883c178e25 Turn on EL_SAFEREAD 2021-08-15 12:16:02 +00:00
mlelstv e5ab0163dd Print real maxrss value like other shells. 2020-10-17 08:46:02 +00:00
christos 883939c9f3 undo previous for 'r' and 'e' modifiers; they should no go further than
the last '/'.
2020-10-02 17:33:13 +00:00
christos e06f645ac3 Fix
% set x='a/b c/d.e'
% echo $x:q:h
2020-09-30 17:51:10 +00:00
msaitoh 57920690e6 s/occurence/occurrence/ 2020-09-29 02:58:51 +00:00
dholland 00826baa83 Use the right size for several calloc calls.
When allocating for a Char **, it should use sizeof(Char *), not
sizeof(Char **). This doesn't actually affect the results except
on DS9000 though :-)

(part 2, the instance in this file was as far as I can tell
inexplicably missed by CVS on the first go...)
2020-08-09 00:53:38 +00:00
dholland eadef030c6 Clarify some comments. 2020-08-09 00:51:12 +00:00
dholland 7f63690a47 Use the right size for several calloc calls.
When allocating for a Char **, it should use sizeof(Char *), not
sizeof(Char **). This doesn't actually affect the results except
on DS9000 though :-)
2020-08-09 00:34:21 +00:00
dholland 85bd10cb24 Don't cast the value returned from *malloc. No change to compiler output. 2020-08-09 00:22:53 +00:00
simonb ccc205ceda Add '-t' option for tcsh-style time output. 2020-04-23 07:54:53 +00:00
joerg e5e328a1f9 Don't depend on common declarations. 2020-04-03 18:11:29 +00:00
fox bbacb4192b bin/csh: Fix the -Wclobber warning.
Mark the variable as volatile as it can be clobbered when a vfork occurs.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-05 20:06:17 +00:00
christos f550769e95 Add file completion. 2020-01-12 18:42:41 +00:00
christos 08c40aa982 remove unused 2020-01-12 18:36:55 +00:00
christos a02ac89d43 PR/54853: Greg Oster: unable to 'unset filec' or 'unset edit' in csh
While here allow set edit=vi
2020-01-12 03:50:30 +00:00
mrg 684b182f81 compare pointers with NULL not '\0'. 2019-02-01 08:29:03 +00:00
christos ab87f51e55 PR/53837: Michael Scholz: src/bin/csh/func.c from current has a superfluous
fprintf
2019-01-06 01:22:50 +00:00
christos afec7330e3 put back x in xrealloc 2019-01-05 16:56:25 +00:00
christos 1767ce60a2 Welcome to the 21th century csh: retire "ptr_t" now that we have "void *" 2019-01-05 16:54:00 +00:00
maya bd073e6366 Remove Free, s/xfree/free/.
Standard C says that free should be a no-op for a NULL pointer, so
we don't need an extra function to do this.

While here, add an XXX about a wrong sounding comment
2019-01-05 10:51:06 +00:00
christos 2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
christos 397b110260 Add a variant that passes the format, so that time(1) can use it. 2017-07-15 14:35:55 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos 8080de59a7 switch to a backtracking instead of a recursive pattern matcher. 2017-04-27 18:50:34 +00:00
sevan a275f45a6c C Shell appeared in 2BSD, not 3BSD 2016-08-10 17:16:47 +00:00
christos c1d7b11ef3 add Will Robinson comment. 2016-03-16 22:35:44 +00:00
christos b4f0f90a59 Avoid gcc-5 conversion warning (|= expands to int) 2016-03-16 22:25:05 +00:00
dholland 076d336118 remove .if make(install)
these are seriously bad juju
2014-07-05 23:12:33 +00:00
dholland b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
mrg 26f35dd6b6 remove the build support for GCC 4.1, and any hacks i found for it.
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
2014-06-13 01:17:45 +00:00
christos eca938ae97 CID 1060854: Wrong sizeof argument (SIZEOF_MISMATCH) 2013-08-06 05:42:43 +00:00
christos 37e3924882 WARNS=6 [-Wconversion] 2013-07-16 17:47:43 +00:00
christos 2227ba4bf1 Make shifting variables reflect their environment counterparts. Makes
"shift path" work as expected.
2013-04-03 17:32:24 +00:00
he 85e98624ed When using -ledit, also use -lterminfo, to allow static linking. 2013-01-25 19:07:14 +00:00
christos 0961e62ab9 Obey SMALLPROG and don't enable the editor 2013-01-25 14:20:57 +00:00
christos 185136779b make history kind of work :-), turn libedit support on. 2013-01-23 16:39:03 +00:00
christos 9263138f08 fix compilation without -DEDIT 2013-01-22 22:40:31 +00:00
wiz cefd6eea55 Bump date for previous. 2013-01-22 21:20:26 +00:00
christos 5e9a2dddf3 Add a little libedit front end. Could be used as someone's pet project to
learn how to program. It is not enabled in the Makefile, and it states why
there.
2013-01-22 20:35:29 +00:00