BBOOLSETCBF(3)


Table of Contents

1. NAME
2. SYNOPSIS
3. DESCRIPTION
4. RETURN VALUE
5. ERRORS
6. EXAMPLE
7. BUGS
8. SEE ALSO
9. COPYING

1. NAME

Bboolsetcbf - Add the callback function to the Boolean expression evaluator

2. SYNOPSIS

#include <ubf.h>

int Bboolsetcbf (char funcname, long (functionPtr)(UBFH *p_ub, char *funcname));

Link with -lubf -lnstd -lm -lpthread

3. DESCRIPTION

Register callback function to boolean expression evaluator. The function name which appears in UBF expression is set in funcname, the function it self is set passed in functionPtr. The callback function receives the buffer on which it is being evaluated in p_ub, and callback receives the function name too in funcname.

Min length for function name is 3 symbols and max length is 64.

4. RETURN VALUE

On success, Bboolsetcbf() returns 0. On error -1 is returned, with Berror set to indicate the error.

5. ERRORS

Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.

BBADNAME Invalid function name

6. EXAMPLE

See ubftest/test_expr.c for sample code.

7. BUGS

Report bugs to support@mavimax.com

8. SEE ALSO

Bboolco(3) Bfloatev(3) Btreefree(3)

9. COPYING

© Mavimax, Ltd