Changeset 3804 for trunk/src/kernel32/lang.cpp
- Timestamp:
- Jul 6, 2000, 11:18:45 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/lang.cpp
r3746 r3804 1 /* $Id: lang.cpp,v 1.2 3 2000-06-23 19:02:37sandervl Exp $ */1 /* $Id: lang.cpp,v 1.24 2000-07-06 21:18:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 language API functions for OS/2 … … 6 6 * Copyright 1998 Patrick Haller 7 7 * Copyright 1999 Przemyslaw Dobrowolski 8 * 8 9 * 9 10 * Project Odin Software License can be found in LICENSE.TXT … … 21 22 #include "unicode.h" 22 23 #include "oslibmisc.h" 24 #include <wprocess.h> 23 25 24 26 #define DBG_LOCALLOG DBG_lang … … 880 882 BOOL WIN32API IsValidLocale(LCID Locale, DWORD dwFlags) 881 883 { 882 dprintf(("KERNEL32: OS2IsValidLocale, always returns TRUE\n"));884 dprintf(("KERNEL32: IsValidLocale, always returns TRUE\n")); 883 885 return(TRUE); 884 886 } … … 887 889 LCID WIN32API GetThreadLocale() 888 890 { 889 dprintf(("KERNEL32: OS2GetThreadLocale always return US English!\n")); 890 return(0x409); //US English 891 } 892 //****************************************************************************** 893 //****************************************************************************** 894 //****************************************************************************** 895 BOOL WIN32API SetThreadLocale( LCID locale ) 896 { 897 dprintf(("KERNEL32: OS2SetThreadLocale not implemented!\n")); 891 THDB *thdb = GetThreadTHDB(); 892 893 if(thdb == NULL) { 894 dprintf(("KERNEL32: ERROR: GetThreadLocale thdb == NULL!")); 895 return FALSE; 896 } 897 dprintf(("KERNEL32: GetThreadLocale returned %x", thdb->lcid)); 898 return(thdb->lcid); 899 } 900 //****************************************************************************** 901 //****************************************************************************** 902 BOOL WIN32API SetThreadLocale(LCID locale) 903 { 904 THDB *thdb = GetThreadTHDB(); 905 906 if(thdb == NULL) { 907 dprintf(("KERNEL32: ERROR SetThreadLocale thdb == NULL!")); 908 return FALSE; 909 } 910 dprintf(("KERNEL32: SetThreadLocale %x", locale)); 911 thdb->lcid = locale; 898 912 return(TRUE); 899 913 } … … 901 915 //****************************************************************************** 902 916 BOOL WIN32API EnumSystemLocalesA(LOCALE_ENUMPROCA lpLocaleEnumProc, 903 DWORD dwFlags) 904 { 917 DWORD dwFlags) 918 { 919 char buffer[32]; 920 905 921 dprintf(("EnumSystemLocalesA %X %X\n", lpLocaleEnumProc, dwFlags)); 906 922 if(lpLocaleEnumProc == NULL || ((dwFlags & LCID_INSTALLED) && (dwFlags & LCID_SUPPORTED))) { … … 909 925 return(FALSE); 910 926 } 911 lpLocaleEnumProc("OS/2 US English"); 927 928 sprintf(buffer, "%08lx", GetUserDefaultLCID()); 929 lpLocaleEnumProc(buffer); 912 930 return(TRUE); 913 931 } … … 915 933 //****************************************************************************** 916 934 BOOL WIN32API EnumSystemLocalesW(LOCALE_ENUMPROCW lpLocaleEnumProc, 917 DWORD dwFlags) 918 { 919 WCHAR locStr[32]; 935 DWORD dwFlags) 936 { 937 WCHAR bufferW[32]; 938 char bufferA[32]; 920 939 921 940 dprintf(("EnumSystemLocalesW %X %X\n", lpLocaleEnumProc, dwFlags)); … … 925 944 return(FALSE); 926 945 } 927 AsciiToUnicode("OS/2 US English", locStr); 928 lpLocaleEnumProc(locStr); 946 sprintf(bufferA, "%08lx", GetUserDefaultLCID()); 947 lstrcpyAtoW(bufferW, bufferA); 948 949 lpLocaleEnumProc(bufferW); 929 950 return(TRUE); 930 951 }
Note:
See TracChangeset
for help on using the changeset viewer.