repo.or.cz
/
ppn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
update isl for change in lexicographic optimization
[ppn.git]
/
memrchr.c
blob
3de6fc282572ce45610fe0e9f7a987940da7625d
1
#include
"memrchr.h"
2
3
const void
*
memrchr
(
const void
*
s
,
int
c
,
size_t
n
)
4
{
5
int
i
;
6
const char
*
p
=
s
;
7
8
for
(
i
=
n
-
1
;
i
>=
0
; --
i
)
9
if
(
p
[
i
] ==
c
)
10
return
p
+
i
;
11
12
return
NULL
;
13
}