From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu
Subject: autoload failing
Date: Thu, 20 Mar 1997 16:25:01 GMT [thread overview]
Message-ID: <303.199703201625@stone.dcs.warwick.ac.uk> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
This patch stops failed module autoloads being attempted again. This is
particularly useful with the zle module: currently an autoload will be
attempted every time the main prompt is reached while it is not loaded.
-zefram
*** Src/builtin.c 1997/03/17 14:23:38 1.62
--- Src/builtin.c 1997/03/20 13:04:52
***************
*** 60,65 ****
--- 60,66 ----
#ifdef DYNAMIC
if (!bn->handlerfunc) {
zwarnnam(name, "autoload failed", NULL, 0);
+ deletebuiltin(bn->nam);
return 1;
}
#endif
*** Src/init.c 1997/03/19 00:21:09 1.41
--- Src/init.c 1997/03/20 13:13:33
***************
*** 790,796 ****
--- 790,800 ----
ZleVoidFn gotwordptr = noop_function;
ZleVoidFn refreshptr = noop_function;
ZleVoidIntFn spaceinlineptr = noop_function_int;
+ # ifdef UNLINKED_XMOD_zle
+ ZleReadFn zlereadptr = autoload_zleread;
+ # else /* !UNLINKED_XMOD_zle */
ZleReadFn zlereadptr = fallback_zleread;
+ # endif /* !UNLINKED_XMOD_zle */
/**/
void
***************
*** 806,811 ****
--- 810,828 ----
/* do nothing */
}
+ # ifdef UNLINKED_XMOD_zle
+
+ /**/
+ unsigned char *
+ autoload_zleread(char *lp, char *rp)
+ {
+ zlereadptr = fallback_zleread;
+ load_module("zle");
+ return zleread(lp, rp);
+ }
+
+ # endif /* UNLINKED_XMOD_zle */
+
/**/
unsigned char *
fallback_zleread(char *lp, char *rp)
***************
*** 813,822 ****
char *pptbuf;
int pptlen;
- #ifdef UNLINKED_XMOD_zle
- if (load_module("zle"))
- return zleread(lp, rp);
- #endif /* UNLINKED_XMOD_zle */
pptbuf = putprompt(lp, &pptlen, NULL, 1);
write(2, (WRITE_ARG_2_T)pptbuf, pptlen);
free(pptbuf);
--- 830,835 ----
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii
iQCVAwUBMzFDBXD/+HJTpU/hAQH8TgQAoDGAJ2caaTkuWDFGOj4csh2EtnikEdb+
J/m3u1cnDPhKYj1fK2PsteNjIFuaELBSFaftoCTANFdhfjYEu/ZkTitSQG3W8guv
eFnUxZFaNWYPDAOxM0LyEwLndGuxJB4KgWw9I9aSl/ES+5nmxgyDJBdIWdkMBSbf
OFdoHKoMDwI=
=nXo9
-----END PGP SIGNATURE-----
reply other threads:[~1997-03-20 16:39 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=303.199703201625@stone.dcs.warwick.ac.uk \
--to=zefram@dcs.warwick.ac.uk \
--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).