repo.or.cz
/
splint-patched.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Don't try calling lsl when file is missing.
[splint-patched.git]
/
test
/
manual
/
palindrome.c
blob
77100139a13f6073b1727fe8f9feea5f5a5cb462
1
# include
"bool.h"
2
# include
"mstring.h"
3
4
bool
isPalindrome
(
mstring s
)
5
{
6
char
*
current
= (
char
*)
s
;
7
int
i
,
len
= (
int
)
strlen
(
s
);
8
9
for
(
i
=
0
;
i
<= (
len
+
1
)/
2
;
i
++)
10
{
11
if
(
current
[
i
] !=
s
[
len
-
i
-
1
])
12
return
FALSE
;
13
}
14
return
TRUE
;
15
}
16
17
bool
callPal
(
void
)
18
{
19
return
(
isPalindrome
(
"bob"
));
20
}
21
22
23
24
25