mirror of
https://github.com/reactos/reactos.git
synced 2024-11-11 01:04:11 +00:00
c424146e2c
svn path=/branches/cmake-bringup/; revision=48236
33 lines
359 B
C
33 lines
359 B
C
#include <mbstring.h>
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
unsigned char * _mbsrev(unsigned char *s)
|
|
{
|
|
unsigned char *e;
|
|
unsigned char a;
|
|
unsigned char *e2;
|
|
e=s;
|
|
while (*e) {
|
|
if ( _ismbblead(*e) ) {
|
|
a = *e;
|
|
e2 = e;
|
|
*e2 = *++e;
|
|
if ( *e == 0 )
|
|
break;
|
|
*e = a;
|
|
}
|
|
e++;
|
|
}
|
|
while (s<e) {
|
|
a=*s;
|
|
*s=*e;
|
|
*e=a;
|
|
s++;
|
|
e--;
|
|
}
|
|
|
|
|
|
return s;
|
|
}
|