| Last change
 on this file since 1031 was             847, checked in by bird, 26 years ago | 
        
          | 
Initial checkin of Win32k. (not tested & pe2lx not up-to-date!)
 | 
        
          | File size:
            1.1 KB | 
      
      
| Line |  | 
|---|
| 1 | /* $Id: stricmp.c,v 1.1 1999-09-06 02:20:02 bird Exp $ | 
|---|
| 2 | * | 
|---|
| 3 | * stricmp - Case insensitive string compare. | 
|---|
| 4 | * | 
|---|
| 5 | * Copyright (c) 1999 knut st. osmundsen | 
|---|
| 6 | * | 
|---|
| 7 | */ | 
|---|
| 8 |  | 
|---|
| 9 | /******************************************************************************* | 
|---|
| 10 | *   Defined Constants                                                          * | 
|---|
| 11 | *******************************************************************************/ | 
|---|
| 12 | #define upcase(ch)   \ | 
|---|
| 13 | (ch >= 'a' && ch <= 'z' ? ch - ('a' - 'A') : ch) | 
|---|
| 14 |  | 
|---|
| 15 |  | 
|---|
| 16 | /******************************************************************************* | 
|---|
| 17 | *   Header Files                                                               * | 
|---|
| 18 | *******************************************************************************/ | 
|---|
| 19 | #include <string.h> | 
|---|
| 20 |  | 
|---|
| 21 |  | 
|---|
| 22 | /** | 
|---|
| 23 | * strcmpi - case insensitive string compare. Not i subsys library. | 
|---|
| 24 | * @param   psz1   String 1 | 
|---|
| 25 | * @parma   psz2   String 2 | 
|---|
| 26 | * @return  0 if equal | 
|---|
| 27 | *          != 0 if not equal | 
|---|
| 28 | */ | 
|---|
| 29 | int stricmp(const char *psz1, const char *psz2) | 
|---|
| 30 | { | 
|---|
| 31 | int iRet; | 
|---|
| 32 |  | 
|---|
| 33 | while ((iRet = upcase(*psz1) - upcase(*psz2)) == 0 && *psz1 != '\0') | 
|---|
| 34 | psz1++, psz2++; | 
|---|
| 35 |  | 
|---|
| 36 | return iRet; | 
|---|
| 37 | } | 
|---|
| 38 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.