Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmbsrchr.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/mbsrchr.c 00005 * PURPOSE: Searches for a character in reverse 00006 * PROGRAMER: Ariadne 00007 * UPDATE HISTORY: 00008 * 12/04/99: Created 00009 */ 00010 #include <stdlib.h> 00011 #include <mbstring.h> 00012 00013 /* 00014 * @implemented 00015 */ 00016 unsigned char * _mbsrchr(const unsigned char *src, unsigned int val) 00017 { 00018 unsigned int c; 00019 unsigned char *match = NULL; 00020 00021 if (!src) 00022 return NULL; 00023 00024 while (1) 00025 { 00026 c = _mbsnextc(src); 00027 if (c == val) 00028 match = (unsigned char*)src; 00029 if (!c) 00030 return match; 00031 src += (c > 255) ? 2 : 1; 00032 } 00033 } Generated on Sun May 27 2012 04:36:29 for ReactOS by
1.7.6.1
|