[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.9.2 Implementing new library functions

Adding more external libraries to avram is currently a manual procedure requiring the attention of a developer conversant with C. To support a new library called foobar, these steps need to be followed at a minimum.

The functions shown above have the obvious interpretations, namely that avm_foobar_call evaluates a library function from the foobar library, and avm_have_foobar_call tests for a function’s availability. The latter should interpret wild cards as explained in Calling existing library functions, but should return only a list of strings for the matching function names rather than a list of pairs of strings, as the library name is redundant. The remaining functions are for static initialization and reclamation.

These functions should consist mainly of boilerplate code similar to the corresponding functions in any of the other library source files, which should be consulted as examples. The real work would be done by other functions called by them. These should be statically declared within the ‘.c’ source file and normally not listed in the ‘.h’ header file unless there is some reason to think they may be of more general use. Any externally visible functions should have names beginning with avm_ to avoid name clashes.

Some helpful hints are reported below for what they may be worth.

Those who support avram are always prepared to assist in the dissemination of worthwhile contributed library modules under terms compatible with GNU GENERAL PUBLIC LICENCE, and under separate copyrights if preferred. Contributed modules can be integrated into the official source tree provided that they meet the following additional guidelines to those above.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on November 8, 2012 using texi2html 1.82.