History log of /netbsd-src/bin/sh/options.c (Results 26 – 50 of 62)
Revision Date Author Comments
# 027df12d 30-Oct-2004 christos <christos@NetBSD.org>

Pass WARNS=3


# b635f565 05-Jan-2004 jmmv <jmmv@NetBSD.org>

Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.


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


# e6a384fc 15-Apr-2003 itojun <itojun@NetBSD.org>

%d is 12 chars, not 10 chars. hinted by deraadt


# e314f958 22-Jan-2003 dsl <dsl@NetBSD.org>

Support command -p, -v and -V as posix
Stop temporary PATH assigments messing up hash table
Fix sh -c -e "echo $0 $*" -a x (as posix)
(agreed by christos)


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


# 8d35854b 26-Feb-2001 wiz <wiz@NetBSD.org>

Fix command name in error message for 'sh nonexistingfile'.


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

remove redundant declarations and nexted externs.


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

compile with WARNS = 2


# ee9e50ea 28-Jul-1998 mycroft <mycroft@NetBSD.org>

Be more retentive about use of NOTREACHED and noreturn.


# 9dc385be 28-Jul-1998 mycroft <mycroft@NetBSD.org>

Delint.


# d2ded939 02-May-1998 christos <christos@NetBSD.org>

PR/5315: Dan Winship: options parsing code should print errors to stderr.


# cd799663 04-Jul-1997 christos <christos@NetBSD.org>

Fix compiler warnings.


# 7accaec4 14-Mar-1997 christos <christos@NetBSD.org>

NO_HISTORY->SMALL


# a5aaf55c 25-Feb-1997 christos <christos@NetBSD.org>

Fix PR/3258 sh -c 'echo $0' causes segmentation fault.


# 48250187 11-Jan-1997 tls <tls@NetBSD.org>

kill 'register'


# a00e49c2 15-Dec-1996 christos <christos@NetBSD.org>

Getopts bugs again (I'll never get this right).
- make sure that OPTIND is set correctly even in the absence of options.
- don't keep stale state between getopts calls.


# 9530a327 24-Nov-1996 christos <christos@NetBSD.org>

Fix bug in getopts code where the argument list got truncated.
From Todd Miller.


# ccce082d 06-Nov-1996 christos <christos@NetBSD.org>

Fix miscellaneous getopts problems:
- the 3 argument version of getopts would not reset properly
- OPTARG did not get cleared after a non argument option was found
- OPTIND was not set properly after

Fix miscellaneous getopts problems:
- the 3 argument version of getopts would not reset properly
- OPTARG did not get cleared after a non argument option was found
- OPTIND was not set properly after a non argument option.

show more ...


# 846dce0e 02-Nov-1996 christos <christos@NetBSD.org>

Fix problems that gcc -Wall found (from Todd Miller, OpenBSD)


# fd8c9943 16-Oct-1996 christos <christos@NetBSD.org>

PR/2808: POSIX 1003.2: first arg after -c cmd is $0, remainder $1...
(from FreeBSD)


# cc31700a 25-Jun-1996 christos <christos@NetBSD.org>

- Add getoptsreset to be used as a callback function when OPTIND is set.
This is used to implement the POSIX behavior when OPTIND=1
- Call setvarsafe instead of setvar. If one ran
"getopts optstr

- Add getoptsreset to be used as a callback function when OPTIND is set.
This is used to implement the POSIX behavior when OPTIND=1
- Call setvarsafe instead of setvar. If one ran
"getopts optstr badvariable"
where badvariable contained an illegal variable name, there was no way
to recover, since setvar() would longjmp on the error.

show more ...


# 0bc88b24 04-Jun-1996 christos <christos@NetBSD.org>

getopts fixes:

1. OPTIND value was not computed correctly when the argument was part of the
option string (i.e. for "l:" "-l 1" was working "-l1" was not). (PR/2505).
2. OPTARG was not being unse

getopts fixes:

1. OPTIND value was not computed correctly when the argument was part of the
option string (i.e. for "l:" "-l 1" was working "-l1" was not). (PR/2505).
2. OPTARG was not being unset in case of errors [in the non POSIX error case].
3. optvar could be set to random values.
4. Option string starting with a : was not treated specially as POSIX
specifies (if the option string starts with a :, then there is no
error printed when there are missing option arguments or illegal options,
and OPTARG and optvar are being set specially).
5. Implemented getopts "opts" optvar [arg]. The optional argument case
was not implemented.

To do:
- what does Posix say about resetting the getopts state? Bash does it
by setting OPTIND=0; is that correct? Should we be doing the same thing?
- should we be using getopt(3) for everything internal to the shell? Is that
feasible because we might need to handle multiple invocations at once.

show more ...


# 07bae7ed 11-May-1995 christos <christos@NetBSD.org>

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


# 6ee2193d 26-Mar-1995 christos <christos@NetBSD.org>

Reverted to set - turning off -x and -v. Charles corrected me... It is part
of POSIX.


123