Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmbsset.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS system libraries 00004 * FILE: lib/msvcrt/mbstring/mbsset.c 00005 * PURPOSE: Fills a string with a multibyte character 00006 * PROGRAMER: Ariadne 00007 * UPDATE HISTORY: 00008 * 12/04/99: Created 00009 */ 00010 00011 #include <mbstring.h> 00012 00013 size_t _mbclen2(const unsigned int s); 00014 00015 /* 00016 * @implemented 00017 */ 00018 unsigned char * _mbsset(unsigned char *src, unsigned int c) 00019 { 00020 unsigned char *char_src = src; 00021 unsigned short *short_src = (unsigned short *)src; 00022 00023 if ( _mbclen2(c) == 1 ) { 00024 00025 while(*char_src != 0) { 00026 *char_src = c; 00027 char_src++; 00028 } 00029 *char_src = 0; 00030 } 00031 else { 00032 while(*short_src != 0) { 00033 *short_src = c; 00034 short_src++; 00035 } 00036 *short_src = 0; 00037 } 00038 00039 return src; 00040 } Generated on Tue May 22 2012 04:40:41 for ReactOS by
1.7.6.1
|