zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: compctl-related core dump
Date: Fri, 28 Feb 1997 11:17:21 +0100	[thread overview]
Message-ID: <199702281017.LAA13329@hydra.ifh.de> (raw)
In-Reply-To: "Xris Laas"'s message of "Thu, 27 Feb 1997 21:54:51 MET." <199702271653.VAA07297@lator.cybercom.net>

Xris Laas wrote:
> On 27 Feb, John Harres wrote:
> > While working on another odd command's compctl, I got a core dump out of 
> > 3.0.2.  First, the compctl:
> > 
> >    compctl -x 's[-]' -k '(logical physical server database contents object 
> as 
> > type dependencies from stripe incremental stripe replace copyover merge 
> > no_replace no_index indexfile sql_insert charset audits no_audits no_data 
> > data_only merge no_segments on_segment cache no_cache on_index_segment 
> > on_text_segment interfaces user password sybasedump masterinfo bcp_batch_si
> ze 
> > db_refs dryrun code verbose no_prompt no_status quiet debug)' - \
> > 'c[-1,from][-1,stripe][-1.indexfile][-1,interfaces][-1,sybasedump][-1,maste
> rinf
> > o]' -f -- dtsload
> 
> The problem isn't that there's nothing defined for that case.  The
> problem is merely compctl syntax in the line:
> 
> > 'c[-1,from][-1,stripe][-1.indexfile][-1,interfaces][-1,sybasedump][-1,maste
> rinf
>                         ^^^^^^^^^^^^^^
> Change that to "[-1,indexfile]" .

The test in zsh is insufficient when the incorrect condition has
another bracketed expression after it:  it finds the next comma after
and doesn't realise it's gone too far.  This fixes it (for 3.1.1, it
will apply to 3.0.x if you can find the file with get_xcompctl() in
it).

*** Src/Zle/compctl.c.bug	Sun Jan  5 22:07:31 1997
--- Src/Zle/compctl.c	Fri Feb 28 11:11:14 1997
***************
*** 598,605 ****
  		    c->u.l.b[l] = ztrdup(tt);
  		} else {
  		    /* remaining patterns are number followed by string */
! 		    for (; *t && *t != '\201'; t++);
! 		    if (!*t) {
  			zwarnnam(name, "error in condition", NULL, 0);
  			freecompcond(m);
  			return 1;
--- 598,605 ----
  		    c->u.l.b[l] = ztrdup(tt);
  		} else {
  		    /* remaining patterns are number followed by string */
! 		    for (; *t && *t != '\200' && *t != '\201'; t++);
! 		    if (!*t || *t == '\200') {
  			zwarnnam(name, "error in condition", NULL, 0);
  			freecompcond(m);
  			return 1;

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


      reply	other threads:[~1997-02-28 11:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-28  0:10 John Harres
1997-02-28  2:54 ` Xris Laas
1997-02-28 10:17   ` Peter Stephenson [this message]

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=199702281017.LAA13329@hydra.ifh.de \
    --to=pws@ifh.de \
    --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).