From: blaise@zenith.att.com
To: zsh-workers@math.gatech.edu
Subject: getopts patch
Date: Thu, 30 Jan 1997 09:35:14 -0500 [thread overview]
Message-ID: <9701301435.AA26670@jbond.zenith.att.com> (raw)
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
reply other threads:[~1997-01-30 14:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9701301435.AA26670@jbond.zenith.att.com \
--to=blaise@zenith.att.com \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).