Back to home page

Enduro/X

 
 

    


0001 BSUBSET(3)
0002 ==========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Bsubset - check that buffer 2 is part of the buffer 1 (values and fields
0009 found in buffer 1)
0010 
0011 
0012 SYNOPSIS
0013 --------
0014 
0015 #include <ubf.h>
0016 
0017 int Bsubset (UBFH *'p_ubf1', UBFH *'p_ubf2');
0018 
0019 Link with '-lubf -lnstd -lm -lpthread'
0020 
0021 DESCRIPTION
0022 -----------
0023 Test that 'p_ubf2' (needle) is found in 'p_ubf1' (haystack).
0024 
0025 RETURN VALUE
0026 ------------
0027 If 'p_ubf2' occurrences, fields and values are found in 'p_ubf1' the function
0028 returns *1*, if there are any differences, function returns 0 (not found). In
0029 case of error -1 is returned with *Berror* set accordingly.
0030 
0031 For field type *BFLD_UBF* subset testing is performed in recursive way, i.e.
0032 subset of 'p_ubf2' UBF field is tested in 'p_ubf1' UBF field.
0033 
0034 ERRORS
0035 ------
0036 Note that *Bstrerror()* returns generic error message plus custom message with 
0037 debug info from last function call.
0038 
0039 *BEINVAL* 'p_ubf1' or 'p_ubf2' are NULL pointers.
0040 
0041 *BNOTFLD* 'p_ubf1' or 'p_ubf2' buffers not fielded, 
0042 not correctly allocated or corrupted.
0043 
0044 EXAMPLE
0045 -------
0046 See *ubftest/test_bcmp.c* for sample code.
0047 
0048 BUGS
0049 ----
0050 Report bugs to support@mavimax.com
0051 
0052 SEE ALSO
0053 --------
0054 *Bcmp(3)*
0055 
0056 COPYING
0057 -------
0058 (C) Mavimax, Ltd
0059