itohy
ef88b5d2bd
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.
1998-09-26 20:56:33 +00:00
mycroft
ee9e50eacb
Be more retentive about use of NOTREACHED and noreturn.
1998-07-28 11:41:40 +00:00
mrg
a26bae1e08
- change "extern" variables into int's
...
- remove extern'd variables not actually referenced
- don't use char as an array index
1998-03-29 04:41:43 +00:00
christos
1eb178df64
Fix Sparcworks warnings.
1997-07-15 17:45:53 +00:00
christos
cd799663e4
Fix compiler warnings.
1997-07-04 21:01:48 +00:00
christos
7accaec421
NO_HISTORY->SMALL
1997-03-14 01:42:18 +00:00
christos
6f224ae59f
Fix parsing problem introduced in the previous ${10} fix, where $#digit
...
or $digit# would get mis-parsed as a positional parameter.
1997-01-26 18:05:34 +00:00
christos
3d5f212ba8
enable parsing of multi-digit positional arguments i.e. ${10} works and it
...
is not a bad substitution.
1997-01-24 17:15:56 +00:00
tls
48250187e6
kill 'register'
1997-01-11 02:04:27 +00:00
christos
340077b543
- 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.
1996-11-25 20:22:00 +00:00
christos
d8c242f0ae
PR/2808: - detect eof inside backquotes
...
- handle && and || shortcircuits properly
- tokens.def -> tokens.h
(from FreeBSD)
1996-10-16 14:53:23 +00:00
christos
55a41e8abb
Close PR/2384 backquoted backslash-newline was not eaten.
1996-05-09 19:40:08 +00:00
christos
b09ffc42b1
- 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
1996-03-05 21:03:52 +00:00
christos
893ade3fac
- 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
1995-10-19 04:14:37 +00:00
christos
56a08eccca
Fixed bug where ${#} was interpreted incorrectly as ${#var} and thus
...
misparsed. Keith Bostic reported it.
1995-05-17 00:05:25 +00:00
christos
07bae7eddd
Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
...
bug.
1995-05-11 21:28:33 +00:00
cgd
49f0ad8601
convert to new RCS id conventions.
1995-03-21 09:01:59 +00:00
christos
ad8d5369f5
I added the documented in the manual but not implemented variable expansions:
...
${#WORD}
${WORD%PAT}
${WORD%%PAT}
${WORD#PAT}
${WORD##PAT}
1995-01-23 06:33:03 +00:00
cgd
4ce0d34a31
clean up further. more patches from Jim Jegers
1994-12-05 19:07:32 +00:00
mycroft
06f53b6838
Eliminate uses of some obsolete functions.
1994-09-23 11:28:39 +00:00
mycroft
08a6730054
Fix a core dump and another parse error related to null commands.
1994-08-24 05:48:26 +00:00
mycroft
aaed410145
Fix some problems with empty commands.
1994-07-07 20:53:32 +00:00
jtc
918ce04f57
From Christos:
...
1. Fix `-' quoting in [ ] expressions.
2. Fix expansion of variables in redirections
1994-06-14 05:49:19 +00:00
mycroft
cafd1f7e9f
Add RCS ids.
1994-06-11 16:11:35 +00:00
jtc
20ddd6eee4
Fixed another case statement parsing bug that was introduced by my
...
last fix :-(. Thanks to Theo for letting me know about it...
1994-06-01 21:36:54 +00:00
jtc
d8e5937418
Re-worked case statement parsing. With luck, this fixes bug #268 .
1994-05-30 20:05:40 +00:00
cgd
242337bcae
a few more things to omit when NO_HISTORY defined. from noel@cs.oberlin.edu
1994-05-21 01:42:30 +00:00
jtc
1af99404cd
Fix backslash parsing within backquoted string
1994-05-17 10:47:50 +00:00
jtc
83b8a2f413
Mark Weaver's background/list fix (for bug #236 )
1994-05-11 17:39:11 +00:00
jtc
37ed7877b2
sync with 4.4lite
1994-05-11 17:09:42 +00:00
cgd
7f42c5de51
from jim wilson: (command): Handle TEOF like TNL.
1993-09-09 01:21:43 +00:00
mycroft
f0e18400d3
Make `>file;' work.
1993-09-06 00:44:46 +00:00
mycroft
8542364e07
Add RCS identifiers.
1993-08-01 18:49:50 +00:00
jtc
6659413c9a
Another change from Jim Wilson.
1993-07-15 22:12:02 +00:00
jtc
67893cfee5
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.
1993-07-07 01:11:56 +00:00
sef
5916a08554
Jim "wilson@moria.cygnus.com" Wilson's patches to make C News (and other
...
things) work.
1993-05-02 01:28:40 +00:00
dpassage
2d12aa06fa
Fixed incorrect calls to longjmp.
1993-04-26 22:07:46 +00:00
cgd
06be60083d
changed "Id" to "Header" for rcsids
1993-03-23 00:22:59 +00:00
cgd
346aa5dd48
added rcs ids to all files
1993-03-22 08:04:00 +00:00
cgd
61f282557f
initial import of 386bsd-0.1 sources
1993-03-21 09:45:37 +00:00