Ignore:
Timestamp:
May 20, 2001, 10:17:42 AM (24 years ago)
Author:
sandervl
Message:

DT: IFIRSTDAYOFWEEK changes/fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/lang.cpp

    r5740 r5764  
    1 /* $Id: lang.cpp,v 1.35 2001-05-19 08:24:47 sandervl Exp $ */
     1/* $Id: lang.cpp,v 1.36 2001-05-20 08:17:41 sandervl Exp $ */
    22/*
    33 * Win32 language API functions for OS/2
     
    524524        LocaleFromUniStr(pInfoItem,wbuf,&ulInfoLen);
    525525        UniFreeMem(pInfoItem);
    526         if ((++wbuf[0])=='7') wbuf[0]='0';
    527526        break;
    528527
     
    914913//******************************************************************************
    915914//******************************************************************************
    916 
    917 
    918 
    919 #if 0
    920 PHS: disabled for ole2nls.cpp
    921 
    922 /*****************************************************************************
    923  * Name      : BOOL SetLocaleInfoA
    924  * Purpose   : The SetLocaleInfoA function sets an item of locale information.
    925  *             It does so by making an entry in the process portion of the
    926  *             locale table. This setting only affects the user override portion
    927  *             of the locale settings; it does not set the system defaults.
    928  *             Only certain types of locale information, or LCTYPE values, can
    929  *             be set by this function. See the following Remarks section for a
    930  *             list of valid LCTYPE values.
    931  *             The locale information is always passed in as a null-terminated
    932  *             Unicode string in the Unicode (W) version of the function, and as
    933  *             a null-terminated ANSI string in the ANSI (A) version. No integers
    934  *             are allowed by this function; any numeric values must be specified
    935  *             as Unicode or ANSI text. Each LCTYPE has a particular format, as
    936  *             noted in Locale Identifiers.
    937  * Parameters: LCID    Locale   locale identifier
    938  *             LCTYPE  LCType   type of information to set
    939  *             LPCTSTR lpLCData pointer to information to set
    940  * Variables :
    941  * Result    : TRUE / FALSE
    942  * Remark    :
    943  * Status    : UNTESTED STUB
    944  *
    945  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    946  *****************************************************************************/
    947 
    948 BOOL WIN32API SetLocaleInfoA(LCID   Locale,
    949                                 LCTYPE LCType,
    950                                 LPCSTR lpLCData)
    951 {
    952   dprintf(("KERNEL32: SetLocaleInfoA(%08xh,%08xh,%08xh) not implemented.\n",
    953            Locale,
    954            LCType,
    955            lpLCData));
    956 
    957   return (FALSE);
    958 }
    959 
    960 
    961 /*****************************************************************************
    962  * Name      : BOOL SetLocaleInfoW
    963  * Purpose   : The SetLocaleInfoW function sets an item of locale information.
    964  *             It does so by making an entry in the process portion of the
    965  *             locale table. This setting only affects the user override portion
    966  *             of the locale settings; it does not set the system defaults.
    967  *             Only certain types of locale information, or LCTYPE values, can
    968  *             be set by this function. See the following Remarks section for a
    969  *             list of valid LCTYPE values.
    970  *             The locale information is always passed in as a null-terminated
    971  *             Unicode string in the Unicode (W) version of the function, and as
    972  *             a null-terminated ANSI string in the ANSI (A) version. No integers
    973  *             are allowed by this function; any numeric values must be specified
    974  *             as Unicode or ANSI text. Each LCTYPE has a particular format, as
    975  *             noted in Locale Identifiers.
    976  * Parameters: LCID    Locale   locale identifier
    977  *             LCTYPE  LCType   type of information to set
    978  *             LPCTSTR lpLCData pointer to information to set
    979  * Variables :
    980  * Result    : TRUE / FALSE
    981  * Remark    :
    982  * Status    : UNTESTED STUB
    983  *
    984  * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
    985  *****************************************************************************/
    986 
    987 BOOL WIN32API SetLocaleInfoW(LCID    Locale,
    988                                 LCTYPE  LCType,
    989                                 LPCWSTR lpLCData)
    990 {
    991   dprintf(("KERNEL32: SetLocaleInfoW(%08xh,%08xh,%08xh) not implemented.\n",
    992            Locale,
    993            LCType,
    994            lpLCData));
    995 
    996   return (FALSE);
    997 }
    998 
    999 
    1000 /*****************************************************************************
    1001  * Name      :
    1002  * Purpose   :
    1003  * Parameters:
    1004  * Variables :
    1005  * Result    :
    1006  * Remark    :
    1007  * Status    : UNTESTED STUB
    1008  *
    1009  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1010  *****************************************************************************/
    1011 
    1012 ODINFUNCTION3(DWORD,VerLanguageNameA,DWORD,  wLang,
    1013                                      LPSTR,  szLang,
    1014                                      DWORD,  nSize)
    1015 {
    1016   char    buffer[80];
    1017   LPCSTR  name;
    1018   DWORD   result;
    1019 
    1020   dprintf(("KERNEL32: VerLanguageNameA not implemented"));
    1021 
    1022   /*
    1023    * First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
    1024    * from the registry.
    1025    */
    1026 
    1027 #if 0
    1028 PHS: disabled because if interlinkage with registry
    1029   sprintf( buffer,
    1030            "\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",
    1031            wLang );
    1032 
    1033   result = RegQueryValueA(HKEY_LOCAL_MACHINE,
    1034                           buffer,
    1035                           szLang,
    1036                           (LPLONG)&nSize );
    1037   if (result == ERROR_SUCCESS ||
    1038       result == ERROR_MORE_DATA)
    1039     return nSize;
    1040 #endif
    1041 
    1042   /*
    1043    * If that fails, use the internal table
    1044    * (actually, Windows stores the names in a string table resource ...)
    1045    */
    1046 
    1047   lstrcpynA(szLang,
    1048             "Language-Neutral",
    1049             nSize);
    1050 
    1051   return strlen(szLang);
    1052 }
    1053 
    1054 /*****************************************************************************
    1055  * Name      :
    1056  * Purpose   :
    1057  * Parameters:
    1058  * Variables :
    1059  * Result    :
    1060  * Remark    :
    1061  * Status    : UNTESTED STUB
    1062  *
    1063  * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    1064  *****************************************************************************/
    1065 
    1066 ODINFUNCTION3(DWORD,VerLanguageNameW,DWORD,  wLang,
    1067                                      LPWSTR, szLang,
    1068                                      DWORD,  nSize)
    1069 {
    1070   LPSTR szLangA;
    1071   DWORD rc;
    1072 
    1073   if ( (szLang == NULL) ||
    1074        (nSize  == 0) )          // validate parameters
    1075      return 0;
    1076 
    1077   szLangA = (LPSTR)HEAP_malloc(nSize + 1);
    1078   rc = VerLanguageNameA(wLang,
    1079                         szLangA,
    1080                         nSize);
    1081   if (rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA)
    1082     AsciiToUnicodeN(szLangA,
    1083                     szLang,
    1084                     nSize);
    1085   HEAP_free(szLangA);
    1086   return rc;
    1087 }
    1088 
    1089 
    1090 #endif
    1091 
Note: See TracChangeset for help on using the changeset viewer.