On 2007-04-28 at 00:56 -0700, Phil Pennock wrote: > The attached patch and files, which includes documentation, adds a new > loadable module, zsh/regex. I've not examined widechar issues and which > regex libraries actually do handle these. I've not looked at linkage > issues on platforms where regex (the POSIX interface, not regexp) is not > a part of libc. I noticed a gcc complaint that a variable might be used uninitialised; this was bogus, but understandable. The first patch below fixes it. The second patch is a spelling correction in the docs. Alternatively, it might be a sign that the option needs to be renamed ... arr is only initialised if nelem. Later there are two references to it. The second is guarded by "if (nelem)"; the first is guarded by "if (isset(BASHREMATCH))". If BASHREMATCH is set, nelem is always at least 1. Assuming re.re_nsub is never negative, which it isn't. And the patch also affirms this for sheer paranoia's sake. -Phil