BBOOLEV(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

Bboolev - Evaluate compiled expression tree against UBF buffer

2. SYNOPSIS

#include <ubf.h>

int Bboolev (UBFH *p_ub, char *tree);

Link with -lubf -lnstd -lm -lpthread

3. DESCRIPTION

Evaluate compiled Boolean expression in tree against UBF buffer in p_ub. In case if accessing BFLD_VIEW subfields, value is read as BFLD_STRING.

4. RETURN VALUE

On success, Bboolev() and result is TRUE, then 1 is returned. ON success but statement is FALSE, then 0 is returned. 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.

BNOTFLD p_ub is not fielded buffer or argument NULL.

BEINVAL tree parameter is NULL.

BALIGNERR Corrupted buffer or pointing to not aligned memory area.

BNOTFLD Buffer not fielded, not correctly allocated or corrupted.

BBADFLD Invalid field id passed.

BNOTPRES Field not present.

FMALLOC Malloc failed.

BSYNTAX Synax error in script.

BBADNAME Bad field name specified.

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