mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:45:50 +00:00
Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
This commit is contained in:
parent
a28e798006
commit
c424146e2c
20602 changed files with 0 additions and 1140137 deletions
33
lib/sdk/crt/mbstring/mbsrchr.c
Normal file
33
lib/sdk/crt/mbstring/mbsrchr.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/msvcrt/mbstring/mbsrchr.c
|
||||
* PURPOSE: Searches for a character in reverse
|
||||
* PROGRAMER: Ariadne
|
||||
* UPDATE HISTORY:
|
||||
* 12/04/99: Created
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <mbstring.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
unsigned char * _mbsrchr(const unsigned char *src, unsigned int val)
|
||||
{
|
||||
unsigned int c;
|
||||
unsigned char *match = NULL;
|
||||
|
||||
if (!src)
|
||||
return NULL;
|
||||
|
||||
while (1)
|
||||
{
|
||||
c = _mbsnextc(src);
|
||||
if (c == val)
|
||||
match = (unsigned char*)src;
|
||||
if (!c)
|
||||
return match;
|
||||
src += (c > 255) ? 2 : 1;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue