zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: Re: BUG: unexpected end of string in findsep()
Date: Wed, 07 Jul 1999 17:58:31 +0200	[thread overview]
Message-ID: <9907071558.AA09134@ibmth.df.unipi.it> (raw)
In-Reply-To: ""Andrej Borsenkow""'s message of "Wed, 07 Jul 1999 19:28:58 DFT." <002401bec88d$6e8115d0$21c9ca95@mow.siemens.ru>

"Andrej Borsenkow" wrote:
> As a result of testing something else ...
> 
> bor@itsrm2:~/test%> args "${(ps:'\C-@':)$(print -N *)}"
> 1
> DBI
> BUG: unexpected end of string in findsep()
> BUG: unexpected end of string in findsep()

I think the bug is in the error message:  at the point it's actually
testing I don't see any reason why there shouldn't be the end of the
string.  Maybe the patch below is what was intended.

By the way, you actually just need:

args "${(ps:\C-@:)$(print -N *)}"

since the single quotes are taken as literal characters inside the double
quotes.  It seems to work without single quotes with the double quotes just
around the command substitution, too.  I suspect trying to quote the
separation string is going to be problematic, because it isn't untokenized
properly.  But until you can find something that doesn't work that
should...

--- Src/utils.c.fs	Wed Jul  7 17:49:36 1999
+++ Src/utils.c	Wed Jul  7 17:49:52 1999
@@ -1735,10 +1735,11 @@
 	if (!*t)
 	    return i;
 	if (*(*s)++ == Meta) {
-	    (*s)++;
 #ifdef DEBUG
-	    if (! **s)
+	    if (! *(*s)++)
 		fprintf(stderr, "BUG: unexpected end of string in findsep()\n");
+#else
+	    (*s)++;
 #endif
 	}
     }

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


      reply	other threads:[~1999-07-07 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-07 15:28 Andrej Borsenkow
1999-07-07 15:58 ` 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=9907071558.AA09134@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).