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
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
builtins
/
lib
/
strcspn.c
blob
53f609114bbbdfb1b7fee2a3a137d5c142d1f3d5
1
extern
void
abort
(
void
);
2
extern
int
inside_main
;
3
4
__SIZE_TYPE__
5
strcspn
(
const char
*
s1
,
const char
*
s2
)
6
{
7
const char
*
p
, *
q
;
8
9
#ifdef __OPTIMIZE__
10
if
(
inside_main
)
11
abort
();
12
#endif
13
14
for
(
p
=
s1
; *
p
;
p
++)
15
for
(
q
=
s2
; *
q
;
q
++)
16
if
(*
p
== *
q
)
17
goto
found
;
18
19
found
:
20
return
p
-
s1
;
21
}