The NetBSD Project

CVS log for src/bin/sh/parser.c

[BACK] Up to [cvs.netbsd.org] / src / bin / sh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.80.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:01:38 2012 UTC (5 weeks, 4 days ago) by yamt
Branch: yamt-pagecache
Changes since 1.80: +4 -3 lines
Diff to previous 1.80 (colored) next main 1.81 (colored)

sync with head

Revision 1.82 / (download) - annotate - [select for diffs], Wed Mar 28 20:11:25 2012 UTC (8 weeks, 2 days ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, HEAD
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (colored)

include <limits.h> for CHAR_MIN/CHAR_MAX

Revision 1.81 / (download) - annotate - [select for diffs], Sun Mar 25 18:49:13 2012 UTC (2 months ago) by christos
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

PR/43597: Don't break from parsing word tokens in we are in double quotes.
Fixes: sh -c 'echo "${foo:="first-word"} second-word"'

Revision 1.80 / (download) - annotate - [select for diffs], Wed Aug 31 16:24:55 2011 UTC (8 months, 3 weeks ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6
Branch point for: yamt-pagecache
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored)

NULL does not need a cast

Revision 1.79 / (download) - annotate - [select for diffs], Mon Dec 13 16:54:04 2010 UTC (17 months, 1 week ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.78: +2 -4 lines
Diff to previous 1.78 (colored)

PR/44229: Henning Petersen: Remove dup check for whitespace.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Nov 17 13:40:48 2010 UTC (18 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.77: +14 -34 lines
Diff to previous 1.77 (colored)

revert again, since this breaks libtool amongst other things.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Nov 16 18:17:32 2010 UTC (18 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.76: +36 -16 lines
Diff to previous 1.76 (colored)

PR/43469: Antii Kantee: test/util/sh/t_expand:strip fails.
Bring back fixes from revision 1.75:

- Fix a couple of bugs to make the following two echo statements print the
  same output as they should:

    line='#define bindir "/usr/bin" /* comment */'
    echo "${line%%/\**}"
    echo ${line%%/\**}

1. ISDBLQUOTE() was not working properly for non VSNORMAL expansions because
   varnest was incremented before the variable was completely parsed. Add
   an insub adjustment to keep track of that.
2. When we have a quoted backslash, we either need to escape twice, because
   one level of escaping will be stripped later (in the variable substitution
   case) or simply enter the backslash.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Nov 14 19:49:16 2010 UTC (18 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.75: +14 -29 lines
Diff to previous 1.75 (colored)

revert previous. breaks other stuff.

Revision 1.75 / (download) - annotate - [select for diffs], Sun Nov 14 19:43:38 2010 UTC (18 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.74: +31 -16 lines
Diff to previous 1.74 (colored)

- Fix a couple of bugs to make the following two echo statements print the
  same output as they should:

    line='#define bindir "/usr/bin" /* comment */'
    echo "${line%%/\**}"
    echo ${line%%/\**}

1. ISDBLQUOTE() was not working properly for non VSNORMAL expansions because
   varnest was incremented before the variable was completely parsed. Add
   an insub adjustment to keep track of that.
2. When we have a quoted backslash, we need to escape twice, because one
   level of escaping will be stripped later. (XXX: Do that when insub == 1
   only?)

- Make macros statements

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jan 18 00:30:54 2009 UTC (3 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

fix -Wsign-compare issues

Revision 1.73 / (download) - annotate - [select for diffs], Sat Nov 8 00:14:05 2008 UTC (3 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.72: +18 -18 lines
Diff to previous 1.72 (colored)

and if you don't succeed twice, try again.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Nov 7 15:18:11 2008 UTC (3 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

Try a different fix for PR/11317: Don't ignore errors in list().

Revision 1.71 / (download) - annotate - [select for diffs], Fri Nov 7 15:08:43 2008 UTC (3 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.70: +0 -11 lines
Diff to previous 1.70 (colored)

Break PR/11317 again. The counting parentheses fix does not handle case
statements properly. Fixes PR/39873.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Nov 5 22:04:43 2008 UTC (3 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.69: +13 -2 lines
Diff to previous 1.69 (colored)

PR/11317: Hubert Feyrer: Recognize mismatched parentheses inside old style
command substitution.

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:27:42 2008 UTC (3 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored) next main 1.69 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Aug 23 10:05:52 2008 UTC (3 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Fix here documents that end abruptly without NL before EOF.
(Andy Shevchenko)

Revision 1.67.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:28:44 2008 UTC (4 years ago) by yamt
Branch: yamt-pf42
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored) next main 1.68 (colored)

sync with head.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Apr 25 17:32:31 2008 UTC (4 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

Detect unmatched quotes inside old style command substitution.
echo `"`

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:14:29 2008 UTC (4 years, 2 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored) next main 1.67 (colored)

sync with head.

Revision 1.65.4.2 / (download) - annotate - [select for diffs], Sun Mar 23 00:11:41 2008 UTC (4 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.65.4.1: +3 -3 lines
Diff to previous 1.65.4.1 (colored) to branchpoint 1.65 (colored) next main 1.66 (colored)

sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Wed Feb 27 21:55:07 2008 UTC (4 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-base
Branch point for: yamt-pf42
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Change spaces to tabs for consistency with adjacent lines.

Revision 1.65.4.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:20:03 2008 UTC (4 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

sync with HEAD

Revision 1.66 / (download) - annotate - [select for diffs], Sat Dec 15 19:44:37 2007 UTC (4 years, 5 months ago) by perry
Branch: MAIN
CVS Tags: matt-armv6-base, hpcarm-cleanup-base
Branch point for: keiichi-mipv6
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

convert __attribute__s to applicable cdefs.h macros

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Mon Sep 3 06:50:59 2007 UTC (4 years, 8 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.63: +19 -14 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Wed Jun 13 10:48:25 2007 UTC (4 years, 11 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.63.2.1: +4 -5 lines
Diff to previous 1.63.2.1 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

Pull up following revision(s) (requested by dsl in ticket #718):
	bin/sh/parser.c: revision 1.64
PR/35410: Valeriy E. Ushakov: /bin/sh mishandles shell function definitions
with function names that are not plain words
1. remove the escape annotations from the function name.
2. check if the function has a valid name before storing it.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Wed Jun 13 10:44:00 2007 UTC (4 years, 11 months ago) by liamjfoy
Branch: netbsd-4
Changes since 1.63: +17 -11 lines
Diff to previous 1.63 (colored)

Pull up following revision(s) (requested by dsl in ticket #719):
	bin/sh/parser.c: revision 1.65
Fix sh -c 'true && ! true | false; echo $?'
Add some more TRACE((...)) calls to aid such debugging.
Fixes PR bin/36435
Clearly no one tried this test when the changes of rev 1.31 and 1.44 were done!

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jun 7 20:57:59 2007 UTC (4 years, 11 months ago) by dsl
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: matt-armv6
Changes since 1.64: +17 -11 lines
Diff to previous 1.64 (colored)

Fix sh -c 'true && ! true | false; echo $?'
Add some more TRACE((...)) calls to aid such debugging.
Fixes PR bin/36435
Clearly no one tried this test when the changes of rev 1.31 and 1.44 were done!

Revision 1.64 / (download) - annotate - [select for diffs], Sat Jan 13 18:58:26 2007 UTC (5 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.63: +4 -5 lines
Diff to previous 1.63 (colored)

PR/35410: Valeriy E. Ushakov: /bin/sh mishandles shell function definitions
with function names that are not plain words
1. remove the escape annotations from the function name.
2. check if the function has a valid name before storing it.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Oct 16 00:36:19 2006 UTC (5 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.62: +17 -30 lines
Diff to previous 1.62 (colored)

sprinkle volatile.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Oct 4 15:00:38 2006 UTC (5 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.61: +4 -2 lines
Diff to previous 1.61 (colored)

Prefix "Syntax Error" with the program name, if the command name is not
available. At least this way we get an idea of what program gives us the
message.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jun 20 15:57:44 2006 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.60: +4 -2 lines
Diff to previous 1.60 (colored)

PR/33775: YAMAMOTO Takashi: /bin/sh doesn't accept "(" before case patterns

Revision 1.60 / (download) - annotate - [select for diffs], Wed May 10 21:53:14 2006 UTC (6 years ago) by mrg
Branch: MAIN
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

quell GCC 4.1 uninitialised variable warnings.

XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..

Revision 1.59 / (download) - annotate - [select for diffs], Mon Mar 21 20:10:29 2005 UTC (7 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.58: +5 -10 lines
Diff to previous 1.58 (colored)

Back out previous, amongst other things it breaks $((0x10))

Revision 1.58 / (download) - annotate - [select for diffs], Sun Mar 20 21:39:11 2005 UTC (7 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.57: +10 -5 lines
Diff to previous 1.57 (colored)

Treat $((x)) as equivalent to $(($x)) - posix seems to require this now.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jun 27 10:27:57 2004 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.56: +9 -2 lines
Diff to previous 1.56 (colored)

Fix treatment of ' inside a 'here document' with a quoted EOF marker.
Fixes a breakage from the previous version.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Jun 26 22:09:49 2004 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.55: +59 -39 lines
Diff to previous 1.55 (colored)

Correctly apply IFS to unquoted text in ${x-text}.
Fixes PR/26058 and the 'for i in ${x-a b c}; do ...' and ${x-'a b' c}.
I can't find a PR for the latter problem.
Regression test goind in shortly.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Aug 7 09:05:37 2003 UTC (8 years, 9 months ago) by agc
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.54: +3 -7 lines
Diff to previous 1.54 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Nov 24 22:35:42 2002 UTC (9 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.53: +48 -49 lines
Diff to previous 1.53 (colored)

Fixes from David Laight:
- ansification
- format of output of jobs command (etc)
- job identiers %+, %- etc
- $? and $(...)
- correct quoting of output of set, export -p and readonly -p
- differentiation between nornal and 'posix special' builtins
- correct behaviour (posix) for errors on builtins and special builtins
- builtin printf and kill
- set -o debug (if compiled with DEBUG)
- cd src obj (as ksh - too useful to do without)
- unset -e name, remove non-readonly variable from export list.
  (so I could unset -e PS1 before running the test shell...)

Revision 1.53 / (download) - annotate - [select for diffs], Wed May 15 16:33:35 2002 UTC (10 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

implement noclobber. From Ben Harris, with minor tweaks from me. Two
unimplemented comments to go. Go Ben!

Revision 1.52 / (download) - annotate - [select for diffs], Wed Feb 20 21:42:35 2002 UTC (10 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: ELRICshvfork-base, ELRICshvfork
Changes since 1.51: +13 -8 lines
Diff to previous 1.51 (colored)

enami convinced me that it is a good idea to use the first word of
the allocated area.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Feb 12 20:32:35 2002 UTC (10 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.50: +77 -34 lines
Diff to previous 1.50 (colored)

Since we should be able to handle nested double quotes, don't use
the syntax maps to determine the beginning and end quotes (kill
CENDQUOTE).  Handle single quotes opening and closing via checking
the current syntax map. Keep a bitmap of doublequote state one bit
per variable nesting level.  For the first 32 nested double quotes,
we don't need any additional memory, but for more we allocate
dynamically.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Feb 12 06:39:10 2002 UTC (10 years, 3 months ago) by ross
Branch: MAIN
Changes since 1.49: +1 -1 lines
Diff to previous 1.49 (colored)

back this directory up a day, systems won't even boot (rc.subr splodes)

suggested back-to-the-drawing-board test: $ echo "${PWD:-notlikely}"

Revision 1.49 / (download) - annotate - [select for diffs], Mon Feb 11 18:57:19 2002 UTC (10 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

PR/15579: Alan Barrett: }'s inside variable specs were taken into account
even if quoted:
    foo=${foo:-"'{}'"}; echo $foo
would display '{'} instead of '{}'.

Revision 1.44.4.1 / (download) - annotate - [select for diffs], Sun Nov 25 20:20:46 2001 UTC (10 years, 6 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.44: +18 -8 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Pull up revision 1.48 (requested by hubertf):
  Prevent alias expansion in case labels, where it is unwanted.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Nov 2 23:49:14 2001 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.47: +18 -8 lines
Diff to previous 1.47 (colored)

Fix switch alias handling. Inspired from FreeBSD, but corrected to handle
alias expansion inside the switch as appropriate. This is achieved by a
flag noalias which is turned on and off in as we parse. In the following
example [1] and [0] indicate the value of noalias.

[0] case <expr> in
[1] <lit> ) [0] <expr> ;;
[1] <lit> ) [0] <expr> ;;
...
[1] esac [0]

FreeBSD does:

[0] case <expr> in [1]
<lit> ) <expr> ;;
<lit> )  <expr> ;;
...
esac [0]

This handles the following shell script:

alias a=ls

case $1 in
a)	echo a;
	a;;
f)	echo f;;
*)	echo default;;
esac

Revision 1.47 / (download) - annotate - [select for diffs], Tue Apr 3 15:00:11 2001 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.46: +3 -2 lines
Diff to previous 1.46 (colored)

PR/12533: Koji Mori: eval gets misparsed when it has a trailing semi-colon.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Feb 4 19:52:06 2001 UTC (11 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.45: +3 -2 lines
Diff to previous 1.45 (colored)

remove redundant declarations and nexted externs.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jul 27 04:09:27 2000 UTC (11 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.44: +6 -12 lines
Diff to previous 1.44 (colored)

un-__P functions declared in parser.h.  host programs include parser.h,
and so it shouldn't use __P.  (this should probably be done better, by
not declaring the parser functions in headers used by host programs,
but this works well enough.)

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jan 27 23:39:40 2000 UTC (12 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.43: +15 -4 lines
Diff to previous 1.43 (colored)

Fix bin/9184, bin/9194, bin/9265, bin/9266
Exitcode and negation problems (From Martin Husemann)

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jul 9 03:05:50 1999 UTC (12 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.42: +27 -38 lines
Diff to previous 1.42 (colored)

compile with WARNS = 2

Revision 1.42 / (download) - annotate - [select for diffs], Thu Feb 4 16:17:39 1999 UTC (13 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Changes since 1.41: +15 -6 lines
Diff to previous 1.41 (colored)

PR/4966: Joel Reicher: Implement <> redirections which are documented in
the man page.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jan 25 14:20:56 1999 UTC (13 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.40: +25 -6 lines
Diff to previous 1.40 (colored)

Patches from Tor Egge (via Havard Eidnes) to fix various bugs in field
splitting and combining.
(Note: Some of this are not strictly bugs, but differences between traditional
Bourne shell and POSIX.)

Revision 1.40 / (download) - annotate - [select for diffs], Sat Sep 26 20:56:33 1998 UTC (13 years, 8 months ago) by itohy
Branch: MAIN
Changes since 1.39: +3 -4 lines
Diff to previous 1.39 (colored)

Fixed memory leak on old style command substitution
such as  sh -c 'echo `echo foo`' .
The memory allocated with ckmalloc() at
parser.c:1349:readtoken1() (search for "done:" label)
was never freed.

I changed this to use 'string stack' framework of Ash.
Note that a string on string stack is properly freed on
exception and end of command parsing, and no explicit free
or signal handlings required.
See TOUR for an overview, and memalloc.[ch] for details
of string stack.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jul 28 11:41:57 1998 UTC (13 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.38: +7 -4 lines
Diff to previous 1.38 (colored)

Be more retentive about use of NOTREACHED and noreturn.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Fri May 8 06:01:05 1998 UTC (14 years ago) by mycroft
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync with trunk, per request of christos.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Mar 29 04:41:44 1998 UTC (14 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

- change "extern" variables into int's
- remove extern'd variables not actually referenced
- don't use char as an array index

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jul 15 17:45:53 1997 UTC (14 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.36: +4 -3 lines
Diff to previous 1.36 (colored)

Fix Sparcworks warnings.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Jul 4 21:02:19 1997 UTC (14 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.35: +6 -4 lines
Diff to previous 1.35 (colored)

Fix compiler warnings.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Mar 14 01:42:23 1997 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

NO_HISTORY->SMALL

Revision 1.29.4.2 / (download) - annotate - [select for diffs], Sun Jan 26 18:20:40 1997 UTC (15 years, 4 months ago) by rat
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.29.4.1: +8 -4 lines
Diff to previous 1.29.4.1 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored)

Pullup request 1.33 -> 1.34 from Christos Zoulas.
	"Fix parsing problem introduced in the previous ${10} fix, where $#digit
	or $digit# would get mis-parsed as a positional parameter."

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jan 26 18:05:34 1997 UTC (15 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.33: +8 -4 lines
Diff to previous 1.33 (colored)

Fix parsing problem introduced in the previous ${10} fix, where $#digit
or $digit# would get mis-parsed as a positional parameter.

Revision 1.29.4.1 / (download) - annotate - [select for diffs], Sun Jan 26 04:57:35 1997 UTC (15 years, 4 months ago) by rat
Branch: netbsd-1-2
Changes since 1.29: +81 -50 lines
Diff to previous 1.29 (colored)

Update /bin/sh from trunk per request of Christos Zoulas.  Fixes
many bugs.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jan 24 17:15:56 1997 UTC (15 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.32: +10 -7 lines
Diff to previous 1.32 (colored)

enable parsing of multi-digit positional arguments i.e. ${10} works and it
is not a bad substitution.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jan 11 02:04:45 1997 UTC (15 years, 4 months ago) by tls
Branch: MAIN
Changes since 1.31: +10 -10 lines
Diff to previous 1.31 (colored)

kill 'register'

Revision 1.31 / (download) - annotate - [select for diffs], Mon Nov 25 20:22:00 1996 UTC (15 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.30: +43 -22 lines
Diff to previous 1.30 (colored)

- fix parsing bug reported by mycroft: ! was only recognized in the beginning
  of pipelines. Now we are recognizing it everywhere like ksh, so:

	! if [ a = b ]; then ! echo c && ! true; else ! echo d; fi

  works.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Oct 16 14:53:23 1996 UTC (15 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.29: +25 -18 lines
Diff to previous 1.29 (colored)

PR/2808: - detect eof inside backquotes
	 - handle && and || shortcircuits properly
	 - tokens.def -> tokens.h
	 (from FreeBSD)

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 9 19:40:08 1996 UTC (16 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.28: +9 -2 lines
Diff to previous 1.28 (colored)

Close PR/2384 backquoted backslash-newline was not eaten.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Mar 5 21:04:00 1996 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.27: +47 -9 lines
Diff to previous 1.27 (colored)

- parser.c: Fix prompting in old style backquote expansion. Fixes PR/2139
	    and many user complaints why the shell hangs in echo "`"
- eval.c:   Fix exitstatus invalid resetting in `if' statements were:
		if (exit 3); then
			echo foo $?
		else
			echo bar $?
		fi
	    printed 'bar 0' instead of bar 3

Revision 1.27 / (download) - annotate - [select for diffs], Thu Oct 19 04:14:41 1995 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.26: +9 -4 lines
Diff to previous 1.26 (colored)

- fix PR1620, -DNO_HISTORY did not work.
- restore parsing state after parsing old style command substitution.
  The ';' in '`echo z;`' broke the following:
	for i in 1; do
		cat > /dev/tty << __EOF__
		`echo z;`
		__EOF__
	done

cVS: Enter Log.  Lines beginning with `CVS: ' are removed automatically

Revision 1.26 / (download) - annotate - [select for diffs], Wed May 17 00:05:25 1995 UTC (17 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.25: +5 -3 lines
Diff to previous 1.25 (colored)

Fixed bug where ${#} was interpreted incorrectly as ${#var} and thus
misparsed. Keith Bostic reported it.

Revision 1.25 / (download) - annotate - [select for diffs], Thu May 11 21:29:55 1995 UTC (17 years ago) by christos
Branch: MAIN
Changes since 1.24: +25 -9 lines
Diff to previous 1.24 (colored)

Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
bug.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Mar 21 09:09:59 1995 UTC (17 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.23: +7 -2 lines
Diff to previous 1.23 (colored)

convert to new RCS id conventions.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 23 06:33:05 1995 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.22: +29 -7 lines
Diff to previous 1.22 (colored)

I added the documented in the manual but not implemented variable expansions:

    ${#WORD}
    ${WORD%PAT}
    ${WORD%%PAT}
    ${WORD#PAT}
    ${WORD##PAT}

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 5 19:07:50 1994 UTC (17 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.21: +17 -7 lines
Diff to previous 1.21 (colored)

clean up further.  more patches from Jim Jegers

Revision 1.21 / (download) - annotate - [select for diffs], Fri Sep 23 11:28:45 1994 UTC (17 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Eliminate uses of some obsolete functions.

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Wed Aug 24 05:49:25 1994 UTC (17 years, 9 months ago) by mycroft
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Changes since 1.18.2.1: +2 -1 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

update from trunk

Revision 1.20 / (download) - annotate - [select for diffs], Wed Aug 24 05:48:28 1994 UTC (17 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

Fix a core dump and another parse error related to null commands.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Fri Jul 8 05:46:00 1994 UTC (17 years, 10 months ago) by cgd
Branch: netbsd-1-0
Changes since 1.18: +9 -1 lines
Diff to previous 1.18 (colored)

from trunk: Fix some problems with empty commands.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jul 7 20:53:32 1994 UTC (17 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +9 -1 lines
Diff to previous 1.18 (colored)

Fix some problems with empty commands.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 14 05:49:25 1994 UTC (17 years, 11 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.17: +38 -17 lines
Diff to previous 1.17 (colored)

From Christos:
  1. Fix `-' quoting in [ ] expressions.
  2. Fix expansion of variables in redirections

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jun 11 16:12:28 1994 UTC (17 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Add RCS ids.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jun 1 21:36:54 1994 UTC (17 years, 11 months ago) by jtc
Branch: MAIN
Changes since 1.15: +1 -0 lines
Diff to previous 1.15 (colored)

Fixed another case statement parsing bug that was introduced by my
last fix :-(.  Thanks to Theo for letting me know about it...

Revision 1.15 / (download) - annotate - [select for diffs], Mon May 30 20:05:40 1994 UTC (18 years ago) by jtc
Branch: MAIN
Changes since 1.14: +12 -11 lines
Diff to previous 1.14 (colored)

Re-worked case statement parsing.  With luck, this fixes bug #268.

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 21 01:42:33 1994 UTC (18 years ago) by cgd
Branch: MAIN
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

a few more things to omit when NO_HISTORY defined.  from noel@cs.oberlin.edu

Revision 1.13 / (download) - annotate - [select for diffs], Tue May 17 10:47:50 1994 UTC (18 years ago) by jtc
Branch: MAIN
Changes since 1.12: +0 -7 lines
Diff to previous 1.12 (colored)

Fix backslash parsing within backquoted string

Revision 1.12 / (download) - annotate - [select for diffs], Wed May 11 17:39:11 1994 UTC (18 years ago) by jtc
Branch: MAIN
Changes since 1.11: +28 -20 lines
Diff to previous 1.11 (colored)

Mark Weaver's background/list fix (for bug #236)

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 11 17:10:36 1994 UTC (18 years ago) by jtc
Branch: MAIN
Changes since 1.10: +206 -145 lines
Diff to previous 1.10 (colored)

sync with 4.4lite

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Wed May 11 17:01:14 1994 UTC (18 years ago) by jtc
Branch: WFJ-920714, CSRG
CVS Tags: lite-1
Changes since 1.1.1.1: +232 -115 lines
Diff to previous 1.1.1.1 (colored)

44lite code

Revision 1.10 / (download) - annotate - [select for diffs], Thu Sep 9 01:21:43 1993 UTC (18 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.9: +8 -5 lines
Diff to previous 1.9 (colored)

from jim wilson: (command): Handle TEOF like TNL.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Sep 6 00:44:46 1993 UTC (18 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

Make `>file;' work.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Aug 1 18:58:02 1993 UTC (18 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Add RCS identifiers.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 15 22:12:02 1993 UTC (18 years, 10 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.6: +6 -3 lines
Diff to previous 1.6 (colored)

Another change from Jim Wilson.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jul 7 01:11:59 1993 UTC (18 years, 10 months ago) by jtc
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

IEEE 1003.2 (D11.2.2.3) requires that the system's true and false be accessed
instead of searching $PATH.  The best way to satisfy this requirement is to
make them builtins.

True was allready builtin, this patch adds false.

Revision 1.5 / (download) - annotate - [select for diffs], Sun May 2 01:28:43 1993 UTC (19 years ago) by sef
Branch: MAIN
Changes since 1.4: +70 -22 lines
Diff to previous 1.4 (colored)

Jim "wilson@moria.cygnus.com" Wilson's patches to make C News (and other
things) work.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Apr 26 22:07:46 1993 UTC (19 years, 1 month ago) by dpassage
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Fixed incorrect calls to longjmp.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 23 00:29:10 1993 UTC (19 years, 2 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

changed "Id" to "Header" for rcsids

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 22 08:04:00 1993 UTC (19 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

added rcs ids to all files

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (19 years, 2 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (19 years, 2 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>