zsh-workers
 help / color / mirror / code / Atom feed
* error message for lack of boot/cleanup function
@ 1996-12-24 11:28 Zefram
  0 siblings, 0 replies; only message in thread
From: Zefram @ 1996-12-24 11:28 UTC (permalink / raw)
  To: Z Shell workers mailing list

-----BEGIN PGP SIGNED MESSAGE-----

The patch makes zmodload give an error message if a module's boot or
cleanup function couldn't be found.  Previously it just silently failed,
which can be confusing and is certainly unhelpful.

 -zefram

      *** Src/module.c	1996/12/24 02:09:54	1.17
      --- Src/module.c	1996/12/24 02:31:26
      ***************
      *** 195,201 ****
            sprintf(buf, "boot_%s", s);
        #endif
            fn = (Module_func) dlsym(m->handle, buf);
      !     return fn ? fn(m) : 1;
        }
        
        /**/
      --- 195,204 ----
            sprintf(buf, "boot_%s", s);
        #endif
            fn = (Module_func) dlsym(m->handle, buf);
      !     if(fn)
      ! 	return fn(m);
      !     zwarnnam(m->nam, "no boot function", NULL, 0);
      !     return 1;
        }
        
        /**/
      ***************
      *** 270,276 ****
            sprintf(buf, "cleanup_%s", s);
        #endif
            fn = (Module_func) dlsym(m->handle, buf);
      !     return fn ? fn(m) : 1;
        }
        
        /**/
      --- 273,282 ----
            sprintf(buf, "cleanup_%s", s);
        #endif
            fn = (Module_func) dlsym(m->handle, buf);
      !     if(fn)
      ! 	return fn(m);
      !     zwarnnam(m->nam, "no cleanup function", NULL, 0);
      !     return 1;
        }
        
        /**/

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMr9DtXD/+HJTpU/hAQEg9QQAvU8zqt4xrqxQ1UGdA/M0NdLF+w1M0Pcs
9SOH9ink9TMRknTmUKYDaYqlRhuibIMvbdQhGwA+fRv7I1aSdvMmVEQv7aRjnMuP
PhjjePP5UQUAaCuvfMr4o2J7FjKEJQgAssgqvZKQK8EZn8jle+J+9Est3V8QZetO
9aG47Te6Hwo=
=oNr0
-----END PGP SIGNATURE-----


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

only message in thread, other threads:[~1996-12-24 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-24 11:28 error message for lack of boot/cleanup function 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).