Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: modules configuration patch

Zefram wrote:
>     like $(@D@LEXT) have varying effect.  It's hacky, but portably doing
>     anything complex in a Makefile is a bit of a black art anyway.

I was a bit afraid of that myself.  With a better make we can hack up some
automatic rules for K&R compilers and we may delete those _file.c rules.
This hack is a bit more difficult for modules.

> * Src/mod_example.c
>     Include "zsh.h", in order to get all the type definitions, prototypes
>     and so on that should be available.  Modules should do this some
>     way or other, in order to allow proper interface checking.

Of course you are right.  Here I just wanted to demonstrare that a module
can be compiled independently from zsh.

> Some other points that occurred to me:
> The initialise/cleanup interface, with varying names that depend on
> the filename of the module, is really ugly.  Is there a good reason to
> have varying names?  Fixed names would be easier to implement.  And the

If we want to statically link modules to zsh we must use unique names.
I also think that the _init/_fini functions are not always available.

> The interface to modload could use some more thought.  Is the argument
> a filename, or a module name?  At the moment only a pathname starting
> with /, ./ or ../ is treated as a filename.  It would be more consistent
> to treat any pathname containing a / as an actual pathname, and only do
> the path search and .so appending when only a bare name is specified.

I know that the interface is not good at the mement but this is the easiest
part.  I wrote this interface a few months ago just to test the
capabilities of my ELF system.  The most difficult part is to make
everything portable and allow static linking of modules.  The user
interface part is really half finished I showed it to the public just to
give you some food for thought.

> And finally a more general question.  Are any non-trivial modules going
> to be included in the zsh distribution?

I hope so.  Perl comes with several modules and I think it would make zsh
popular if it came with a few powefull module.


Messages sorted by: Reverse Date, Date, Thread, Author