comparison loader/ext.c @ 3465:4dad31e655b6

avifile merge. kabi: indent changes really suxxxx
author arpi
date Tue, 11 Dec 2001 22:58:14 +0000
parents 181db9e5a887
children aa1491f8167b
comparison
equal deleted inserted replaced
3464:08c273282650 3465:4dad31e655b6
3 * 3 *
4 * Stub functions for Wine module 4 * Stub functions for Wine module
5 * 5 *
6 * 6 *
7 ********************************************************/ 7 ********************************************************/
8 #include <config.h> 8 #include "config.h"
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #ifdef HAVE_MALLOC_H 11 #ifdef HAVE_MALLOC_H
12 #include <malloc.h> 12 #include <malloc.h>
13 #endif 13 #endif
15 #include <sys/mman.h> 15 #include <sys/mman.h>
16 #include <errno.h> 16 #include <errno.h>
17 #include <fcntl.h> 17 #include <fcntl.h>
18 #include <string.h> 18 #include <string.h>
19 #include <stdarg.h> 19 #include <stdarg.h>
20 #include <ctype.h>
20 #include <wine/windef.h> 21 #include <wine/windef.h>
21 #include <wine/winbase.h> 22 #include <wine/winbase.h>
22 #include <wine/debugtools.h> 23 #include <wine/debugtools.h>
23 #include <wine/heap.h> 24 #include <wine/heap.h>
24 #include "ext.h" 25 #include "ext.h"
144 src++; 145 src++;
145 dest++; 146 dest++;
146 } 147 }
147 return result; 148 return result;
148 } 149 }
150 /* i stands here for ignore case! */
149 int wcsnicmp(const unsigned short* s1, const unsigned short* s2, int n) 151 int wcsnicmp(const unsigned short* s1, const unsigned short* s2, int n)
150 { 152 {
151 /* 153 /*
152 if(s1==0) 154 if(s1==0)
153 return; 155 return;
154 if(s2==0) 156 if(s2==0)
155 return; 157 return;
156 */ 158 */
157 while(n>0) 159 while(n>0)
158 { 160 {
159 if(*s1<*s2) 161 if (((*s1 | *s2) & 0xff00) || toupper((char)*s1) != toupper((char)*s2))
160 return -1; 162 {
161 else 163
162 if(*s1>*s2) 164 if(*s1<*s2)
163 return 1; 165 return -1;
164 else 166 else
165 if(*s1==0) 167 if(*s1>*s2)
166 return 0; 168 return 1;
167 s1++; 169 else
168 s2++; 170 if(*s1==0)
169 n--; 171 return 0;
172 }
173 s1++;
174 s2++;
175 n--;
170 } 176 }
171 return 0; 177 return 0;
172 } 178 }
173 179
174 WIN_BOOL WINAPI IsBadReadPtr(LPCVOID data, UINT size) 180 WIN_BOOL WINAPI IsBadReadPtr(LPCVOID data, UINT size)