source: git/src/strcasecmp.c @ 014fd7e

RELEASE/1.0RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since 014fd7e was 23b9fda, checked in by Olly Betts <olly@…>, 26 years ago

corrected reverse sense on exit test

git-svn-id: file:///home/survex-svn/survex/trunk@182 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 365 bytes
RevLine 
[1f04920]1/* portable case insensitive string compare */
[fe72b3a]2/* Copyright (C) Olly Betts 1994,1999 */
[1f04920]3
4#include <ctype.h>
5
6/* What about top bit set chars? */
[fe72b3a]7int strcasecmp(const char *s1, const char *s2) {
8   register c1, c2;
[1f04920]9   do {
10      c1 = *s1++;
11      c2 = *s2++;
[23b9fda]12   } while (c1 && toupper(c1) == toupper(c2));
[fe72b3a]13   /* now calculate real difference */
[1f04920]14   return c1 - c2;
15}
Note: See TracBrowser for help on using the repository browser.