KwMap.net - browse the Keyword Map of ferite.org
Now that you know how to write native functions by hand this section is a piece of cake. All you have to do to fullfill the requirements of a ferite module is write four functions. Yes it is that easy. These functions are the ones that builder creates for you from module-init, module-deinit, module-register, and module-unregister. Rather than talk too much, I will show you the code for a blank module:
If you have these four functions exported from you module, it will find them without problem. One thing to note, the name of the module must be the same as the prefix for each of the functions otherwise ferite will not be able to find them. For instance in foo.lib the init function must be called foo_init.
The hardest part of writing a module is probably getting it to compile and be installed. But that will be left as an exercise to the reader. [Hint: look at generate-module, a tool shipped with ferite for installing modules written using builder - but can be modified to handle home made modules].
You may also want to read the next chapter as a cunning secret is told that can make writing native modules easier.
|ferite et al © 2000-2004, Chris Ross|