Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
error message for lack of boot/cleanup function
- X-seq: zsh-workers 2628
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Z Shell workers mailing list)
- Subject: error message for lack of boot/cleanup function
- Date: Tue, 24 Dec 1996 11:28:50 +0000 (GMT)
-----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-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author