repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
builtins
/
lib
/
strrchr.c
blob
c2f7107064c97def6b895053b7f87231895b87ce
1
extern
void
abort
(
void
);
2
extern
int
inside_main
;
3
4
char
*
5
strrchr
(
const char
*
s
,
int
c
)
6
{
7
__SIZE_TYPE__ i
;
8
9
#ifdef __OPTIMIZE__
10
if
(
inside_main
)
11
abort
();
12
#endif
13
14
i
=
0
;
15
while
(
s
[
i
] !=
0
)
16
i
++;
17
18
do
19
if
(
s
[
i
] ==
c
)
20
return
(
char
*)
s
+
i
;
21
while
(
i
-- !=
0
);
22
23
return
0
;
24
}
25
26
char
*
27
rindex
(
const char
*
s
,
int
c
)
28
{
29
return
strrchr
(
s
,
c
);
30
}