~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to src/reference/plain/strcmp.c

  • Committer: Michael Hope
  • Date: 2010-08-30 23:30:25 UTC
  • Revision ID: michael.hope@linaro.org-20100830233025-2f14wknqev6ryj01
Modified the imported versions to build locally.  Added the CSL routines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
int strcmp(const char *s1, const char *s2)
 
2
 
3
  while (*s1 != '\0' && *s1 == *s2)
 
4
    {
 
5
      s1++;
 
6
      s2++;
 
7
    }
 
8
 
 
9
  return (*(unsigned char *) s1) - (*(unsigned char *) s2);
 
10
}
 
11