
If you want to add library-functions, do the following (funcname is the
function-name):

-Add two lines in libs.h

 extern int args_funcname[];
 extern flowctrl func_funcname(type_block*,opt*,joined_list<type_value>*);

-Add one line to the end of the initialisation of the functions-array in
 libs.cc

 libfunc("funcname",returntype,&func_funcname,args_funcname),

 returntype can be:
 TYPE_VALUE_LONG
 TYPE_VALUE_ULONG         
 TYPE_VALUE_DOUBLE
 TYPE_VALUE_STRING
 TYPE_VALUE_VOID

-Add the argument-list to userdefined.cc, example:

 int args_tcache_get[]= { TYPE_VALUE_STRING,
                          TYPE_VALUE_STRING,
                          TYPE_VALUE_STRING,
                          0 };

 tcache_get has three string-arguments

-Define the function in userdefined.cc. always begin with:

 flowctrl func_funcname(type_block* aktblock,opt* options,
                        joined_list<type_value>* args)
 {
   aktblock=aktblock;options=options;args=args; /* to prevent warnings */
   flowctrl back;
   back.ctrl=FLOW_RETURN;

 You can get the Arguments with (*args)[0],(*args)[1],...
 They have the type type_value defined in boil.h. Conversions from the class
 string to char* and char* to string are defined. Please assure that all
 string-type-Arguments are defined at the beginning of the functions, eg:

 if (!defined((*args)[0].stringval) ||
     !defined((*args)[1].stringval) ||
     !defined((*args)[2].stringval))
   {
     setvarulong("error",1);
     setvarstring("perror","tcache_get: string not defined");
     return back;
   };

 Here you can see how to set the error-variables 'error' and 'perror'. The
 returned variable back has the type flowctrl defined in boil.h. The only
 interesting elements are type and returnval. Type must be set to one of the
 TYPE_VALUE_* macros. Returnval has the type type_value and contains the
 result. 
