4 * Copyright 1994 Alexandre Julliard
14 #ifdef MALLOC_DEBUGGING
25 #include "debugtools.h"
26 #include "debugdefs.h"
36 #include "wine/winuser16.h"
40 /**********************************************************************/
42 USER_DRIVER *USER_Driver = NULL;
46 /***********************************************************************
47 * MAIN_ParseDebugOptions
49 * Turns specific debug messages on or off, according to "options".
51 void MAIN_ParseDebugOptions( const char *arg )
53 /* defined in relay32/relay386.c */
54 extern char **debug_relay_includelist;
55 extern char **debug_relay_excludelist;
56 /* defined in relay32/snoop.c */
57 extern char **debug_snoop_includelist;
58 extern char **debug_snoop_excludelist;
63 char *options = strdup(arg);
68 if (options[l-1]=='\n') options[l-1]='\0';
71 if ((*options!='+')&&(*options!='-')){
74 for(j=0; j<DEBUG_CLASS_COUNT; j++)
75 if(!lstrncmpiA(options, debug_cl_name[j], strlen(debug_cl_name[j])))
77 if(j==DEBUG_CLASS_COUNT)
79 options += strlen(debug_cl_name[j]);
80 if ((*options!='+')&&(*options!='-'))
85 cls = -1; /* all classes */
87 if (strchr(options,','))
88 l=strchr(options,',')-options;
92 if (!lstrncmpiA(options+1,"all",l-1))
95 for (i=0; i<DEBUG_CHANNEL_COUNT; i++)
96 for(j=0; j<DEBUG_CLASS_COUNT; j++)
97 if(cls == -1 || cls == j)
98 __SET_DEBUGGING( j, debug_channels[i], (*options=='+') );
100 else if (!lstrncmpiA(options+1, "relay=", 6) ||
101 !lstrncmpiA(options+1, "snoop=", 6))
104 char *s, *s2, ***output, c;
106 for (i=0; i<DEBUG_CHANNEL_COUNT; i++)
107 if (!strncasecmp( debug_channels[i] + 1, options + 1, 5))
109 for(j=0; j<DEBUG_CLASS_COUNT; j++)
110 if(cls == -1 || cls == j)
111 __SET_DEBUGGING( j, debug_channels[i], 1 );
114 /* should never happen, maybe assert(i!=DEBUG_CHANNEL_COUNT)? */
115 if (i==DEBUG_CHANNEL_COUNT)
117 output = (*options == '+') ?
118 ((*(options+1) == 'r') ?
119 &debug_relay_includelist :
120 &debug_snoop_includelist) :
121 ((*(options+1) == 'r') ?
122 &debug_relay_excludelist :
123 &debug_snoop_excludelist);
125 /* if there are n ':', there are n+1 modules, and we need n+2 slots
126 * last one being for the sentinel (NULL) */
128 while((s = strchr(s, ':'))) i++, s++;
129 *output = malloc(sizeof(char **) * i);
132 while((s2 = strchr(s, ':'))) {
135 *((*output)+i) = CharUpperA(strdup(s));
141 *(options + l) = '\0';
142 *((*output)+i) = CharUpperA(strdup(s));
144 *((*output)+i+1) = NULL;
149 for (i=0; i<DEBUG_CHANNEL_COUNT; i++)
150 if (!strncasecmp( debug_channels[i] + 1, options + 1, l - 1) && !debug_channels[i][l])
152 for(j=0; j<DEBUG_CLASS_COUNT; j++)
153 if(cls == -1 || cls == j)
154 __SET_DEBUGGING( j, debug_channels[i], (*options=='+') );
157 if (i==DEBUG_CHANNEL_COUNT)
162 while((*options==',')&&(*(++options)));
164 if (!*options) return;
167 MESSAGE("%s: Syntax: --debugmsg [class]+xxx,... or "
168 "-debugmsg [class]-xxx,...\n",argv0);
169 MESSAGE("Example: --debugmsg +all,warn-heap\n"
170 " turn on all messages except warning heap messages\n");
171 MESSAGE("Special case: --debugmsg +relay=DLL:DLL.###:FuncName\n"
172 " turn on -debugmsg +relay only as specified\n"
173 "Special case: --debugmsg -relay=DLL:DLL.###:FuncName\n"
174 " turn on --debugmsg +relay except as specified\n"
175 "Also permitted, +snoop=..., -snoop=... as with relay.\n\n");
177 MESSAGE("Available message classes:\n");
178 for(i=0;i<DEBUG_CLASS_COUNT;i++)
179 MESSAGE( "%-9s", debug_cl_name[i]);
182 MESSAGE("Available message types:\n");
183 MESSAGE("%-9s ","all");
184 for(i=0;i<DEBUG_CHANNEL_COUNT;i++)
185 MESSAGE("%-9s%c",debug_channels[i] + 1,
186 (((i+2)%8==0)?'\n':' '));
191 /***********************************************************************
195 * Lang: a string whose two first chars are the iso name of a language.
196 * Country: a string whose two first chars are the iso name of country
197 * Charset: a string defining the chossen charset encoding
198 * Dialect: a string defining a variation of the locale
200 * all those values are from the standardized format of locale
201 * name in unix which is: Lang[_Country][.Charset][@Dialect]
204 * the numeric code of the language used by Windows (or 0x00)
206 int MAIN_GetLanguageID(LPCSTR Lang,LPCSTR Country,LPCSTR Charset,LPCSTR Dialect)
208 char lang[3]="??", country[3]={0,0,0};
209 char *charset=NULL, *dialect=NULL;
212 if (Lang==NULL) return 0x00;
213 if (Lang[0]) lang[0]=tolower(Lang[0]);
214 if (Lang[1]) lang[1]=tolower(Lang[1]);
217 if (Country[0]) country[0]=toupper(Country[0]);
218 if (Country[1]) country[1]=toupper(Country[1]);
223 charset=(char*)malloc(j+1);
225 charset[i]=toupper(Charset[i]);
231 dialect=(char*)malloc(j+1);
233 dialect[i]=tolower(Dialect[i]);
240 #define LANG_ENTRY_BEGIN(x,y) if(!strcmp(lang, x )) { \
242 ret=MAKELANGID(LANG_##y, SUBLANG_DEFAULT); \
243 goto end_MAIN_GetLanguageID; \
245 #define LANG_SUB_ENTRY(x,y,z) if (!strcmp(country, x )) { \
246 ret = MAKELANGID( LANG_##y , SUBLANG_##z ); \
247 goto end_MAIN_GetLanguageID; \
249 #define LANG_DIALECT_ENTRY(x,y) { ret = MAKELANGID(LANG_##x , SUBLANG_##y ); \
250 goto end_MAIN_GetLanguageID; }
251 #define LANG_ENTRY_END(x) ret = MAKELANGID(LANG_##x , SUBLANG_DEFAULT); \
252 goto end_MAIN_GetLanguageID; \
255 /*x01*/ LANG_ENTRY_BEGIN( "ar", ARABIC )
256 LANG_SUB_ENTRY( "SA", ARABIC, ARABIC)
257 LANG_SUB_ENTRY( "IQ", ARABIC, ARABIC_IRAQ )
258 LANG_SUB_ENTRY( "EG", ARABIC, ARABIC_EGYPT )
259 LANG_SUB_ENTRY( "LY", ARABIC, ARABIC_LIBYA )
260 LANG_SUB_ENTRY( "DZ", ARABIC, ARABIC_ALGERIA )
261 LANG_SUB_ENTRY( "MA", ARABIC, ARABIC_MOROCCO )
262 LANG_SUB_ENTRY( "TN", ARABIC, ARABIC_TUNISIA )
263 LANG_SUB_ENTRY( "OM", ARABIC, ARABIC_OMAN )
264 LANG_SUB_ENTRY( "YE", ARABIC, ARABIC_YEMEN )
265 LANG_SUB_ENTRY( "SY", ARABIC, ARABIC_SYRIA )
266 LANG_SUB_ENTRY( "JO", ARABIC, ARABIC_JORDAN )
267 LANG_SUB_ENTRY( "LB", ARABIC, ARABIC_LEBANON )
268 LANG_SUB_ENTRY( "KW", ARABIC, ARABIC_KUWAIT )
269 LANG_SUB_ENTRY( "AE", ARABIC, ARABIC_UAE )
270 LANG_SUB_ENTRY( "BH", ARABIC, ARABIC_BAHRAIN )
271 LANG_SUB_ENTRY( "QA", ARABIC, ARABIC_QATAR )
272 LANG_ENTRY_END( ARABIC )
273 /*x02*/ LANG_ENTRY_BEGIN( "bu", BULGARIAN )
274 LANG_ENTRY_END( BULGARIAN )
275 /*x03*/ LANG_ENTRY_BEGIN( "ca", CATALAN )
276 LANG_ENTRY_END( CATALAN )
277 /*x04*/ LANG_ENTRY_BEGIN( "zh", CHINESE )
278 LANG_SUB_ENTRY( "TW", CHINESE, CHINESE_TRADITIONAL )
279 LANG_SUB_ENTRY( "CN", CHINESE, CHINESE_SIMPLIFIED )
280 LANG_SUB_ENTRY( "HK", CHINESE, CHINESE_HONGKONG )
281 LANG_SUB_ENTRY( "SG", CHINESE, CHINESE_SINGAPORE )
282 LANG_SUB_ENTRY( "MO", CHINESE, CHINESE_MACAU )
283 LANG_ENTRY_END( CHINESE )
284 /*x05*/ LANG_ENTRY_BEGIN( "cs", CZECH )
285 LANG_ENTRY_END( CZECH )
286 /*x06*/ LANG_ENTRY_BEGIN( "da", DANISH )
287 LANG_ENTRY_END( DANISH )
288 /*x07*/ LANG_ENTRY_BEGIN( "de", GERMAN )
289 LANG_SUB_ENTRY( "DE", GERMAN, GERMAN )
290 LANG_SUB_ENTRY( "CH", GERMAN, GERMAN_SWISS )
291 LANG_SUB_ENTRY( "AT", GERMAN, GERMAN_AUSTRIAN )
292 LANG_SUB_ENTRY( "LU", GERMAN, GERMAN_LUXEMBOURG )
293 LANG_SUB_ENTRY( "LI", GERMAN, GERMAN_LIECHTENSTEIN )
294 LANG_ENTRY_END( GERMAN )
295 /*x08*/ LANG_ENTRY_BEGIN( "el", GREEK )
296 LANG_ENTRY_END( GREEK )
297 /*x09*/ LANG_ENTRY_BEGIN( "en", ENGLISH )
298 LANG_SUB_ENTRY( "US", ENGLISH, ENGLISH_US )
299 LANG_SUB_ENTRY( "UK", ENGLISH, ENGLISH_UK )
300 LANG_SUB_ENTRY( "GB", ENGLISH, ENGLISH_UK )
301 LANG_SUB_ENTRY( "AU", ENGLISH, ENGLISH_AUS )
302 LANG_SUB_ENTRY( "CA", ENGLISH, ENGLISH_CAN )
303 LANG_SUB_ENTRY( "NZ", ENGLISH, ENGLISH_NZ )
304 LANG_SUB_ENTRY( "EI", ENGLISH, ENGLISH_EIRE )
305 LANG_SUB_ENTRY( "ZA", ENGLISH, ENGLISH_SAFRICA )
306 LANG_SUB_ENTRY( "JM", ENGLISH, ENGLISH_JAMAICA )
307 /* LANG_SUB_ENTRY( "AG", ENGLISH, ENGLISH_CARIBBEAN ) */
308 LANG_SUB_ENTRY( "BZ", ENGLISH, ENGLISH_BELIZE )
309 LANG_SUB_ENTRY( "TT", ENGLISH, ENGLISH_TRINIDAD )
310 LANG_SUB_ENTRY( "ZW", ENGLISH, ENGLISH_ZIMBABWE )
311 LANG_SUB_ENTRY( "PH", ENGLISH, ENGLISH_PHILIPPINES )
312 LANG_ENTRY_END( ENGLISH )
313 /*x0a*/ LANG_ENTRY_BEGIN( "es", SPANISH )
314 /* traditional sorting */
315 if (!strcmp(dialect,"tradicional"))
316 LANG_DIALECT_ENTRY( SPANISH, SPANISH )
317 LANG_SUB_ENTRY( "MX", SPANISH, SPANISH_MEXICAN )
318 LANG_SUB_ENTRY( "ES", SPANISH, SPANISH_MODERN )
319 LANG_SUB_ENTRY( "GT", SPANISH, SPANISH_GUATEMALA )
320 LANG_SUB_ENTRY( "CR", SPANISH, SPANISH_COSTARICA )
321 LANG_SUB_ENTRY( "PA", SPANISH, SPANISH_PANAMA )
322 LANG_SUB_ENTRY( "DO", SPANISH, SPANISH_DOMINICAN )
323 LANG_SUB_ENTRY( "VE", SPANISH, SPANISH_VENEZUELA )
324 LANG_SUB_ENTRY( "CO", SPANISH, SPANISH_COLOMBIA )
325 LANG_SUB_ENTRY( "PE", SPANISH, SPANISH_PERU )
326 LANG_SUB_ENTRY( "AR", SPANISH, SPANISH_ARGENTINA )
327 LANG_SUB_ENTRY( "EC", SPANISH, SPANISH_ECUADOR )
328 LANG_SUB_ENTRY( "CL", SPANISH, SPANISH_CHILE )
329 LANG_SUB_ENTRY( "UY", SPANISH, SPANISH_URUGUAY )
330 LANG_SUB_ENTRY( "PY", SPANISH, SPANISH_PARAGUAY )
331 LANG_SUB_ENTRY( "BO", SPANISH, SPANISH_BOLIVIA )
332 LANG_SUB_ENTRY( "HN", SPANISH, SPANISH_HONDURAS )
333 LANG_SUB_ENTRY( "NI", SPANISH, SPANISH_NICARAGUA )
334 LANG_SUB_ENTRY( "PR", SPANISH, SPANISH_PUERTO_RICO )
335 LANG_ENTRY_END( SPANISH )
336 /*x0b*/ LANG_ENTRY_BEGIN( "fi", FINNISH )
337 LANG_ENTRY_END( FINNISH )
338 /*x0c*/ LANG_ENTRY_BEGIN( "fr", FRENCH )
339 LANG_SUB_ENTRY( "FR", FRENCH, FRENCH )
340 LANG_SUB_ENTRY( "BE", FRENCH, FRENCH_BELGIAN )
341 LANG_SUB_ENTRY( "CA", FRENCH, FRENCH_CANADIAN )
342 LANG_SUB_ENTRY( "CH", FRENCH, FRENCH_SWISS )
343 LANG_SUB_ENTRY( "LU", FRENCH, FRENCH_LUXEMBOURG )
344 LANG_SUB_ENTRY( "MC", FRENCH, FRENCH_MONACO )
345 LANG_ENTRY_END( FRENCH )
346 /*x0d*/ LANG_ENTRY_BEGIN( "iw", HEBREW )
347 LANG_ENTRY_END( HEBREW )
348 /*x0e*/ LANG_ENTRY_BEGIN( "hu", HUNGARIAN )
349 LANG_ENTRY_END( HUNGARIAN )
350 /*x0f*/ LANG_ENTRY_BEGIN( "ic", ICELANDIC )
351 LANG_ENTRY_END( ICELANDIC )
352 /*x10*/ LANG_ENTRY_BEGIN( "it", ITALIAN )
353 LANG_SUB_ENTRY( "IT", ITALIAN, ITALIAN )
354 LANG_SUB_ENTRY( "CH", ITALIAN, ITALIAN_SWISS )
355 LANG_ENTRY_END( ITALIAN )
356 /*x11*/ LANG_ENTRY_BEGIN( "ja", JAPANESE )
357 LANG_ENTRY_END( JAPANESE )
358 /*x12*/ LANG_ENTRY_BEGIN( "ko", KOREAN )
360 if (!strcmp(charset,"JOHAB"))
361 LANG_DIALECT_ENTRY( KOREAN, KOREAN_JOHAB )
363 LANG_DIALECT_ENTRY( KOREAN, KOREAN )
364 LANG_ENTRY_END( KOREAN )
365 /*x13*/ LANG_ENTRY_BEGIN( "nl", DUTCH )
366 LANG_SUB_ENTRY( "NL", DUTCH, DUTCH )
367 LANG_SUB_ENTRY( "BE", DUTCH, DUTCH_BELGIAN )
368 LANG_SUB_ENTRY( "SR", DUTCH, DUTCH_SURINAM )
369 LANG_ENTRY_END( DUTCH )
370 /*x14*/ LANG_ENTRY_BEGIN( "no", NORWEGIAN )
372 if (!strcmp(dialect,"nynorsk"))
373 LANG_DIALECT_ENTRY( NORWEGIAN, NORWEGIAN_NYNORSK )
375 LANG_DIALECT_ENTRY( NORWEGIAN, NORWEGIAN_BOKMAL )
376 LANG_ENTRY_END( NORWEGIAN )
377 /*x15*/ LANG_ENTRY_BEGIN( "pl", POLISH )
378 LANG_ENTRY_END( POLISH )
379 /*x16*/ LANG_ENTRY_BEGIN( "pt", PORTUGUESE )
380 LANG_SUB_ENTRY( "BR", PORTUGUESE, PORTUGUESE_BRAZILIAN )
381 LANG_SUB_ENTRY( "PT", PORTUGUESE, PORTUGUESE )
382 LANG_ENTRY_END( PORTUGUESE )
383 /*x17*/ LANG_ENTRY_BEGIN( "rm", RHAETO_ROMANCE )
384 LANG_ENTRY_END( RHAETO_ROMANCE )
385 /*x18*/ LANG_ENTRY_BEGIN( "ro", ROMANIAN )
386 LANG_SUB_ENTRY( "RO", ROMANIAN, ROMANIAN )
387 LANG_SUB_ENTRY( "MD", ROMANIAN, ROMANIAN_MOLDAVIA )
388 LANG_ENTRY_END( ROMANIAN )
389 /*x19*/ LANG_ENTRY_BEGIN( "ru", RUSSIAN )
390 LANG_SUB_ENTRY( "RU", RUSSIAN, RUSSIAN )
391 LANG_SUB_ENTRY( "MD", RUSSIAN, RUSSIAN_MOLDAVIA )
392 LANG_ENTRY_END( RUSSIAN )
393 /*x1a*/ if (!strcmp(lang,"sh") || !strcmp(lang,"hr") || !strcmp(lang,"sr")) {
395 LANG_DIALECT_ENTRY( SERBO_CROATIAN, NEUTRAL)
396 if (!strcmp(charset,"ISO-8859-5"))
397 LANG_DIALECT_ENTRY( SERBO_CROATIAN, SERBIAN )
398 LANG_SUB_ENTRY( "HR", SERBO_CROATIAN, CROATIAN )
399 if (!strcmp(country,"YU") && !strcmp(charset,"ISO-8859-2"))
400 LANG_DIALECT_ENTRY( SERBO_CROATIAN, SERBIAN_LATIN )
401 LANG_SUB_ENTRY( "YU", SERBO_CROATIAN, SERBIAN )
402 LANG_DIALECT_ENTRY( SERBO_CROATIAN, SERBIAN_LATIN )
404 /*x1b*/ LANG_ENTRY_BEGIN( "sk", SLOVAK )
405 LANG_ENTRY_END( SLOVAK )
406 /*x1c*/ LANG_ENTRY_BEGIN( "sq", ALBANIAN )
407 LANG_ENTRY_END( ALBANIAN )
408 /*x1d*/ LANG_ENTRY_BEGIN( "sv", SWEDISH )
409 LANG_SUB_ENTRY( "SE", SWEDISH, SWEDISH )
410 LANG_SUB_ENTRY( "FI", SWEDISH, SWEDISH_FINLAND )
411 LANG_ENTRY_END( SWEDISH )
412 /*x1e*/ LANG_ENTRY_BEGIN( "th", THAI )
413 LANG_ENTRY_END( THAI )
414 /*x1f*/ LANG_ENTRY_BEGIN( "tr", TURKISH )
415 LANG_ENTRY_END( TURKISH )
416 /*x20*/ LANG_ENTRY_BEGIN( "ur", URDU )
417 LANG_ENTRY_END( URDU )
418 /*x21*/ LANG_ENTRY_BEGIN( "in", INDONESIAN )
419 LANG_ENTRY_END( INDONESIAN )
420 /*x22*/ LANG_ENTRY_BEGIN( "uk", UKRAINIAN )
421 LANG_ENTRY_END( UKRAINIAN )
422 /*x23*/ LANG_ENTRY_BEGIN( "be", BYELORUSSIAN )
423 LANG_ENTRY_END( BYELORUSSIAN )
424 /*x24*/ LANG_ENTRY_BEGIN( "sl", SLOVENIAN )
425 LANG_ENTRY_END( SLOVENIAN )
426 /*x25*/ LANG_ENTRY_BEGIN( "et", ESTONIAN )
427 LANG_ENTRY_END( ESTONIAN )
428 /*x26*/ LANG_ENTRY_BEGIN( "lv", LATVIAN )
429 LANG_ENTRY_END( LATVIAN )
430 /*x27*/ LANG_ENTRY_BEGIN( "lt", LITHUANIAN )
431 /* traditional sorting ? */
432 if (!strcmp(dialect,"classic") || !strcmp(dialect,"traditional"))
433 LANG_DIALECT_ENTRY( LITHUANIAN, LITHUANIAN_CLASSIC )
435 LANG_DIALECT_ENTRY( LITHUANIAN, LITHUANIAN )
436 LANG_ENTRY_END( LITHUANIAN )
437 /*x28*/ LANG_ENTRY_BEGIN( "mi", MAORI )
438 LANG_ENTRY_END( MAORI )
439 /*x29*/ LANG_ENTRY_BEGIN( "fa", FARSI )
440 LANG_ENTRY_END( FARSI )
441 /*x2a*/ LANG_ENTRY_BEGIN( "vi", VIETNAMESE )
442 LANG_ENTRY_END( VIETNAMESE )
443 /*x2b*/ LANG_ENTRY_BEGIN( "hy", ARMENIAN )
444 LANG_ENTRY_END( ARMENIAN )
445 /*x2c*/ LANG_ENTRY_BEGIN( "az", AZERI )
447 if (strstr(charset,"KOI8") || !strcmp(charset,"ISO-8859-5"))
448 LANG_DIALECT_ENTRY( AZERI, AZERI_CYRILLIC )
450 LANG_DIALECT_ENTRY( AZERI, AZERI )
451 LANG_ENTRY_END( AZERI )
452 /*x2d*/ LANG_ENTRY_BEGIN( "eu", BASQUE )
453 LANG_ENTRY_END( BASQUE )
454 /*x2e*/ /*LANG_ENTRY_BEGIN( "??", SORBIAN )
455 LANG_ENTRY_END( SORBIAN ) */
456 /*x2f*/ LANG_ENTRY_BEGIN( "mk", MACEDONIAN )
457 LANG_ENTRY_END( MACEDONIAN )
458 /*x30*/ /*LANG_ENTRY_BEGIN( "??", SUTU )
459 LANG_ENTRY_END( SUTU ) */
460 /*x31*/ LANG_ENTRY_BEGIN( "ts", TSONGA )
461 LANG_ENTRY_END( TSONGA )
462 /*x32*/ /*LANG_ENTRY_BEGIN( "??", TSWANA )
463 LANG_ENTRY_END( TSWANA ) */
464 /*x33*/ /*LANG_ENTRY_BEGIN( "??", VENDA )
465 LANG_ENTRY_END( VENDA ) */
466 /*x34*/ LANG_ENTRY_BEGIN( "xh", XHOSA )
467 LANG_ENTRY_END( XHOSA )
468 /*x35*/ LANG_ENTRY_BEGIN( "zu", ZULU )
469 LANG_ENTRY_END( ZULU )
470 /*x36*/ LANG_ENTRY_BEGIN( "af", AFRIKAANS )
471 LANG_ENTRY_END( AFRIKAANS )
472 /*x37*/ LANG_ENTRY_BEGIN( "ka", GEORGIAN )
473 LANG_ENTRY_END( GEORGIAN )
474 /*x38*/ LANG_ENTRY_BEGIN( "fo", FAEROESE )
475 LANG_ENTRY_END( FAEROESE )
476 /*x39*/ LANG_ENTRY_BEGIN( "hi", HINDI )
477 LANG_ENTRY_END( HINDI )
478 /*x3a*/ LANG_ENTRY_BEGIN( "mt", MALTESE )
479 LANG_ENTRY_END( MALTESE )
480 /*x3b*/ /*LANG_ENTRY_BEGIN( "??", SAAMI )
481 LANG_ENTRY_END( SAAMI ) */
482 /*x3c*/ LANG_ENTRY_BEGIN( "ga", GAELIC )
483 LANG_DIALECT_ENTRY( GAELIC, GAELIC )
484 LANG_ENTRY_END( GAELIC )
485 /*x3c*/ LANG_ENTRY_BEGIN( "gd", GAELIC )
486 LANG_DIALECT_ENTRY( GAELIC, GAELIC_SCOTTISH )
487 LANG_ENTRY_END( GAELIC )
489 /*x3e*/ LANG_ENTRY_BEGIN( "ms", MALAY )
490 LANG_SUB_ENTRY( "MY", MALAY, MALAY )
491 LANG_SUB_ENTRY( "BN", MALAY, MALAY_BRUNEI_DARUSSALAM )
492 LANG_ENTRY_END( MALAY )
493 /*x3f*/ LANG_ENTRY_BEGIN( "kk", KAZAKH )
494 LANG_ENTRY_END( KAZAKH )
496 /*x41*/ LANG_ENTRY_BEGIN( "sw", SWAHILI )
497 LANG_ENTRY_END( SWAHILI )
499 /*x43*/ LANG_ENTRY_BEGIN( "uz", UZBEK )
501 if (strstr(charset,"KOI8") || !strcmp(charset,"ISO-8859-5"))
502 LANG_DIALECT_ENTRY( UZBEK, UZBEK_CYRILLIC )
504 LANG_DIALECT_ENTRY( UZBEK, UZBEK )
505 LANG_ENTRY_END( UZBEK )
506 /*x44*/ LANG_ENTRY_BEGIN( "tt", TATAR )
507 LANG_ENTRY_END( TATAR )
508 /*x45*/ LANG_ENTRY_BEGIN( "bn", BENGALI )
509 LANG_ENTRY_END( BENGALI )
510 /*x46*/ LANG_ENTRY_BEGIN( "pa", PUNJABI )
511 LANG_ENTRY_END( PUNJABI )
512 /*x47*/ LANG_ENTRY_BEGIN( "gu", GUJARATI )
513 LANG_ENTRY_END( GUJARATI )
514 /*x48*/ LANG_ENTRY_BEGIN( "or", ORIYA )
515 LANG_ENTRY_END( ORIYA )
516 /*x49*/ LANG_ENTRY_BEGIN( "ta", TAMIL )
517 LANG_ENTRY_END( TAMIL )
518 /*x4a*/ LANG_ENTRY_BEGIN( "te", TELUGU )
519 LANG_ENTRY_END( TELUGU )
520 /*x4b*/ LANG_ENTRY_BEGIN( "kn", KANNADA )
521 LANG_ENTRY_END( KANNADA )
522 /*x4c*/ LANG_ENTRY_BEGIN( "ml", MALAYALAM )
523 LANG_ENTRY_END( MALAYALAM )
524 /*x4d*/ LANG_ENTRY_BEGIN( "as", ASSAMESE )
525 LANG_ENTRY_END( ASSAMESE )
526 /*x4e*/ LANG_ENTRY_BEGIN( "mr", MARATHI )
527 LANG_ENTRY_END( MARATHI )
528 /*x4f*/ LANG_ENTRY_BEGIN( "sa", SANSKRIT )
529 LANG_ENTRY_END( SANSKRIT )
531 /*x57*/ /*LANG_ENTRY_BEGIN( "??", KONKANI )
532 LANG_ENTRY_END( KONKANI ) */
534 LANG_ENTRY_BEGIN( "eo", ESPERANTO ) /* not official */
535 LANG_ENTRY_END( ESPERANTO )
536 LANG_ENTRY_BEGIN( "wa", WALON ) /* not official */
537 LANG_ENTRY_END( WALON )
539 end_MAIN_GetLanguageID:
540 if (Charset) free(charset);
547 /***********************************************************************
550 static void called_at_exit(void)
555 /***********************************************************************
558 * Wine initialisation and command-line parsing
560 void MAIN_WineInit(void)
564 #ifdef MALLOC_DEBUGGING
568 if (!(trace = getenv("MALLOC_TRACE")))
570 MESSAGE( "MALLOC_TRACE not set. No trace generated\n" );
574 MESSAGE( "malloc trace goes to %s\n", trace );
582 setlocale(LC_CTYPE,"");
583 gettimeofday( &tv, NULL);
584 atexit(called_at_exit);
587 /***********************************************************************
590 BOOL WINAPI Beep( DWORD dwFreq, DWORD dwDur )
592 static char beep = '\a';
593 /* dwFreq and dwDur are ignored by Win95 */
594 if (isatty(2)) write( 2, &beep, 1 );
599 /***********************************************************************
600 * FileCDR (KERNEL.130)
602 FARPROC16 WINAPI FileCDR16(FARPROC16 x)
604 FIXME_(file)("(0x%8x): stub\n", (int) x);
605 return (FARPROC16)TRUE;
608 /***********************************************************************
609 * GetTickCount (USER.13) (KERNEL32.299)
611 * Returns the number of milliseconds, modulo 2^32, since the start
612 * of the current session.
614 DWORD WINAPI GetTickCount(void)
617 gettimeofday( &t, NULL );
618 return (t.tv_sec * 1000) + (t.tv_usec / 1000);