User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:ubf:bvnull.3

bvnull

Name

Bvnull — Test is structure field have a NULL value according to the view

Synopsis

#include <ubf.h>

int Bvnull(char *cstruct, char *cname, BFLDOCC occ, char *view);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Test is field in structure NULL. The tests are done by comparing the field value with NULL value column defined in view file. Note that if NULL was set to NONE, then function will always return FALSE. The pointer to structure is given in cstruct. The field name is specified in cname. The array element index (zero based) is passed in occ field. If COUNT is set to 1 in view file, then field is tested via occ set to 0.

RETURN VALUE

If field is NULL, Bvftos() return 1; If field is no NULL, function returns 0; on error, -1 is returned, with Berror set to indicate the error.

ERRORS

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

BEINVAL Invalid value passed to function, parameters are NULL or invalid occ index.

BNOCNAME Invalid cname specified (field not found).

BBADVIEW View is not found, object file is defective or system error.

EXAMPLE

See atmitest/test040_typedview/viewunit1.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd