Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    int _bprintf( char *buf, size_t bufsize,
                  const char *format, ... );
    int _bwprintf( wchar_t *buf, size_t bufsize,
                   const wchar_t *format, ... );

Description:
    The _bprintf function is equivalent to the  sprintf function, except
    that the argument bufsize specifies the size of the character array buf
    into which the generated output is placed.  A null character is placed
    at the end of the generated character string.  The format string is
    described under the description of the  printf function.

    The _bwprintf function is identical to _bprintf except that the argument
    buf specifies an array of wide characters into which the generated
    output is to be written, rather than converted to multibyte characters
    and written to a stream.  The _bwprintf function accepts a
    wide-character string argument for format

Returns:
    The _bprintf function returns the number of characters written into the
    array, not counting the terminating null character.  An error can occur
    while converting a value for output.  When an error has occurred,  errno
    contains a value indicating the type of error that has been detected.

Example:
    #include <stdio.h>

    void main( int argc, char *argv[] )
      {
        char file_name[9];
        char file_ext[4];

        _bprintf( file_name, 9, "%s", argv[1] );
        _bprintf( file_ext,  4, "%s", argv[2] );
        printf( "%s.%s\n", file_name, file_ext );
      }

Classification:
    WATCOM

Systems:
     _bprintf - All, Netware

    _bwprintf - All

See Also:
    cprintf, fprintf, printf, sprintf, _vbprintf, vcprintf, vfprintf,
    vprintf, vsprintf

See Also: cprintf vcprintf

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson