File: linux.tmp

package info (click to toggle)
gentle 1.9+cvs20100605+dfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,224 kB
  • ctags: 6,214
  • sloc: cpp: 41,569; ansic: 3,978; sh: 1,420; makefile: 243
file content (19 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#if defined(__WXGTK__) || defined(__WXMOTIF__)
int strcmpi ( const char *c1 , const char *c2 )
{
  while ( *c1 && *c2 )
    {
      char d1 = *c1 ;
      char d2 = *c2 ;
      if ( d1 >= 'a' && d1 <= 'z' ) d1 = d1 - 'a' + 'A' ;
      if ( d2 >= 'a' && d2 <= 'z' ) d2 = d2 - 'a' + 'A' ;
      if ( d1 < d2 ) return -1 ;
      if ( d1 > d2 ) return 1 ;
      c1++ ;
      c2++ ;
    }
  if ( *c1 ) return 1 ;
  if ( *c2 ) return -1 ;
  return 0 ;
}
#endif