
cstubgen:

cstubgen can generate a stub file that allows linking in dynamic
link libraries into Yacas at runtime. It works by generating
a .cc file that should be compiled and linked with the library.
The input file can contain commands defined by cstubgen.

Currently defined functions:

>>> StubApiCStart()

To start up generating a c stub file for linking a c library with
Yacas. A stub specification file needs to start with this
function call, to reset the internal state of Yacas for emitting
a stub c++ file.

>>> StubApiCShortIntegerConstant(const,value)

define a constant 'const' to have value 'value'.  The value should
be short integer constant. This is useful for linking in
defines and enumerated values into Yacas.
If the library for instance has a define <br>
#define FOO 10
Then 
StubApiCShortIntegerConstant("FOO","FOO")
will bind the global variable FOO to the value for FOO defined in
the library header file.

>>> StubApiCInclude(file)

Declare an include file (a header file for the library, for instance)
The delimiters need to be specified too. So, for a standard library
like the one needed for opengl, you need to specify <br>
StubApiCInclude("<GL/gl.h>") <BR>
and for user include file:
StubApiCInclude("\"GL/gl.h\"") <BR>

>>> StubApiCFunction(returntype,fname,args)
>>> StubApiCFunction(returntype,fname,fname2,args)

return type, function name, and list of arguments. All of these
should be literal strings (surrounded by quotes).

The return types currently supported are "int", "double" and "void".

The argument values that are currently supported
are "int", "double", and "input_string".


>>> StubApiCFile(basename)

Generate the c++ stub file, "basename.cc".


>>> StubApiCSetEnv(func)

This function forces the plugin to call the function func, with as
argument LispEnvironment& aEnvironment. This lets the plugin store
the environment class (which is needed for almost any thing to do with
Yacas), somewhere in a global variable. aEnvironment can then be used
from within a callback function in the plugin that doesn't take the
extra argument by design.



