mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 13:02:59 +00:00
Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira.reactos.org/browse/CORE-7250 for more details.
svn path=/branches/ntvdm/; revision=59241
This commit is contained in:
parent
3e3200acef
commit
4f0b8d3db0
20620 changed files with 0 additions and 1232833 deletions
40
lib/sdk/crt/mbstring/mbsset.c
Normal file
40
lib/sdk/crt/mbstring/mbsset.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/msvcrt/mbstring/mbsset.c
|
||||
* PURPOSE: Fills a string with a multibyte character
|
||||
* PROGRAMER: Ariadne
|
||||
* UPDATE HISTORY:
|
||||
* 12/04/99: Created
|
||||
*/
|
||||
|
||||
#include <mbstring.h>
|
||||
|
||||
size_t _mbclen2(const unsigned int s);
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
unsigned char * _mbsset(unsigned char *src, unsigned int c)
|
||||
{
|
||||
unsigned char *char_src = src;
|
||||
unsigned short *short_src = (unsigned short *)src;
|
||||
|
||||
if ( _mbclen2(c) == 1 ) {
|
||||
|
||||
while(*char_src != 0) {
|
||||
*char_src = c;
|
||||
char_src++;
|
||||
}
|
||||
*char_src = 0;
|
||||
}
|
||||
else {
|
||||
while(*short_src != 0) {
|
||||
*short_src = c;
|
||||
short_src++;
|
||||
}
|
||||
*short_src = 0;
|
||||
}
|
||||
|
||||
return src;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue