On Tue, Sep 08, 1998 at 06:03:07PM -0700, Darryl Okahata wrote:
> Over the weekend I had what I thought was a bright idea. While
Elisp is
> ummm ... fine and dandy, I figured it would be nice if it were possible to
> extend XEmacs using dynamically loaded objects. For those applications
> that are very CPU intensive, it would make more sense (and make for much
> greater speed) if they were written in C and then loaded into emacs.
Ummm:
1. It's already been done (and is a part of XEmacs 21.0), but it hasn't
been widely publicized, because of various remaining issues (which
might cause the interface to change, etc.). See the source file
"src/dll.c".
[ Bottom line: it's not yet ready for prime time. Think of it as a
prototype: you can play with it, but don't depend on it. ]
Ok ... I had a
look at it and the stuff I did for 20.4 was much further
along, and works as well with 21 as it was with 20.4. I dont know how close
201 is to release, but this is an area I know a great deal about (the
technology, not getting it to play nicely with XEmacs). I would like to
make this work, and believe I can with a little internals help. It would
make things go much faster if I could ask questions and get them answered
rather than wading through large doucments.
Does anyone really care about this or am I the sole torch barer? The stuff
in dll.c, while its on the right track, is missing lots of things. I already
have them so lets try and save duplication of effort. Here's what I have got:
a) Functions for loading and unloading DLLs.
b) Function for listing loaded DLLs and their versions
c) A sensible and similar (to the internals) API, which is partly documented
already.
d) Required patches for the Makefile to propperly support dynamic loading.
e) Samples that actually work. None of the stuff in modules/* will work at
all, as dll.c is expecting to find a symbol emacs_initialize, which
doesn't exist in any of the samples.
f) A plan (and 90% implementation) for making it easy for any user to compile
module source and have it loaded. This involves copying the right header
files across and providing 2 shell scripts which invoke the compiler and
linker correctly.
g) Time and inclination to see this through quickly and correctly :-)
--
J. Kean Johnston | "Truth and beauty, beauty and truth. This is all we know,
Engineer, SPG | and all we need ever know." -- John Keats, Endymion
Santa Cruz, CA +----------------------------------------------------------
Tel: 408-427-7569 Fax: 408-429-1887 E-mail: jkj(a)sco.com