summaryrefslogtreecommitdiffstats
path: root/bin/sh/parser.c
Commit message (Collapse)AuthorAgeFilesLines
* ``|'' 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
* Implement the <> redirection operator.brian2000-10-031-0/+2
|
* 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 parsing of string for eval command.cracauer2000-05-151-0/+1
| | | | | PR: 18447 Submitted by: Koji Mori <mori@tri.asanuma.co.jp>
* Fix warnings, some of them serious because sh violated namecracauer2000-04-201-2/+1
| | | | | | | | 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.
* 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>
* Second part of 8-bit fixes.cracauer1999-12-161-1/+9
|
* First round of 8-bit fixes.cracauer1999-12-151-4/+5
|
* Fix "subscript has type `char'" warnings by casting to int, ascracauer1999-12-041-1/+1
| | | | discussed on -arch.
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Be more consistent with handling of quote mark control character.tegge1998-09-131-9/+19
| | | | | | | Don't output double-quotes inside variable expansion/arithmetic expansion region in here-documents. When leaving the arithmetic expansion syntax mode, adjust the dblquote flag according to previous syntax, in order to avoid splitting of quoted variables.
* Better handling of word splitting. Don't record the same regiontegge1998-09-061-1/+10
| | | | | | multiple times when performing nested variable expansion, and preserve some quoting information in order to avoid removing apparently empty expansion result.
* Add rcsid. Spelling.charnier1998-05-181-3/+5
|
* Use the __unused attribute where warranted.steve1997-05-191-3/+3
|
* Revert changes from rev 1.16 to 1.17 for now. Closes PR 2879.steve1997-04-281-49/+29
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-141-45/+121
| | | | Obtained from: NetBSD, me
* Ok, lets try this again, shall we? It was definatly my mistake, notpeter1996-09-101-1/+13
| | | | Steve's.. :-]
* ack! back these out so I can see what I did wrong. It looks like apeter1996-09-101-12/+0
| | | | patch-by-hand botch, but it sig-11's during make world.
* Fix for PR#1248, sh doesn't expand past ${9}peter1996-09-101-1/+13
| | | | Submitted by: Steve Price <sprice@hiwaay.net>
* Fix for PR#1287. This makes sh behave sensibly in case statements in thepeter1996-09-031-4/+9
| | | | | | | | | | | | | | face of aliases. Note, bash doesn't do aliases while running scripts, but "real" ksh does.. Also: Reduce redundant .Nm macros in (unused) bltin/echo.1 nuke error2, it's hardly used. More -Wall cleanups dont do certain history operations if NO_HISTORY defined handle quad_t's from resource limits Submitted by: Steve Price <sprice@hiwaay.net> (minor tweaks by me)
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is apeter1996-09-011-81/+166
| | | | | | | | | | | | | | merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
* Fix the borokeness that crept in with rev 1.10 of parser.c, the shjoerg1996-02-031-2/+2
| | | | | | | | didn't correctly start background jobs anymore. Strange that nobody was complaining... Add a dummy target for `builtins' in the Makefile, to prevent it from attempting to build this file by compiling builtins.c. :-/
* The shell incorrectly gave & precedence over ;. This breaks thejoerg1995-12-101-23/+19
| | | | | | | | | | | traditional behaviour, and it violates Posix.2. Fixes PR # bin/880: /bin/sh incorrectly parse... Fixes also an earlier problem report about the shell not evaluating loops correctly. (Not files via GNATS.) Submitted by: nnd@itfs.nsk.su (Nickolay N. Dudorov)
* Sigh. This will become a never ending story. :-(joerg1995-08-281-1/+4
| | | | | | When comparing my recent parser change against the ash in 1.1.5.1, i found that a couple of other problems in the same area has been fixed there, but not in 2.2. Semicolons and EOF do also delimit words...
* Make the shell handle a null command in a &&/|| sequence correctly.joerg1995-08-271-1/+3
| | | | | | | | | | | | | The && and || tokens do also terminate a command, not only the newline. While i was at it, disabled trace code by default, it served no good purpose since it required the use of a debugger anyway to be turned on. Instead, placed a hint in the Makefile on how to turn it on. This makes the shell ~ 10 % faster and ~ 4 KB smaller. :) Pointed out by: jan@physik.TU-Berlin.DE (Jan Riedinger)
* sh(1) incorrectly ignored an EOF condition when looking for thejoerg1995-08-111-1/+5
| | | | | | closing backquote in a `foo` substitution. Discovered by: Martin Welk <mw@theatre.pandora.sax.de>
* Remove trailing whitespace.rgrimes1995-05-301-7/+7
| | | | Reviewed by: phk
* What I think is a more correct fix for the handling of backslashespaul1995-01-111-3/+3
| | | | inside backquotes. Reversed my previous fix.
* Fix a bug with handling backslash escapes inside some quotes.paul1995-01-091-2/+2
| | | | Should solve our problems with edit-pr.
* Added $Id$dg1994-09-241-0/+2
|
* With '!' being made into a keyword (yech!), case cases didn't work properly.sef1994-09-141-11/+13
| | | | | | | | | | This should fix it (passed my test cases). Originally discovered with perl's Configure (well, in FreeBSD, I don't know how the NetBSD folks discovered it). Reviewed by: sef Submitted by: jtc@cygnus.com Obtained from: NetBSD
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+1363
OpenPOWER on IntegriCloud