RELEASE/1.2debug-cidebug-ci-sanitiserswalls-datawalls-data-hanging-as-warning
Rev | Line | |
---|
[1f04920] | 1 | /* portable case insensitive string compare */ |
---|
[846746e] | 2 | /* Copyright (C) Olly Betts 1994,1999 |
---|
| 3 | * |
---|
[89231c4] | 4 | * This program is free software; you can redistribute it and/or modify |
---|
| 5 | * it under the terms of the GNU General Public License as published by |
---|
| 6 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | * (at your option) any later version. |
---|
[846746e] | 8 | * |
---|
| 9 | * This program is distributed in the hope that it will be useful, |
---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
[89231c4] | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | * GNU General Public License for more details. |
---|
[846746e] | 13 | * |
---|
[89231c4] | 14 | * You should have received a copy of the GNU General Public License |
---|
| 15 | * along with this program; if not, write to the Free Software |
---|
[ecbc6c18] | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
[846746e] | 17 | */ |
---|
[1f04920] | 18 | |
---|
| 19 | #include <ctype.h> |
---|
| 20 | |
---|
| 21 | /* What about top bit set chars? */ |
---|
[fe72b3a] | 22 | int strcasecmp(const char *s1, const char *s2) { |
---|
| 23 | register c1, c2; |
---|
[1f04920] | 24 | do { |
---|
| 25 | c1 = *s1++; |
---|
| 26 | c2 = *s2++; |
---|
[23b9fda] | 27 | } while (c1 && toupper(c1) == toupper(c2)); |
---|
[fe72b3a] | 28 | /* now calculate real difference */ |
---|
[1f04920] | 29 | return c1 - c2; |
---|
| 30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.