zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: zefram@dcs.warwick.ac.uk (Zefram)
Subject: Re: improvement in builtin addition/deletion
Date: Sat, 28 Dec 1996 01:06:09 +0100 (MET)	[thread overview]
Message-ID: <199612280006.BAA02285@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <6676.199612271120@stone.dcs.warwick.ac.uk> from Zefram at "Dec 27, 96 11:19:59 am"

Zefram wrote:
> This patch adds two new functions, addbuiltins() and deletebuiltins().
> They add and delete several builtins at once, in the manner of the code
> I produced for the files module.  They are actually helpful even when
> adding only one builtin: they ensure that error messages are correctly
> generated in all cases.  It also makes adding a second builtin to the
> module as easy as possible.

There is a little bug in that patch, fix is below.

Zoltan


*** Src/module.c.zefram	Sat Dec 28 00:59:10 1996
--- Src/module.c	Sat Dec 28 01:00:03 1996
***************
*** 92,101 ****
  	if(addbuiltin(b->nam, b->binf, b->func,
  	    b->minargs, b->maxargs, b->funcid, b->optstr, b->defopts)) {
  	    zwarnnam(nam, "name clash when adding builtin `%s'", b->nam, 0);
- 	    b->flags |= BINL_ADDED;
  	    hadf = 1;
! 	} else
  	    hads = 2;
      }
      return hadf ? hads : 1;
  }
--- 92,102 ----
  	if(addbuiltin(b->nam, b->binf, b->func,
  	    b->minargs, b->maxargs, b->funcid, b->optstr, b->defopts)) {
  	    zwarnnam(nam, "name clash when adding builtin `%s'", b->nam, 0);
  	    hadf = 1;
! 	} else {
! 	    b->flags |= BINL_ADDED;
  	    hads = 2;
+ 	}
      }
      return hadf ? hads : 1;
  }


      reply	other threads:[~1996-12-28  0:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-27 11:19 Zefram
1996-12-28  0:06 ` Zoltan Hidvegi [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=199612280006.BAA02285@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=zefram@dcs.warwick.ac.uk \
    /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).