Ignore:
Timestamp:
Apr 10, 2003, 12:28:07 PM (23 years ago)
Author:
sandervl
Message:

PF: MSVCRT update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/msvcrt/locale.c

    r9633 r10005  
    2222#else
    2323#include <emxheader.h>
     24#include <stdlib.h>
     25#include <stdio.h>
     26#include <string.h>
     27#include <ctype.h>
    2428#endif
    2529
     
    8892  for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 )
    8993  {
    90     if (!strcasecmp(_country_synonyms[i],name))
     94    if (!_stricmp(_country_synonyms[i],name))
    9195    {
    9296      TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]);
     
    126130    return 0;
    127131  /* Partial matches are allowed, e.g. "Germ" matches "Germany" */
    128   return !strncasecmp(cmp, buff, strlen(cmp));
     132  return !_strnicmp(cmp, buff, strlen(cmp));
    129133}
    130134
     
    227231      {
    228232        /* Special codepage values: OEM & ANSI */
    229         if (strcasecmp(locale->search_codepage,"OCP"))
     233        if (_stricmp(locale->search_codepage,"OCP"))
    230234        {
    231235          GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE,
    232236                         locale->found_codepage, MAX_ELEM_LEN);
    233237        }
    234         if (strcasecmp(locale->search_codepage,"ACP"))
     238        if (_stricmp(locale->search_codepage,"ACP"))
    235239        {
    236240          GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE,
     
    261265}
    262266
    263 extern int snprintf(char *, int, const char *, ...);
    264267
    265268/* INTERNAL: Set ctype behaviour for a codepage */
     
    315318  int lc_all = 0;
    316319
    317   TRACE("(%d %s)\n",category,locale);
     320  TRACE("MSVCRT: setlocale (%d %s)\n",category,locale);
    318321
    319322  if (category < MSVCRT_LC_MIN || category > MSVCRT_LC_MAX)
     
    445448  MSVCRT_current_lc_all_lcid = lcid;
    446449
    447   snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s",
     450  _snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s",
    448451           lc.found_language,lc.found_country,lc.found_codepage);
    449452
     
    522525{
    523526  LOCK_LOCALE;
     527  dprintf(("MSVCRT: _setmbcp %d",cp));
    524528  if (MSVCRT_current_lc_all_cp != cp)
    525529  {
     
    535539int _getmbcp(void)
    536540{
     541  dprintf(("MSVCRT: _getmbcp"));
    537542  return MSVCRT_current_lc_all_cp;
    538543}
     544
     545/*********************************************************************
     546 *              __crtLCMapStringA (MSVCRT.@)
     547 */
     548int __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.