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 <mbstring.h>
    unsigned char *_mbvtop( unsigned int ch,
                            unsigned char *addr );
    unsigned char __far *_fmbvtop( unsigned int ch,
                            unsigned char __far *addr );

Description:
    The _mbvtop function stores the multibyte character ch into the string
    pointed to by addr.

    The function is a data model independent form of the _mbvtop function
    that accepts far pointer arguments.  It is most useful in mixed memory
    model applications.

Returns:
    The _mbvtop function returns the value of the argument addr.


Example:
    #include <stdio.h>
    #include <mbctype.h>
    #include <mbstring.h>


    void main()
      {
        unsigned char string[10];
        unsigned char *p;
        int           i;

        _setmbcp( 932 );
        p = string;
        _mbvtop( '.', p );
        p++;
        _mbvtop( '1', p );
        p++;
        _mbvtop( 'A', p );
        p++;
        _mbvtop( 0x8140, p );
        p += 2;
        _mbvtop( 0x8260, p );
        p += 2;
        _mbvtop( 0x82A6, p );
        p += 2;
        _mbvtop( '\0', p );

        for( i = 0; i < 10; i++ )
          printf( "%2.2x ", string[i] );
        printf( "\n" );
      }

    produces the following:

    2e 31 41 81 40 82 60 82 a6 00

Classification:
    WATCOM

Systems:
     _mbvtop - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

    _fmbvtop - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    _mbccmp, _mbccpy, _mbcicmp, _mbcjistojms, _mbcjmstojis, _mbclen,
    _mbctohira, _mbctokata, _mbctolower, _mbctombb, _mbctoupper, mblen,
    mbrlen, mbrtowc, mbsrtowcs, mbstowcs, mbtowc, sisinit, wcrtomb,
    wcsrtombs, wcstombs, wctob, wctomb

See Also: _mbcjistojms _mbcjmstojis

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