NetBSD/bin/sh
christos 0bc88b2434 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.
1996-06-04 21:00:09 +00:00
..
bltin convert to new RCS id conventions. 1995-03-21 09:01:59 +00:00
funcs Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
Makefile Fix problems with the way init.o is built: 1996-02-18 12:29:18 +00:00
TOUR Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
alias.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
alias.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
arith.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
arith.y Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
arith_lex.l Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
builtins.def Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
cd.c Changed so that cd builtin doesn't do wierd stuff when cd'ing through 1996-03-01 01:58:58 +00:00
cd.h Fix PR/1760, where 'cd -' before any other command could cause a reference 1995-11-19 23:27:37 +00:00
error.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
error.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
eval.c Fix PR/2504: return with no args returns 0 instead of the return value of 1996-06-03 12:21:17 +00:00
eval.h Fix return builtin to work like it does in ksh: 1995-09-11 17:05:41 +00:00
exec.c Changed so that 'PATH=newpath command' works, instead of looking at the 1995-06-09 01:53:44 +00:00
exec.h Changed so that 'PATH=newpath command' works, instead of looking at the 1995-06-09 01:53:44 +00:00
expand.c Fix PR/2070: Ksh style variable modifiers were broken in /bin/sh, from 1996-02-12 15:11:41 +00:00
expand.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
histedit.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
init.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
input.c - fix PR1620, -DNO_HISTORY did not work. 1995-10-19 04:14:37 +00:00
input.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
jobs.c Relocate pointers after re-allocation of the job table. 1995-07-04 16:26:45 +00:00
jobs.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
machdep.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mail.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mail.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
main.c Fix PR/1760, where 'cd -' before any other command could cause a reference 1995-11-19 23:27:37 +00:00
main.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
memalloc.c Fix growstackblock() 'newlen' calculations: 1996-05-20 14:49:32 +00:00
memalloc.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
miscbltin.c Changed type of rlimit values from quad_t to rlim_t. Cast rlim_t's to 1995-06-12 19:44:16 +00:00
mkbuiltins Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mkinit.c Fix problems with the way init.o is built: 1996-02-18 12:29:18 +00:00
mknodes.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mksyntax.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mktokens Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
myhistedit.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mystring.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
mystring.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
nodes.c.pat Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
nodetypes Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
options.c getopts fixes: 1996-06-04 21:00:09 +00:00
options.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
output.c Handle %q format directive; from Mike Long (PR #1454). 1995-09-14 16:19:06 +00:00
output.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
parser.c Close PR/2384 backquoted backslash-newline was not eaten. 1996-05-09 19:40:08 +00:00
parser.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
redir.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
redir.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
sh.1 Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
shell.h Changed so that cd builtin doesn't do wierd stuff when cd'ing through 1996-03-01 01:58:58 +00:00
show.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
show.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
trap.c Ignore result of sigaction when setting traps. Traps will succeed even 1995-06-07 04:16:57 +00:00
trap.h Ignore result of sigaction when setting traps. Traps will succeed even 1995-06-07 04:16:57 +00:00
var.c Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00
var.h Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 1995-05-11 21:28:33 +00:00