the fact that optind refers to the *next* argument to be consumed by getopt(), not the current one. This means we have to keep track of when we are working with a new argv entry by hand. OK hugh@
From Piotr Domagalski, closes PR 3405
after all since there's no need to check an invariant the first time through. I've fixed the loop invariants (we need to take special care with the "j == fg->patternLen" case) and hopefully made things a tad bit clearer. tedu@ OK
Lack of clarity pointed out by Sam Smith, different fix suggested by jmc@
Fixes a problem on sparc64 where sizeof(int) != sizeof(pointer). Based on a patch from Brian Poole; tedu@ OK
- remove a .Pp
… all) patterns. ok tedu@, millert@
keep track of what the last char from getopt was as well as the previous value of optind so we know when a new number has started.
array access (and a core dump on sparc64 at least). Noticed by sturm@ and pvalchev@. Fix tested an OK by pvalchev@.
the program name as expected. ok millert@
of a potentially nontermined src.
this makes searching for constant strings much faster by avoiding regex. ok deraadt@