History log of /netbsd-src/bin/sh/expand.c (Results 76 – 100 of 146)
Revision Date Author Comments
# 5166671b 01-Jun-2005 lukem <lukem@NetBSD.org>

appease gcc -Wuninitialized


# 328c4365 19-Mar-2005 dsl <dsl@NetBSD.org>

Check quoting before merging ifs regions.
sh -c 'set -- a; x="b c"; set -- "$@"$x'
now correctly gives $1=ab, $2=c


# 2078d2c0 19-Mar-2005 dsl <dsl@NetBSD.org>

Don't merge ifs regions with different quoting requirements


# f712e70a 14-Feb-2005 dsl <dsl@NetBSD.org>

expbackq() was incorrectly backing up a temporary buffer when removing \n
from the end of output of commands inside $(...) substitutions.
If the program output is n*128+1 bytes long (ending in a \n)

expbackq() was incorrectly backing up a temporary buffer when removing \n
from the end of output of commands inside $(...) substitutions.
If the program output is n*128+1 bytes long (ending in a \n) then the code
checks buf[-1] for another \n - looking an uninitialised stack.
On a big-endian system an integer of value 10 will satisfy this (unlikely
on little endian) and can happen depending on the last code path to use
a lot of stack!
This caused the problem with newvers.sh on sparc64 after ', 2005' was
added to the date list.
Fixed PR/28852

show more ...


# cf788c31 13-Jul-2004 seb <seb@NetBSD.org>

Add new builtin `wordexp' to support wordexp(3).

From FreeBSD.
Provided in PR lib/26123.
Approved by kleink@.


# c6cbc16d 26-Jun-2004 dsl <dsl@NetBSD.org>

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.


# 97e8f814 26-Jun-2004 dsl <dsl@NetBSD.org>

Remove a broken optimistion that crept in earlier today.


# 8e940884 26-Jun-2004 dsl <dsl@NetBSD.org>

Kill a diagnostic I accidentally left in.


# e4a2a056 26-Jun-2004 dsl <dsl@NetBSD.org>

No functional changes (intended).
Rename some variables, add some comments, and restructure a little.
In preparation for fixing "set ${x-a b c}" and friends.


# cf199667 09-Jun-2004 christos <christos@NetBSD.org>

Undo previous fix, breaks:
#!/bin/sh
echo ${1+"$@"}
./sh.new foo.sh a b c
a b c b c
I'll revisit this when I have some more time.


# fc5d4115 08-Jun-2004 christos <christos@NetBSD.org>

"for i in ${x-a b c}; do echo $i; done" should print "a\nb\nc\n" not "a b c\n"
like other shells do. mark the expansion for ifs splitting. XXX: linux has a
very complicated fix for this. I wonder why.


# 30651d6b 21-Dec-2003 jdolecek <jdolecek@NetBSD.org>

minor optimization in evalvar()
change sent in bin/23813 by VaX#n8


# b17e1b5c 22-Sep-2003 dsl <dsl@NetBSD.org>

Fix 'set "*" b; case "* b" in "$@") ...' and 'set "*"; case 1 in "${#1}") ...'
Which got broken by the previous fix.


# 4dcb41ae 17-Sep-2003 christos <christos@NetBSD.org>

PR/22640: Paul Jarc: sh mishandles positional parameters in case. Fixed
from FreeBSD PR 56147.


# b5b29542 07-Aug-2003 agc <agc@NetBSD.org>

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

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


# c02b3bbd 24-Nov-2002 christos <christos@NetBSD.org>

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
- differentia

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...)

show more ...


# 4783843f 28-Sep-2002 christos <christos@NetBSD.org>

Revert previous change. No need to save rootshell. It is only affecting
the non-vfork case. Having said that, it would be nice if pipelines of
simple commands were vforked too. Right now they are not

Revert previous change. No need to save rootshell. It is only affecting
the non-vfork case. Having said that, it would be nice if pipelines of
simple commands were vforked too. Right now they are not.
Explain that setpgid() might fail because we are doing it both in the
parent and the child case, because we don't know which one will come
first.
Suspending a pipeline prints %1 Suspended n times where n is the number
of processes, but that was there before. It is easy to fix, but I'll
leave the code alone for now.

show more ...


# 6f482334 27-Sep-2002 christos <christos@NetBSD.org>

Deal with rootshell not being maintained correctly in the vfork() case.
Propagate isroot, throughout the eval process and maintain it properly.
Fixes sleep 10 | cat^C not exiting because sleep and ca

Deal with rootshell not being maintained correctly in the vfork() case.
Propagate isroot, throughout the eval process and maintain it properly.
Fixes sleep 10 | cat^C not exiting because sleep and cat ended up in
their own process groups, because wasroot was always true in the children.

show more ...


# eac95517 15-May-2002 christos <christos@NetBSD.org>

Implement unset variable error messages from Ben Harris.


# 31952d57 19-Sep-2001 itojun <itojun@NetBSD.org>

make sure we do not truncate arith expresssion > 10 digits.
freebsd bin/sh/expand.c revision 1.15. NetBSD PR 13943.


# 59771e30 30-Mar-2001 mycroft <mycroft@NetBSD.org>

Globbing should match broken symlinks. stat()->lstat() to fix this.


# 33809804 04-Feb-2001 christos <christos@NetBSD.org>

remove redundant declarations and nexted externs.


# 1594850f 13-Mar-2000 soren <soren@NetBSD.org>

Fix doubled 'the' in comment.


# 3d424690 09-Jul-1999 christos <christos@NetBSD.org>

compile with WARNS = 2


# e97b0193 30-Apr-1999 he <he@NetBSD.org>

Fix for bin/7502, from Tor Egge / FreeBSD. Their commit message:
> During variable expansion, the internal representation of the expression
> might be relocated. Handle this case.


123456