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/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    int _bprintf( char *buf, unsigned int bufsize,
                  const char *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.

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.

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

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:
    All

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