ReactOS Fundraising Campaign 2012
 
€ 4,060 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mbsset.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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.