Back to home page

Enduro/X

 
 

    


0001 BVCMP(3)
0002 ========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Bvcmp - Compare two view contents
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 int Bvcmp(char *'cstruct1', char *'view1', char *'cstruct2', char *'view2');
0017 
0018 
0019 Link with '-lubf -lnstd -lm -lpthread'
0020 
0021 DESCRIPTION
0022 -----------
0023 Function compares two views by analyzing the view type and their contents. Compare
0024 is based on following principles:
0025 
0026 . The names are compared as strings and if they differ, result is returned.
0027 
0028 . The count indicators (if used) are matched. If differ, result is returned.
0029 
0030 . Only used fields are compared. Array values beyond count indicator (if used) are ignored.
0031 
0032 . For *CARRAY* if length indicator is used, then it is matched in first place, 
0033 if differ, result is returned.
0034 
0035 . Null fields according to view file are equal.
0036 
0037 All function arguments must not be *NULL*. In case of error (for example view
0038 is not defined), value *-2* is returned.
0039 
0040 RETURN VALUE
0041 ------------
0042 On success, *Bvcmp()* return *-1* if 'view1'/'cstruct1' is lesser than 'view2'/'cstruct2'.
0043 *0* is returned in case of both structures matches. *1* is returned in case if 
0044 'view1'/'cstruct1' is lesser greater than 'view2'/'cstruct2'.
0045 
0046 ERRORS
0047 ------
0048 Note that *Bstrerror()* returns generic error message plus custom message with debug info 
0049 from last function call.
0050 
0051 *BEINVAL* 'cstruct1', 'view1', 'cstruct2' or 'view2' is *NULL*.
0052 
0053 *BBADVIEW* 'view' not found in view files.
0054 
0055 EXAMPLE
0056 -------
0057 See *atmitest/test040_typedview/viewunit1.c* for sample code.
0058 
0059 BUGS
0060 ----
0061 Report bugs to support@mavimax.com
0062 
0063 SEE ALSO
0064 --------
0065 *CBvchg(3)* *CBvget(3)* *Bvsetoccur(3)* *Bvoccur(3)* *viewfile(5)* *ex_env(5)*
0066 *viewc(8)*
0067 
0068 COPYING
0069 -------
0070 (C) Mavimax, Ltd
0071