~ubuntu-branches/ubuntu/lucid/graphviz/lucid-security

« back to all changes in this revision

Viewing changes to dotneato/common/strcasecmp.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-02-05 18:52:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020205185212-8i04c70te00rc40y
Tags: upstream-1.7.16
ImportĀ upstreamĀ versionĀ 1.7.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "gvconfig.h"
 
2
#ifndef HAVE_STRCASECMP
 
3
 
 
4
#include <string.h>
 
5
#include <ctype.h>
 
6
 
 
7
#ifdef DMALLOC
 
8
#include "dmalloc.h"
 
9
#endif
 
10
 
 
11
int
 
12
strcasecmp(char *s1, char *s2)
 
13
{
 
14
        while (*s1 != '\0' && tolower(*s1) == tolower(*s2))
 
15
        {
 
16
                s1++;
 
17
                s2++;
 
18
        }
 
19
 
 
20
        return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
 
21
}
 
22
 
 
23
#endif /* HAVE_STRCASECMP */