Release 960114
[wine/gsoc-2012-control.git] / misc / ole2nls.c
blob8100e5efac110611860efdb15223aa4db8cd75fc
1 /*
2 * OLE2NLS library
4 * Copyright 1995 Martin von Loewis
5 */
7 /* At the moment, these are only empty stubs.
8 */
10 #include <string.h>
11 #include "windows.h"
12 #include "ole.h"
13 #include "options.h"
14 #include "winnls.h"
15 #include "stddebug.h"
16 #include "debug.h"
18 /***********************************************************************
19 * GetUserDefaultLCID (OLE2NLS.1)
21 DWORD WINAPI GetUserDefaultLCID()
23 /* Default sorting, neutral sublanguage */
24 switch(Options.language)
26 case LANG_En: return 0x09;
27 case LANG_Es: return 0x07; /* Just a Guess :-) */
28 case LANG_De: return 0x07;
29 case LANG_No: return 0x14;
30 case LANG_Fr:
31 case LANG_Fi:
32 case LANG_Da:
33 default:
34 return 0; /* Neutral language */
38 /***********************************************************************
39 * GetSystemDefaultLCID (OLE2NLS.2)
41 DWORD WINAPI GetSystemDefaultLCID()
43 return GetUserDefaultLCID();
46 /***********************************************************************
47 * GetUserDefaultLangID (OLE2NLS.3)
49 WORD WINAPI GetUserDefaultLangID()
51 return (WORD)GetUserDefaultLCID();
54 /***********************************************************************
55 * GetSystemDefaultLangID (OLE2NLS.4)
57 WORD WINAPI GetSystemDefaultLangID()
59 return GetUserDefaultLangID();
62 /***********************************************************************
63 * GetLocaleInfoA (OLE2NLS.5)
64 * Is the last parameter really WORD for Win16?
66 int WINAPI GetLocaleInfoA(DWORD lcid,DWORD LCType,LPSTR buf,WORD len)
68 char *retString;
69 int retLen;
70 dprintf_ole(stddeb,"GetLocaleInfoA(%8lX,%8lX,%p,%4X)\n",
71 lcid,LCType,buf,len);
72 /* Wine is supporting only the default locale */
73 if(lcid!=GetUserDefaultLCID())
75 dprintf_ole(stdnimp,"GetLocaleInfoA: Unknown locale\n");
76 return 0;
78 /* As an option, we could obtain the value from win.ini.
79 This would not match the Wine compile-time option.
80 Also, not all identifiers are available from win.ini */
81 retString=0;
82 retLen=0;
83 /* If we are through all of this, retLen should not be zero anymore.
84 If it is, the value is not supported */
85 #define LOCVAL(type,value) if(type==LCType) \
86 {retLen=strlen(value)+1;\
87 retString=value; \
89 #define UNSUPPORTED(type) if(type==lcid)retString=#type;
91 /* I really wish I would know a better way to do this */
92 UNSUPPORTED(LOCALE_ILANGUAGE)
93 UNSUPPORTED(LOCALE_SLANGUAGE)
94 UNSUPPORTED(LOCALE_SENGLANGUAGE)
95 UNSUPPORTED(LOCALE_SABBREVLANGNAME)
96 UNSUPPORTED(LOCALE_SNATIVELANGNAME)
97 UNSUPPORTED(LOCALE_ICOUNTRY)
98 UNSUPPORTED(LOCALE_SCOUNTRY)
99 UNSUPPORTED(LOCALE_SENGCOUNTRY)
100 UNSUPPORTED(LOCALE_SABBREVCTRYNAME)
101 UNSUPPORTED(LOCALE_SNATIVECTRYNAME)
102 UNSUPPORTED(LOCALE_IDEFAULTLANGUAGE)
103 UNSUPPORTED(LOCALE_IDEFAULTCOUNTRY)
104 UNSUPPORTED(LOCALE_IDEFAULTCODEPAGE)
105 UNSUPPORTED(LOCALE_IDEFAULTANSICODEPAGE)
106 UNSUPPORTED(LOCALE_SLIST)
107 UNSUPPORTED(LOCALE_IMEASURE)
108 UNSUPPORTED(LOCALE_SDECIMAL)
109 UNSUPPORTED(LOCALE_STHOUSAND)
110 UNSUPPORTED(LOCALE_SGROUPING)
111 UNSUPPORTED(LOCALE_IDIGITS)
112 UNSUPPORTED(LOCALE_ILZERO)
113 UNSUPPORTED(LOCALE_INEGNUMBER)
114 UNSUPPORTED(LOCALE_SNATIVEDIGITS)
115 UNSUPPORTED(LOCALE_SCURRENCY)
116 UNSUPPORTED(LOCALE_SINTLSYMBOL)
117 UNSUPPORTED(LOCALE_SMONDECIMALSEP)
118 UNSUPPORTED(LOCALE_SMONTHOUSANDSEP)
119 UNSUPPORTED(LOCALE_SMONGROUPING)
120 UNSUPPORTED(LOCALE_ICURRDIGITS)
121 UNSUPPORTED(LOCALE_IINTLCURRDIGITS)
122 UNSUPPORTED(LOCALE_ICURRENCY)
123 UNSUPPORTED(LOCALE_INEGCURR)
124 UNSUPPORTED(LOCALE_SDATE)
125 UNSUPPORTED(LOCALE_STIME)
126 UNSUPPORTED(LOCALE_SSHORTDATE)
127 UNSUPPORTED(LOCALE_SLONGDATE)
128 UNSUPPORTED(LOCALE_STIMEFORMAT)
129 UNSUPPORTED(LOCALE_IDATE)
130 UNSUPPORTED(LOCALE_ILDATE)
131 UNSUPPORTED(LOCALE_ITIME)
132 UNSUPPORTED(LOCALE_ITIMEMARKPOSN)
133 UNSUPPORTED(LOCALE_ICENTURY)
134 UNSUPPORTED(LOCALE_ITLZERO)
135 UNSUPPORTED(LOCALE_IDAYLZERO)
136 UNSUPPORTED(LOCALE_IMONLZERO)
137 UNSUPPORTED(LOCALE_S1159)
138 UNSUPPORTED(LOCALE_S2359)
139 UNSUPPORTED(LOCALE_ICALENDARTYPE)
140 UNSUPPORTED(LOCALE_IOPTIONALCALENDAR)
141 UNSUPPORTED(LOCALE_IFIRSTDAYOFWEEK)
142 UNSUPPORTED(LOCALE_IFIRSTWEEKOFYEAR)
143 UNSUPPORTED(LOCALE_SDAYNAME1)
144 UNSUPPORTED(LOCALE_SDAYNAME2)
145 UNSUPPORTED(LOCALE_SDAYNAME3)
146 UNSUPPORTED(LOCALE_SDAYNAME4)
147 UNSUPPORTED(LOCALE_SDAYNAME5)
148 UNSUPPORTED(LOCALE_SDAYNAME6)
149 UNSUPPORTED(LOCALE_SDAYNAME7)
150 UNSUPPORTED(LOCALE_SABBREVDAYNAME1)
151 UNSUPPORTED(LOCALE_SABBREVDAYNAME2)
152 UNSUPPORTED(LOCALE_SABBREVDAYNAME3)
153 UNSUPPORTED(LOCALE_SABBREVDAYNAME4)
154 UNSUPPORTED(LOCALE_SABBREVDAYNAME5)
155 UNSUPPORTED(LOCALE_SABBREVDAYNAME6)
156 UNSUPPORTED(LOCALE_SABBREVDAYNAME7)
157 UNSUPPORTED(LOCALE_SMONTHNAME1)
158 UNSUPPORTED(LOCALE_SMONTHNAME2)
159 UNSUPPORTED(LOCALE_SMONTHNAME3)
160 UNSUPPORTED(LOCALE_SMONTHNAME4)
161 UNSUPPORTED(LOCALE_SMONTHNAME5)
162 UNSUPPORTED(LOCALE_SMONTHNAME6)
163 UNSUPPORTED(LOCALE_SMONTHNAME7)
164 UNSUPPORTED(LOCALE_SMONTHNAME8)
165 UNSUPPORTED(LOCALE_SMONTHNAME9)
166 UNSUPPORTED(LOCALE_SMONTHNAME10)
167 UNSUPPORTED(LOCALE_SMONTHNAME11)
168 UNSUPPORTED(LOCALE_SMONTHNAME12)
169 UNSUPPORTED(LOCALE_SMONTHNAME13)
170 UNSUPPORTED(LOCALE_SABBREVMONTHNAME1)
171 UNSUPPORTED(LOCALE_SABBREVMONTHNAME2)
172 UNSUPPORTED(LOCALE_SABBREVMONTHNAME3)
173 UNSUPPORTED(LOCALE_SABBREVMONTHNAME4)
174 UNSUPPORTED(LOCALE_SABBREVMONTHNAME5)
175 UNSUPPORTED(LOCALE_SABBREVMONTHNAME6)
176 UNSUPPORTED(LOCALE_SABBREVMONTHNAME7)
177 UNSUPPORTED(LOCALE_SABBREVMONTHNAME8)
178 UNSUPPORTED(LOCALE_SABBREVMONTHNAME9)
179 UNSUPPORTED(LOCALE_SABBREVMONTHNAME10)
180 UNSUPPORTED(LOCALE_SABBREVMONTHNAME11)
181 UNSUPPORTED(LOCALE_SABBREVMONTHNAME12)
182 UNSUPPORTED(LOCALE_SABBREVMONTHNAME13)
183 UNSUPPORTED(LOCALE_SPOSITIVESIGN)
184 UNSUPPORTED(LOCALE_SNEGATIVESIGN)
185 UNSUPPORTED(LOCALE_IPOSSIGNPOSN)
186 UNSUPPORTED(LOCALE_INEGSIGNPOSN)
187 UNSUPPORTED(LOCALE_IPOSSYMPRECEDES)
188 UNSUPPORTED(LOCALE_IPOSSEPBYSPACE)
189 UNSUPPORTED(LOCALE_INEGSYMPRECEDES)
190 UNSUPPORTED(LOCALE_INEGSEPBYSPACE)
192 /* Now, the language specific definitions. They don't have to be
193 complete */
194 switch(Options.language)
196 case LANG_De:
197 /* This definitions apply to Germany only. Users in Austria
198 or Switzerland might want to modify them */
199 LOCVAL(LOCALE_ILANGUAGE,"9")
200 LOCVAL(LOCALE_SLANGUAGE,"Deutsch")
201 LOCVAL(LOCALE_SENGLANGUAGE,"German")
202 LOCVAL(LOCALE_SABBREVLANGNAME,"deu")
203 LOCVAL(LOCALE_SNATIVELANGNAME,"Deutsch")
204 LOCVAL(LOCALE_ICOUNTRY,"49")
205 LOCVAL(LOCALE_SCOUNTRY,"Deutschland")
206 LOCVAL(LOCALE_SENGCOUNTRY,"Deutschland")
207 LOCVAL(LOCALE_SABBREVCTRYNAME,"De")
208 LOCVAL(LOCALE_SNATIVECTRYNAME,"Deutschland")
209 LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9")
210 LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49")
211 /* Dunno
212 LOCVAL(LOCALE_IDEFAULTCODEPAGE)
213 LOCVAL(LOCALE_IDEFAULTANSICODEPAGE)
215 LOCVAL(LOCALE_SLIST,";")
216 LOCVAL(LOCALE_IMEASURE,"0")
217 LOCVAL(LOCALE_SDECIMAL,",")
218 LOCVAL(LOCALE_STHOUSAND,".")
220 LOCVAL(LOCALE_SGROUPING)
222 LOCVAL(LOCALE_IDIGITS,"2")
223 LOCVAL(LOCALE_ILZERO,"1")
225 LOCVAL(LOCALE_INEGNUMBER)
226 Is this "0123456789" ??
227 LOCVAL(LOCALE_SNATIVEDIGITS)
229 LOCVAL(LOCALE_SCURRENCY,"DM")
231 LOCVAL(LOCALE_SINTLSYMBOL)
232 LOCVAL(LOCALE_SMONDECIMALSEP)
233 LOCVAL(LOCALE_SMONTHOUSANDSEP)
234 LOCVAL(LOCALE_SMONGROUPING)
236 LOCVAL(LOCALE_ICURRDIGITS,"2")
238 LOCVAL(LOCALE_IINTLCURRDIGITS)
240 LOCVAL(LOCALE_ICURRENCY,"3")
241 LOCVAL(LOCALE_INEGCURR,"8")
242 LOCVAL(LOCALE_SDATE,".")
243 LOCVAL(LOCALE_STIME,":")
244 LOCVAL(LOCALE_SSHORTDATE,"dd.MM.yyyy")
245 LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy")
247 LOCVAL(LOCALE_STIMEFORMAT)
249 LOCVAL(LOCALE_IDATE,"1")
251 LOCVAL(LOCALE_ILDATE)
253 LOCVAL(LOCALE_ITIME,"1")
255 LOCVAL(LOCALE_ITIMEMARKPOSN)
256 LOCVAL(LOCALE_ICENTURY)
258 LOCVAL(LOCALE_ITLZERO,"1")
260 LOCVAL(LOCALE_IDAYLZERO)
261 LOCVAL(LOCALE_IMONLZERO)
262 LOCVAL(LOCALE_S1159)
263 LOCVAL(LOCALE_S2359)
264 LOCVAL(LOCALE_ICALENDARTYPE)
265 LOCVAL(LOCALE_IOPTIONALCALENDAR)
266 LOCVAL(LOCALE_IFIRSTDAYOFWEEK)
267 LOCVAL(LOCALE_IFIRSTWEEKOFYEAR)
269 LOCVAL(LOCALE_SDAYNAME1,"Montag")
270 LOCVAL(LOCALE_SDAYNAME2,"Dienstag")
271 LOCVAL(LOCALE_SDAYNAME3,"Mittwoch")
272 LOCVAL(LOCALE_SDAYNAME4,"Donnerstag")
273 LOCVAL(LOCALE_SDAYNAME5,"Freitag")
274 LOCVAL(LOCALE_SDAYNAME6,"Sonnabend")
275 LOCVAL(LOCALE_SDAYNAME7,"Sonntag")
276 LOCVAL(LOCALE_SABBREVDAYNAME1,"Mo")
277 LOCVAL(LOCALE_SABBREVDAYNAME2,"Di")
278 LOCVAL(LOCALE_SABBREVDAYNAME3,"Mi")
279 LOCVAL(LOCALE_SABBREVDAYNAME4,"Do")
280 LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr")
281 LOCVAL(LOCALE_SABBREVDAYNAME6,"Sa")
282 LOCVAL(LOCALE_SABBREVDAYNAME7,"So")
283 LOCVAL(LOCALE_SMONTHNAME1,"Januar")
284 LOCVAL(LOCALE_SMONTHNAME2,"Februar")
285 LOCVAL(LOCALE_SMONTHNAME3,"März")
286 LOCVAL(LOCALE_SMONTHNAME4,"April")
287 LOCVAL(LOCALE_SMONTHNAME5,"Mai")
288 LOCVAL(LOCALE_SMONTHNAME6,"Juni")
289 LOCVAL(LOCALE_SMONTHNAME7,"Juli")
290 LOCVAL(LOCALE_SMONTHNAME8,"August")
291 LOCVAL(LOCALE_SMONTHNAME9,"September")
292 LOCVAL(LOCALE_SMONTHNAME10,"Oktober")
293 LOCVAL(LOCALE_SMONTHNAME11,"November")
294 LOCVAL(LOCALE_SMONTHNAME12,"Dezember")
295 LOCVAL(LOCALE_SMONTHNAME13,"")
296 LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
297 LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
298 LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mär")
299 LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
300 LOCVAL(LOCALE_SABBREVMONTHNAME5,"Mai")
301 LOCVAL(LOCALE_SABBREVMONTHNAME6,"Jun")
302 LOCVAL(LOCALE_SABBREVMONTHNAME7,"Jul")
303 LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aug")
304 LOCVAL(LOCALE_SABBREVMONTHNAME9,"Sep")
305 LOCVAL(LOCALE_SABBREVMONTHNAME10,"Okt")
306 LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
307 LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dez")
308 LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
310 LOCVAL(LOCALE_SPOSITIVESIGN)
311 LOCVAL(LOCALE_SNEGATIVESIGN)
312 LOCVAL(LOCALE_IPOSSIGNPOSN)
313 LOCVAL(LOCALE_INEGSIGNPOSN)
314 LOCVAL(LOCALE_IPOSSYMPRECEDES)
315 LOCVAL(LOCALE_IPOSSEPBYSPACE)
316 LOCVAL(LOCALE_INEGSYMPRECEDES)
317 LOCVAL(LOCALE_INEGSEPBYSPACE)
319 break; /* LANG(De) */
321 case LANG_Da:
322 /* LOCVAL(LOCALE_ILANGUAGE,"9") */
323 LOCVAL(LOCALE_SLANGUAGE,"Dansk")
324 LOCVAL(LOCALE_SENGLANGUAGE,"Danish")
325 LOCVAL(LOCALE_SABBREVLANGNAME,"dan")
326 LOCVAL(LOCALE_SNATIVELANGNAME,"Dansk")
327 LOCVAL(LOCALE_ICOUNTRY,"45")
328 LOCVAL(LOCALE_SCOUNTRY,"Danmark")
329 LOCVAL(LOCALE_SENGCOUNTRY,"Denmark")
330 LOCVAL(LOCALE_SABBREVCTRYNAME,"Da")
331 LOCVAL(LOCALE_SNATIVECTRYNAME,"Danmark")
332 /* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") */
333 LOCVAL(LOCALE_IDEFAULTCOUNTRY,"45")
334 /* LOCVAL(LOCALE_IDEFAULTCODEPAGE) */
335 /* LOCVAL(LOCALE_IDEFAULTANSICODEPAGE) */
336 LOCVAL(LOCALE_SLIST,";")
337 LOCVAL(LOCALE_IMEASURE,"0")
338 LOCVAL(LOCALE_SDECIMAL,",")
339 LOCVAL(LOCALE_STHOUSAND,".")
340 /* LOCVAL(LOCALE_SGROUPING) */
341 LOCVAL(LOCALE_IDIGITS,"2")
342 LOCVAL(LOCALE_ILZERO,"1")
343 /* LOCVAL(LOCALE_INEGNUMBER) */
344 /* LOCVAL(LOCALE_SNATIVEDIGITS) */
345 LOCVAL(LOCALE_SCURRENCY,"kr")
346 /* LOCVAL(LOCALE_SINTLSYMBOL) */
347 LOCVAL(LOCALE_SMONDECIMALSEP,",")
348 LOCVAL(LOCALE_SMONTHOUSANDSEP,".")
349 /* LOCVAL(LOCALE_SMONGROUPING) */
350 LOCVAL(LOCALE_ICURRDIGITS,"2")
351 /* LOCVAL(LOCALE_IINTLCURRDIGITS) */
352 LOCVAL(LOCALE_ICURRENCY,"3")
353 LOCVAL(LOCALE_INEGCURR,"8")
354 LOCVAL(LOCALE_SDATE,".")
355 LOCVAL(LOCALE_STIME,":")
356 LOCVAL(LOCALE_SSHORTDATE,"dd/MM-yyyy")
357 LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy")
358 /* LOCVAL(LOCALE_STIMEFORMAT) */
359 LOCVAL(LOCALE_IDATE,"1")
360 /* LOCVAL(LOCALE_ILDATE) */
361 LOCVAL(LOCALE_ITIME,"1")
362 /* LOCVAL(LOCALE_ITIMEMARKPOSN) */
363 /* LOCVAL(LOCALE_ICENTURY) */
364 LOCVAL(LOCALE_ITLZERO,"1")
365 /* LOCVAL(LOCALE_IDAYLZERO) */
366 /* LOCVAL(LOCALE_IMONLZERO) */
367 /* LOCVAL(LOCALE_S1159) */
368 /* LOCVAL(LOCALE_S2359) */
369 /* LOCVAL(LOCALE_ICALENDARTYPE) */
370 /* LOCVAL(LOCALE_IOPTIONALCALENDAR) */
371 /* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
372 /* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
373 LOCVAL(LOCALE_SDAYNAME1,"Mandag")
374 LOCVAL(LOCALE_SDAYNAME2,"Tirsdag")
375 LOCVAL(LOCALE_SDAYNAME3,"Onsdag")
376 LOCVAL(LOCALE_SDAYNAME4,"Torsdag")
377 LOCVAL(LOCALE_SDAYNAME5,"Fredag")
378 LOCVAL(LOCALE_SDAYNAME6,"Lørdag")
379 LOCVAL(LOCALE_SDAYNAME7,"Søndag")
380 LOCVAL(LOCALE_SABBREVDAYNAME1,"Ma")
381 LOCVAL(LOCALE_SABBREVDAYNAME2,"Ti")
382 LOCVAL(LOCALE_SABBREVDAYNAME3,"On")
383 LOCVAL(LOCALE_SABBREVDAYNAME4,"To")
384 LOCVAL(LOCALE_SABBREVDAYNAME5,"Fr")
385 LOCVAL(LOCALE_SABBREVDAYNAME6,"Lø")
386 LOCVAL(LOCALE_SABBREVDAYNAME7,"Sø")
387 LOCVAL(LOCALE_SMONTHNAME1,"Januar")
388 LOCVAL(LOCALE_SMONTHNAME2,"Februar")
389 LOCVAL(LOCALE_SMONTHNAME3,"Marts")
390 LOCVAL(LOCALE_SMONTHNAME4,"April")
391 LOCVAL(LOCALE_SMONTHNAME5,"Maj")
392 LOCVAL(LOCALE_SMONTHNAME6,"Juni")
393 LOCVAL(LOCALE_SMONTHNAME7,"Juli")
394 LOCVAL(LOCALE_SMONTHNAME8,"August")
395 LOCVAL(LOCALE_SMONTHNAME9,"September")
396 LOCVAL(LOCALE_SMONTHNAME10,"Oktober")
397 LOCVAL(LOCALE_SMONTHNAME11,"November")
398 LOCVAL(LOCALE_SMONTHNAME12,"December")
399 LOCVAL(LOCALE_SMONTHNAME13,"")
400 LOCVAL(LOCALE_SABBREVMONTHNAME1,"Jan")
401 LOCVAL(LOCALE_SABBREVMONTHNAME2,"Feb")
402 LOCVAL(LOCALE_SABBREVMONTHNAME3,"Mar")
403 LOCVAL(LOCALE_SABBREVMONTHNAME4,"Apr")
404 LOCVAL(LOCALE_SABBREVMONTHNAME5,"Maj")
405 LOCVAL(LOCALE_SABBREVMONTHNAME6,"Jun")
406 LOCVAL(LOCALE_SABBREVMONTHNAME7,"Jul")
407 LOCVAL(LOCALE_SABBREVMONTHNAME8,"Aug")
408 LOCVAL(LOCALE_SABBREVMONTHNAME9,"Sep")
409 LOCVAL(LOCALE_SABBREVMONTHNAME10,"Okt")
410 LOCVAL(LOCALE_SABBREVMONTHNAME11,"Nov")
411 LOCVAL(LOCALE_SABBREVMONTHNAME12,"Dec")
412 LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
413 /* LOCVAL(LOCALE_SPOSITIVESIGN) */
414 /* LOCVAL(LOCALE_SNEGATIVESIGN) */
415 /* LOCVAL(LOCALE_IPOSSIGNPOSN) */
416 /* LOCVAL(LOCALE_INEGSIGNPOSN) */
417 /* LOCVAL(LOCALE_IPOSSYMPRECEDES) */
418 /* LOCVAL(LOCALE_IPOSSEPBYSPACE) */
419 /* LOCVAL(LOCALE_INEGSYMPRECEDES) */
420 /* LOCVAL(LOCALE_INEGSEPBYSPACE) */
421 break; /* LANG(Da) */
423 /*Insert other languages here*/
425 default:
426 break;
427 } /* switch */
429 if(!retLen)
431 if(!retString)fprintf(stderr,"Unkown LC type %lX\n",LCType);
432 else fprintf(stderr,"'%s' not supported for your language.\n",
433 retString);
434 return 0;
437 if(retLen>len)retLen=len;
438 lstrcpyn(buf,retString,len);
439 return retLen;
443 /***********************************************************************
444 * CompareStringA (OLE2NLS.8)
445 * This implementation ignores the locale, and trusts in libc
447 int CompareStringA(DWORD lcid, DWORD fdwStyle,
448 char *s1, int l1, char *s2,int l2)
450 int len,ret;
451 if(fdwStyle & NORM_IGNORENONSPACE)
453 fprintf(stdnimp, "CompareStringA: IGNORENONSPACE not supprted\n");
455 if(fdwStyle & NORM_IGNORESYMBOLS)
456 fprintf(stdnimp, "CompareStringA: IGNORESYMBOLS not supported\n");
457 /* Is strcmp defaulting to string sort or to word sort?? */
458 /* FIXME: Handle NORM_STRINGSORT */
459 l1 = (l1==-1)?strlen(s1):l1;
460 l2 = (l2==-1)?strlen(s2):l2;
461 len = l1<l2 ? l1:l2;
462 ret = (fdwStyle & NORM_IGNORECASE) ?
463 lstrncmpi(s1,s2,len) :
464 strncmp(s1,s2,len);
465 /* not equal, return 1 or 3 */
466 if(ret!=0)return ret+2;
467 /* same len, return 2 */
468 if(l1==l2)return 2;
469 /* the longer one is lexically greater */
470 return (l1<l2)? 1 : 3;