zsh-workers
 help / color / mirror / code / Atom feed
* autoload failing
@ 1997-03-20 16:25 Zefram
  0 siblings, 0 replies; only message in thread
From: Zefram @ 1997-03-20 16:25 UTC (permalink / raw)
  To: zsh-workers

-----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-----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-03-20 16:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-20 16:25 autoload failing Zefram

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).