projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added binary and unicode file i/o support to msvcrt.
[reactos.git]
/
reactos
/
lib
/
crtdll
/
mbstring
/
mbsrev.c
1
#include <msvcrt/mbstring.h>
2
3
unsigned char
*
_mbsrev
(
unsigned char
*
s
)
4
{
5
unsigned char
*
e
;
6
unsigned char
a
;
7
e
=
s
;
8
while
(*
e
) {
9
if
(
_ismbblead
(*
e
) ) {
10
a
= *
e
;
11
*
e
= *++
e
;
12
if
( *
e
==
0
)
13
break
;
14
*
e
=
a
;
15
}
16
e
++;
17
}
18
while
(
s
<
e
) {
19
a
=*
s
;
20
*
s
=*
e
;
21
*
e
=
a
;
22
s
++;
23
e
--;
24
}
25
26
27
return
s
;
28
}