mbccpy.c

来自「C标准库源代码」· C语言 代码 · 共 45 行

C
45
字号
/***
*mbccpy.c - Copy one character  to another (MBCS)
*
*       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       Copy one MBCS character to another (1 or 2 bytes)
*
*******************************************************************************/

#include <cruntime.h>
#include <mbdata.h>
#include <mbctype.h>
#include <mbstring.h>
#include <stddef.h>

/***
* _mbccpy - Copy one character to another (MBCS)
*
*Purpose:
*       Copies exactly one MBCS character from src to dst.  Copies _mbclen(src)
*       bytes from src to dst.
*
*Entry:
*       unsigned char *dst = destination for copy
*       unsigned char *src = source for copy
*
*Exit:
*
*Exceptions:
*
*******************************************************************************/

void __cdecl _mbccpy(
    unsigned char *dst,
    const unsigned char *src
    )
{
        *dst = *src;
        if (_ISLEADBYTE(*src))
                {
                *++dst = *++src;
                }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?