From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: error message for lack of boot/cleanup function
Date: Tue, 24 Dec 1996 11:28:50 +0000 (GMT) [thread overview]
Message-ID: <23496.199612241128@stone.dcs.warwick.ac.uk> (raw)
-----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-----
reply other threads:[~1996-12-24 11:26 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=23496.199612241128@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).