Back to home page

Enduro/X

 
 

    


0001 BPRINT(3)
0002 =========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 Bprint - Print the buffer output in human readable form to *stdout*
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 
0014 #include <ubf.h>
0015 
0016 int Bprint (UBFH *'p_ub');
0017 
0018 Link with '-lubf -lnstd -lm -lpthread'
0019 
0020 DESCRIPTION
0021 -----------
0022 Function prints the 'p_ub' buffer content to *stdout*. The format of the output 
0023 is "<FIELD><TAB><VALUE><NEW LINE>". The *BFLD_CARRAY* fields are printed 
0024 in the way that non readable characters are printed in hex-decimal format, 
0025 prefixed with \. If value contains \ char, then it is printed as \\. Example:
0026 
0027 --------------------------------------------------------------------------------
0028 T_SHORT_FLD     1765
0029 T_LONG_FLD      3333111
0030 T_LONG_FLD      2
0031 T_CHAR_FLD      A
0032 T_FLOAT_FLD     1.33000
0033 T_DOUBLE_FLD    1111.220000
0034 T_DOUBLE_FLD    333.000000
0035 T_DOUBLE_FLD    444.000000
0036 T_STRING_FLD    HELLO WORLD
0037 T_CARRAY_FLD    \00\01\02\03HELLO BINARY\04\05\00
0038 --------------------------------------------------------------------------------
0039 
0040 Floating point values are printed with 6 symbols after decimal separator.
0041 
0042 RETURN VALUE
0043 ------------
0044 On success, *Bprint()* return zero; on error, -1 is returned, 
0045 with *Berror* set to indicate the error.
0046 
0047 ERRORS
0048 ------
0049 Note that *Bstrerror()* returns generic error message plus custom message with 
0050 debug info from last function call.
0051 
0052 *BALIGNERR* Corrupted buffer or pointing to not aligned memory area.
0053 
0054 *BNOTFLD* Buffer not fielded, not correctly allocated or corrupted.
0055 
0056 EXAMPLE
0057 -------
0058 See *ubftest/test_print.c* for sample code.
0059 
0060 BUGS
0061 ----
0062 Report bugs to support@mavimax.com
0063 
0064 SEE ALSO
0065 --------
0066 *Bextread(3)* *Bfprint(3)* *Bfprintcb(3)* *Bread(3)* *Bwrite(3)*
0067 
0068 COPYING
0069 -------
0070 (C) Mavimax, Ltd
0071