summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Don't call setvar() with the VTEXTFIXED flag. A copy is created bytegge2001-11-071-4/+4
| | | | | | | | setvar() and passed to setvareq(). When the VTEXTFIXED flag is set, that copy is never freed, causing a memory leak. PR: 31533 Submitted by: maxim@macomnet.ru
* Repair normally unused is_digit() macro.tegge2001-10-141-1/+1
|
* *** empty log message ***obrien2001-10-012-29/+34
|
* Don't check uninitialized memory for having the shell control charactertegge2001-09-191-4/+4
| | | | | | | | | | | value CTLARI since this might break expansion of arithmetic expressions. Don't access memory below start of stackblock. Problem analyzed by hunt@iprg.nokia.com, slightly different patch applied. PR: 24443 Submitted by: hunt@iprg.nokia.com
* BASESYNTAX, DQSYNTAX, SQSYNTAX and ARISYNTAX handles negative indexes.tegge2001-09-192-6/+6
| | | | | Allow those to be used to properly quote characters in the shell control character range.
* Adjust some type checks to include CTLQUOTEMARK in the range oftegge2001-09-191-3/+3
| | | | shell control characters.
* Initialize infp at main()peter2001-08-131-1/+2
|
* Removed duplicate VCS ID tags, as per style(9).ru2001-08-132-4/+0
|
* can not -> cannotsheldonh2001-08-081-1/+1
|
* mdoc(7) police:ru2001-08-071-5/+4
| | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
* Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. Thesheldonh2001-07-262-3/+3
| | | | | | | definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms>
* Break the list of parameter expansions into two lists so thatsheldonh2001-07-231-0/+2
| | | | | | the paragraph introducing the prefix and suffix pattern expansions does not appear as part of the explanation for the string length expansion.
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-102-2/+2
|
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).ru2001-07-061-1/+1
|
* Use the correct printf format to print a long.dwmalone2001-06-261-1/+1
| | | | Approved by: cracauer
* Include missing header files which define functions for which gcc hasdd2001-06-241-0/+1
| | | | builtins (e.g., exit, strcmp).
* Remove duplicate words.dd2001-06-241-1/+1
|
* Add more headers that are required with -fno-builtin (stdlib and strings)des2001-06-192-0/+2
|
* Fix how /bin/sh handles 'for' and 'case' statements when it is called to dogad2001-06-011-0/+16
| | | | | | | | errexit (-e) processing. This solves a problem where 'make clean' would fail with an unspecified error in certain automake-generated makefiles. Reviewed by: no objections from -hackers... MFC after: 2 weeks
* Use PATH_MAX in preference in MAXPATHLEN.imp2001-05-301-1/+2
|
* Document "chdir" builtin.dd2001-04-281-0/+4
|
* -Wnon-const-format sweep: make format strings const char *'s, addkris2001-04-177-25/+25
| | | | | | __printflike()/__printf0like() to function prototypes, as appropriate. Reviewed by: bde, -audit
* ``|'' should be more binding than ``!'' so that this isn't broken:brian2001-04-091-2/+13
| | | | | | | | if ! echo bla | wc -c ; then echo broken fi Obtained from: NetBSD
* A much better (more correct) fix for handling ``!'' charactersbrian2001-04-041-23/+40
| | | | Obtained from: NetBSD
* Handle ``!'' characters when they appear as second and subsequentbrian2001-04-041-0/+3
| | | | | | | | parts of an && or || expression. This makes this expression work as expected: if true && ! false; then echo yes; fi
* Fix child's SIGSTOP behaviour in scripts.cracauer2001-02-061-1/+2
| | | | | | | | | | | | | | | | | | When a child is receiving SIGSTOP, eval continues with the next command. While that is correct for the interactive case (Control-Z and you get the prompt back), it is wrong for a shellscript, which just continues with the next command, never again waiting for the stopped child. Noted when childs from cronjobs were stopped, just to make more processes (by wosch). The fix is not to return from a job wait when the wait returned for a stopped child while in non-interactive mode. This bahaviour seems to be what bash2 and ksh implement. I tested for correct behaviour for finnaly killing the child with and without forgrounding it first. When not foregrouding before killing, the shell continues with the script, which is what the other shells do as well. Reviewed by: Silence on -current
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-5/+8
|
* Prepare for mdoc(7)NG.ru2001-01-161-1/+1
|
* Prepare for mdoc(7)NG.ru2000-12-181-11/+11
|
* Prepare for mdoc(7)NG.ru2000-12-151-2/+2
|
* Add `_PATH_DEVZERO'.obrien2000-12-091-6/+7
| | | | Use _PATH_* where where possible.
* mdoc(7) police: Er macro usage cleanup.ru2000-11-221-1/+1
|
* Use secure temporary filenames during build.kris2000-11-222-8/+9
| | | | Audited by: markm, cracauer
* Implement the <> redirection operator.brian2000-10-037-3/+34
|
* Disable part of my 8-bits fixes from December 1999.cracauer2000-08-161-4/+1
| | | | | | | | Serious fix still needed, see discussion on -current (Subject: /bin/sh dumps core with here-document of 8bit text) Problem in this code originally spotted by Jun Kuriyama <kuriyama@FreeBSD.org>
* Fix type builtin for absolute paths and relative paths with directorycracauer2000-08-161-9/+16
| | | | | | | | | names in them. Also use a colon in the answer of `type` everytime the questioned item is not usable. PR: bin/20567
* From submitter:cracauer2000-08-163-1/+22
| | | | | | | | | | | | | | | | | growstackblock() sometimes relocates a stack_block considered empty without properly relocating stack marks referencing that block. The first call to popstackmark() with the unrelocated stack mark as argument then causes sh to abort. Relocating the relevant stack marks seems to solve this problem. The patch changes the semantics of popstackmark() somewhat. It can only be called once after a call to setstackmark(), thus cmdloop() in main.c needs an extra call to setstackmark(). PR: bin/19983 Submitted by: Tor.Egge@fast.no Reviewed by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* Mark up the -a flag to unalias as a flag (Fl), not an argument (Ar).sheldonh2000-07-241-1/+1
|
* Add missing punctuation to one line.sheldonh2000-07-241-1/+1
|
* Document the builtin echo commandmarko2000-07-171-4/+60
| | | | Reviewed by: Matthew Hunt <mph@astro.caltech.edu>
* Fixd with alias missing.sada2000-07-151-0/+1
| | | | | PR: bin/19475 Approved by: Martin Cracauer <cracauer@cons.org> (with conditions)
* Add \a and \e to "echo -e" escape handling.mph2000-06-261-0/+2
|
* Fix parsing of string for eval command.cracauer2000-05-151-0/+1
| | | | | PR: 18447 Submitted by: Koji Mori <mori@tri.asanuma.co.jp>
* Fix environment passung to eval'ed commands.cracauer2000-05-152-1/+2
| | | | | | PR: bin/6577 Submitted by: Anatoly Vorobey <mellon@pobox.com> Approved by: silence amoung other sh experts
* Rename the trace() function (that is build only in the -DDEBUG=2cracauer2000-04-203-4/+5
| | | | | | | | | | | case), so that it doesn't clash with the ncurses function of the same name when linking statically with -ltermcap. The linker only complains when -static is used, and it is not clear whether this is a bug. PR: bin/18104 Submitted by: Anatoly Vorobey <mellon@pobox.com>
* Include <errno.h> when compiling with -DDEBUG=2cracauer2000-04-201-0/+3
| | | | | PR: bin/18104 Submitted by: mellon@pobox.com
* Fix warnings, some of them serious because sh violated namecracauer2000-04-208-17/+8
| | | | | | | | spaces reserved by the header files it includes. mkinit.c still produces C code with redundant declarations, although they are more harmless since they automatically derived from the right places.
* Use #include <errno.h> rather than extern int errno;.imp2000-04-141-2/+1
|
* Fix ${#varname} (getting length of string) when in double-quotes.cracauer2000-02-151-1/+1
| | | | | | | Approved-by: jkh PR: bin/12137 Submitted by: "Danny J. Zerkel" <dzerkel@columbus.rr.com>
OpenPOWER on IntegriCloud