Changeset 10005 for trunk/src/msvcrt/locale.c
- Timestamp:
- Apr 10, 2003, 12:28:07 PM (23 years ago)
- File:
-
- 1 edited
-
trunk/src/msvcrt/locale.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/msvcrt/locale.c
r9633 r10005 22 22 #else 23 23 #include <emxheader.h> 24 #include <stdlib.h> 25 #include <stdio.h> 26 #include <string.h> 27 #include <ctype.h> 24 28 #endif 25 29 … … 88 92 for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 ) 89 93 { 90 if (! strcasecmp(_country_synonyms[i],name))94 if (!_stricmp(_country_synonyms[i],name)) 91 95 { 92 96 TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]); … … 126 130 return 0; 127 131 /* Partial matches are allowed, e.g. "Germ" matches "Germany" */ 128 return ! strncasecmp(cmp, buff, strlen(cmp));132 return !_strnicmp(cmp, buff, strlen(cmp)); 129 133 } 130 134 … … 227 231 { 228 232 /* Special codepage values: OEM & ANSI */ 229 if ( strcasecmp(locale->search_codepage,"OCP"))233 if (_stricmp(locale->search_codepage,"OCP")) 230 234 { 231 235 GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, 232 236 locale->found_codepage, MAX_ELEM_LEN); 233 237 } 234 if ( strcasecmp(locale->search_codepage,"ACP"))238 if (_stricmp(locale->search_codepage,"ACP")) 235 239 { 236 240 GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, … … 261 265 } 262 266 263 extern int snprintf(char *, int, const char *, ...);264 267 265 268 /* INTERNAL: Set ctype behaviour for a codepage */ … … 315 318 int lc_all = 0; 316 319 317 TRACE(" (%d %s)\n",category,locale);320 TRACE("MSVCRT: setlocale (%d %s)\n",category,locale); 318 321 319 322 if (category < MSVCRT_LC_MIN || category > MSVCRT_LC_MAX) … … 445 448 MSVCRT_current_lc_all_lcid = lcid; 446 449 447 snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s",450 _snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s", 448 451 lc.found_language,lc.found_country,lc.found_codepage); 449 452 … … 522 525 { 523 526 LOCK_LOCALE; 527 dprintf(("MSVCRT: _setmbcp %d",cp)); 524 528 if (MSVCRT_current_lc_all_cp != cp) 525 529 { … … 535 539 int _getmbcp(void) 536 540 { 541 dprintf(("MSVCRT: _getmbcp")); 537 542 return MSVCRT_current_lc_all_cp; 538 543 } 544 545 /********************************************************************* 546 * __crtLCMapStringA (MSVCRT.@) 547 */ 548 int __crtLCMapStringA( 549 LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst, 550 int dstlen, unsigned int codepage, int xflag 551 ) { 552 FIXME("(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n", 553 lcid,mapflags,src,srclen,dst,dstlen,codepage,xflag); 554 /* FIXME: A bit incorrect. But msvcrt itself just converts its 555 * arguments to wide strings and then calls LCMapStringW 556 */ 557 return LCMapStringA(lcid,mapflags,src,srclen,dst,dstlen); 558 }
Note:
See TracChangeset
for help on using the changeset viewer.
