zsh-workers
 help / color / mirror / code / Atom feed
* getopts patch
@ 1997-01-30 14:35 blaise
  0 siblings, 0 replies; only message in thread
From: blaise @ 1997-01-30 14:35 UTC (permalink / raw)
  To: zsh-workers

getopts broke in 3.0.2; it was ok in 3.0.1.  The problem is the
handling of required paramtetrs.  Here is the patch, courtesy of
Andrew Robinson.  (it's against 3.0.2 and 3.1.1)

--- Src/builtin.c.orig	Wed Jan 29 10:22:40 1997
+++ Src/builtin.c	Wed Jan 29 11:09:08 1997
@@ -4512,7 +4512,7 @@
     /* copy option into specified parameter, with + if required */
     setsparam(var, metafy(opch - (*str == '+'), 1 + (*str == '+'), META_DUP));
     /* handle case of an expected extra argument */
-    if (optstr[1] == ':') {
+    if (optstr[i + 1] == ':') {
 	if (!args[zoptind - 1]) {
 	    /* no extra argument was provided */
 	    if (quiet) {

-- 
Blaise Tarr
btarr@attmail.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-01-30 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-30 14:35 getopts patch blaise

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).