]> andersk Git - splint.git/blob - test/manual/palindrome.c
Fixes for win32
[splint.git] / test / manual / palindrome.c
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
This page took 0.043407 seconds and 5 git commands to generate.