From 3764164b0fe8b802b77607c635d3d9ba99778c97 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Sat, 18 Oct 2008 09:56:48 +0200 Subject: [PATCH] push 6ad4febc802779d39881ae7cccabf16fa19e6741 --- configure | 69 +++++ configure.ac | 9 + dlls/Makefile.in | 5 + dlls/advapi32/security.c | 16 +- dlls/advapi32/tests/security.c | 53 +++- dlls/comctl32/tab.c | 3 +- dlls/comctl32/tests/tab.c | 24 +- dlls/comdlg32/filedlg31.c | 6 +- dlls/comdlg32/tests/filedlg.c | 92 ++++++- dlls/crypt32/decode.c | 12 +- dlls/crypt32/tests/cert.c | 7 +- dlls/crypt32/tests/chain.c | 159 ++++++----- dlls/crypt32/tests/encode.c | 149 ++++++---- dlls/crypt32/tests/msg.c | 18 +- dlls/cryptnet/tests/cryptnet.c | 12 +- dlls/d3d10/Makefile.in | 1 + dlls/d3dxof/d3dxof.c | 155 ++++++++--- dlls/dinput/keyboard.c | 14 +- dlls/dsound/dsound_convert.c | 86 +++--- dlls/dxguid/Makefile.in | 5 +- include/dxgi.idl => dlls/dxguid/dx10guid.c | 19 +- dlls/gdi32/font.c | 7 +- dlls/gdi32/tests/mapping.c | 2 +- dlls/gdiplus/image.c | 11 +- dlls/gdiplus/tests/pathiterator.c | 53 +++- dlls/imm32/imm.c | 10 +- dlls/itss/itss.c | 2 +- dlls/jscript/date.c | 103 ++++++- dlls/jscript/engine.c | 31 ++- dlls/jscript/global.c | 82 +++++- dlls/jscript/jscript.c | 27 +- dlls/jscript/jscript.h | 22 ++ dlls/jscript/jsutils.c | 36 ++- dlls/jscript/math.c | 26 +- dlls/jscript/parser.y | 7 +- dlls/jscript/tests/api.js | 27 ++ dlls/jscript/tests/lang.js | 59 ++++ dlls/kernel32/lzexpand.c | 3 +- dlls/kernel32/nls/div.nls | 312 ++++++++++----------- dlls/kernel32/nls/eox.nls | 344 +++++++++++------------ dlls/kernel32/nls/guj.nls | 312 ++++++++++----------- dlls/kernel32/nls/hin.nls | 312 ++++++++++----------- dlls/kernel32/nls/hye.nls | 312 ++++++++++----------- dlls/kernel32/nls/kan.nls | 312 ++++++++++----------- dlls/kernel32/nls/kat.nls | 312 ++++++++++----------- dlls/kernel32/nls/knk.nls | 312 ++++++++++----------- dlls/kernel32/nls/mar.nls | 312 ++++++++++----------- dlls/kernel32/nls/pan.nls | 312 ++++++++++----------- dlls/kernel32/nls/san.nls | 312 ++++++++++----------- dlls/kernel32/nls/syr.nls | 312 ++++++++++----------- dlls/kernel32/nls/tam.nls | 312 ++++++++++----------- dlls/kernel32/nls/tel.nls | 312 ++++++++++----------- dlls/kernel32/process.c | 52 +++- dlls/kernel32/profile.c | 2 +- dlls/kernel32/tests/process.c | 109 +++++++- dlls/kernel32/tests/volume.c | 74 +++++ dlls/kernel32/volume.c | 13 +- dlls/kernel32/vxd.c | 2 +- dlls/mcicda/mcicda.c | 2 +- dlls/mlang/mlang.c | 8 +- dlls/mlang/tests/mlang.c | 16 +- dlls/mountmgr.sys/device.c | 37 ++- dlls/mountmgr.sys/diskarb.c | 4 +- dlls/mountmgr.sys/hal.c | 6 +- dlls/mountmgr.sys/mountmgr.c | 10 +- dlls/mountmgr.sys/mountmgr.h | 2 +- dlls/mpr/wnet.c | 2 +- dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/htmldoc3.c | 29 +- dlls/mshtml/htmlelem.c | 49 +++- dlls/mshtml/htmlimg.c | 21 +- dlls/mshtml/htmlinput.c | 41 ++- dlls/mshtml/htmlnode.c | 49 +++- dlls/mshtml/htmlstyle.c | 38 +-- dlls/mshtml/mshtml_private.h | 3 + dlls/mshtml/nsevents.c | 191 ++++++++++++- dlls/mshtml/nsio.c | 17 ++ dlls/mshtml/omnavigator.c | 17 +- dlls/mshtml/tests/dom.c | 326 ++++++++++++++++++---- dlls/mshtml/txtrange.c | 42 ++- dlls/msi/action.c | 8 +- dlls/msi/appsearch.c | 80 +++--- dlls/msi/tests/install.c | 88 +++++- dlls/msi/tests/package.c | 15 +- dlls/msxml3/bsc.c | 2 +- dlls/msxml3/dispex.c | 35 ++- dlls/msxml3/domdoc.c | 12 +- dlls/ntoskrnl.exe/ntoskrnl.c | 2 + dlls/oleacc/Makefile.in | 4 +- dlls/oleacc/main.c | 74 +++++ include/dxgi.idl => dlls/oleacc/oleacc.rc | 9 +- dlls/oleacc/oleacc.spec | 4 +- dlls/oleacc/oleacc_En.rc | 90 ++++++ dlls/oleacc/{ => tests}/Makefile.in | 11 +- dlls/oleacc/tests/main.c | 121 ++++++++ dlls/oleaut32/olepicture.c | 29 +- dlls/opengl32/tests/opengl.c | 24 +- dlls/riched20/tests/editor.c | 20 +- dlls/riched32/tests/editor.c | 16 +- dlls/rpcrt4/tests/rpc.c | 69 +++++ dlls/rpcrt4/tests/server.c | 10 +- dlls/rpcrt4/tests/server.idl | 3 +- dlls/rsaenh/mpi.c | 35 ++- dlls/rsaenh/rsaenh.c | 2 +- dlls/rsaenh/tomcrypt.h | 21 -- dlls/shdocvw/tests/intshcut.c | 1 - dlls/shell32/dialogs.c | 2 +- dlls/shell32/shlview.c | 253 +++++++++++------ dlls/shell32/tests/shellpath.c | 7 +- dlls/shell32/tests/shlexec.c | 69 +++++ dlls/shlwapi/assoc.c | 257 +++++++++++------ dlls/shlwapi/ordinal.c | 24 ++ dlls/shlwapi/shlwapi.spec | 4 +- dlls/shlwapi/tests/assoc.c | 76 ++++- dlls/user32/edit.c | 39 +-- dlls/user32/tests/edit.c | 48 ++++ dlls/user32/tests/text.c | 428 +++++++++++++++++++++++++++-- dlls/user32/tests/win.c | 191 +++++++++++++ dlls/user32/text.c | 59 +++- dlls/user32/winpos.c | 21 +- dlls/version/info.c | 1 + dlls/wined3d/context.c | 12 +- dlls/wined3d/device.c | 12 +- dlls/wined3d/drawprim.c | 1 - dlls/wined3d/surface.c | 277 +++++++++---------- dlls/wined3d/surface_gdi.c | 12 +- dlls/winex11.drv/keyboard.c | 38 ++- dlls/winex11.drv/opengl.c | 1 + dlls/wininet/http.c | 51 ++-- dlls/wininet/internet.c | 7 +- dlls/wininet/netconnection.c | 4 - dlls/wininet/tests/http.c | 32 +++ dlls/winmm/tests/mixer.c | 5 +- dlls/winmm/tests/mmio.c | 6 +- dlls/wintrust/crypt.c | 6 +- dlls/wnaspi32/aspi.c | 4 +- documentation/README.ja | 190 +++++++++++++ include/Makefile.in | 1 + include/config.h.in | 3 + include/dxgi.idl | 40 +++ include/mscat.h | 2 +- include/shlguid.h | 8 + include/shlobj.h | 2 - include/shobjidl.idl | 38 +++ include/wine/port.h | 4 + include/wingdi.h | 1 + include/winresrc.h | 2 +- include/winuser.rh | 210 ++++++++++++++ libs/port/Makefile.in | 1 + include/dxgi.idl => libs/port/isnan.c | 23 +- programs/oleview/tree.c | 14 +- programs/regedit/Ru.rc | 10 +- programs/winecfg/drive.c | 121 +++----- programs/winecfg/drivedetect.c | 33 ++- programs/winecfg/driveui.c | 44 ++- programs/winecfg/winecfg.h | 6 +- programs/wordpad/Da.rc | 5 +- programs/wordpad/De.rc | 5 +- programs/wordpad/En.rc | 5 +- programs/wordpad/Fr.rc | 5 +- programs/wordpad/Hu.rc | 5 +- programs/wordpad/Ja.rc | 5 +- programs/wordpad/Ko.rc | 5 +- programs/wordpad/Nl.rc | 6 +- programs/wordpad/No.rc | 5 +- programs/wordpad/Pl.rc | 5 +- programs/wordpad/Ru.rc | 5 +- programs/wordpad/Si.rc | 5 +- programs/wordpad/Tr.rc | 5 +- programs/wordpad/Zh.rc | 5 +- programs/wordpad/print.c | 30 +- programs/wordpad/registry.c | 15 +- programs/wordpad/wordpad.c | 15 +- programs/wordpad/wordpad.h | 7 +- programs/write/write.c | 2 + tools/make_makefiles | 3 + tools/runtest | 4 +- tools/winapi/msvcmaker | 121 ++++++-- 178 files changed, 7193 insertions(+), 3546 deletions(-) copy include/dxgi.idl => dlls/dxguid/dx10guid.c (69%) rewrite dlls/kernel32/nls/div.nls (85%) rewrite dlls/kernel32/nls/eox.nls (71%) rewrite dlls/kernel32/nls/guj.nls (84%) rewrite dlls/kernel32/nls/hin.nls (84%) rewrite dlls/kernel32/nls/hye.nls (83%) rewrite dlls/kernel32/nls/kan.nls (84%) rewrite dlls/kernel32/nls/kat.nls (84%) rewrite dlls/kernel32/nls/knk.nls (84%) rewrite dlls/kernel32/nls/mar.nls (84%) rewrite dlls/kernel32/nls/pan.nls (83%) rewrite dlls/kernel32/nls/san.nls (84%) rewrite dlls/kernel32/nls/syr.nls (84%) rewrite dlls/kernel32/nls/tam.nls (83%) rewrite dlls/kernel32/nls/tel.nls (84%) copy include/dxgi.idl => dlls/oleacc/oleacc.rc (84%) create mode 100644 dlls/oleacc/oleacc_En.rc copy dlls/oleacc/{ => tests}/Makefile.in (58%) create mode 100644 dlls/oleacc/tests/main.c create mode 100644 documentation/README.ja create mode 100644 include/winuser.rh copy include/dxgi.idl => libs/port/isnan.c (71%) diff --git a/configure b/configure index 50797441e58..ee2ee9763bf 100755 --- a/configure +++ b/configure @@ -22264,6 +22264,66 @@ _ACEOF fi +{ echo "$as_me:$LINENO: checking for isnan" >&5 +echo $ECHO_N "checking for isnan... $ECHO_C" >&6; } +if test "${ac_cv_have_isnan+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f = 0.0; int i=isnan(f) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_have_isnan="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_isnan="no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_isnan" >&5 +echo "${ECHO_T}$ac_cv_have_isnan" >&6; } +if test "$ac_cv_have_isnan" = "yes" +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN 1 +_ACEOF + +fi + case $host_cpu in *i[3456789]86*) { echo "$as_me:$LINENO: checking whether we need to define __i386__" >&5 @@ -24332,6 +24392,14 @@ dlls/oleacc/Makefile: dlls/oleacc/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/oleacc/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/oleacc/tests/Makefile" +test "x$enable_oleacc_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\ + oleacc/tests" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/oleacc/tests/Makefile: dlls/oleacc/tests/Makefile.in dlls/Maketest.rules" +ac_config_files="$ac_config_files dlls/oleacc/tests/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ dlls/oleaut32/Makefile" test "x$enable_oleaut32" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ oleaut32" @@ -26784,6 +26852,7 @@ do "dlls/ole32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/ole32/Makefile" ;; "dlls/ole32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/ole32/tests/Makefile" ;; "dlls/oleacc/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/oleacc/Makefile" ;; + "dlls/oleacc/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/oleacc/tests/Makefile" ;; "dlls/oleaut32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/oleaut32/Makefile" ;; "dlls/oleaut32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/oleaut32/tests/Makefile" ;; "dlls/olecli32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/olecli32/Makefile" ;; diff --git a/configure.ac b/configure.ac index 0bda9b0a4f6..1e3c8fc340d 100644 --- a/configure.ac +++ b/configure.ac @@ -1691,6 +1691,14 @@ then AC_DEFINE(HAVE_ISINF, 1, [Define to 1 if you have the `isinf' function.]) fi +dnl Check for isnan +AC_CACHE_CHECK([for isnan], ac_cv_have_isnan, + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[float f = 0.0; int i=isnan(f)]])],[ac_cv_have_isnan="yes"],[ac_cv_have_isnan="no"])) +if test "$ac_cv_have_isnan" = "yes" +then + AC_DEFINE(HAVE_ISNAN, 1, [Define to 1 if you have the `isnan' function.]) +fi + dnl *** check for the need to define platform-specific symbols case $host_cpu in @@ -1972,6 +1980,7 @@ WINE_CONFIG_MAKEFILE([dlls/odbccp32/tests/Makefile],[dlls/Maketest.rules],[dlls] WINE_CONFIG_MAKEFILE([dlls/ole32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/ole32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/oleacc/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) +WINE_CONFIG_MAKEFILE([dlls/oleacc/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/oleaut32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/oleaut32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/olecli32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 1ac4ee0b79f..12f6584e4a6 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -197,6 +197,7 @@ IMPORT_LIBS = \ cryptnet/libcryptnet.$(IMPLIBEXT) \ cryptui/libcryptui.$(IMPLIBEXT) \ ctl3d32/libctl3d32.$(IMPLIBEXT) \ + d3d10/libd3d10.$(IMPLIBEXT) \ d3d8/libd3d8.$(IMPLIBEXT) \ d3d9/libd3d9.$(IMPLIBEXT) \ d3dim/libd3dim.$(IMPLIBEXT) \ @@ -335,6 +336,7 @@ CROSS_IMPLIBS = \ cryptnet/libcryptnet.a \ cryptui/libcryptui.a \ ctl3d32/libctl3d32.a \ + d3d10/libd3d10.a \ d3d8/libd3d8.a \ d3d9/libd3d9.a \ d3dim/libd3dim.a \ @@ -516,6 +518,9 @@ cryptui/libcryptui.def cryptui/libcryptui.a: cryptui/cryptui.spec $(WINEBUILD) ctl3d32/libctl3d32.def ctl3d32/libctl3d32.a: ctl3d32/ctl3d32.spec $(WINEBUILD) @cd ctl3d32 && $(MAKE) `basename $@` +d3d10/libd3d10.def d3d10/libd3d10.a: d3d10/d3d10.spec $(WINEBUILD) + @cd d3d10 && $(MAKE) `basename $@` + d3d8/libd3d8.def d3d8/libd3d8.a: d3d8/d3d8.spec $(WINEBUILD) @cd d3d8 && $(MAKE) `basename $@` diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index ca262173109..3c2665494e1 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -2315,9 +2315,13 @@ BOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken) NTSTATUS Status; HANDLE ImpersonationToken; TOKEN_TYPE Type; + static BOOL warn = TRUE; - FIXME( "(%p)\n", hToken ); - + if (warn) + { + FIXME( "(%p)\n", hToken ); + warn = FALSE; + } if (!GetTokenInformation( hToken, TokenType, &Type, sizeof(TOKEN_TYPE), &size )) return FALSE; @@ -3829,6 +3833,7 @@ static BOOL ParseStringAclToAcl(LPCWSTR StringAcl, LPDWORD lpdwFlags, return TRUE; lerr: + SetLastError(ERROR_INVALID_ACL); WARN("Invalid ACE string format\n"); return FALSE; } @@ -4021,6 +4026,11 @@ BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW( SetLastError(ERROR_CALL_NOT_IMPLEMENTED); goto lend; } + else if (!StringSecurityDescriptor || !SecurityDescriptor) + { + SetLastError(ERROR_INVALID_PARAMETER); + goto lend; + } else if (StringSDRevision != SID_REVISION) { SetLastError(ERROR_UNKNOWN_REVISION); @@ -4472,7 +4482,6 @@ BOOL WINAPI ConvertStringSidToSidW(LPCWSTR StringSid, PSID* Sid) if (!bret) LocalFree(*Sid); } - TRACE("returning %s\n", bret ? "TRUE" : "FALSE"); return bret; } @@ -4498,7 +4507,6 @@ BOOL WINAPI ConvertStringSidToSidA(LPCSTR StringSid, PSID* Sid) bret = ConvertStringSidToSidW(wStringSid, Sid); HeapFree(GetProcessHeap(), 0, wStringSid); } - TRACE("returning %s\n", bret ? "TRUE" : "FALSE"); return bret; } diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 99dbce88d92..f0d7adef544 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -81,6 +81,8 @@ typedef BOOL (WINAPI *fnConvertSidToStringSidA)( PSID pSid, LPSTR *str ); typedef BOOL (WINAPI *fnConvertStringSidToSidA)( LPCSTR str, PSID pSid ); static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG ); +static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorW)(LPCWSTR, DWORD, + PSECURITY_DESCRIPTOR*, PULONG ); static BOOL (WINAPI *pConvertSecurityDescriptorToStringSecurityDescriptorA)(PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPSTR *, PULONG ); typedef BOOL (WINAPI *fnGetFileSecurityA)(LPCSTR, SECURITY_INFORMATION, @@ -144,6 +146,8 @@ static void init(void) pAddAuditAccessAceEx = (void *)GetProcAddress(hmod, "AddAuditAccessAceEx"); pConvertStringSecurityDescriptorToSecurityDescriptorA = (void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" ); + pConvertStringSecurityDescriptorToSecurityDescriptorW = + (void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorW" ); pConvertSecurityDescriptorToStringSecurityDescriptorA = (void *)GetProcAddress(hmod, "ConvertSecurityDescriptorToStringSecurityDescriptorA" ); pCreateWellKnownSid = (fnCreateWellKnownSid)GetProcAddress( hmod, "CreateWellKnownSid" ); @@ -1962,7 +1966,7 @@ static void test_impersonation_level(void) ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); error = GetLastError(); ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenUser) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); - User = (TOKEN_USER *)HeapAlloc(GetProcessHeap(), 0, Size); + User = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenUser, User, Size, &Size); ok(ret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); HeapFree(GetProcessHeap(), 0, User); @@ -1971,11 +1975,11 @@ static void test_impersonation_level(void) ret = GetTokenInformation(Token, TokenPrivileges, NULL, 0, &Size); error = GetLastError(); ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); - Privileges = (TOKEN_PRIVILEGES *)HeapAlloc(GetProcessHeap(), 0, Size); + Privileges = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(Token, TokenPrivileges, Privileges, Size, &Size); ok(ret, "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); - PrivilegeSet = (PRIVILEGE_SET *)HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(PRIVILEGE_SET, Privilege[Privileges->PrivilegeCount])); + PrivilegeSet = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(PRIVILEGE_SET, Privilege[Privileges->PrivilegeCount])); PrivilegeSet->PrivilegeCount = Privileges->PrivilegeCount; memcpy(PrivilegeSet->Privilege, Privileges->Privileges, PrivilegeSet->PrivilegeCount * sizeof(PrivilegeSet->Privilege[0])); PrivilegeSet->Control = PRIVILEGE_SET_ALL_NECESSARY; @@ -2175,6 +2179,7 @@ static void test_ConvertStringSecurityDescriptor(void) { BOOL ret; PSECURITY_DESCRIPTOR pSD; + static const WCHAR Blank[] = { 0 }; if (!pConvertStringSecurityDescriptorToSecurityDescriptorA) { @@ -2255,11 +2260,51 @@ static void test_ConvertStringSecurityDescriptor(void) SetLastError(0xdeadbeef); ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( "D:(A;;ROB;;;WD)", SDDL_REVISION_1, &pSD, NULL); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_ACL, "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_ACL instead of %d\n", GetLastError()); + /* test behaviour with NULL parameters */ + SetLastError(0xdeadbeef); + ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( + NULL, 0xdeadbeef, &pSD, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + GetLastError()); + + SetLastError(0xdeadbeef); + ret = pConvertStringSecurityDescriptorToSecurityDescriptorW( + NULL, 0xdeadbeef, &pSD, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + GetLastError()); + + SetLastError(0xdeadbeef); + ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( + "D:(A;;ROB;;;WD)", 0xdeadbeef, NULL, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + GetLastError()); + + SetLastError(0xdeadbeef); + ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( + "D:(A;;ROB;;;WD)", SDDL_REVISION_1, NULL, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", + GetLastError()); + + /* test behaviour with empty strings */ + SetLastError(0xdeadbeef); + ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( + "", SDDL_REVISION_1, &pSD, NULL); + ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pConvertStringSecurityDescriptorToSecurityDescriptorW( + Blank, SDDL_REVISION_1, &pSD, NULL); + ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError()); + /* test ACE string SID */ SetLastError(0xdeadbeef); ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 725cc103f84..35af81cfb52 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -142,7 +142,6 @@ typedef struct #define BUTTON_SPACINGY 3 #define FLAT_BTN_SPACINGX 8 #define DEFAULT_MIN_TAB_WIDTH 54 -#define DEFAULT_TAB_WIDTH_FIXED 96 #define DEFAULT_PADDING_X 6 #define EXTRA_ICON_PADDING 3 @@ -3019,7 +3018,7 @@ static LRESULT TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) /* Initialize the width of a tab. */ if (dwStyle & TCS_FIXEDWIDTH) - infoPtr->tabWidth = DEFAULT_TAB_WIDTH_FIXED; + infoPtr->tabWidth = GetDeviceCaps(hdc, LOGPIXELSX); infoPtr->tabMinWidth = -1; diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index d311d503563..eba3f617b80 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -27,7 +27,6 @@ #include "msg.h" #define DEFAULT_MIN_TAB_WIDTH 54 -#define TAB_DEFAULT_WIDTH 96 #define TAB_PADDING_X 6 #define EXTRA_ICON_PADDING 3 #define MAX_TABLEN 32 @@ -506,12 +505,13 @@ static void test_tab(INT nMinTabWidth) SIZE size; HDC hdc; HFONT hOldFont; - INT i; + INT i, dpi; hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE); SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); hdc = GetDC(hwTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); hOldFont = SelectObject(hdc, (HFONT)SendMessage(hwTab, WM_GETFONT, 0, 0)); GetTextExtentPoint32A(hdc, "Tab 1", strlen("Tab 1"), &size); trace("Tab1 text size: size.cx=%d size.cy=%d\n", size.cx, size.cy); @@ -519,7 +519,7 @@ static void test_tab(INT nMinTabWidth) ReleaseDC(hwTab, hdc); trace (" TCS_FIXEDWIDTH tabs no icon...\n"); - CheckSize(hwTab, TAB_DEFAULT_WIDTH, -1, "default width"); + CheckSize(hwTab, dpi, -1, "default width"); TabCheckSetSize(hwTab, 50, 20, 50, 20, "set size"); TabCheckSetSize(hwTab, 0, 1, 0, 1, "min size"); @@ -535,8 +535,11 @@ static void test_tab(INT nMinTabWidth) hwTab = create_tabcontrol(TCS_FIXEDWIDTH | TCS_BUTTONS, TCIF_TEXT|TCIF_IMAGE); SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); + hdc = GetDC(hwTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); + ReleaseDC(hwTab, hdc); trace (" TCS_FIXEDWIDTH buttons no icon...\n"); - CheckSize(hwTab, TAB_DEFAULT_WIDTH, -1, "default width"); + CheckSize(hwTab, dpi, -1, "default width"); TabCheckSetSize(hwTab, 20, 20, 20, 20, "set size 1"); TabCheckSetSize(hwTab, 10, 50, 10, 50, "set size 2"); TabCheckSetSize(hwTab, 0, 1, 0, 1, "min size"); @@ -555,8 +558,11 @@ static void test_tab(INT nMinTabWidth) hwTab = create_tabcontrol(TCS_FIXEDWIDTH | TCS_BOTTOM, TCIF_TEXT|TCIF_IMAGE); SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); + hdc = GetDC(hwTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); + ReleaseDC(hwTab, hdc); trace (" TCS_FIXEDWIDTH | TCS_BOTTOM tabs...\n"); - CheckSize(hwTab, TAB_DEFAULT_WIDTH, -1, "no icon, default width"); + CheckSize(hwTab, dpi, -1, "no icon, default width"); TabCheckSetSize(hwTab, 20, 20, 20, 20, "no icon, set size 1"); TabCheckSetSize(hwTab, 10, 50, 10, 50, "no icon, set size 2"); @@ -633,6 +639,8 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs) RECT rTab; INT nTabsRetrieved; INT rowCount; + INT dpi; + HDC hdc; ok(parent_wnd != NULL, "no parent window!\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -678,7 +686,11 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs) /* Testing GetItemRect */ flush_sequences(sequences, NUM_MSG_SEQUENCES); ok(SendMessage(hTab, TCM_GETITEMRECT, 0, (LPARAM) &rTab), "GetItemRect failed.\n"); - CheckSize(hTab, TAB_DEFAULT_WIDTH, -1 , "Default Width"); + + hdc = GetDC(hTab); + dpi = GetDeviceCaps(hdc, LOGPIXELSX); + ReleaseDC(hTab, hdc); + CheckSize(hTab, dpi, -1 , "Default Width"); ok_sequence(sequences, TAB_SEQ_INDEX, get_item_rect_seq, "Get itemRect test sequence", FALSE); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Get itemRect test parent sequence", FALSE); diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c index c8fcf7e220b..30409af856a 100644 --- a/dlls/comdlg32/filedlg31.c +++ b/dlls/comdlg32/filedlg31.c @@ -312,8 +312,10 @@ static void FD31_UpdateResult(const FD31_DATA *lfs, const WCHAR *tmpstr) if (lenstr2 > 3) tmpstr2[lenstr2++]='\\'; lstrcpynW(tmpstr2+lenstr2, tmpstr, BUFFILE-lenstr2); - if (ofnW->lpstrFile) - lstrcpynW(ofnW->lpstrFile, tmpstr2, ofnW->nMaxFile); + if (!ofnW->lpstrFile) + return; + + lstrcpynW(ofnW->lpstrFile, tmpstr2, ofnW->nMaxFile); /* set filename offset */ p = PathFindFileNameW(ofnW->lpstrFile); diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c index ea999f330db..86895dcd3bf 100644 --- a/dlls/comdlg32/tests/filedlg.c +++ b/dlls/comdlg32/tests/filedlg.c @@ -22,6 +22,10 @@ #include #include +#include "initguid.h" +#include "shlguid.h" +#define COBJMACROS +#include "shobjidl.h" /* ##### */ @@ -131,9 +135,95 @@ static void test_DialogCancel(void) } } +static UINT CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (msg == WM_NOTIFY) + { + if (((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE) + { + IShellBrowser *shell_browser = (IShellBrowser *)SendMessage(GetParent(dlg), WM_USER + 7 /* WM_GETISHELLBROWSER */, 0, 0); + IShellView *shell_view = NULL; + IShellView2 *shell_view2 = NULL; + SV2CVW2_PARAMS view_params; + FOLDERSETTINGS folder_settings; + HRESULT hr; + RECT rect = {0, 0, 0, 0}; + + hr = IShellBrowser_QueryActiveShellView(shell_browser, &shell_view); + ok(SUCCEEDED(hr), "QueryActiveShellView returned %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = IShellView_QueryInterface(shell_view, &IID_IShellView2, (void **)&shell_view2); + if (hr == E_NOINTERFACE) + { + skip("IShellView2 not supported\n"); + goto cleanup; + } + ok(SUCCEEDED(hr), "QueryInterface returned %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = IShellView2_DestroyViewWindow(shell_view2); + ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr); + + folder_settings.ViewMode = FVM_LIST; + folder_settings.fFlags = 0; + + view_params.cbSize = sizeof(view_params); + view_params.psvPrev = NULL; + view_params.pfs = &folder_settings; + view_params.psbOwner = shell_browser; + view_params.prcView = ▭ + view_params.pvid = NULL; + view_params.hwndView = NULL; + + hr = IShellView2_CreateViewWindow2(shell_view2, &view_params); + ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings); + ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr); + ok(folder_settings.ViewMode == FVM_LIST, "view mode is %d, expected %d\n", folder_settings.ViewMode, FVM_LIST); + + hr = IShellView2_DestroyViewWindow(shell_view2); + ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr); + + view_params.pvid = &VID_Details; + hr = IShellView2_CreateViewWindow2(shell_view2, &view_params); + ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr); + if (FAILED(hr)) goto cleanup; + + hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings); + ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr); + ok(folder_settings.ViewMode == FVM_DETAILS, "view mode is %d, expected %d\n", folder_settings.ViewMode, FVM_DETAILS); + +cleanup: + if (shell_view2) IShellView2_Release(shell_view2); + if (shell_view) IShellView_Release(shell_view); + PostMessage(GetParent(dlg), WM_COMMAND, IDCANCEL, 0); + } + } + return 0; +} + +static void test_create_view_window2(void) +{ + OPENFILENAMEA ofn = {0}; + char filename[1024] = {0}; + DWORD ret; + + ofn.lStructSize = sizeof(ofn); + ofn.lpstrFile = filename; + ofn.nMaxFile = 1042; + ofn.lpfnHook = create_view_window2_hook; + ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER; + ret = GetOpenFileNameA(&ofn); + ok(!ret, "GetOpenFileNameA returned %#x\n", ret); + ret = CommDlgExtendedError(); + ok(!ret, "CommDlgExtendedError returned %#x\n", ret); +} START_TEST(filedlg) { test_DialogCancel(); - + test_create_view_window2(); } diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c index 4ed2abe9d81..3a487eadfcd 100644 --- a/dlls/crypt32/decode.c +++ b/dlls/crypt32/decode.c @@ -3454,7 +3454,7 @@ static BOOL WINAPI CRYPT_AsnDecodeInt(DWORD dwCertEncodingType, if (!cbEncoded) { - SetLastError(CRYPT_E_ASN1_CORRUPT); + SetLastError(CRYPT_E_ASN1_EOD); ret = FALSE; } else if (pbEncoded[0] != ASN_INTEGER) @@ -4979,11 +4979,6 @@ BOOL WINAPI CryptDecodeObject(DWORD dwCertEncodingType, LPCSTR lpszStructType, SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - if (!cbEncoded) - { - SetLastError(CRYPT_E_ASN1_EOD); - return FALSE; - } if (cbEncoded > MAX_ENCODED_LEN) { SetLastError(CRYPT_E_ASN1_LARGE); @@ -5031,11 +5026,6 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType, SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - if (!cbEncoded) - { - SetLastError(CRYPT_E_ASN1_EOD); - return FALSE; - } if (cbEncoded > MAX_ENCODED_LEN) { SetLastError(CRYPT_E_ASN1_LARGE); diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 2027c4aa2b1..c26398b4a6f 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -1694,8 +1694,10 @@ static void testVerifyCertSig(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, 0, NULL, 0, NULL); ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == CRYPT_E_ASN1_EOD /* Win9x */), - "Expected STATUS_ACCESS_VIOLATION or CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + GetLastError() == CRYPT_E_ASN1_EOD /* Win9x */ || + GetLastError() == CRYPT_E_ASN1_BADTAG /* Win98 */), + "Expected STATUS_ACCESS_VIOLATION, CRYPT_E_ASN1_EOD, OR CRYPT_E_ASN1_BADTAG, got %08x\n", + GetLastError()); certBlob.cbData = size; certBlob.pbData = cert; @@ -2634,7 +2636,6 @@ static void testHashToBeSigned(void) } SetLastError(0xdeadbeef); ret = CryptHashToBeSigned(0, 0, NULL, 0, NULL, &size); - todo_wine ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); SetLastError(0xdeadbeef); diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c index eb8db2cbd52..bfaa80278f2 100644 --- a/dlls/crypt32/tests/chain.c +++ b/dlls/crypt32/tests/chain.c @@ -1163,6 +1163,38 @@ typedef struct _SimpleChainStatusCheck const CERT_TRUST_STATUS *rgElementStatus; } SimpleChainStatusCheck; +static void checkElementStatus(const CERT_TRUST_STATUS *expected, + const CERT_TRUST_STATUS *got, const CERT_TRUST_STATUS *ignore, + DWORD todo, DWORD testIndex, DWORD chainIndex, DWORD elementIndex) +{ + if (todo & TODO_ERROR && got->dwErrorStatus != expected->dwErrorStatus) + todo_wine + ok(got->dwErrorStatus == expected->dwErrorStatus, + "Chain %d, element [%d,%d]: expected error %08x, got %08x\n", + testIndex, chainIndex, elementIndex, expected->dwErrorStatus, + got->dwErrorStatus); + else + ok(got->dwErrorStatus == expected->dwErrorStatus || + broken((got->dwErrorStatus & ~ignore->dwErrorStatus) == + expected->dwErrorStatus), + "Chain %d, element [%d,%d]: expected error %08x, got %08x\n", + testIndex, chainIndex, elementIndex, expected->dwErrorStatus, + got->dwErrorStatus); + if (todo & TODO_INFO && got->dwInfoStatus != expected->dwInfoStatus) + todo_wine + ok(got->dwInfoStatus == expected->dwInfoStatus, + "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", + testIndex, chainIndex, elementIndex, expected->dwInfoStatus, + got->dwInfoStatus); + else + ok(got->dwInfoStatus == expected->dwInfoStatus || + broken((got->dwInfoStatus & ~ignore->dwInfoStatus) == + expected->dwInfoStatus), + "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", + testIndex, chainIndex, elementIndex, expected->dwInfoStatus, + got->dwInfoStatus); +} + static void checkSimpleChainStatus(const CERT_SIMPLE_CHAIN *simpleChain, const SimpleChainStatusCheck *simpleChainStatus, const CERT_TRUST_STATUS *ignore, DWORD todo, DWORD testIndex, DWORD chainIndex) @@ -1180,41 +1212,9 @@ static void checkSimpleChainStatus(const CERT_SIMPLE_CHAIN *simpleChain, DWORD i; for (i = 0; i < simpleChain->cElement; i++) - { - DWORD error = - simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus & - ~ignore->dwErrorStatus; - DWORD info = - simpleChain->rgpElement[i]->TrustStatus.dwInfoStatus & - ~ignore->dwInfoStatus; - - if (todo & TODO_ERROR && error != - simpleChainStatus->rgElementStatus[i].dwErrorStatus) - todo_wine ok(error == - simpleChainStatus->rgElementStatus[i].dwErrorStatus, - "Chain %d, element [%d,%d]: expected error %08x, got %08x\n", - testIndex, chainIndex, i, - simpleChainStatus->rgElementStatus[i].dwErrorStatus, error); - else - ok(error == - simpleChainStatus->rgElementStatus[i].dwErrorStatus, - "Chain %d, element [%d,%d]: expected error %08x, got %08x\n", - testIndex, chainIndex, i, - simpleChainStatus->rgElementStatus[i].dwErrorStatus, error); - if (todo & TODO_INFO && info != - simpleChainStatus->rgElementStatus[i].dwInfoStatus) - todo_wine ok(info == - simpleChainStatus->rgElementStatus[i].dwInfoStatus, - "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", - testIndex, chainIndex, i, - simpleChainStatus->rgElementStatus[i].dwInfoStatus, info); - else - ok(info == - simpleChainStatus->rgElementStatus[i].dwInfoStatus, - "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", - testIndex, chainIndex, i, - simpleChainStatus->rgElementStatus[i].dwInfoStatus, info); - } + checkElementStatus(&simpleChain->rgpElement[i]->TrustStatus, + &simpleChainStatus->rgElementStatus[i], ignore, todo, testIndex, + chainIndex, i); } } @@ -1229,30 +1229,41 @@ typedef struct _ChainStatusCheck static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain, const ChainStatusCheck *chainStatus, DWORD todo, DWORD testIndex) { - DWORD error = chainStatus->status.dwErrorStatus & - ~chainStatus->statusToIgnore.dwErrorStatus; - DWORD info = chainStatus->status.dwInfoStatus & - ~chainStatus->statusToIgnore.dwInfoStatus; - ok(chain->cChain == chainStatus->cChain, "Chain %d: expected %d simple chains, got %d\n", testIndex, chainStatus->cChain, chain->cChain); - if (todo & TODO_ERROR && error != chainStatus->status.dwErrorStatus) - todo_wine ok(error == chainStatus->status.dwErrorStatus, + if (todo & TODO_ERROR && + chain->TrustStatus.dwErrorStatus != chainStatus->status.dwErrorStatus) + todo_wine ok(chain->TrustStatus.dwErrorStatus == + chainStatus->status.dwErrorStatus, "Chain %d: expected error %08x, got %08x\n", - testIndex, chainStatus->status.dwErrorStatus, error); + testIndex, chainStatus->status.dwErrorStatus, + chain->TrustStatus.dwErrorStatus); else - ok(error == chainStatus->status.dwErrorStatus, + ok(chain->TrustStatus.dwErrorStatus == + chainStatus->status.dwErrorStatus || + broken((chain->TrustStatus.dwErrorStatus & + ~chainStatus->statusToIgnore.dwErrorStatus) == + chainStatus->status.dwErrorStatus), "Chain %d: expected error %08x, got %08x\n", - testIndex, chainStatus->status.dwErrorStatus, error); - if (todo & TODO_INFO && info != chainStatus->status.dwInfoStatus) - todo_wine ok(info == chainStatus->status.dwInfoStatus, + testIndex, chainStatus->status.dwErrorStatus, + chain->TrustStatus.dwErrorStatus); + if (todo & TODO_INFO && + chain->TrustStatus.dwInfoStatus != chainStatus->status.dwInfoStatus) + todo_wine ok(chain->TrustStatus.dwInfoStatus == + chainStatus->status.dwInfoStatus, "Chain %d: expected info %08x, got %08x\n", - testIndex, chainStatus->status.dwInfoStatus, info); + testIndex, chainStatus->status.dwInfoStatus, + chain->TrustStatus.dwInfoStatus); else - ok(info == chainStatus->status.dwInfoStatus, + ok(chain->TrustStatus.dwInfoStatus == + chainStatus->status.dwInfoStatus || + broken((chain->TrustStatus.dwInfoStatus & + ~chainStatus->statusToIgnore.dwInfoStatus) == + chainStatus->status.dwInfoStatus), "Chain %d: expected info %08x, got %08x\n", - testIndex, chainStatus->status.dwInfoStatus, info); + testIndex, chainStatus->status.dwInfoStatus, + chain->TrustStatus.dwInfoStatus); if (chain->cChain == chainStatus->cChain) { DWORD i; @@ -1521,7 +1532,7 @@ static ChainCheck chainCheck[] = { { CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT | CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, 0 }, 1, simpleStatus9 }, - TODO_INFO }, + TODO_ERROR | TODO_INFO }, { { sizeof(chain10) / sizeof(chain10[0]), chain10 }, { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 }, @@ -1530,7 +1541,7 @@ static ChainCheck chainCheck[] = { { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 }, { { sizeof(chain12) / sizeof(chain12[0]), chain12 }, { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus12 }, 0 }, + { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus12 }, TODO_ERROR }, { { sizeof(chain13) / sizeof(chain13[0]), chain13 }, { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus13 }, @@ -1566,7 +1577,7 @@ static ChainCheck chainCheckNoStore[] = { { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID, 0 }, 1, simpleStatus8NoStore }, - TODO_INFO }, + TODO_ERROR | TODO_INFO }, }; /* Wednesday, Oct 1, 2007 */ @@ -1660,7 +1671,7 @@ typedef struct _ChainPolicyCheck DWORD todo; } ChainPolicyCheck; -static ChainPolicyCheck basePolicyCheck[] = { +static const ChainPolicyCheck basePolicyCheck[] = { { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, 0 }, { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, @@ -1691,7 +1702,7 @@ static ChainPolicyCheck basePolicyCheck[] = { { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, 0 }, }; -static ChainPolicyCheck authenticodePolicyCheck[] = { +static const ChainPolicyCheck authenticodePolicyCheck[] = { { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, 0 }, { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, @@ -1722,7 +1733,7 @@ static ChainPolicyCheck authenticodePolicyCheck[] = { { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, 0 }, }; -static ChainPolicyCheck basicConstraintsPolicyCheck[] = { +static const ChainPolicyCheck basicConstraintsPolicyCheck[] = { { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, { 0, 0, -1, -1, NULL }, 0 }, { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, @@ -1762,7 +1773,7 @@ static const char *num_to_str(WORD num) return buf; } -static void checkChainPolicyStatus(LPCSTR policy, ChainPolicyCheck *check, +static void checkChainPolicyStatus(LPCSTR policy, const ChainPolicyCheck *check, DWORD testIndex) { PCCERT_CHAIN_CONTEXT chain = getChain(&check->certs, 0, TRUE, &oct2007, @@ -1775,7 +1786,9 @@ static void checkChainPolicyStatus(LPCSTR policy, ChainPolicyCheck *check, &policyStatus); if (check->todo & TODO_POLICY) - todo_wine ok(ret, "%d: CertVerifyCertificateChainPolicy failed: %08x\n", + todo_wine ok(ret, + "%s[%d]: CertVerifyCertificateChainPolicy failed: %08x\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), testIndex, GetLastError()); else { @@ -1786,36 +1799,46 @@ static void checkChainPolicyStatus(LPCSTR policy, ChainPolicyCheck *check, pCertFreeCertificateChain(chain); return; } - ok(ret, "%d: CertVerifyCertificateChainPolicy failed: %08x\n", - testIndex, GetLastError()); + ok(ret, "%s[%d]: CertVerifyCertificateChainPolicy failed: %08x\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), testIndex, + GetLastError()); } if (ret) { if (check->todo & TODO_ERROR) todo_wine ok(policyStatus.dwError == check->status.dwError, - "%d: expected %08x, got %08x\n", testIndex, - check->status.dwError, policyStatus.dwError); + "%s[%d]: expected %08x, got %08x\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), + testIndex, check->status.dwError, policyStatus.dwError); else ok(policyStatus.dwError == check->status.dwError, - "%d: expected %08x, got %08x\n", testIndex, - check->status.dwError, policyStatus.dwError); + "%s[%d]: expected %08x, got %08x\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), + testIndex, check->status.dwError, policyStatus.dwError); if (check->todo & TODO_CHAINS) todo_wine ok(policyStatus.lChainIndex == - check->status.lChainIndex, "%d: expected %d, got %d\n", + check->status.lChainIndex, "%s[%d]: expected %d, got %d\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), testIndex, check->status.lChainIndex, policyStatus.lChainIndex); else ok(policyStatus.lChainIndex == check->status.lChainIndex, - "%d: expected %d, got %d\n", testIndex, + "%s[%d]: expected %d, got %d\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), + testIndex, check->status.lChainIndex, policyStatus.lChainIndex); if (check->todo & TODO_ELEMENTS) todo_wine ok(policyStatus.lElementIndex == check->status.lElementIndex, - "%d: expected %d, got %d\n", testIndex, + "%s[%d]: expected %d, got %d\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), + testIndex, check->status.lElementIndex, policyStatus.lElementIndex); else ok(policyStatus.lElementIndex == check->status.lElementIndex, - "%d: expected %d, got %d\n", testIndex, + "%s[%d]: expected %d, got %d\n", + HIWORD(policy) ? policy : num_to_str(LOWORD(policy)), + testIndex, check->status.lElementIndex, policyStatus.lElementIndex); } pCertFreeCertificateChain(chain); diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index 108df0dc6c5..e08a7ce6f9c 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -469,7 +469,7 @@ static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType, } } else - ok(!ret && GetLastError() == CRYPT_E_BAD_ENCODE, + ok((!ret && GetLastError() == CRYPT_E_BAD_ENCODE) || broken(ret), "Expected CRYPT_E_BAD_ENCODE, got 0x%08x\n", GetLastError()); } @@ -526,7 +526,8 @@ static void testTimeDecoding(DWORD dwEncoding, LPCSTR structType, { ok(ret, "CryptDecodeObjectEx failed: %d (0x%08x)\n", GetLastError(), GetLastError()); - compareTime(&time->sysTime, &ft); + if (ret) + compareTime(&time->sysTime, &ft); } else ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || @@ -1771,7 +1772,8 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding) value.dwValueType = unicodeResults[i].valueType; ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH /* Win9x */), + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == unicodeResults[i].encoded.cbData, @@ -1825,7 +1827,8 @@ static void test_decodeUnicodeNameValue(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, unicodeResults[i].encoded.pbData, unicodeResults[i].encoded.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || broken(GetLastError() == CRYPT_E_NOT_CHAR_STRING /* Win9x */), + "CryptDecodeObjectEx failed: %08x\n", GetLastError()); if (ret && buf) { PCERT_NAME_VALUE value = (PCERT_NAME_VALUE)buf; @@ -2098,7 +2101,8 @@ static void test_encodeBasicConstraints(DWORD dwEncoding) info.cSubtreesConstraint = 0; ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(bufSize == sizeof(emptyConstraint), "Wrong size %d\n", bufSize); @@ -2113,7 +2117,8 @@ static void test_encodeBasicConstraints(DWORD dwEncoding) info.rgSubtreesConstraint = &nameBlob; ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(bufSize == sizeof(constraintWithDomainName), "Wrong size %d\n", bufSize); @@ -2354,7 +2359,7 @@ static void test_decodeRsaPublicKey(DWORD dwEncoding) rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1], CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &bufSize); ok(!ret && GetLastError() == CRYPT_E_ASN1_EOD, - "Expected CRYPT_E_ASN1_EOD, got %08x\n", CRYPT_E_ASN1_EOD); + "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); /* Try with a couple of RSA-related OIDs */ ret = pCryptDecodeObjectEx(dwEncoding, szOID_RSA_RSA, rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1] + 2, @@ -2671,7 +2676,8 @@ static void test_encodePublicKeyInfo(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, &pubKeys[i].info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(bufSize == pubKeys[i].encoded[1] + 2 || @@ -2750,8 +2756,10 @@ static void test_decodePublicKeyInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, bogusPubKeyInfo, bogusPubKeyInfo[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &bufSize); - ok(!ret && GetLastError() == CRYPT_E_ASN1_CORRUPT, - "Expected CRYPT_E_ASN1_CORRUPT, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || + GetLastError() == OSS_DATA_ERROR /* Win9x */), + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + GetLastError()); } static const BYTE v1Cert[] = { 0x30, 0x33, 0x02, 0x00, 0x30, 0x02, 0x06, 0x00, @@ -2850,7 +2858,8 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) /* Test with a V1 cert */ ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == v1Cert[1] + 2, "Expected size %d, got %d\n", @@ -2862,7 +2871,8 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) info.dwVersion = CERT_V2; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == sizeof(v2Cert), "Wrong size %d\n", size); @@ -2873,7 +2883,8 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) info.dwVersion = CERT_V3; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == sizeof(v3Cert), "Wrong size %d\n", size); @@ -2888,7 +2899,8 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) info.rgExtension = &criticalExt; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == sizeof(v1CertWithConstraints), "Wrong size %d\n", size); @@ -2967,8 +2979,9 @@ static void test_decodeCertToBeSigned(DWORD dwEncoding) /* Test with NULL pbEncoded */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, NULL, 0, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == CRYPT_E_ASN1_EOD, - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || + GetLastError() == OSS_BAD_ARG /* Win9x */), + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); if (0) { /* Crashes on win9x */ @@ -3616,7 +3629,8 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) /* Test with a V1 CRL */ ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == sizeof(v1CRL), "Wrong size %d\n", size); @@ -3627,7 +3641,8 @@ static void test_encodeCRLToBeSigned(DWORD dwEncoding) info.dwVersion = CRL_V2; ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), + "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (buf) { ok(size == v2CRL[1] + 2, "Expected size %d, got %d\n", @@ -4294,8 +4309,10 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, corruptCRLs[i], corruptCRLs[i][1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT), - "Expected CRYPT_E_ASN1_CORRUPT, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || + GetLastError() == OSS_DATA_ERROR /* Win9x */), + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + GetLastError()); } /* at a minimum, a CRL must contain an issuer: */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, @@ -4319,8 +4336,10 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, v1CRLWithIssuerAndEmptyEntry, v1CRLWithIssuerAndEmptyEntry[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == CRYPT_E_ASN1_CORRUPT, - "Expected CRYPT_E_ASN1_CORRUPT, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || + GetLastError() == OSS_DATA_ERROR /* Win9x */), + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", + GetLastError()); /* with a real CRL entry */ ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, v1CRLWithIssuerAndEntry, v1CRLWithIssuerAndEntry[1] + 2, @@ -4858,8 +4877,9 @@ static void test_encodeAuthorityInfoAccess(DWORD dwEncoding) aia.rgAccDescr = accessDescription; ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == E_INVALIDARG || + GetLastError() == OSS_LIMITED /* Win9x */), + "expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); /* It can't have an empty location */ accessDescription[0].pszAccessMethod = oid1; SetLastError(0xdeadbeef); @@ -5538,14 +5558,18 @@ static void test_decodeCTL(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, signedCTL, sizeof(signedCTL), CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == CRYPT_E_ASN1_BADTAG, - "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || + GetLastError() == OSS_DATA_ERROR /* Win9x */), + "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", + GetLastError()); SetLastError(0xdeadbeef); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == CRYPT_E_ASN1_BADTAG, - "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || + GetLastError() == OSS_DATA_ERROR /* Win9x */), + "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", + GetLastError()); } static const BYTE emptyPKCSContentInfo[] = { 0x30,0x04,0x06,0x02,0x2a,0x03 }; @@ -5577,8 +5601,9 @@ static void test_encodePKCSContentInfo(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == E_INVALIDARG || + GetLastError() == OSS_LIMITED /* Win9x */), + "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); info.pszObjId = oid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); @@ -5674,8 +5699,8 @@ static void test_decodePKCSContentInfo(DWORD dwEncoding) /* Native fails with CRYPT_E_ASN1_EOD, accept also CRYPT_E_ASN1_CORRUPT as * I doubt an app depends on that. */ - ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == CRYPT_E_ASN1_CORRUPT), + ok((!ret && (GetLastError() == CRYPT_E_ASN1_EOD || + GetLastError() == CRYPT_E_ASN1_CORRUPT)) || broken(ret), "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %x\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, @@ -5738,8 +5763,9 @@ static void test_encodePKCSAttribute(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == E_INVALIDARG || + GetLastError() == OSS_LIMITED /* Win9x */), + "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); attr.pszObjId = oid; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); @@ -5803,8 +5829,8 @@ static void test_decodePKCSAttribute(DWORD dwEncoding) * I doubt an app depends on that. */ ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == CRYPT_E_ASN1_CORRUPT), - "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %x\n", + GetLastError() == CRYPT_E_ASN1_CORRUPT || OSS_MORE_INPUT /* Win9x */), + "Expected CRYPT_E_ASN1_EOD, CRYPT_E_ASN1_CORRUPT, or OSS_MORE_INPUT, got %x\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, intPKCSAttr, sizeof(intPKCSAttr), @@ -5855,8 +5881,9 @@ static void test_encodePKCSAttributes(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == E_INVALIDARG || + GetLastError() == OSS_LIMITED /* Win9x */), + "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); attr[0].pszObjId = oid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); @@ -5978,8 +6005,9 @@ static void test_encodePKCSSMimeCapabilities(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == E_INVALIDARG || + GetLastError() == OSS_LIMITED /* Win9x */), + "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); capability[0].pszObjId = oid1; ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); @@ -6154,8 +6182,9 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) skip("no PKCS7_SIGNER_INFO encode support\n"); return; } - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == E_INVALIDARG || + GetLastError() == OSS_LIMITED /* Win9x */), + "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); /* To be encoded, a signer must have an issuer at least, and the encoding * must include PKCS_7_ASN_ENCODING. (That isn't enough to be decoded, * see decoding tests.) @@ -6170,7 +6199,8 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) "Expected E_INVALIDARG, got %08x\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), + "CryptEncodeObjectEx failed: %x\n", GetLastError()); if (buf) { ok(size == sizeof(minimalPKCSSigner), "Unexpected size %d\n", size); @@ -6191,7 +6221,8 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) "Expected E_INVALIDARG, got %08x\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), + "CryptEncodeObjectEx failed: %x\n", GetLastError()); if (buf) { ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %d\n", @@ -6213,7 +6244,8 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) "Expected E_INVALIDARG, got %08x\n", GetLastError()); else { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), + "CryptEncodeObjectEx failed: %x\n", GetLastError()); if (buf) { ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %d\n", @@ -6308,12 +6340,15 @@ static void test_decodePKCSSignerInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, minimalPKCSSigner, sizeof(minimalPKCSSigner), CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == CRYPT_E_ASN1_CORRUPT, - "Expected CRYPT_E_ASN1_CORRUPT, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || + GetLastError() == OSS_DATA_ERROR /* Win9x */), + "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %x\n", + GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, PKCSSignerWithSerial, sizeof(PKCSSignerWithSerial), CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); + ok(ret || broken(GetLastError() == OSS_DATA_ERROR), + "CryptDecodeObjectEx failed: %x\n", GetLastError()); if (buf) { info = (CMSG_SIGNER_INFO *)buf; @@ -6435,8 +6470,14 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); + ok(!ret, "Expected failure, got %d\n", ret); + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + skip("no CMS_SIGNER_INFO encode support\n"); + return; + } + ok(GetLastError() == E_INVALIDARG, + "Expected E_INVALIDARG, got %08x\n", GetLastError()); info.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, @@ -6601,7 +6642,13 @@ static void test_decodeCMSSignerInfo(DWORD dwEncoding) ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, minimalPKCSSigner, sizeof(minimalPKCSSigner), CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); - ok(!ret && GetLastError() == CRYPT_E_ASN1_CORRUPT, + ok(!ret, "expected failure\n"); + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + skip("no CMS_SIGNER_INFO decode support\n"); + return; + } + ok(GetLastError() == CRYPT_E_ASN1_CORRUPT, "Expected CRYPT_E_ASN1_CORRUPT, got %x\n", GetLastError()); ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, PKCSSignerWithSerial, sizeof(PKCSSignerWithSerial), diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index f5dbec3f488..e8e7eb31747 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -420,8 +420,10 @@ static void test_data_msg_update(void) &streamInfo); SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), + "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", + GetLastError()); CryptMsgClose(msg); /* Calling update with a valid output function succeeds, even if the data * exceeds the size specified in the stream info. @@ -2028,8 +2030,10 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), FALSE); todo_wine - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), + "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", + GetLastError()); /* Changing the callback pointer after the fact yields the same error (so * the message must copy the stream info, not just store a pointer to it) */ @@ -2038,8 +2042,10 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), FALSE); todo_wine - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), + "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", + GetLastError()); CryptMsgClose(msg); /* Empty non-final updates are allowed when streaming.. */ diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c index 0907a53aa28..2a40ed6b6ab 100644 --- a/dlls/cryptnet/tests/cryptnet.c +++ b/dlls/cryptnet/tests/cryptnet.c @@ -285,6 +285,12 @@ static void test_retrieveObjectByUrl(void) pBlobArray = (CRYPT_BLOB_ARRAY *)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, NULL, 0, 0, (void **)&pBlobArray, NULL, NULL, NULL, NULL); + if (!ret && GetLastError() == ERROR_NOT_SUPPORTED) + { + /* File URL support was apparently removed in Vista/Windows 2008 */ + skip("File URLs not supported\n"); + return; + } ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); ok(pBlobArray && pBlobArray != (CRYPT_BLOB_ARRAY *)0xdeadbeef, "Expected a valid pointer\n"); @@ -306,10 +312,8 @@ static void test_retrieveObjectByUrl(void) SetLastError(0xdeadbeef); ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CRL, 0, 0, (void **)&crl, NULL, NULL, NULL, NULL); - /* vista: ERROR_NOT_SUPPORTED, w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, - 95: OSS_DATA_ERROR */ - ok(!ret && (GetLastError() == ERROR_NOT_SUPPORTED || - GetLastError() == CRYPT_E_NO_MATCH || + /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, 95: OSS_DATA_ERROR */ + ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH || GetLastError() == CRYPT_E_ASN1_BADTAG || GetLastError() == OSS_DATA_ERROR), "got 0x%x/%u (expected CRYPT_E_NO_MATCH or CRYPT_E_ASN1_BADTAG or " diff --git a/dlls/d3d10/Makefile.in b/dlls/d3d10/Makefile.in index 5ee45c12b32..d9bb511d786 100644 --- a/dlls/d3d10/Makefile.in +++ b/dlls/d3d10/Makefile.in @@ -3,6 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = d3d10.dll +IMPORTLIB = d3d10 IMPORTS = dxguid uuid wined3d kernel32 C_SRCS = \ diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 5fae6d58761..ca4eb73750b 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -92,6 +92,48 @@ static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl; static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional); static BOOL parse_object(parse_buffer * buf); +static const char* get_primitive_string(WORD token); + +static void dump_template(xtemplate* templates_array, xtemplate* ptemplate) +{ + int j, k; + GUID* clsid; + + clsid = &ptemplate->class_id; + + DPRINTF("template %s\n", ptemplate->name); + DPRINTF("{\n"); + DPRINTF(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0], + clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]); + for (j = 0; j < ptemplate->nb_members; j++) + { + if (ptemplate->members[j].nb_dims) + DPRINTF("array "); + if (ptemplate->members[j].type == TOKEN_NAME) + DPRINTF("%s ", templates_array[ptemplate->members[j].idx_template].name); + else + DPRINTF("%s ", get_primitive_string(ptemplate->members[j].type)); + DPRINTF("%s", ptemplate->members[j].name); + for (k = 0; k < ptemplate->members[j].nb_dims; k++) + { + if (ptemplate->members[j].dim_fixed[k]) + DPRINTF("[%d]", ptemplate->members[j].dim_value[k]); + else + DPRINTF("[%s]", ptemplate->members[ptemplate->members[j].dim_value[k]].name); + } + DPRINTF(";\n"); + } + if (ptemplate->open) + DPRINTF("[...]\n"); + else if (ptemplate->nb_childs) + { + DPRINTF("[%s", ptemplate->childs[0]); + for (j = 1; j < ptemplate->nb_childs; j++) + DPRINTF(",%s", ptemplate->childs[j]); + DPRINTF("]\n"); + } + DPRINTF("}\n"); +} HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj) { @@ -597,6 +639,43 @@ static BOOL is_integer(parse_buffer* buf) return TRUE; } +static BOOL is_string(parse_buffer* buf) +{ + char tmp[32]; + DWORD pos = 1; + char c; + BOOL ok = 0; + + if (*buf->buffer != '"') + return FALSE; + tmp[0] = '"'; + + while (!is_separator(c = *(buf->buffer+pos)) && (pos < 32)) + { + tmp[pos++] = c; + if (c == '"') + { + ok = 1; + break; + } + } + tmp[pos] = 0; + + if (!ok) + { + TRACE("Wrong string %s\n", tmp); + return FALSE; + } + + buf->buffer += pos; + buf->rem_bytes -= pos; + + TRACE("Found string %s\n", tmp); + strcpy((char*)buf->value, tmp); + + return TRUE; +} + static WORD parse_TOKEN(parse_buffer * buf) { WORD token; @@ -662,6 +741,11 @@ static WORD parse_TOKEN(parse_buffer * buf) token = TOKEN_FLOAT; break; } + if (is_string(buf)) + { + token = TOKEN_LPSTR; + break; + } if (is_name(buf)) { token = TOKEN_NAME; @@ -1081,46 +1165,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP { TRACE("Template successfully parsed:\n"); if (TRACE_ON(d3dxof)) - { - int i,j,k; - GUID* clsid; - - i = This->nb_xtemplates - 1; - clsid = &This->xtemplates[i].class_id; - - DPRINTF("template %s\n", This->xtemplates[i].name); - DPRINTF("{\n"); - DPRINTF(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0], - clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]); - for (j = 0; j < This->xtemplates[i].nb_members; j++) - { - if (This->xtemplates[i].members[j].nb_dims) - DPRINTF("array "); - if (This->xtemplates[i].members[j].type == TOKEN_NAME) - DPRINTF("%s ", This->xtemplates[This->xtemplates[i].members[j].idx_template].name); - else - DPRINTF("%s ", get_primitive_string(This->xtemplates[i].members[j].type)); - DPRINTF("%s", This->xtemplates[i].members[j].name); - for (k = 0; k < This->xtemplates[i].members[j].nb_dims; k++) - { - if (This->xtemplates[i].members[j].dim_fixed[k]) - DPRINTF("[%d]", This->xtemplates[i].members[j].dim_value[k]); - else - DPRINTF("[%s]", This->xtemplates[i].members[This->xtemplates[i].members[j].dim_value[k]].name); - } - DPRINTF(";\n"); - } - if (This->xtemplates[i].open) - DPRINTF("[...]\n"); - else if (This->xtemplates[i].nb_childs) - { - DPRINTF("[%s", This->xtemplates[i].childs[0]); - for (j = 1; j < This->xtemplates[i].nb_childs; j++) - DPRINTF(",%s", This->xtemplates[i].childs[j]); - DPRINTF("]\n"); - } - DPRINTF("}\n"); - } + dump_template(This->xtemplates, &This->xtemplates[This->nb_xtemplates - 1]); } } @@ -1808,8 +1853,34 @@ static BOOL parse_object_members_list(parse_buffer * buf) return FALSE; } } + else if (token == TOKEN_LPSTR) + { + static char fake_string[] = "Fake string"; + get_TOKEN(buf); + TRACE("%s = %s\n", pt->members[i].name, (char*)buf->value); + /* Assume larger size */ + if ((buf->cur_pdata - buf->pxo->pdata + 4) > MAX_DATA_SIZE) + { + WARN("Buffer too small\n"); + return FALSE; + } + if (pt->members[i].type == TOKEN_LPSTR) + { + /* Use a fake string for now */ + *(((LPCSTR*)(buf->cur_pdata))) = fake_string; + buf->cur_pdata += 4; + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } else + { + FIXME("Unexpected token %d\n", token); return FALSE; + } } } @@ -1865,7 +1936,7 @@ _exit: return FALSE; } buf->pxo->childs[buf->pxo->nb_childs] = &buf->pxo_tab[buf->cur_subobject++]; - buf->pxo->childs[buf->pxo->nb_childs]->ptarget = &buf->pxo_globals[i*MAX_SUBOBJECTS]; + buf->pxo->childs[buf->pxo->nb_childs]->ptarget = &buf->pxo_globals[i*MAX_SUBOBJECTS+j]; buf->pxo->nb_childs++; } else if (check_TOKEN(buf) == TOKEN_NAME) @@ -1961,7 +2032,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE IDirectXFileDataImpl* object; HRESULT hr; LPBYTE pdata; - + TRACE("(%p/%p)->(%p)\n", This, iface, ppDataObj); if (!This->buf.rem_bytes) diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index b851b95b987..46d82fcba5b 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -53,13 +53,13 @@ struct SysKeyboardImpl static BYTE map_dik_code(DWORD scanCode, DWORD vkCode) { static const BYTE asciiCodes[] = - {/*32*/ DIK_SPACE,0,0,0,0,0,0,DIK_APOSTROPHE, \ - /*40*/ 0,0,0,0,DIK_COMMA,DIK_MINUS,DIK_PERIOD,DIK_SLASH, \ - /*48*/ DIK_0,DIK_1,DIK_2,DIK_3,DIK_4,DIK_5,DIK_6,DIK_7, \ - /*56*/ DIK_8,DIK_9,DIK_COLON,DIK_SEMICOLON,0,DIK_EQUALS,0,0, \ - /*64*/ DIK_AT,DIK_A,DIK_B,DIK_C,DIK_D,DIK_E,DIK_F,DIK_G, \ - /*72*/ DIK_H,DIK_I,DIK_J,DIK_K,DIK_L,DIK_M,DIK_N,DIK_O, \ - /*80*/ DIK_P,DIK_Q,DIK_R,DIK_S,DIK_T,DIK_U,DIK_V,DIK_W, \ + {/*32*/ DIK_SPACE,0,0,0,0,0,0,DIK_APOSTROPHE, + /*40*/ 0,0,0,0,DIK_COMMA,DIK_MINUS,DIK_PERIOD,DIK_SLASH, + /*48*/ DIK_0,DIK_1,DIK_2,DIK_3,DIK_4,DIK_5,DIK_6,DIK_7, + /*56*/ DIK_8,DIK_9,DIK_COLON,DIK_SEMICOLON,0,DIK_EQUALS,0,0, + /*64*/ DIK_AT,DIK_A,DIK_B,DIK_C,DIK_D,DIK_E,DIK_F,DIK_G, + /*72*/ DIK_H,DIK_I,DIK_J,DIK_K,DIK_L,DIK_M,DIK_N,DIK_O, + /*80*/ DIK_P,DIK_Q,DIK_R,DIK_S,DIK_T,DIK_U,DIK_V,DIK_W, /*88*/ DIK_X,DIK_Y,DIK_Z,DIK_LBRACKET,0,DIK_RBRACKET,DIK_CIRCUMFLEX,DIK_UNDERLINE} /*95*/ ; BYTE out_code = 0; diff --git a/dlls/dsound/dsound_convert.c b/dlls/dsound/dsound_convert.c index 4b5ff4b99c4..d149b7d8ffd 100644 --- a/dlls/dsound/dsound_convert.c +++ b/dlls/dsound/dsound_convert.c @@ -34,9 +34,7 @@ */ #include "config.h" -#ifdef HAVE_STDINT_H -#include -#endif + #include #define NONAMELESSSTRUCT @@ -62,20 +60,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound); static void convert_8_to_8 (const void *src, void *dst) { - uint8_t *dest = dst; - *dest = *(uint8_t*)src; + BYTE *dest = dst; + *dest = *(BYTE*)src; } static void convert_8_to_16 (const void *src, void *dst) { - uint16_t dest = *(uint8_t*)src, *dest16 = dst; + WORD dest = *(BYTE*)src, *dest16 = dst; *dest16 = le16(dest * 257 - 32768); } static void convert_8_to_24 (const void *src, void *dst) { - uint8_t dest = *(uint8_t*)src; - uint8_t *dest24 = dst; + BYTE dest = *(BYTE*)src; + BYTE *dest24 = dst; dest24[0] = dest; dest24[1] = dest; dest24[2] = dest - 0x80; @@ -83,27 +81,27 @@ static void convert_8_to_24 (const void *src, void *dst) static void convert_8_to_32 (const void *src, void *dst) { - uint32_t dest = *(uint8_t*)src, *dest32 = dst; + DWORD dest = *(BYTE*)src, *dest32 = dst; *dest32 = le32(dest * 16843009 - 2147483648U); } static void convert_16_to_8 (const void *src, void *dst) { - uint8_t *dst8 = dst; - *dst8 = (le16(*(uint16_t*)src)) / 256; + BYTE *dst8 = dst; + *dst8 = (le16(*(WORD*)src)) / 256; *dst8 -= 0x80; } static void convert_16_to_16 (const void *src, void *dst) { - uint16_t *dest = dst; - *dest = *(uint16_t*)src; + WORD *dest = dst; + *dest = *(WORD*)src; } static void convert_16_to_24 (const void *src, void *dst) { - uint16_t dest = le16(*(uint16_t*)src); - uint8_t *dest24 = dst; + WORD dest = le16(*(WORD*)src); + BYTE *dest24 = dst; dest24[0] = dest / 256; dest24[1] = dest; @@ -112,27 +110,27 @@ static void convert_16_to_24 (const void *src, void *dst) static void convert_16_to_32 (const void *src, void *dst) { - uint32_t dest = *(uint16_t*)src, *dest32 = dst; + DWORD dest = *(WORD*)src, *dest32 = dst; *dest32 = dest * 65537; } static void convert_24_to_8 (const void *src, void *dst) { - uint8_t *dst8 = dst; - *dst8 = ((uint8_t *)src)[2]; + BYTE *dst8 = dst; + *dst8 = ((BYTE *)src)[2]; } static void convert_24_to_16 (const void *src, void *dst) { - uint16_t *dest16 = dst; - const uint8_t *source = src; + WORD *dest16 = dst; + const BYTE *source = src; *dest16 = le16(source[2] * 256 + source[1]); } static void convert_24_to_24 (const void *src, void *dst) { - uint8_t *dest24 = dst; - const uint8_t *src24 = src; + BYTE *dest24 = dst; + const BYTE *src24 = src; dest24[0] = src24[0]; dest24[1] = src24[1]; @@ -141,28 +139,28 @@ static void convert_24_to_24 (const void *src, void *dst) static void convert_24_to_32 (const void *src, void *dst) { - uint32_t *dest32 = dst; - const uint8_t *source = src; + DWORD *dest32 = dst; + const BYTE *source = src; *dest32 = le32(source[2] * 16777217 + source[1] * 65536 + source[0] * 256); } static void convert_32_to_8 (const void *src, void *dst) { - uint8_t *dst8 = dst; - *dst8 = (le32(*(uint32_t *)src) / 16777216); + BYTE *dst8 = dst; + *dst8 = (le32(*(DWORD *)src) / 16777216); *dst8 -= 0x80; } static void convert_32_to_16 (const void *src, void *dst) { - uint16_t *dest16 = dst; - *dest16 = le16(le32(*(uint32_t*)src) / 65536); + WORD *dest16 = dst; + *dest16 = le16(le32(*(DWORD*)src) / 65536); } static void convert_32_to_24 (const void *src, void *dst) { - uint32_t dest = le32(*(uint32_t*)dst); - uint8_t *dest24 = dst; + DWORD dest = le32(*(DWORD*)dst); + BYTE *dest24 = dst; dest24[0] = dest / 256; dest24[1] = dest / 65536; @@ -171,8 +169,8 @@ static void convert_32_to_24 (const void *src, void *dst) static void convert_32_to_32 (const void *src, void *dst) { - uint32_t *dest = dst; - *dest = *(uint32_t*)src; + DWORD *dest = dst; + *dest = *(DWORD*)src; } const bitsconvertfunc convertbpp[4][4] = { @@ -182,15 +180,15 @@ const bitsconvertfunc convertbpp[4][4] = { { convert_32_to_8, convert_32_to_16, convert_32_to_24, convert_32_to_32 }, }; -static void mix8(int8_t *src, int32_t *dst, unsigned len) +static void mix8(signed char *src, INT *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); while (len--) /* 8-bit WAV is unsigned, it's here converted to signed, normalize function will convert it back again */ - *(dst++) += (int8_t)((uint8_t)*(src++) - (uint8_t)0x80); + *(dst++) += (signed char)((BYTE)*(src++) - (BYTE)0x80); } -static void mix16(int16_t *src, int32_t *dst, unsigned len) +static void mix16(SHORT *src, INT *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); len /= 2; @@ -201,14 +199,14 @@ static void mix16(int16_t *src, int32_t *dst, unsigned len) } } -static void mix24(uint8_t *src, int32_t *dst, unsigned len) +static void mix24(BYTE *src, INT *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); len /= 3; while (len--) { - uint32_t field; - field = ((unsigned)src[2] << 16) + ((unsigned)src[1] << 8) + (unsigned)src[0]; + DWORD field; + field = ((DWORD)src[2] << 16) + ((DWORD)src[1] << 8) + (DWORD)src[0]; if (src[2] & 0x80) field |= 0xFF000000U; *(dst++) += field; @@ -216,7 +214,7 @@ static void mix24(uint8_t *src, int32_t *dst, unsigned len) } } -static void mix32(int32_t *src, int64_t *dst, unsigned len) +static void mix32(INT *src, LONGLONG *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); len /= 4; @@ -231,7 +229,7 @@ const mixfunc mixfunctions[4] = { (mixfunc)mix32 }; -static void norm8(int32_t *src, int8_t *dst, unsigned len) +static void norm8(INT *src, signed char *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); while (len--) @@ -246,7 +244,7 @@ static void norm8(int32_t *src, int8_t *dst, unsigned len) } } -static void norm16(int32_t *src, int16_t *dst, unsigned len) +static void norm16(INT *src, SHORT *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); len /= 2; @@ -262,7 +260,7 @@ static void norm16(int32_t *src, int16_t *dst, unsigned len) } } -static void norm24(int32_t *src, uint8_t *dst, unsigned len) +static void norm24(INT *src, BYTE *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); len /= 3; @@ -291,14 +289,14 @@ static void norm24(int32_t *src, uint8_t *dst, unsigned len) } } -static void norm32(int64_t *src, int32_t *dst, unsigned len) +static void norm32(LONGLONG *src, INT *dst, unsigned len) { TRACE("%p - %p %d\n", src, dst, len); len /= 4; while (len--) { *dst = le32(*src); - if (*src <= -(int64_t)0x80000000) + if (*src <= -(LONGLONG)0x80000000) *dst = le32(0x80000000); else if (*src > 0x7fffffff) *dst = le32(0x7fffffff); diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in index 8659ba1e4fa..e3806acc96d 100644 --- a/dlls/dxguid/Makefile.in +++ b/dlls/dxguid/Makefile.in @@ -5,8 +5,9 @@ VPATH = @srcdir@ MODULE = dxguid C_SRCS = \ - dx8guid.c \ - dx9guid.c \ + dx8guid.c \ + dx9guid.c \ + dx10guid.c \ dxguid.c @MAKE_IMPLIB_RULES@ diff --git a/include/dxgi.idl b/dlls/dxguid/dx10guid.c similarity index 69% copy from include/dxgi.idl copy to dlls/dxguid/dx10guid.c index 85f561f65f7..de6490ff0f6 100644 --- a/include/dxgi.idl +++ b/dlls/dxguid/dx10guid.c @@ -1,5 +1,9 @@ /* - * Copyright 2007 Andras Kovacs + * DirectX 10 GUID definitions + * + * Copyright 2000 Alexandre Julliard + * Copyright 2000 Francois Gouget + * Copyright 2003 Raphael Junqueira * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,4 +20,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -import "dxgitype.idl"; +#include + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" + +#include "objbase.h" +#include "olectl.h" +#include "initguid.h" + +#include "d3d10.h" diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 21d2ebb52ca..7b8d97de04f 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -1648,14 +1648,17 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, DWORD type; DC * dc = get_dc_ptr( hdc ); INT breakRem; + static int quietfixme = 0; if (!dc) return FALSE; breakRem = dc->breakRem; - if (flags & (ETO_NUMERICSLOCAL | ETO_NUMERICSLATIN | ETO_PDY)) + if (quietfixme == 0 && flags & (ETO_NUMERICSLOCAL | ETO_NUMERICSLATIN | ETO_PDY)) + { FIXME("flags ETO_NUMERICSLOCAL | ETO_NUMERICSLATIN | ETO_PDY unimplemented\n"); - + quietfixme = 1; + } if (!dc->funcs->pExtTextOut && !PATH_IsPathOpen(dc->path)) { release_dc_ptr( dc ); diff --git a/dlls/gdi32/tests/mapping.c b/dlls/gdi32/tests/mapping.c index 210f78341b8..7e85ca9e05a 100644 --- a/dlls/gdi32/tests/mapping.c +++ b/dlls/gdi32/tests/mapping.c @@ -101,7 +101,7 @@ static void test_world_transform(void) if (is_win9x) { - expect_viewport_ext(hdc, 96, 96); + expect_viewport_ext(hdc, GetDeviceCaps(hdc, LOGPIXELSX), GetDeviceCaps(hdc, LOGPIXELSY)); expect_window_ext(hdc, 254, -254); } else diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 9516d64215e..0cb5ded5aca 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -253,6 +253,7 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) IStream* stream; HRESULT hr; INT size; + LARGE_INTEGER move; TRACE("%p, %p\n", image, cloneImage); @@ -279,6 +280,12 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) goto out; } + /* Set seek pointer back to the beginning of the picture */ + move.QuadPart = 0; + hr = IStream_Seek(stream, move, STREAM_SEEK_SET, NULL); + if (FAILED(hr)) + goto out; + hr = OleLoadPicture(stream, size, FALSE, &IID_IPicture, (LPVOID*) &(*cloneImage)->picture); if (FAILED(hr)) @@ -450,7 +457,9 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, TRACE("%d %d %d %d %p %p\n", width, height, stride, format, scan0, bitmap); - if(!bitmap || width <= 0 || height <= 0 || (scan0 && (stride % 4))){ + if (!bitmap) return InvalidParameter; + + if(width <= 0 || height <= 0 || (scan0 && (stride % 4))){ *bitmap = NULL; return InvalidParameter; } diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c index 79ce879238d..eddb24e89fd 100644 --- a/dlls/gdiplus/tests/pathiterator.c +++ b/dlls/gdiplus/tests/pathiterator.c @@ -459,8 +459,6 @@ static void test_nextsubpath(void) INT start, end, result; BOOL closed; - GdipCreatePath(FillModeAlternate, &path); - /* empty path */ GdipCreatePath(FillModeAlternate, &path); GdipCreatePathIter(&iter, path); @@ -471,8 +469,8 @@ static void test_nextsubpath(void) expect(Ok, stat); expect(0, result); expect(TRUE, closed); - GdipCreatePathIter(&iter, path); + GdipDeletePathIter(iter); GdipDeletePath(path); } @@ -500,6 +498,55 @@ static void test_nextpathtype(void) expect(InvalidParameter, stat); stat = GdipPathIterNextPathType(iter, NULL, &type, &start, &end); expect(InvalidParameter, stat); + stat = GdipPathIterNextPathType(iter, &result, &type, NULL, NULL); + expect(InvalidParameter, stat); + + /* empty path */ + start = end = result = (INT)0xdeadbeef; + stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); + todo_wine expect(Ok, stat); + expect((INT)0xdeadbeef, start); + expect((INT)0xdeadbeef, end); + todo_wine expect(0, result); + GdipDeletePathIter(iter); + + /* single figure */ + GdipAddPathLine(path, 0.0, 0.0, 10.0, 30.0); + GdipCreatePathIter(&iter, path); + start = end = result = (INT)0xdeadbeef; + type = 255; /* out of range */ + stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); + todo_wine expect(Ok, stat); + expect((INT)0xdeadbeef, start); + expect((INT)0xdeadbeef, end); + expect(255, type); + todo_wine expect(0, result); + GdipDeletePathIter(iter); + + GdipAddPathEllipse(path, 0.0, 0.0, 35.0, 70.0); + GdipCreatePathIter(&iter, path); + start = end = result = (INT)0xdeadbeef; + type = 255; /* out of range */ + stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); + todo_wine expect(Ok, stat); + expect((INT)0xdeadbeef, start); + expect((INT)0xdeadbeef, end); + expect(255, type); + todo_wine expect(0, result); + GdipDeletePathIter(iter); + + /* closed */ + GdipClosePathFigure(path); + GdipCreatePathIter(&iter, path); + start = end = result = (INT)0xdeadbeef; + type = 255; /* out of range */ + stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); + todo_wine expect(Ok, stat); + expect((INT)0xdeadbeef, start); + expect((INT)0xdeadbeef, end); + expect(255, type); + todo_wine expect(0, result); + GdipDeletePathIter(iter); GdipDeletePath(path); } diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 2c9489a1a7c..5e820a28a29 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -2349,7 +2349,7 @@ DWORD WINAPI ImmGetImeMenuItemsA( HIMC hIMC, DWORD dwFlags, DWORD dwType, } if (lpImeMenu && rc) { - int i; + unsigned int i; for (i = 0; i < rc; i++) { memcpy(&lpImeMenu[i],&lpImeMenuW[1],sizeof(IMEMENUITEMINFOA)); @@ -2412,7 +2412,7 @@ DWORD WINAPI ImmGetImeMenuItemsW( HIMC hIMC, DWORD dwFlags, DWORD dwType, } if (lpImeMenu && rc) { - int i; + unsigned int i; for (i = 0; i < rc; i++) { memcpy(&lpImeMenu[i],&lpImeMenuA[1],sizeof(IMEMENUITEMINFOA)); @@ -2559,7 +2559,7 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC) if (data->IMC.dwNumMsgBuf > 0) { LPTRANSMSG lpTransMsg; - INT i; + DWORD i; lpTransMsg = (LPTRANSMSG)ImmLockIMCC(data->IMC.hMsgBuf); for (i = 0; i < data->IMC.dwNumMsgBuf; i++) @@ -2586,7 +2586,7 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lKeyD LPVOID list = 0; UINT msg_count; UINT uVirtKey; - static const int list_count = 10; + static const DWORD list_count = 10; TRACE("%p %x %x %x\n",hwnd, msg, (UINT)wParam, (UINT)lKeyData); @@ -2621,7 +2621,7 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lKeyD TRACE("%i messages generated\n",msg_count); if (msg_count && msg_count <= list_count) { - int i; + UINT i; LPTRANSMSG msgs = (LPTRANSMSG)((LPBYTE)list + sizeof(DWORD)); for (i = 0; i < msg_count; i++) diff --git a/dlls/itss/itss.c b/dlls/itss/itss.c index 47756fa4b06..0722efad9c2 100644 --- a/dlls/itss/itss.c +++ b/dlls/itss/itss.c @@ -396,7 +396,7 @@ static HRESULT register_server(BOOL do_register) STRTABLEA strtable; STRENTRYA pse[4]; static CLSID const *clsids[4]; - int i = 0; + DWORD i = 0; static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 3fee568e106..0dac085abcc 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include +#include + #include "jscript.h" #include "wine/debug.h" @@ -24,6 +27,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript); typedef struct { DispatchEx dispex; + + /* ECMA-262 3rd Edition 15.9.1.1 */ + DOUBLE time; } DateInstance; static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0}; @@ -72,9 +78,17 @@ static const WCHAR setUTCMonthW[] = {'s','e','t','U','T','C','M','o','n','t','h' static const WCHAR setFullYearW[] = {'s','e','t','F','u','l','l','Y','e','a','r',0}; static const WCHAR setUTCFullYearW[] = {'s','e','t','U','T','C','F','u','l','l','Y','e','a','r',0}; -static inline HRESULT systime_to_time(const SYSTEMTIME *st, FILETIME *time) +/* ECMA-262 3rd Edition 15.9.1.14 */ +static inline DOUBLE time_clip(DOUBLE time) { - return SystemTimeToFileTime(st, time) ? S_OK : HRESULT_FROM_WIN32(GetLastError()); + /* FIXME: Handle inf */ + + if(8.64e15 < time || time < -8.64e15) { + FIXME("return NaN\n"); + return 0.0; + } + + return floor(time); } static HRESULT Date_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, @@ -154,11 +168,22 @@ static HRESULT Date_toLocaleTimeString(DispatchEx *dispex, LCID lcid, WORD flags return E_NOTIMPL; } +/* ECMA-262 3rd Edition 15.9.5.9 */ static HRESULT Date_getTime(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + if(!is_class(dispex, JSCLASS_DATE)) { + FIXME("throw TypeError\n"); + return E_FAIL; + } + + if(retv) { + DateInstance *date = (DateInstance*)dispex; + num_set_val(retv, date->time); + } + return S_OK; } static HRESULT Date_getFullYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, @@ -448,7 +473,7 @@ static const builtin_info_t Date_info = { NULL }; -static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DispatchEx **ret) +static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DOUBLE time, DispatchEx **ret) { DateInstance *date; HRESULT hres; @@ -466,6 +491,8 @@ static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DispatchEx **ret) return hres; } + date->time = time; + *ret = &date->dispex; return S_OK; } @@ -473,8 +500,67 @@ static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DispatchEx **ret) static HRESULT DateConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + DispatchEx *date; + HRESULT hres; + + TRACE("\n"); + + switch(flags) { + case DISPATCH_CONSTRUCT: + switch(arg_cnt(dp)) { + /* ECMA-262 3rd Edition 15.9.3.3 */ + case 0: { + FILETIME time; + + GetSystemTimeAsFileTime(&time); + + hres = create_date(dispex->ctx, TRUE, + floor((DOUBLE)(time.dwLowDateTime/1e6) + (DOUBLE)time.dwHighDateTime*((DOUBLE)UINT_MAX+1.0)/1.e6), + &date); + if(FAILED(hres)) + return hres; + break; + } + + /* ECMA-262 3rd Edition 15.9.3.2 */ + case 1: { + VARIANT prim, num; + + hres = to_primitive(dispex->ctx, get_arg(dp,0), ei, &prim); + if(FAILED(hres)) + return hres; + + if(V_VT(&prim) == VT_BSTR) { + FIXME("VT_BSTR not supported\n"); + return E_NOTIMPL; + } + + hres = to_number(dispex->ctx, &prim, ei, &num); + VariantClear(&prim); + if(FAILED(hres)) + return hres; + + hres = create_date(dispex->ctx, TRUE, time_clip(num_val(&num)), &date); + if(FAILED(hres)) + return hres; + break; + } + + default: + FIXME("unimplemented argcnt %d\n", arg_cnt(dp)); + return E_NOTIMPL; + } + + V_VT(retv) = VT_DISPATCH; + V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(date); + return S_OK; + + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; } HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx **ret) @@ -482,7 +568,7 @@ HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx **ret) DispatchEx *date; HRESULT hres; - hres = create_date(ctx, FALSE, &date); + hres = create_date(ctx, FALSE, 0.0, &date); if(FAILED(hres)) return hres; @@ -491,4 +577,3 @@ HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx **ret) jsdisp_release(date); return hres; } - diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 9c539515d1f..815d5fd6667 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + #include #include "jscript.h" @@ -2599,7 +2602,7 @@ HRESULT not_equal2_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD f } /* ECMA-262 3rd Edition 11.8.5 */ -static HRESULT less_eval(exec_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcept_t *ei, BOOL *ret) +static HRESULT less_eval(exec_ctx_t *ctx, VARIANT *lval, VARIANT *rval, BOOL greater, jsexcept_t *ei, BOOL *ret) { VARIANT l, r, ln, rn; HRESULT hres; @@ -2615,7 +2618,7 @@ static HRESULT less_eval(exec_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcept } if(V_VT(&l) == VT_BSTR && V_VT(&r) == VT_BSTR) { - *ret = strcmpW(V_BSTR(&l), V_BSTR(&r)) < 0; + *ret = (strcmpW(V_BSTR(&l), V_BSTR(&r)) < 0) ^ greater; SysFreeString(V_BSTR(&l)); SysFreeString(V_BSTR(&r)); return S_OK; @@ -2629,10 +2632,14 @@ static HRESULT less_eval(exec_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcept if(FAILED(hres)) return hres; - if(V_VT(&ln) == VT_I4 && V_VT(&rn) == VT_I4) - *ret = V_I4(&ln) < V_I4(&rn); - else - *ret = num_val(&ln) < num_val(&rn); + if(V_VT(&ln) == VT_I4 && V_VT(&rn) == VT_I4) { + *ret = (V_I4(&ln) < V_I4(&rn)) ^ greater; + }else { + DOUBLE ld = num_val(&ln); + DOUBLE rd = num_val(&rn); + + *ret = !isnan(ld) && !isnan(rd) && ((ld < rd) ^ greater); + } return S_OK; } @@ -2651,7 +2658,7 @@ HRESULT less_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, if(FAILED(hres)) return hres; - hres = less_eval(ctx, &lval, &rval, ei, &b); + hres = less_eval(ctx, &lval, &rval, FALSE, ei, &b); VariantClear(&lval); VariantClear(&rval); if(FAILED(hres)) @@ -2674,13 +2681,13 @@ HRESULT lesseq_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags if(FAILED(hres)) return hres; - hres = less_eval(ctx, &rval, &lval, ei, &b); + hres = less_eval(ctx, &rval, &lval, TRUE, ei, &b); VariantClear(&lval); VariantClear(&rval); if(FAILED(hres)) return hres; - return return_bool(ret, !b); + return return_bool(ret, b); } /* ECMA-262 3rd Edition 11.8.2 */ @@ -2697,7 +2704,7 @@ HRESULT greater_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flag if(FAILED(hres)) return hres; - hres = less_eval(ctx, &rval, &lval, ei, &b); + hres = less_eval(ctx, &rval, &lval, FALSE, ei, &b); VariantClear(&lval); VariantClear(&rval); if(FAILED(hres)) @@ -2720,13 +2727,13 @@ HRESULT greatereq_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD fl if(FAILED(hres)) return hres; - hres = less_eval(ctx, &lval, &rval, ei, &b); + hres = less_eval(ctx, &lval, &rval, TRUE, ei, &b); VariantClear(&lval); VariantClear(&rval); if(FAILED(hres)) return hres; - return return_bool(ret, !b); + return return_bool(ret, b); } /* ECMA-262 3rd Edition 11.4.8 */ diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 432bf00436f..ae9cc5bf16d 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -16,6 +16,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + +#include + #include "jscript.h" #include "engine.h" @@ -103,15 +108,37 @@ static HRESULT constructor_call(DispatchEx *constr, LCID lcid, WORD flags, DISPP static HRESULT JSGlobal_NaN(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + switch(flags) { + case DISPATCH_PROPERTYGET: + num_set_nan(retv); + break; + + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; } static HRESULT JSGlobal_Infinity(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + + switch(flags) { + case DISPATCH_PROPERTYGET: + num_set_inf(retv, TRUE); + break; + + default: + FIXME("unimplemented flags %x\n", flags); + return E_NOTIMPL; + } + + return S_OK; } static HRESULT JSGlobal_Array(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, @@ -252,15 +279,54 @@ static HRESULT JSGlobal_eval(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA static HRESULT JSGlobal_isNaN(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + VARIANT_BOOL ret = VARIANT_FALSE; + VARIANT num; + HRESULT hres; + + TRACE("\n"); + + if(arg_cnt(dp)) { + hres = to_number(dispex->ctx, get_arg(dp,0), ei, &num); + if(FAILED(hres)) + return hres; + + if(V_VT(&num) == VT_R8 && isnan(V_R8(&num))) + ret = VARIANT_TRUE; + }else { + ret = VARIANT_TRUE; + } + + if(retv) { + V_VT(retv) = VT_BOOL; + V_BOOL(retv) = ret; + } + return S_OK; } static HRESULT JSGlobal_isFinite(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + VARIANT_BOOL ret = VARIANT_FALSE; + HRESULT hres; + + TRACE("\n"); + + if(arg_cnt(dp)) { + VARIANT num; + + hres = to_number(dispex->ctx, get_arg(dp,0), ei, &num); + if(FAILED(hres)) + return hres; + + if(V_VT(&num) != VT_R8 || (!isinf(V_R8(&num)) && !isnan(V_R8(&num)))) + ret = VARIANT_TRUE; + } + + if(retv) { + V_VT(retv) = VT_BOOL; + V_BOOL(retv) = ret; + } + return S_OK; } static INT char_to_int(WCHAR c) diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 41fb40f6c30..081f468605c 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -306,23 +306,24 @@ static HRESULT WINAPI JScript_Close(IActiveScript *iface) clear_script_queue(This); - if(This->ctx->named_items) { - named_item_t *iter, *iter2; + if(This->ctx) { + if(This->ctx->named_items) { + named_item_t *iter, *iter2; - iter = This->ctx->named_items; - while(iter) { - iter2 = iter->next; + iter = This->ctx->named_items; + while(iter) { + iter2 = iter->next; - IDispatch_Release(iter->disp); - heap_free(iter); - iter = iter2; - } + IDispatch_Release(iter->disp); + heap_free(iter); + iter = iter2; + } - This->ctx->named_items = NULL; - } + This->ctx->named_items = NULL; + } - if(This->ctx) { - change_state(This, SCRIPTSTATE_CLOSED); + if (This->site) + change_state(This, SCRIPTSTATE_CLOSED); if(This->ctx->script_disp) { IDispatchEx_Release(_IDispatchEx_(This->ctx->script_disp)); diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 691ac9ef902..59e23535374 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -242,6 +242,28 @@ static inline void num_set_val(VARIANT *v, DOUBLE d) } } +static inline void num_set_nan(VARIANT *v) +{ + V_VT(v) = VT_R8; +#ifdef NAN + V_R8(v) = NAN; +#else + V_UI8(v) = (ULONGLONG)0x7ff80000<<32; +#endif +} + +static inline void num_set_inf(VARIANT *v, BOOL positive) +{ + V_VT(v) = VT_R8; +#ifdef INFINITY + V_R8(v) = positive ? INFINITY : -INFINITY; +#else + V_UI8(v) = (ULONGLONG)0x7ff00000<<32; + if(!positive) + V_R8(v) = -V_R8(v); +#endif +} + const char *debugstr_variant(const VARIANT*); HRESULT WINAPI JScriptFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**); diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index c6f4b9c934a..defddd4b0cd 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + #include #include "jscript.h" @@ -243,26 +246,26 @@ static HRESULT str_to_number(BSTR str, VARIANT *ret) while(isspaceW(*ptr)) ptr++; + if(*ptr == '-') { + neg = TRUE; + ptr++; + }else if(*ptr == '+') { + ptr++; + } + if(!strncmpW(ptr, infinityW, sizeof(infinityW)/sizeof(WCHAR))) { ptr += sizeof(infinityW)/sizeof(WCHAR); while(*ptr && isspaceW(*ptr)) ptr++; - if(*ptr) { - FIXME("NaN\n"); - return E_NOTIMPL; - } - - FIXME("inf\n"); - return E_NOTIMPL; + if(*ptr) + num_set_nan(ret); + else + num_set_inf(ret, !neg); + return S_OK; } - if(*ptr == '-') { - neg = TRUE; - ptr++; - }else if(*ptr == '+') { - ptr++; - }else if(*ptr == '0' && ptr[1] == 'x') { + if(*ptr == '0' && ptr[1] == 'x') { DWORD l = 0; ptr += 2; @@ -310,8 +313,8 @@ static HRESULT str_to_number(BSTR str, VARIANT *ret) ptr++; if(*ptr) { - FIXME("NaN\n"); - return E_NOTIMPL; + num_set_nan(ret); + return S_OK; } if(neg) @@ -325,6 +328,9 @@ static HRESULT str_to_number(BSTR str, VARIANT *ret) HRESULT to_number(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, VARIANT *ret) { switch(V_VT(v)) { + case VT_EMPTY: + num_set_nan(ret); + break; case VT_NULL: V_VT(ret) = VT_I4; V_I4(ret) = 0; diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c index e0e88e4ca27..1d37de5a531 100644 --- a/dlls/jscript/math.c +++ b/dlls/jscript/math.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + #include #include "jscript.h" @@ -118,8 +121,9 @@ static HRESULT Math_abs(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d TRACE("\n"); if(!arg_cnt(dp)) { - FIXME("arg_cnt = 0\n"); - return E_NOTIMPL; + if(retv) + num_set_nan(retv); + return S_OK; } hres = to_number(dispex->ctx, get_arg(dp, 0), ei, &v); @@ -222,11 +226,10 @@ static HRESULT Math_max(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d TRACE("\n"); - /* FIXME: Handle NaN */ - if(!arg_cnt(dp)) { - FIXME("arg_cnt = 0\n"); - return E_NOTIMPL; + if(retv) + num_set_inf(retv, FALSE); + return S_OK; } hres = to_number(dispex->ctx, get_arg(dp, 0), ei, &v); @@ -240,7 +243,7 @@ static HRESULT Math_max(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d return hres; d = num_val(&v); - if(d > max) + if(d > max || isnan(d)) max = d; } @@ -260,11 +263,10 @@ static HRESULT Math_min(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d TRACE("\n"); - /* FIXME: Handle NaN */ - if(!arg_cnt(dp)) { - FIXME("arg_cnt = 0\n"); - return E_NOTIMPL; + if(retv) + num_set_inf(retv, TRUE); + return S_OK; } hres = to_number(dispex->ctx, get_arg(dp, 0), ei, &v); @@ -278,7 +280,7 @@ static HRESULT Math_min(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d return hres; d = num_val(&v); - if(d < min) + if(d < min || isnan(d)) min = d; } diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 8f010285a12..af3d35de5e0 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -253,6 +253,9 @@ static source_elements_t *source_elements_add_function(source_elements_t*,functi %type BooleanLiteral %type KFunction +%nonassoc LOWER_THAN_ELSE +%nonassoc kELSE + %% /* ECMA-262 3rd Edition 14 */ @@ -389,7 +392,7 @@ ExpressionStatement IfStatement : kIF '(' Expression ')' Statement kELSE Statement { $$ = new_if_statement(ctx, $3, $5, $7); } - | kIF '(' Expression ')' Statement + | kIF '(' Expression ')' Statement %prec LOWER_THAN_ELSE { $$ = new_if_statement(ctx, $3, $5, NULL); } /* ECMA-262 3rd Edition 12.6 */ @@ -739,7 +742,7 @@ PrimaryExpression /* ECMA-262 3rd Edition 11.1.4 */ ArrayLiteral : '[' ']' { $$ = new_array_literal_expression(ctx, NULL, 0); } - | '[' Elision_opt ']' { $$ = new_array_literal_expression(ctx, NULL, $2+1); } + | '[' Elision ']' { $$ = new_array_literal_expression(ctx, NULL, $2+1); } | '[' ElementList ']' { $$ = new_array_literal_expression(ctx, $2, 0); } | '[' ElementList ',' Elision_opt ']' { $$ = new_array_literal_expression(ctx, $2, $4+1); } diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 58847fad30a..3bb3ddf5410 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -368,6 +368,12 @@ ok(tmp === 1, "Math.min(1) = " + tmp); tmp = Math.min(1, false); ok(tmp === 0, "Math.min(1, false) = " + tmp); +tmp = Math.min(); +ok(tmp === Infinity, "Math.min() = " + tmp); + +tmp = Math.min(1, NaN, -Infinity, false); +ok(isNaN(tmp), "Math.min(1, NaN, -Infinity, false) is not NaN"); + tmp = Math.min(1, false, true, null, -3); ok(tmp === -3, "Math.min(1, false, true, null, -3) = " + tmp); @@ -380,6 +386,12 @@ ok(tmp === 1, "Math.max(true, 0) = " + tmp); tmp = Math.max(-2, false, true, null, 1); ok(tmp === 1, "Math.max(-2, false, true, null, 1) = " + tmp); +tmp = Math.max(); +ok(tmp === -Infinity, "Math.max() = " + tmp); + +tmp = Math.max(true, NaN, 0); +ok(isNaN(tmp), "Math.max(true, NaN, 0) is not NaN"); + tmp = Math.round(0.5); ok(tmp === 1, "Math.round(0.5) = " + tmp); @@ -419,6 +431,15 @@ ok(tmp === 3, "Math.abs(-3) = " + tmp); tmp = Math.abs(true); ok(tmp === 1, "Math.abs(true) = " + tmp); +tmp = Math.abs(); +ok(isNaN(tmp), "Math.abs() is not NaN"); + +tmp = Math.abs(NaN); +ok(isNaN(tmp), "Math.abs() is not NaN"); + +tmp = Math.abs(-Infinity); +ok(tmp === Infinity, "Math.abs(-Infinite) = " + tmp); + tmp = Math.abs(-3, 2); ok(tmp === 3, "Math.abs(-3, 2) = " + tmp); @@ -449,4 +470,10 @@ ok(testFuncToString.toString() === "function testFuncToString(x,y) {\n return ok("" + testFuncToString === "function testFuncToString(x,y) {\n return x+y;\n}", "'' + testFuncToString = " + testFuncToString); +var date = new Date(); + +date = new Date(100); +ok(date.getTime() === 100, "date.getTime() = " + date.getTime()); +ok(Date.prototype.getTime() === 0, "date.prototype.getTime() = " + Date.prototype.getTime()); + reportSuccess(); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 720c1660546..71dd2aae3d3 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -773,4 +773,63 @@ try { ok(false, "deleteTest not throwed exception?"); }catch(ex) {} +if (false) + if (true) + ok(false, "if evaluated"); + else + ok(false, "else should be associated with nearest if statement"); + +if (true) + if (false) + ok(false, "if evaluated"); + else + ok(true, "else should be associated with nearest if statement"); + +ok(isNaN(NaN) === true, "isNaN(NaN) !== true"); +ok(isNaN(0.5) === false, "isNaN(0.5) !== false"); +ok(isNaN(Infinity) === false, "isNaN(Infinity) !== false"); +ok(isNaN() === true, "isNaN() !== true"); +ok(isNaN(NaN, 0) === true, "isNaN(NaN, 0) !== true"); +ok(isNaN(0.5, NaN) === false, "isNaN(0.5, NaN) !== false"); +ok(isNaN(+undefined) === true, "isNaN(+undefined) !== true"); + +ok(isFinite(0.5) === true, "isFinite(0.5) !== true"); +ok(isFinite(Infinity) === false, "isFinite(Infinity) !== fals"); +ok(isFinite(-Infinity) === false, "isFinite(Infinity) !== fals"); +ok(isFinite(NaN) === false, "isFinite(NaN) !== false"); +ok(isFinite(0.5, NaN) === true, "isFinite(0.5, NaN) !== true"); +ok(isFinite(NaN, 0.5) === false, "isFinite(NaN, 0.5) !== false"); +ok(isFinite() === false, "isFinite() !== false"); + +ok((1 < NaN) === false, "(1 < NaN) !== false"); +ok((1 > NaN) === false, "(1 > NaN) !== false"); +ok((1 <= NaN) === false, "(1 <= NaN) !== false"); +ok((1 >= NaN) === false, "(1 >= NaN) !== false"); +ok((NaN < 1) === false, "(NaN < 1) !== false"); +ok((NaN > 1) === false, "(NaN > 1) !== false"); +ok((NaN <= 1) === false, "(NaN <= 1) !== false"); +ok((NaN >= 1) === false, "(NaN >= 1) !== false"); +ok((Infinity < 2) === false, "(Infinity < 2) !== false"); +ok((Infinity > 2) === true, "(Infinity > 2) !== true"); +ok((-Infinity < 2) === true, "(-Infinity < 2) !== true"); + +ok(isNaN(+"test") === true, "isNaN(+'test') !== true"); +ok(isNaN(+"123t") === true, "isNaN(+'123t') !== true"); +ok(isNaN(+"Infinity x") === true, "isNaN(+'Infinity x') !== true"); +ok(+"Infinity" === Infinity, "+'Infinity' !== Infinity"); +ok(+" Infinity " === Infinity, "+' Infinity ' !== Infinity"); +ok(+"-Infinity" === -Infinity, "+'-Infinity' !== -Infinity"); + +ok((NaN !== NaN) === true, "(NaN !== NaN) !== true"); +ok((NaN === NaN) === false, "(NaN === NaN) !== false"); +ok((Infinity !== NaN) === true, "(Infinity !== NaN) !== true"); +ok((Infinity !== NaN) === true, "(Infinity !== NaN) !== true"); +ok((0 === NaN) === false, "(0 === NaN) !== false"); + +ok((NaN != NaN) === true, "(NaN !== NaN) != true"); +ok((NaN == NaN) === false, "(NaN === NaN) != false"); +ok((Infinity != NaN) === true, "(Infinity != NaN) !== true"); +ok((Infinity != NaN) === true, "(Infinity != NaN) !== true"); +ok((0 == NaN) === false, "(0 === NaN) != false"); + reportSuccess(); diff --git a/dlls/kernel32/lzexpand.c b/dlls/kernel32/lzexpand.c index 0b81bf84c0a..97459958e1c 100644 --- a/dlls/kernel32/lzexpand.c +++ b/dlls/kernel32/lzexpand.c @@ -181,8 +181,7 @@ HFILE WINAPI LZInit( HFILE hfSrc ) struct lzfileheader head; struct lzstate *lzs; - DWORD ret; - int i; + int i, ret; TRACE("(%d)\n",hfSrc); ret=read_header(hfSrc,&head); diff --git a/dlls/kernel32/nls/div.nls b/dlls/kernel32/nls/div.nls dissimilarity index 85% index 2383d4004a3..0d3886a1fff 100644 --- a/dlls/kernel32/nls/div.nls +++ b/dlls/kernel32/nls/div.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Divehi - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_DIVEHI, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8000\x3808\x0000\x0100\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"6" - LOCALE_ICENTURY L"0" - LOCALE_ICOUNTRY L"960" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"3" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"960" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0465" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"6" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0465" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"10" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"0" - LOCALE_IOPTIONALCALENDAR L"6" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"0" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"0" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0789\x0786" - LOCALE_S2359 L"\x0789\x078a" - LOCALE_SABBREVCTRYNAME L"MDV" - LOCALE_SABBREVDAYNAME1 L"\x0780\x07af\x0789\x07a6" - LOCALE_SABBREVDAYNAME2 L"\x0787\x07a6\x0782\x07b0\x078e\x07a7\x0783\x07a6" - LOCALE_SABBREVDAYNAME3 L"\x0784\x07aa\x078b\x07a6" - LOCALE_SABBREVDAYNAME4 L"\x0784\x07aa\x0783\x07a7\x0790\x07b0\x078a\x07a6\x078c\x07a8" - LOCALE_SABBREVDAYNAME5 L"\x0780\x07aa\x0786\x07aa\x0783\x07aa" - LOCALE_SABBREVDAYNAME6 L"\x0780\x07ae\x0782\x07a8\x0780\x07a8\x0783\x07aa" - LOCALE_SABBREVDAYNAME7 L"\x0787\x07a7\x078b\x07a9\x0787\x07b0\x078c\x07a6" - LOCALE_SABBREVLANGNAME L"DIV" - LOCALE_SABBREVMONTHNAME1 L"\x0796\x07ac\x0782\x07aa\x0787\x07a6\x0783\x07a9" - LOCALE_SABBREVMONTHNAME2 L"\x078a\x07ac\x0784\x07aa\x0783\x07aa\x0787\x07a6\x0783\x07a9" - LOCALE_SABBREVMONTHNAME3 L"\x0789\x07a7\x0797\x07b0" - LOCALE_SABBREVMONTHNAME4 L"\x0787\x07ac\x0795\x07b0\x0783\x07a8\x078d\x07b0" - LOCALE_SABBREVMONTHNAME5 L"\x0789\x07ad\x0787\x07a8" - LOCALE_SABBREVMONTHNAME6 L"\x0796\x07ab\x0782\x07b0" - LOCALE_SABBREVMONTHNAME7 L"\x0796\x07ab\x078d\x07a7\x0787\x07a8" - LOCALE_SABBREVMONTHNAME8 L"\x0787\x07af\x078e\x07a6\x0790\x07b0\x0793\x07b0" - LOCALE_SABBREVMONTHNAME9 L"\x0790\x07ac\x0795\x07b0\x0793\x07ac\x0789\x07b0\x0784\x07a6\x0783\x07aa" - LOCALE_SABBREVMONTHNAME10 L"\x0787\x07ae\x0786\x07b0\x0793\x07af\x0784\x07a6\x0783\x07aa" - LOCALE_SABBREVMONTHNAME11 L"\x0782\x07ae\x0788\x07ac\x0789\x07b0\x0784\x07a6\x0783\x07aa" - LOCALE_SABBREVMONTHNAME12 L"\x0791\x07a8\x0790\x07ac\x0789\x07b0\x0784\x07a6\x0783\x07aa" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"Maldives" - LOCALE_SCURRENCY L"\x0783." - LOCALE_SDATE L"/" - LOCALE_SDAYNAME1 L"\x0780\x07af\x0789\x07a6\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDAYNAME2 L"\x0787\x07a6\x0782\x07b0\x078e\x07a7\x0783\x07a6\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDAYNAME3 L"\x0784\x07aa\x078b\x07a6\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDAYNAME4 L"\x0784\x07aa\x0783\x07a7\x0790\x07b0\x078a\x07a6\x078c\x07a8\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDAYNAME5 L"\x0780\x07aa\x0786\x07aa\x0783\x07aa\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDAYNAME6 L"\x0780\x07ae\x0782\x07a8\x0780\x07a8\x0783\x07aa\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDAYNAME7 L"\x0787\x07a7\x078b\x07a9\x0787\x07b0\x078c\x07a6\x078b\x07aa\x0788\x07a6\x0790\x07b0" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"Maldives" - LOCALE_SENGCURRNAME L"Rufiyaa" - LOCALE_SENGLANGUAGE L"Divehi" - LOCALE_SGROUPING L"3;0" - LOCALE_SINTLSYMBOL L"MVR" - LOCALE_SISO3166CTRYNAME L"MV" - LOCALE_SISO639LANGNAME L"dv" - LOCALE_SLANGUAGE L"Divehi" - LOCALE_SLIST L"\x060c" - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;0" - LOCALE_SMONTHNAME1 L"\x0796\x07ac\x0782\x07aa\x0787\x07a6\x0783\x07a9" - LOCALE_SMONTHNAME2 L"\x078a\x07ac\x0784\x07aa\x0783\x07aa\x0787\x07a6\x0783\x07a9" - LOCALE_SMONTHNAME3 L"\x0789\x07a7\x0797\x07b0" - LOCALE_SMONTHNAME4 L"\x0787\x07ac\x0795\x07b0\x0783\x07a8\x078d\x07b0" - LOCALE_SMONTHNAME5 L"\x0789\x07ad\x0787\x07a8" - LOCALE_SMONTHNAME6 L"\x0796\x07ab\x0782\x07b0" - LOCALE_SMONTHNAME7 L"\x0796\x07ab\x078d\x07a7\x0787\x07a8" - LOCALE_SMONTHNAME8 L"\x0787\x07af\x078e\x07a6\x0790\x07b0\x0793\x07b0" - LOCALE_SMONTHNAME9 L"\x0790\x07ac\x0795\x07b0\x0793\x07ac\x0789\x07b0\x0784\x07a6\x0783\x07aa" - LOCALE_SMONTHNAME10 L"\x0787\x07ae\x0786\x07b0\x0793\x07af\x0784\x07a6\x0783\x07aa" - LOCALE_SMONTHNAME11 L"\x0782\x07ae\x0788\x07ac\x0789\x07b0\x0784\x07a6\x0783\x07aa" - LOCALE_SMONTHNAME12 L"\x0791\x07a8\x0790\x07ac\x0789\x07b0\x0784\x07a6\x0783\x07aa" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"dv-MV" - LOCALE_SNATIVECTRYNAME L"\x078b\x07a8\x0788\x07ac\x0780\x07a8 \x0783\x07a7\x0787\x07b0\x0796\x07ac" - LOCALE_SNATIVECURRNAME L"\x0783\x07aa\x078a\x07a8\x0794\x07a7" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"\x078b\x07a8\x0788\x07ac\x0780\x07a8\x0784\x07a6\x0790\x07b0" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Thaa;" - LOCALE_SSHORTDATE L"dd/MM/yy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Divehi + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_DIVEHI, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8000\x3808\x0000\x0100\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "6" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "960" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "3" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "960" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0465" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "6" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0465" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "10" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "0" + LOCALE_IOPTIONALCALENDAR "6" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "0" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "1" + LOCALE_S1159 "މކ" + LOCALE_S2359 "މފ" + LOCALE_SABBREVCTRYNAME "MDV" + LOCALE_SABBREVDAYNAME1 "ހޯމަ" + LOCALE_SABBREVDAYNAME2 "އަންގާރަ" + LOCALE_SABBREVDAYNAME3 "ބުދަ" + LOCALE_SABBREVDAYNAME4 "ބުރާސްފަތި" + LOCALE_SABBREVDAYNAME5 "ހުކުރު" + LOCALE_SABBREVDAYNAME6 "ހޮނިހިރު" + LOCALE_SABBREVDAYNAME7 "އާދީއްތަ" + LOCALE_SABBREVLANGNAME "DIV" + LOCALE_SABBREVMONTHNAME1 "ޖެނުއަރީ" + LOCALE_SABBREVMONTHNAME2 "ފެބުރުއަރީ" + LOCALE_SABBREVMONTHNAME3 "މާޗް" + LOCALE_SABBREVMONTHNAME4 "އެޕްރިލް" + LOCALE_SABBREVMONTHNAME5 "މޭއި" + LOCALE_SABBREVMONTHNAME6 "ޖޫން" + LOCALE_SABBREVMONTHNAME7 "ޖޫލާއި" + LOCALE_SABBREVMONTHNAME8 "އޯގަސްޓް" + LOCALE_SABBREVMONTHNAME9 "ސެޕްޓެމްބަރު" + LOCALE_SABBREVMONTHNAME10 "އޮކްޓޯބަރު" + LOCALE_SABBREVMONTHNAME11 "ނޮވެމްބަރު" + LOCALE_SABBREVMONTHNAME12 "ޑިސެމްބަރު" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "Maldives" + LOCALE_SCURRENCY "ރ." + LOCALE_SDATE "/" + LOCALE_SDAYNAME1 "ހޯމަދުވަސް" + LOCALE_SDAYNAME2 "އަންގާރަދުވަސް" + LOCALE_SDAYNAME3 "ބުދަދުވަސް" + LOCALE_SDAYNAME4 "ބުރާސްފަތިދުވަސް" + LOCALE_SDAYNAME5 "ހުކުރުދުވަސް" + LOCALE_SDAYNAME6 "ހޮނިހިރުދުވަސް" + LOCALE_SDAYNAME7 "އާދީއްތަދުވަސް" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "Maldives" + LOCALE_SENGCURRNAME "Rufiyaa" + LOCALE_SENGLANGUAGE "Divehi" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "MVR" + LOCALE_SISO3166CTRYNAME "MV" + LOCALE_SISO639LANGNAME "dv" + LOCALE_SLANGUAGE "Divehi" + LOCALE_SLIST "،" + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHNAME1 "ޖެނުއަރީ" + LOCALE_SMONTHNAME2 "ފެބުރުއަރީ" + LOCALE_SMONTHNAME3 "މާޗް" + LOCALE_SMONTHNAME4 "އެޕްރިލް" + LOCALE_SMONTHNAME5 "މޭއި" + LOCALE_SMONTHNAME6 "ޖޫން" + LOCALE_SMONTHNAME7 "ޖޫލާއި" + LOCALE_SMONTHNAME8 "އޯގަސްޓް" + LOCALE_SMONTHNAME9 "ސެޕްޓެމްބަރު" + LOCALE_SMONTHNAME10 "އޮކްޓޯބަރު" + LOCALE_SMONTHNAME11 "ނޮވެމްބަރު" + LOCALE_SMONTHNAME12 "ޑިސެމްބަރު" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "dv-MV" + LOCALE_SNATIVECTRYNAME "ދިވެހި ރާއްޖެ" + LOCALE_SNATIVECURRNAME "ރުފިޔާ" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "ދިވެހިބަސް" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Thaa;" + LOCALE_SSHORTDATE "dd/MM/yy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/eox.nls b/dlls/kernel32/nls/eox.nls dissimilarity index 71% index f02cd093557..6a6b87f3f4a 100644 --- a/dlls/kernel32/nls/eox.nls +++ b/dlls/kernel32/nls/eox.nls @@ -1,172 +1,172 @@ -/* - * Locale definitions for Esperanto - * - * Esperanto seems not to be supported by Windows - * - * TODO: MS numerical ID for language ? - * - * I choose 0x8f for esperanto language as it is high enough - * not to be attributed to another language in the immediate - * future (as of 19980901 the last official languageID is 0x51) - * - * No Windows 125[0-8] codepage has the c^ g^ h^ j^ s^ used by esperanto. - * And for DOS codepage ? - * - * ISO 2 letter code for esperanto is "eo" but as Windows use - * three letter codes I added an "x" to the end. - * - * Copyright 1998 Marcel Baur - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT -{ - /* FIXME: .NET 2.0 requires a font signature - English (US) signature added */ - LOCALE_FONTSIGNATURE L"\x00af\x8000\x38cb\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x8000\x01ff\x003f\x8000\xffff" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"0" - LOCALE_ICOUNTRY L"0" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"3" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"0" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"048f" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"048f" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"0" - LOCALE_INEGCURR L"8" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"1" - LOCALE_INEGSYMPRECEDES L"0" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"1" - LOCALE_IPOSSYMPRECEDES L"0" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"0" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"" - LOCALE_S2359 L"" - LOCALE_SABBREVCTRYNAME L"" - LOCALE_SABBREVDAYNAME1 L"lu" - LOCALE_SABBREVDAYNAME2 L"ma" - LOCALE_SABBREVDAYNAME3 L"me" - LOCALE_SABBREVDAYNAME4 L"\x00bca" - LOCALE_SABBREVDAYNAME5 L"ve" - LOCALE_SABBREVDAYNAME6 L"sa" - LOCALE_SABBREVDAYNAME7 L"di" - LOCALE_SABBREVLANGNAME L"EOX" - LOCALE_SABBREVMONTHNAME1 L"jan" - LOCALE_SABBREVMONTHNAME2 L"feb" - LOCALE_SABBREVMONTHNAME3 L"mar" - LOCALE_SABBREVMONTHNAME4 L"apr" - LOCALE_SABBREVMONTHNAME5 L"maj" - LOCALE_SABBREVMONTHNAME6 L"jun" - LOCALE_SABBREVMONTHNAME7 L"jul" - LOCALE_SABBREVMONTHNAME8 L"a\x00fdg" - LOCALE_SABBREVMONTHNAME9 L"sep" - LOCALE_SABBREVMONTHNAME10 L"okt" - LOCALE_SABBREVMONTHNAME11 L"nov" - LOCALE_SABBREVMONTHNAME12 L"dec" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"" - LOCALE_SCURRENCY L"\x00a4" - LOCALE_SDATE L"." - LOCALE_SDAYNAME1 L"lundo" - LOCALE_SDAYNAME2 L"mardo" - LOCALE_SDAYNAME3 L"merkredo" - LOCALE_SDAYNAME4 L"\x00bca\x00fddo" - LOCALE_SDAYNAME5 L"vendredo" - LOCALE_SDAYNAME6 L"sabato" - LOCALE_SDAYNAME7 L"diman\x00e6o" - LOCALE_SDECIMAL L"," - LOCALE_SENGCOUNTRY L"" - LOCALE_SENGCURRNAME L"Euro" - LOCALE_SENGLANGUAGE L"Esperanto" - LOCALE_SGROUPING L"3;0" - LOCALE_SINTLSYMBOL L"EUR" - LOCALE_SISO3166CTRYNAME L"" - LOCALE_SISO639LANGNAME L"eo" - LOCALE_SLANGUAGE L"Esperanto" - LOCALE_SLIST L";" - LOCALE_SLONGDATE L"ddd, d. MMMM yyyy" - LOCALE_SMONDECIMALSEP L"," - LOCALE_SMONGROUPING L"3;0" - LOCALE_SMONTHNAME1 L"januaro" - LOCALE_SMONTHNAME2 L"februaro" - LOCALE_SMONTHNAME3 L"marto" - LOCALE_SMONTHNAME4 L"aprilo" - LOCALE_SMONTHNAME5 L"majo" - LOCALE_SMONTHNAME6 L"junio" - LOCALE_SMONTHNAME7 L"julio" - LOCALE_SMONTHNAME8 L"a\x00fdgusto" - LOCALE_SMONTHNAME9 L"septembro" - LOCALE_SMONTHNAME10 L"oktobro" - LOCALE_SMONTHNAME11 L"novembro" - LOCALE_SMONTHNAME12 L"decembro" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"." - LOCALE_SNAME L"eo" - LOCALE_SNATIVECTRYNAME L"" - LOCALE_SNATIVECURRNAME L"Euro" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"Esperanto" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Latn;" - LOCALE_SSHORTDATE L"yyyy-mm-dd" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"." - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Esperanto + * + * Esperanto seems not to be supported by Windows + * + * TODO: MS numerical ID for language ? + * + * I choose 0x8f for esperanto language as it is high enough + * not to be attributed to another language in the immediate + * future (as of 19980901 the last official languageID is 0x51) + * + * No Windows 125[0-8] codepage has the c^ g^ h^ j^ s^ used by esperanto. + * And for DOS codepage ? + * + * ISO 2 letter code for esperanto is "eo" but as Windows use + * three letter codes I added an "x" to the end. + * + * Copyright 1998 Marcel Baur + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT +{ + /* FIXME: .NET 2.0 requires a font signature - English (US) signature added */ + LOCALE_FONTSIGNATURE L"\x00af\x8000\x38cb\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x8000\x01ff\x003f\x8000\xffff" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "0" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "3" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "0" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "048f" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "048f" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "0" + LOCALE_INEGCURR "8" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "1" + LOCALE_INEGSYMPRECEDES "0" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "1" + LOCALE_IPOSSYMPRECEDES "0" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "1" + LOCALE_S1159 "" + LOCALE_S2359 "" + LOCALE_SABBREVCTRYNAME "" + LOCALE_SABBREVDAYNAME1 "lu" + LOCALE_SABBREVDAYNAME2 "ma" + LOCALE_SABBREVDAYNAME3 "me" + LOCALE_SABBREVDAYNAME4 "¼a" + LOCALE_SABBREVDAYNAME5 "ve" + LOCALE_SABBREVDAYNAME6 "sa" + LOCALE_SABBREVDAYNAME7 "di" + LOCALE_SABBREVLANGNAME "EOX" + LOCALE_SABBREVMONTHNAME1 "jan" + LOCALE_SABBREVMONTHNAME2 "feb" + LOCALE_SABBREVMONTHNAME3 "mar" + LOCALE_SABBREVMONTHNAME4 "apr" + LOCALE_SABBREVMONTHNAME5 "maj" + LOCALE_SABBREVMONTHNAME6 "jun" + LOCALE_SABBREVMONTHNAME7 "jul" + LOCALE_SABBREVMONTHNAME8 "aýg" + LOCALE_SABBREVMONTHNAME9 "sep" + LOCALE_SABBREVMONTHNAME10 "okt" + LOCALE_SABBREVMONTHNAME11 "nov" + LOCALE_SABBREVMONTHNAME12 "dec" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "" + LOCALE_SCURRENCY "¤" + LOCALE_SDATE "." + LOCALE_SDAYNAME1 "lundo" + LOCALE_SDAYNAME2 "mardo" + LOCALE_SDAYNAME3 "merkredo" + LOCALE_SDAYNAME4 "¼aýdo" + LOCALE_SDAYNAME5 "vendredo" + LOCALE_SDAYNAME6 "sabato" + LOCALE_SDAYNAME7 "dimanæo" + LOCALE_SDECIMAL "," + LOCALE_SENGCOUNTRY "" + LOCALE_SENGCURRNAME "Euro" + LOCALE_SENGLANGUAGE "Esperanto" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "EUR" + LOCALE_SISO3166CTRYNAME "" + LOCALE_SISO639LANGNAME "eo" + LOCALE_SLANGUAGE "Esperanto" + LOCALE_SLIST ";" + LOCALE_SLONGDATE "ddd, d. MMMM yyyy" + LOCALE_SMONDECIMALSEP "," + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHNAME1 "januaro" + LOCALE_SMONTHNAME2 "februaro" + LOCALE_SMONTHNAME3 "marto" + LOCALE_SMONTHNAME4 "aprilo" + LOCALE_SMONTHNAME5 "majo" + LOCALE_SMONTHNAME6 "junio" + LOCALE_SMONTHNAME7 "julio" + LOCALE_SMONTHNAME8 "aýgusto" + LOCALE_SMONTHNAME9 "septembro" + LOCALE_SMONTHNAME10 "oktobro" + LOCALE_SMONTHNAME11 "novembro" + LOCALE_SMONTHNAME12 "decembro" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "." + LOCALE_SNAME "eo" + LOCALE_SNATIVECTRYNAME "" + LOCALE_SNATIVECURRNAME "Euro" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "Esperanto" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Latn;" + LOCALE_SSHORTDATE "yyyy-mm-dd" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "." + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/guj.nls b/dlls/kernel32/nls/guj.nls dissimilarity index 84% index 92c7ac6ed83..0c757c3b86b 100644 --- a/dlls/kernel32/nls/guj.nls +++ b/dlls/kernel32/nls/guj.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Gujarati - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_GUJARATI, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8004\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"0" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0447" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0447" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0aaa\x0ac2\x0ab0\x0acd\x0ab5\x00a0\x0aae\x0aa7\x0acd\x0aaf\x0abe\x0ab9\x0acd\x0aa8" - LOCALE_S2359 L"\x0a89\x0aa4\x0acd\x0aa4\x0ab0\x00a0\x0aae\x0aa7\x0acd\x0aaf\x0abe\x0ab9\x0acd\x0aa8" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0ab8\x0acb\x0aae" - LOCALE_SABBREVDAYNAME2 L"\x0aae\x0a82\x0a97\x0ab3" - LOCALE_SABBREVDAYNAME3 L"\x0aac\x0ac1\x0aa7" - LOCALE_SABBREVDAYNAME4 L"\x0a97\x0ac1\x0ab0\x0ac1" - LOCALE_SABBREVDAYNAME5 L"\x0ab6\x0ac1\x0a95\x0acd\x0ab0" - LOCALE_SABBREVDAYNAME6 L"\x0ab6\x0aa8\x0abf" - LOCALE_SABBREVDAYNAME7 L"\x0ab0\x0ab5\x0abf" - LOCALE_SABBREVLANGNAME L"GUJ" - LOCALE_SABBREVMONTHNAME1 L"\x0a9c\x0abe\x0aa8\x0acd\x0aaf\x0ac1" - LOCALE_SABBREVMONTHNAME2 L"\x0aab\x0ac7\x0aac\x0acd\x0ab0\x0ac1" - LOCALE_SABBREVMONTHNAME3 L"\x0aae\x0abe\x0ab0\x0acd\x0a9a" - LOCALE_SABBREVMONTHNAME4 L"\x0a8f\x0aaa\x0acd\x0ab0\x0abf\x0ab2" - LOCALE_SABBREVMONTHNAME5 L"\x0aae\x0ac7" - LOCALE_SABBREVMONTHNAME6 L"\x0a9c\x0ac2\x0aa8" - LOCALE_SABBREVMONTHNAME7 L"\x0a9c\x0ac1\x0ab2\x0abe\x0a88" - LOCALE_SABBREVMONTHNAME8 L"\x0a91\x0a97\x0ab8\x0acd\x0a9f" - LOCALE_SABBREVMONTHNAME9 L"\x0ab8\x0aaa\x0acd\x0a9f\x0ac7" - LOCALE_SABBREVMONTHNAME10 L"\x0a91\x0a95\x0acd\x0a9f\x0acb" - LOCALE_SABBREVMONTHNAME11 L"\x0aa8\x0ab5\x0ac7" - LOCALE_SABBREVMONTHNAME12 L"\x0aa1\x0abf\x0ab8\x0ac7" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0ab0\x0ac2" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0ab8\x0acb\x0aae\x0ab5\x0abe\x0ab0" - LOCALE_SDAYNAME2 L"\x0aae\x0a82\x0a97\x0ab3\x0ab5\x0abe\x0ab0" - LOCALE_SDAYNAME3 L"\x0aac\x0ac1\x0aa7\x0ab5\x0abe\x0ab0" - LOCALE_SDAYNAME4 L"\x0a97\x0ac1\x0ab0\x0ac1\x0ab5\x0abe\x0ab0" - LOCALE_SDAYNAME5 L"\x0ab6\x0ac1\x0a95\x0acd\x0ab0\x0ab5\x0abe\x0ab0" - LOCALE_SDAYNAME6 L"\x0ab6\x0aa8\x0abf\x0ab5\x0abe\x0ab0" - LOCALE_SDAYNAME7 L"\x0ab0\x0ab5\x0abf\x0ab5\x0abe\x0ab0" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Gujarati" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"gu" - LOCALE_SLANGUAGE L"Gujarati" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x0a9c\x0abe\x0aa8\x0acd\x0aaf\x0ac1\x0a86\x0ab0\x0ac0" - LOCALE_SMONTHNAME2 L"\x0aab\x0ac7\x0aac\x0acd\x0ab0\x0ac1\x0a86\x0ab0\x0ac0" - LOCALE_SMONTHNAME3 L"\x0aae\x0abe\x0ab0\x0acd\x0a9a" - LOCALE_SMONTHNAME4 L"\x0a8f\x0aaa\x0acd\x0ab0\x0abf\x0ab2" - LOCALE_SMONTHNAME5 L"\x0aae\x0ac7" - LOCALE_SMONTHNAME6 L"\x0a9c\x0ac2\x0aa8" - LOCALE_SMONTHNAME7 L"\x0a9c\x0ac1\x0ab2\x0abe\x0a88" - LOCALE_SMONTHNAME8 L"\x0a91\x0a97\x0ab8\x0acd\x0a9f" - LOCALE_SMONTHNAME9 L"\x0ab8\x0aaa\x0acd\x0a9f\x0ac7\x0aae\x0acd\x0aac\x0ab0" - LOCALE_SMONTHNAME10 L"\x0a91\x0a95\x0acd\x0a9f\x0acd\x0aac\x0ab0" - LOCALE_SMONTHNAME11 L"\x0aa8\x0ab5\x0ac7\x0aae\x0acd\x0aac\x0ab0" - LOCALE_SMONTHNAME12 L"\x0aa1\x0abf\x0ab8\x0ac7\x0aae\x0acd\x0aac\x0ab0" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"gu-IN" - LOCALE_SNATIVECTRYNAME L"\x0aad\x0abe\x0ab0\x0aa4" - LOCALE_SNATIVECURRNAME L"\x0ab0\x0ac2\x0aaa\x0abf\x0aaf\x0acb" - LOCALE_SNATIVEDIGITS L"\x0ae6\x0ae7\x0ae8\x0ae9\x0aea\x0aeb\x0aec\x0aed\x0aee\x0aef" - LOCALE_SNATIVELANGNAME L"\x0a97\x0ac1\x0a9c\x0ab0\x0abe\x0aa4\x0ac0" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Gujr;" - LOCALE_SSHORTDATE L"dd-MM-yy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Gujarati + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* Unicode only */ + +STRINGTABLE LANGUAGE LANG_GUJARATI, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8004\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0447" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0447" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "પૂર્વ મધ્યાહ્ન" + LOCALE_S2359 "ઉત્તર મધ્યાહ્ન" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "સોમ" + LOCALE_SABBREVDAYNAME2 "મંગળ" + LOCALE_SABBREVDAYNAME3 "બુધ" + LOCALE_SABBREVDAYNAME4 "ગુરુ" + LOCALE_SABBREVDAYNAME5 "શુક્ર" + LOCALE_SABBREVDAYNAME6 "શનિ" + LOCALE_SABBREVDAYNAME7 "રવિ" + LOCALE_SABBREVLANGNAME "GUJ" + LOCALE_SABBREVMONTHNAME1 "જાન્યુ" + LOCALE_SABBREVMONTHNAME2 "ફેબ્રુ" + LOCALE_SABBREVMONTHNAME3 "માર્ચ" + LOCALE_SABBREVMONTHNAME4 "એપ્રિલ" + LOCALE_SABBREVMONTHNAME5 "મે" + LOCALE_SABBREVMONTHNAME6 "જૂન" + LOCALE_SABBREVMONTHNAME7 "જુલાઈ" + LOCALE_SABBREVMONTHNAME8 "ઑગસ્ટ" + LOCALE_SABBREVMONTHNAME9 "સપ્ટે" + LOCALE_SABBREVMONTHNAME10 "ઑક્ટો" + LOCALE_SABBREVMONTHNAME11 "નવે" + LOCALE_SABBREVMONTHNAME12 "ડિસે" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "રૂ" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "સોમવાર" + LOCALE_SDAYNAME2 "મંગળવાર" + LOCALE_SDAYNAME3 "બુધવાર" + LOCALE_SDAYNAME4 "ગુરુવાર" + LOCALE_SDAYNAME5 "શુક્રવાર" + LOCALE_SDAYNAME6 "શનિવાર" + LOCALE_SDAYNAME7 "રવિવાર" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Gujarati" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "gu" + LOCALE_SLANGUAGE "Gujarati" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "જાન્યુઆરી" + LOCALE_SMONTHNAME2 "ફેબ્રુઆરી" + LOCALE_SMONTHNAME3 "માર્ચ" + LOCALE_SMONTHNAME4 "એપ્રિલ" + LOCALE_SMONTHNAME5 "મે" + LOCALE_SMONTHNAME6 "જૂન" + LOCALE_SMONTHNAME7 "જુલાઈ" + LOCALE_SMONTHNAME8 "ઑગસ્ટ" + LOCALE_SMONTHNAME9 "સપ્ટેમ્બર" + LOCALE_SMONTHNAME10 "ઑક્ટ્બર" + LOCALE_SMONTHNAME11 "નવેમ્બર" + LOCALE_SMONTHNAME12 "ડિસેમ્બર" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "gu-IN" + LOCALE_SNATIVECTRYNAME "ભારત" + LOCALE_SNATIVECURRNAME "રૂપિયો" + LOCALE_SNATIVEDIGITS "૦૧૨૩૪૫૬૭૮૯" + LOCALE_SNATIVELANGNAME "ગુજરાતી" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Gujr;" + LOCALE_SSHORTDATE "dd-MM-yy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/hin.nls b/dlls/kernel32/nls/hin.nls dissimilarity index 84% index b336b3c080f..b8893d2722c 100644 --- a/dlls/kernel32/nls/hin.nls +++ b/dlls/kernel32/nls/hin.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Hindi - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_HINDI, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0439" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0439" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x092a\x0942\x0930\x094d\x0935\x093e\x0939\x094d\x0928" - LOCALE_S2359 L"\x0905\x092a\x0930\x093e\x0939\x094d\x0928" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0938\x094b\x092e." - LOCALE_SABBREVDAYNAME2 L"\x092e\x0902\x0917\x0932." - LOCALE_SABBREVDAYNAME3 L"\x092c\x0941\x0927." - LOCALE_SABBREVDAYNAME4 L"\x0917\x0941\x0930\x0941." - LOCALE_SABBREVDAYNAME5 L"\x0936\x0941\x0915\x094d\x0930." - LOCALE_SABBREVDAYNAME6 L"\x0936\x0928\x093f." - LOCALE_SABBREVDAYNAME7 L"\x0930\x0935\x093f." - LOCALE_SABBREVLANGNAME L"HIN" - LOCALE_SABBREVMONTHNAME1 L"\x091c\x0928\x0935\x0930\x0940" - LOCALE_SABBREVMONTHNAME2 L"\x092b\x0930\x0935\x0930\x0940" - LOCALE_SABBREVMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SABBREVMONTHNAME4 L"\x0905\x092a\x094d\x0930\x0948\x0932" - LOCALE_SABBREVMONTHNAME5 L"\x092e\x0908" - LOCALE_SABBREVMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SABBREVMONTHNAME7 L"\x091c\x0941\x0932\x093e\x0908" - LOCALE_SABBREVMONTHNAME8 L"\x0905\x0917\x0938\x094d\x0924" - LOCALE_SABBREVMONTHNAME9 L"\x0938\x093f\x0924\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME10 L"\x0905\x0915\x094d\x0924\x0942\x092c\x0930" - LOCALE_SABBREVMONTHNAME11 L"\x0928\x0935\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME12 L"\x0926\x093f\x0938\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0930\x0941" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0938\x094b\x092e\x0935\x093e\x0930" - LOCALE_SDAYNAME2 L"\x092e\x0902\x0917\x0932\x0935\x093e\x0930" - LOCALE_SDAYNAME3 L"\x092c\x0941\x0927\x0935\x093e\x0930" - LOCALE_SDAYNAME4 L"\x0917\x0941\x0930\x0941\x0935\x093e\x0930" - LOCALE_SDAYNAME5 L"\x0936\x0941\x0915\x094d\x0930\x0935\x093e\x0930" - LOCALE_SDAYNAME6 L"\x0936\x0928\x093f\x0935\x093e\x0930" - LOCALE_SDAYNAME7 L"\x0930\x0935\x093f\x0935\x093e\x0930" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Hindi" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"hi" - LOCALE_SLANGUAGE L"Hindi" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x091c\x0928\x0935\x0930\x0940" - LOCALE_SMONTHNAME2 L"\x092b\x0930\x0935\x0930\x0940" - LOCALE_SMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SMONTHNAME4 L"\x0905\x092a\x094d\x0930\x0948\x0932" - LOCALE_SMONTHNAME5 L"\x092e\x0908" - LOCALE_SMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SMONTHNAME7 L"\x091c\x0941\x0932\x093e\x0908" - LOCALE_SMONTHNAME8 L"\x0905\x0917\x0938\x094d\x0924" - LOCALE_SMONTHNAME9 L"\x0938\x093f\x0924\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME10 L"\x0905\x0915\x094d\x0924\x0942\x092c\x0930" - LOCALE_SMONTHNAME11 L"\x0928\x0935\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME12 L"\x0926\x093f\x0938\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"hi-IN" - LOCALE_SNATIVECTRYNAME L"\x092d\x093e\x0930\x0924" - LOCALE_SNATIVECURRNAME L"\x0930\x0941\x092a\x092f\x093e" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"\x0939\x093f\x0902\x0926\x0940" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Deva;" - LOCALE_SSHORTDATE L"dd-MM-yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Hindi + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_HINDI, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0439" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0439" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "पूर्वाह्न" + LOCALE_S2359 "अपराह्न" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "सोम." + LOCALE_SABBREVDAYNAME2 "मंगल." + LOCALE_SABBREVDAYNAME3 "बुध." + LOCALE_SABBREVDAYNAME4 "गुरु." + LOCALE_SABBREVDAYNAME5 "शुक्र." + LOCALE_SABBREVDAYNAME6 "शनि." + LOCALE_SABBREVDAYNAME7 "रवि." + LOCALE_SABBREVLANGNAME "HIN" + LOCALE_SABBREVMONTHNAME1 "जनवरी" + LOCALE_SABBREVMONTHNAME2 "फरवरी" + LOCALE_SABBREVMONTHNAME3 "मार्च" + LOCALE_SABBREVMONTHNAME4 "अप्रैल" + LOCALE_SABBREVMONTHNAME5 "मई" + LOCALE_SABBREVMONTHNAME6 "जून" + LOCALE_SABBREVMONTHNAME7 "जुलाई" + LOCALE_SABBREVMONTHNAME8 "अगस्त" + LOCALE_SABBREVMONTHNAME9 "सितम्बर" + LOCALE_SABBREVMONTHNAME10 "अक्तूबर" + LOCALE_SABBREVMONTHNAME11 "नवम्बर" + LOCALE_SABBREVMONTHNAME12 "दिसम्बर" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "रु" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "सोमवार" + LOCALE_SDAYNAME2 "मंगलवार" + LOCALE_SDAYNAME3 "बुधवार" + LOCALE_SDAYNAME4 "गुरुवार" + LOCALE_SDAYNAME5 "शुक्रवार" + LOCALE_SDAYNAME6 "शनिवार" + LOCALE_SDAYNAME7 "रविवार" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Hindi" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "hi" + LOCALE_SLANGUAGE "Hindi" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "जनवरी" + LOCALE_SMONTHNAME2 "फरवरी" + LOCALE_SMONTHNAME3 "मार्च" + LOCALE_SMONTHNAME4 "अप्रैल" + LOCALE_SMONTHNAME5 "मई" + LOCALE_SMONTHNAME6 "जून" + LOCALE_SMONTHNAME7 "जुलाई" + LOCALE_SMONTHNAME8 "अगस्त" + LOCALE_SMONTHNAME9 "सितम्बर" + LOCALE_SMONTHNAME10 "अक्तूबर" + LOCALE_SMONTHNAME11 "नवम्बर" + LOCALE_SMONTHNAME12 "दिसम्बर" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "hi-IN" + LOCALE_SNATIVECTRYNAME "भारत" + LOCALE_SNATIVECURRNAME "रुपया" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "हिंदी" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Deva;" + LOCALE_SSHORTDATE "dd-MM-yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/hye.nls b/dlls/kernel32/nls/hye.nls dissimilarity index 83% index e175fde5fad..fd10c7d6c62 100644 --- a/dlls/kernel32/nls/hye.nls +++ b/dlls/kernel32/nls/hye.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Armenian - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_ARMENIAN, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x042f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0013\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"374" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"3" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"374" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"042b" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"042b" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"8" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"1" - LOCALE_INEGSYMPRECEDES L"0" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"1" - LOCALE_IPOSSYMPRECEDES L"0" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"0" - LOCALE_ITLZERO L"0" - LOCALE_S1159 L"" - LOCALE_S2359 L"" - LOCALE_SABBREVCTRYNAME L"ARM" - LOCALE_SABBREVDAYNAME1 L"\x0535\x0580\x056f" - LOCALE_SABBREVDAYNAME2 L"\x0535\x0580\x0584" - LOCALE_SABBREVDAYNAME3 L"\x0549\x0580\x0584" - LOCALE_SABBREVDAYNAME4 L"\x0540\x0576\x0563" - LOCALE_SABBREVDAYNAME5 L"\x0548\x0552\x0580" - LOCALE_SABBREVDAYNAME6 L"\x0547\x0562\x0569" - LOCALE_SABBREVDAYNAME7 L"\x053f\x056b\x0580" - LOCALE_SABBREVLANGNAME L"HYE" - LOCALE_SABBREVMONTHNAME1 L"\x0540\x0546\x054e" - LOCALE_SABBREVMONTHNAME2 L"\x0553\x054f\x054e" - LOCALE_SABBREVMONTHNAME3 L"\x0544\x0550\x054f" - LOCALE_SABBREVMONTHNAME4 L"\x0531\x054a\x0550" - LOCALE_SABBREVMONTHNAME5 L"\x0544\x0545\x054d" - LOCALE_SABBREVMONTHNAME6 L"\x0540\x0546\x054d" - LOCALE_SABBREVMONTHNAME7 L"\x0540\x053c\x054d" - LOCALE_SABBREVMONTHNAME8 L"\x0555\x0533\x054d" - LOCALE_SABBREVMONTHNAME9 L"\x054d\x0535\x054a" - LOCALE_SABBREVMONTHNAME10 L"\x0540\x0548\x053f" - LOCALE_SABBREVMONTHNAME11 L"\x0546\x0548\x0545" - LOCALE_SABBREVMONTHNAME12 L"\x0534\x0535\x053f" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"Armenia" - LOCALE_SCURRENCY L"\x0564\x0580." - LOCALE_SDATE L"." - LOCALE_SDAYNAME1 L"\x0535\x0580\x056f\x0578\x0582\x0577\x0561\x0562\x0569\x056b" - LOCALE_SDAYNAME2 L"\x0535\x0580\x0565\x0584\x0577\x0561\x0562\x0569\x056b" - LOCALE_SDAYNAME3 L"\x0549\x0578\x0580\x0565\x0584\x0577\x0561\x0562\x0569\x056b" - LOCALE_SDAYNAME4 L"\x0540\x056b\x0576\x0563\x0577\x0561\x0562\x0569\x056b" - LOCALE_SDAYNAME5 L"\x0548\x0552\x0580\x0562\x0561\x0569" - LOCALE_SDAYNAME6 L"\x0547\x0561\x0562\x0561\x0569" - LOCALE_SDAYNAME7 L"\x053f\x056b\x0580\x0561\x056f\x056b" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"Armenia" - LOCALE_SENGCURRNAME L"Armenian Dram" - LOCALE_SENGLANGUAGE L"Armenian" - LOCALE_SGROUPING L"3;0" - LOCALE_SINTLSYMBOL L"AMD" - LOCALE_SISO3166CTRYNAME L"AM" - LOCALE_SISO639LANGNAME L"hy" - LOCALE_SLANGUAGE L"Armenian" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"d MMMM, yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;0" - LOCALE_SMONTHNAME1 L"\x0540\x0578\x0582\x0576\x057e\x0561\x0580" - LOCALE_SMONTHNAME2 L"\x0553\x0565\x057f\x0580\x057e\x0561\x0580" - LOCALE_SMONTHNAME3 L"\x0544\x0561\x0580\x057f" - LOCALE_SMONTHNAME4 L"\x0531\x057a\x0580\x056b\x056c" - LOCALE_SMONTHNAME5 L"\x0544\x0561\x0575\x056b\x057d" - LOCALE_SMONTHNAME6 L"\x0540\x0578\x0582\x0576\x056b\x057d" - LOCALE_SMONTHNAME7 L"\x0540\x0578\x0582\x056c\x056b\x057d" - LOCALE_SMONTHNAME8 L"\x0555\x0563\x0578\x057d\x057f\x0578\x057d" - LOCALE_SMONTHNAME9 L"\x054d\x0565\x057a\x057f\x0565\x0574\x0562\x0565\x0580" - LOCALE_SMONTHNAME10 L"\x0540\x0578\x056f\x057f\x0565\x0574\x0562\x0565\x0580" - LOCALE_SMONTHNAME11 L"\x0546\x0578\x0575\x0565\x0574\x0562\x0565\x0580" - LOCALE_SMONTHNAME12 L"\x0534\x0565\x056f\x057f\x0565\x0574\x0562\x0565\x0580" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"hy-AM" - LOCALE_SNATIVECTRYNAME L"\x0540\x0561\x0575\x0561\x057d\x057f\x0561\x0576" - LOCALE_SNATIVECURRNAME L"\x0564\x0580\x0561\x0574" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"\x0540\x0561\x0575\x0565\x0580\x0565\x0576" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Armn;" - LOCALE_SSHORTDATE L"dd.MM.yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"H:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Armenian + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_ARMENIAN, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x042f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0013\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "374" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "3" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "374" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "042b" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "042b" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "8" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "1" + LOCALE_INEGSYMPRECEDES "0" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "1" + LOCALE_IPOSSYMPRECEDES "0" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "0" + LOCALE_S1159 "" + LOCALE_S2359 "" + LOCALE_SABBREVCTRYNAME "ARM" + LOCALE_SABBREVDAYNAME1 "Երկ" + LOCALE_SABBREVDAYNAME2 "Երք" + LOCALE_SABBREVDAYNAME3 "Չրք" + LOCALE_SABBREVDAYNAME4 "Հնգ" + LOCALE_SABBREVDAYNAME5 "ՈՒր" + LOCALE_SABBREVDAYNAME6 "Շբթ" + LOCALE_SABBREVDAYNAME7 "Կիր" + LOCALE_SABBREVLANGNAME "HYE" + LOCALE_SABBREVMONTHNAME1 "ՀՆՎ" + LOCALE_SABBREVMONTHNAME2 "ՓՏՎ" + LOCALE_SABBREVMONTHNAME3 "ՄՐՏ" + LOCALE_SABBREVMONTHNAME4 "ԱՊՐ" + LOCALE_SABBREVMONTHNAME5 "ՄՅՍ" + LOCALE_SABBREVMONTHNAME6 "ՀՆՍ" + LOCALE_SABBREVMONTHNAME7 "ՀԼՍ" + LOCALE_SABBREVMONTHNAME8 "ՕԳՍ" + LOCALE_SABBREVMONTHNAME9 "ՍԵՊ" + LOCALE_SABBREVMONTHNAME10 "ՀՈԿ" + LOCALE_SABBREVMONTHNAME11 "ՆՈՅ" + LOCALE_SABBREVMONTHNAME12 "ԴԵԿ" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "Armenia" + LOCALE_SCURRENCY "դր." + LOCALE_SDATE "." + LOCALE_SDAYNAME1 "Երկուշաբթի" + LOCALE_SDAYNAME2 "Երեքշաբթի" + LOCALE_SDAYNAME3 "Չորեքշաբթի" + LOCALE_SDAYNAME4 "Հինգշաբթի" + LOCALE_SDAYNAME5 "ՈՒրբաթ" + LOCALE_SDAYNAME6 "Շաբաթ" + LOCALE_SDAYNAME7 "Կիրակի" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "Armenia" + LOCALE_SENGCURRNAME "Armenian Dram" + LOCALE_SENGLANGUAGE "Armenian" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "AMD" + LOCALE_SISO3166CTRYNAME "AM" + LOCALE_SISO639LANGNAME "hy" + LOCALE_SLANGUAGE "Armenian" + LOCALE_SLIST "," + LOCALE_SLONGDATE "d MMMM, yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHNAME1 "Հունվար" + LOCALE_SMONTHNAME2 "Փետրվար" + LOCALE_SMONTHNAME3 "Մարտ" + LOCALE_SMONTHNAME4 "Ապրիլ" + LOCALE_SMONTHNAME5 "Մայիս" + LOCALE_SMONTHNAME6 "Հունիս" + LOCALE_SMONTHNAME7 "Հուլիս" + LOCALE_SMONTHNAME8 "Օգոստոս" + LOCALE_SMONTHNAME9 "Սեպտեմբեր" + LOCALE_SMONTHNAME10 "Հոկտեմբեր" + LOCALE_SMONTHNAME11 "Նոյեմբեր" + LOCALE_SMONTHNAME12 "Դեկտեմբեր" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "hy-AM" + LOCALE_SNATIVECTRYNAME "Հայաստան" + LOCALE_SNATIVECURRNAME "դրամ" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "Հայերեն" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Armn;" + LOCALE_SSHORTDATE "dd.MM.yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "H:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/kan.nls b/dlls/kernel32/nls/kan.nls dissimilarity index 84% index dc58af47b8c..725ba84e471 100644 --- a/dlls/kernel32/nls/kan.nls +++ b/dlls/kernel32/nls/kan.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Kannada - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_KANNADA, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8040\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"0" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"044b" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"044b" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0caa\x0cc2\x0cb0\x0ccd\x0cb5\x0cbe\x0cb9\x0ccd\x0ca8" - LOCALE_S2359 L"\x0c85\x0caa\x0cb0\x0cbe\x0cb9\x0ccd\x0ca8" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0cb8\x0ccb." - LOCALE_SABBREVDAYNAME2 L"\x0cae\x0c82." - LOCALE_SABBREVDAYNAME3 L"\x0cac\x0cc1." - LOCALE_SABBREVDAYNAME4 L"\x0c97\x0cc1." - LOCALE_SABBREVDAYNAME5 L"\x0cb6\x0cc1." - LOCALE_SABBREVDAYNAME6 L"\x0cb6\x0ca8\x0cbf." - LOCALE_SABBREVDAYNAME7 L"\x0cb0." - LOCALE_SABBREVLANGNAME L"KAN" - LOCALE_SABBREVMONTHNAME1 L"\x0c9c\x0ca8\x0cb5\x0cb0\x0cc0" - LOCALE_SABBREVMONTHNAME2 L"\x0cab\x0cc6\x0cac\x0ccd\x0cb0\x0cb5\x0cb0\x0cc0" - LOCALE_SABBREVMONTHNAME3 L"\x0cae\x0cbe\x0cb0\x0ccd\x0c9a\x0ccd" - LOCALE_SABBREVMONTHNAME4 L"\x0c8e\x0caa\x0ccd\x0cb0\x0cbf\x0cb2\x0ccd" - LOCALE_SABBREVMONTHNAME5 L"\x0cae\x0cc6" - LOCALE_SABBREVMONTHNAME6 L"\x0c9c\x0cc2\x0ca8\x0ccd" - LOCALE_SABBREVMONTHNAME7 L"\x0c9c\x0cc1\x0cb2\x0cc8" - LOCALE_SABBREVMONTHNAME8 L"\x0c86\x0c97\x0cb8\x0ccd\x0c9f\x0ccd" - LOCALE_SABBREVMONTHNAME9 L"\x0cb8\x0caa\x0ccd\x0c9f\x0cc6\x0c82\x0cac\x0cb0\x0ccd" - LOCALE_SABBREVMONTHNAME10 L"\x0c85\x0c95\x0ccd\x0c9f\x0ccb\x0cac\x0cb0\x0ccd" - LOCALE_SABBREVMONTHNAME11 L"\x0ca8\x0cb5\x0cc6\x0c82\x0cac\x0cb0\x0ccd" - LOCALE_SABBREVMONTHNAME12 L"\x0ca1\x0cbf\x0cb8\x0cc6\x0c82\x0cac\x0cb0\x0ccd" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0cb0\x0cc2" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0cb8\x0ccb\x0cae\x0cb5\x0cbe\x0cb0" - LOCALE_SDAYNAME2 L"\x0cae\x0c82\x0c97\x0cb3\x0cb5\x0cbe\x0cb0" - LOCALE_SDAYNAME3 L"\x0cac\x0cc1\x0ca7\x0cb5\x0cbe\x0cb0" - LOCALE_SDAYNAME4 L"\x0c97\x0cc1\x0cb0\x0cc1\x0cb5\x0cbe\x0cb0" - LOCALE_SDAYNAME5 L"\x0cb6\x0cc1\x0c95\x0ccd\x0cb0\x0cb5\x0cbe\x0cb0" - LOCALE_SDAYNAME6 L"\x0cb6\x0ca8\x0cbf\x0cb5\x0cbe\x0cb0" - LOCALE_SDAYNAME7 L"\x0cb0\x0cb5\x0cbf\x0cb5\x0cbe\x0cb0" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Kannada" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"kn" - LOCALE_SLANGUAGE L"Kannada" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x0c9c\x0ca8\x0cb5\x0cb0\x0cc0" - LOCALE_SMONTHNAME2 L"\x0cab\x0cc6\x0cac\x0ccd\x0cb0\x0cb5\x0cb0\x0cc0" - LOCALE_SMONTHNAME3 L"\x0cae\x0cbe\x0cb0\x0ccd\x0c9a\x0ccd" - LOCALE_SMONTHNAME4 L"\x0c8e\x0caa\x0ccd\x0cb0\x0cbf\x0cb2\x0ccd" - LOCALE_SMONTHNAME5 L"\x0cae\x0cc6" - LOCALE_SMONTHNAME6 L"\x0c9c\x0cc2\x0ca8\x0ccd" - LOCALE_SMONTHNAME7 L"\x0c9c\x0cc1\x0cb2\x0cc8" - LOCALE_SMONTHNAME8 L"\x0c86\x0c97\x0cb8\x0ccd\x0c9f\x0ccd" - LOCALE_SMONTHNAME9 L"\x0cb8\x0caa\x0ccd\x0c9f\x0cc6\x0c82\x0cac\x0cb0\x0ccd" - LOCALE_SMONTHNAME10 L"\x0c85\x0c95\x0ccd\x0c9f\x0ccb\x0cac\x0cb0\x0ccd" - LOCALE_SMONTHNAME11 L"\x0ca8\x0cb5\x0cc6\x0c82\x0cac\x0cb0\x0ccd" - LOCALE_SMONTHNAME12 L"\x0ca1\x0cbf\x0cb8\x0cc6\x0c82\x0cac\x0cb0\x0ccd" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"kn-IN" - LOCALE_SNATIVECTRYNAME L"\x0cad\x0cbe\x0cb0\x0ca4" - LOCALE_SNATIVECURRNAME L"\x0cb0\x0cc2\x0caa\x0cbe\x0caf\x0cbf" - LOCALE_SNATIVEDIGITS L"\x0ce6\x0ce7\x0ce8\x0ce9\x0cea\x0ceb\x0cec\x0ced\x0cee\x0cef" - LOCALE_SNATIVELANGNAME L"\x0c95\x0ca8\x0ccd\x0ca8\x0ca1" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Knda;" - LOCALE_SSHORTDATE L"dd-MM-yy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Kannada + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_KANNADA, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8040\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "044b" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "044b" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "ಪೂರ್ವಾಹ್ನ" + LOCALE_S2359 "ಅಪರಾಹ್ನ" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "ಸೋ." + LOCALE_SABBREVDAYNAME2 "ಮಂ." + LOCALE_SABBREVDAYNAME3 "ಬು." + LOCALE_SABBREVDAYNAME4 "ಗು." + LOCALE_SABBREVDAYNAME5 "ಶು." + LOCALE_SABBREVDAYNAME6 "ಶನಿ." + LOCALE_SABBREVDAYNAME7 "ರ." + LOCALE_SABBREVLANGNAME "KAN" + LOCALE_SABBREVMONTHNAME1 "ಜನವರೀ" + LOCALE_SABBREVMONTHNAME2 "ಫೆಬ್ರವರೀ" + LOCALE_SABBREVMONTHNAME3 "ಮಾರ್ಚ್" + LOCALE_SABBREVMONTHNAME4 "ಎಪ್ರಿಲ್" + LOCALE_SABBREVMONTHNAME5 "ಮೆ" + LOCALE_SABBREVMONTHNAME6 "ಜೂನ್" + LOCALE_SABBREVMONTHNAME7 "ಜುಲೈ" + LOCALE_SABBREVMONTHNAME8 "ಆಗಸ್ಟ್" + LOCALE_SABBREVMONTHNAME9 "ಸಪ್ಟೆಂಬರ್" + LOCALE_SABBREVMONTHNAME10 "ಅಕ್ಟೋಬರ್" + LOCALE_SABBREVMONTHNAME11 "ನವೆಂಬರ್" + LOCALE_SABBREVMONTHNAME12 "ಡಿಸೆಂಬರ್" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "ರೂ" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "ಸೋಮವಾರ" + LOCALE_SDAYNAME2 "ಮಂಗಳವಾರ" + LOCALE_SDAYNAME3 "ಬುಧವಾರ" + LOCALE_SDAYNAME4 "ಗುರುವಾರ" + LOCALE_SDAYNAME5 "ಶುಕ್ರವಾರ" + LOCALE_SDAYNAME6 "ಶನಿವಾರ" + LOCALE_SDAYNAME7 "ರವಿವಾರ" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Kannada" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "kn" + LOCALE_SLANGUAGE "Kannada" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "ಜನವರೀ" + LOCALE_SMONTHNAME2 "ಫೆಬ್ರವರೀ" + LOCALE_SMONTHNAME3 "ಮಾರ್ಚ್" + LOCALE_SMONTHNAME4 "ಎಪ್ರಿಲ್" + LOCALE_SMONTHNAME5 "ಮೆ" + LOCALE_SMONTHNAME6 "ಜೂನ್" + LOCALE_SMONTHNAME7 "ಜುಲೈ" + LOCALE_SMONTHNAME8 "ಆಗಸ್ಟ್" + LOCALE_SMONTHNAME9 "ಸಪ್ಟೆಂಬರ್" + LOCALE_SMONTHNAME10 "ಅಕ್ಟೋಬರ್" + LOCALE_SMONTHNAME11 "ನವೆಂಬರ್" + LOCALE_SMONTHNAME12 "ಡಿಸೆಂಬರ್" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "kn-IN" + LOCALE_SNATIVECTRYNAME "ಭಾರತ" + LOCALE_SNATIVECURRNAME "ರೂಪಾಯಿ" + LOCALE_SNATIVEDIGITS "೦೧೨೩೪೫೬೭೮೯" + LOCALE_SNATIVELANGNAME "ಕನ್ನಡ" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Knda;" + LOCALE_SSHORTDATE "dd-MM-yy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/kat.nls b/dlls/kernel32/nls/kat.nls dissimilarity index 84% index 52002fa75ca..d9d1430bb45 100644 --- a/dlls/kernel32/nls/kat.nls +++ b/dlls/kernel32/nls/kat.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Georgian - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_GEORGIAN, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8400\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0013\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"995" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"3" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"995" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0437" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0437" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"8" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"1" - LOCALE_INEGSYMPRECEDES L"0" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"1" - LOCALE_IPOSSYMPRECEDES L"0" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"0" - LOCALE_ITLZERO L"0" - LOCALE_S1159 L"" - LOCALE_S2359 L"" - LOCALE_SABBREVCTRYNAME L"GEO" - LOCALE_SABBREVDAYNAME1 L"\x10dd\x10e0\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SABBREVDAYNAME2 L"\x10e1\x10d0\x10db\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SABBREVDAYNAME3 L"\x10dd\x10d7\x10ee\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SABBREVDAYNAME4 L"\x10ee\x10e3\x10d7\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SABBREVDAYNAME5 L"\x10de\x10d0\x10e0\x10d0\x10e1\x10d9\x10d4\x10d5\x10d8" - LOCALE_SABBREVDAYNAME6 L"\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SABBREVDAYNAME7 L"\x10d9\x10d5\x10d8\x10e0\x10d0" - LOCALE_SABBREVLANGNAME L"KAT" - LOCALE_SABBREVMONTHNAME1 L"\x10d8\x10d0\x10dc" - LOCALE_SABBREVMONTHNAME2 L"\x10d7\x10d4\x10d1" - LOCALE_SABBREVMONTHNAME3 L"\x10db\x10d0\x10e0" - LOCALE_SABBREVMONTHNAME4 L"\x10d0\x10de\x10e0" - LOCALE_SABBREVMONTHNAME5 L"\x10db\x10d0\x10d8\x10e1" - LOCALE_SABBREVMONTHNAME6 L"\x10d8\x10d5\x10dc" - LOCALE_SABBREVMONTHNAME7 L"\x10d8\x10d5\x10da" - LOCALE_SABBREVMONTHNAME8 L"\x10d0\x10d2\x10d5" - LOCALE_SABBREVMONTHNAME9 L"\x10e1\x10d4\x10e5" - LOCALE_SABBREVMONTHNAME10 L"\x10dd\x10e5\x10e2" - LOCALE_SABBREVMONTHNAME11 L"\x10dc\x10dd\x10d4\x10db" - LOCALE_SABBREVMONTHNAME12 L"\x10d3\x10d4\x10d9" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"Georgia" - LOCALE_SCURRENCY L"Lari" - LOCALE_SDATE L"." - LOCALE_SDAYNAME1 L"\x10dd\x10e0\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SDAYNAME2 L"\x10e1\x10d0\x10db\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SDAYNAME3 L"\x10dd\x10d7\x10ee\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SDAYNAME4 L"\x10ee\x10e3\x10d7\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SDAYNAME5 L"\x10de\x10d0\x10e0\x10d0\x10e1\x10d9\x10d4\x10d5\x10d8" - LOCALE_SDAYNAME6 L"\x10e8\x10d0\x10d1\x10d0\x10d7\x10d8" - LOCALE_SDAYNAME7 L"\x10d9\x10d5\x10d8\x10e0\x10d0" - LOCALE_SDECIMAL L"," - LOCALE_SENGCOUNTRY L"Georgia" - LOCALE_SENGCURRNAME L"Lari" - LOCALE_SENGLANGUAGE L"Georgian" - LOCALE_SGROUPING L"3;0" - LOCALE_SINTLSYMBOL L"GEL" - LOCALE_SISO3166CTRYNAME L"GE" - LOCALE_SISO639LANGNAME L"ka" - LOCALE_SLANGUAGE L"Georgian" - LOCALE_SLIST L";" - LOCALE_SLONGDATE L"yyyy '\x10ec\x10da\x10d8\x10e1' dd MM, dddd" - LOCALE_SMONDECIMALSEP L"," - LOCALE_SMONGROUPING L"3;0" - LOCALE_SMONTHNAME1 L"\x10d8\x10d0\x10dc\x10d5\x10d0\x10e0\x10d8" - LOCALE_SMONTHNAME2 L"\x10d7\x10d4\x10d1\x10d4\x10e0\x10d5\x10d0\x10da\x10d8" - LOCALE_SMONTHNAME3 L"\x10db\x10d0\x10e0\x10e2\x10d8" - LOCALE_SMONTHNAME4 L"\x10d0\x10de\x10e0\x10d8\x10da\x10d8" - LOCALE_SMONTHNAME5 L"\x10db\x10d0\x10d8\x10e1\x10d8" - LOCALE_SMONTHNAME6 L"\x10d8\x10d5\x10dc\x10d8\x10e1\x10d8" - LOCALE_SMONTHNAME7 L"\x10d8\x10d5\x10da\x10d8\x10e1\x10d8" - LOCALE_SMONTHNAME8 L"\x10d0\x10d2\x10d5\x10d8\x10e1\x10e2\x10dd" - LOCALE_SMONTHNAME9 L"\x10e1\x10d4\x10e5\x10e2\x10d4\x10db\x10d1\x10d4\x10e0\x10d8" - LOCALE_SMONTHNAME10 L"\x10dd\x10e5\x10e2\x10dd\x10db\x10d1\x10d4\x10e0\x10d8" - LOCALE_SMONTHNAME11 L"\x10dc\x10dd\x10d4\x10db\x10d1\x10d4\x10e0\x10d8" - LOCALE_SMONTHNAME12 L"\x10d3\x10d4\x10d9\x10d4\x10db\x10d1\x10d4\x10e0\x10d8" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"\x00a0" - LOCALE_SNAME L"ka-GE" - LOCALE_SNATIVECTRYNAME L"\x10e1\x10d0\x10e5\x10d0\x10e0\x10d7\x10d5\x10d4\x10da\x10dd" - LOCALE_SNATIVECURRNAME L"\x10da\x10d0\x10e0\x10d8" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"\x10e5\x10d0\x10e0\x10d7\x10e3\x10da\x10d8" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Geor;" - LOCALE_SSHORTDATE L"dd.MM.yyyy" - LOCALE_SSORTNAME L"Traditional" - LOCALE_STHOUSAND L"\x00a0" - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"H:mm:ss" - LOCALE_SYEARMONTH L"MMMM yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Georgian + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_GEORGIAN, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8400\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0013\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "995" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "3" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "995" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0437" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0437" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "8" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "1" + LOCALE_INEGSYMPRECEDES "0" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "1" + LOCALE_IPOSSYMPRECEDES "0" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "0" + LOCALE_S1159 "" + LOCALE_S2359 "" + LOCALE_SABBREVCTRYNAME "GEO" + LOCALE_SABBREVDAYNAME1 "ორშაბათი" + LOCALE_SABBREVDAYNAME2 "სამშაბათი" + LOCALE_SABBREVDAYNAME3 "ოთხშაბათი" + LOCALE_SABBREVDAYNAME4 "ხუთშაბათი" + LOCALE_SABBREVDAYNAME5 "პარასკევი" + LOCALE_SABBREVDAYNAME6 "შაბათი" + LOCALE_SABBREVDAYNAME7 "კვირა" + LOCALE_SABBREVLANGNAME "KAT" + LOCALE_SABBREVMONTHNAME1 "იან" + LOCALE_SABBREVMONTHNAME2 "თებ" + LOCALE_SABBREVMONTHNAME3 "მარ" + LOCALE_SABBREVMONTHNAME4 "აპრ" + LOCALE_SABBREVMONTHNAME5 "მაის" + LOCALE_SABBREVMONTHNAME6 "ივნ" + LOCALE_SABBREVMONTHNAME7 "ივლ" + LOCALE_SABBREVMONTHNAME8 "აგვ" + LOCALE_SABBREVMONTHNAME9 "სექ" + LOCALE_SABBREVMONTHNAME10 "ოქტ" + LOCALE_SABBREVMONTHNAME11 "ნოემ" + LOCALE_SABBREVMONTHNAME12 "დეკ" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "Georgia" + LOCALE_SCURRENCY "Lari" + LOCALE_SDATE "." + LOCALE_SDAYNAME1 "ორშაბათი" + LOCALE_SDAYNAME2 "სამშაბათი" + LOCALE_SDAYNAME3 "ოთხშაბათი" + LOCALE_SDAYNAME4 "ხუთშაბათი" + LOCALE_SDAYNAME5 "პარასკევი" + LOCALE_SDAYNAME6 "შაბათი" + LOCALE_SDAYNAME7 "კვირა" + LOCALE_SDECIMAL "," + LOCALE_SENGCOUNTRY "Georgia" + LOCALE_SENGCURRNAME "Lari" + LOCALE_SENGLANGUAGE "Georgian" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "GE" + LOCALE_SISO3166CTRYNAME "GE" + LOCALE_SISO639LANGNAME "ka" + LOCALE_SLANGUAGE "Georgian" + LOCALE_SLIST ";" + LOCALE_SLONGDATE "yyyy 'წლის' dd MM, dddd" + LOCALE_SMONDECIMALSEP "," + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHNAME1 "იანვარი" + LOCALE_SMONTHNAME2 "თებერვალი" + LOCALE_SMONTHNAME3 "მარტი" + LOCALE_SMONTHNAME4 "აპრილი" + LOCALE_SMONTHNAME5 "მაისი" + LOCALE_SMONTHNAME6 "ივნისი" + LOCALE_SMONTHNAME7 "ივლისი" + LOCALE_SMONTHNAME8 "აგვისტო" + LOCALE_SMONTHNAME9 "სექტემბერი" + LOCALE_SMONTHNAME10 "ოქტომბერი" + LOCALE_SMONTHNAME11 "ნოემბერი" + LOCALE_SMONTHNAME12 "დეკემბერი" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP " " + LOCALE_SNAME "ka-GE" + LOCALE_SNATIVECTRYNAME "საქართველო" + LOCALE_SNATIVECURRNAME "ლარი" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "ქართული" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Geor;" + LOCALE_SSHORTDATE "dd.MM.yyyy" + LOCALE_SSORTNAME "Traditional" + LOCALE_STHOUSAND " " + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "H:mm:ss" + LOCALE_SYEARMONTH "MMMM yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/knk.nls b/dlls/kernel32/nls/knk.nls dissimilarity index 84% index 02c564c7466..705398d26cb 100644 --- a/dlls/kernel32/nls/knk.nls +++ b/dlls/kernel32/nls/knk.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Konkani - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_KONKANI, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0457" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0457" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x092e.\x092a\x0942." - LOCALE_S2359 L"\x092e.\x0928\x0902." - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0938\x094b\x092e." - LOCALE_SABBREVDAYNAME2 L"\x092e\x0902\x0917\x0933." - LOCALE_SABBREVDAYNAME3 L"\x092c\x0941\x0927." - LOCALE_SABBREVDAYNAME4 L"\x092c\x093f\x0930\x0947." - LOCALE_SABBREVDAYNAME5 L"\x0938\x0941\x0915\x094d\x0930." - LOCALE_SABBREVDAYNAME6 L"\x0936\x0947\x0928." - LOCALE_SABBREVDAYNAME7 L"\x0906\x092f." - LOCALE_SABBREVLANGNAME L"KNK" - LOCALE_SABBREVMONTHNAME1 L"\x091c\x093e\x0928\x0947\x0935\x093e\x0930\x0940" - LOCALE_SABBREVMONTHNAME2 L"\x092b\x0947\x092c\x094d\x0930\x0941\x0935\x093e\x0930\x0940" - LOCALE_SABBREVMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SABBREVMONTHNAME4 L"\x090f\x092a\x094d\x0930\x093f\x0932" - LOCALE_SABBREVMONTHNAME5 L"\x092e\x0947" - LOCALE_SABBREVMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SABBREVMONTHNAME7 L"\x091c\x0941\x0932\x0948" - LOCALE_SABBREVMONTHNAME8 L"\x0911\x0917\x0938\x094d\x091f" - LOCALE_SABBREVMONTHNAME9 L"\x0938\x092a\x094d\x091f\x0947\x0902\x092c\x0930" - LOCALE_SABBREVMONTHNAME10 L"\x0911\x0915\x094d\x091f\x094b\x092c\x0930" - LOCALE_SABBREVMONTHNAME11 L"\x0928\x094b\x0935\x0947\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME12 L"\x0921\x093f\x0938\x0947\x0902\x092c\x0930" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0930\x0941" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0938\x094b\x092e\x093e\x0930" - LOCALE_SDAYNAME2 L"\x092e\x0902\x0917\x0933\x093e\x0930" - LOCALE_SDAYNAME3 L"\x092c\x0941\x0927\x0935\x093e\x0930" - LOCALE_SDAYNAME4 L"\x092c\x093f\x0930\x0947\x0938\x094d\x0924\x093e\x0930" - LOCALE_SDAYNAME5 L"\x0938\x0941\x0915\x094d\x0930\x093e\x0930" - LOCALE_SDAYNAME6 L"\x0936\x0947\x0928\x0935\x093e\x0930" - LOCALE_SDAYNAME7 L"\x0906\x092f\x0924\x093e\x0930" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Konkani" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"kok" - LOCALE_SLANGUAGE L"Konkani" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x091c\x093e\x0928\x0947\x0935\x093e\x0930\x0940" - LOCALE_SMONTHNAME2 L"\x092b\x0947\x092c\x094d\x0930\x0941\x0935\x093e\x0930\x0940" - LOCALE_SMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SMONTHNAME4 L"\x090f\x092a\x094d\x0930\x093f\x0932" - LOCALE_SMONTHNAME5 L"\x092e\x0947" - LOCALE_SMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SMONTHNAME7 L"\x091c\x0941\x0932\x0948" - LOCALE_SMONTHNAME8 L"\x0911\x0917\x0938\x094d\x091f" - LOCALE_SMONTHNAME9 L"\x0938\x092a\x094d\x091f\x0947\x0902\x092c\x0930" - LOCALE_SMONTHNAME10 L"\x0911\x0915\x094d\x091f\x094b\x092c\x0930" - LOCALE_SMONTHNAME11 L"\x0928\x094b\x0935\x0947\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME12 L"\x0921\x093f\x0938\x0947\x0902\x092c\x0930" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"kok-IN" - LOCALE_SNATIVECTRYNAME L"\x092d\x093e\x0930\x0924" - LOCALE_SNATIVECURRNAME L"\x0930\x0941\x092a\x092f" - LOCALE_SNATIVEDIGITS L"\x0966\x0967\x0968\x0969\x096a\x096b\x096c\x096d\x096e\x096f" - LOCALE_SNATIVELANGNAME L"\x0915\x094b\x0902\x0915\x0923\x0940" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Deva;" - LOCALE_SSHORTDATE L"dd-MM-yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Konkani + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_KONKANI, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0457" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0457" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "म.पू." + LOCALE_S2359 "म.नं." + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "सोम." + LOCALE_SABBREVDAYNAME2 "मंगळ." + LOCALE_SABBREVDAYNAME3 "बुध." + LOCALE_SABBREVDAYNAME4 "बिरे." + LOCALE_SABBREVDAYNAME5 "सुक्र." + LOCALE_SABBREVDAYNAME6 "शेन." + LOCALE_SABBREVDAYNAME7 "आय." + LOCALE_SABBREVLANGNAME "KNK" + LOCALE_SABBREVMONTHNAME1 "जानेवारी" + LOCALE_SABBREVMONTHNAME2 "फेब्रुवारी" + LOCALE_SABBREVMONTHNAME3 "मार्च" + LOCALE_SABBREVMONTHNAME4 "एप्रिल" + LOCALE_SABBREVMONTHNAME5 "मे" + LOCALE_SABBREVMONTHNAME6 "जून" + LOCALE_SABBREVMONTHNAME7 "जुलै" + LOCALE_SABBREVMONTHNAME8 "ऑगस्ट" + LOCALE_SABBREVMONTHNAME9 "सप्टेंबर" + LOCALE_SABBREVMONTHNAME10 "ऑक्टोबर" + LOCALE_SABBREVMONTHNAME11 "नोवेम्बर" + LOCALE_SABBREVMONTHNAME12 "डिसेंबर" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "रु" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "सोमार" + LOCALE_SDAYNAME2 "मंगळार" + LOCALE_SDAYNAME3 "बुधवार" + LOCALE_SDAYNAME4 "बिरेस्तार" + LOCALE_SDAYNAME5 "सुक्रार" + LOCALE_SDAYNAME6 "शेनवार" + LOCALE_SDAYNAME7 "आयतार" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Konkani" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "kok" + LOCALE_SLANGUAGE "Konkani" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "जानेवारी" + LOCALE_SMONTHNAME2 "फेब्रुवारी" + LOCALE_SMONTHNAME3 "मार्च" + LOCALE_SMONTHNAME4 "एप्रिल" + LOCALE_SMONTHNAME5 "मे" + LOCALE_SMONTHNAME6 "जून" + LOCALE_SMONTHNAME7 "जुलै" + LOCALE_SMONTHNAME8 "ऑगस्ट" + LOCALE_SMONTHNAME9 "सप्टेंबर" + LOCALE_SMONTHNAME10 "ऑक्टोबर" + LOCALE_SMONTHNAME11 "नोवेम्बर" + LOCALE_SMONTHNAME12 "डिसेंबर" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "kok-IN" + LOCALE_SNATIVECTRYNAME "भारत" + LOCALE_SNATIVECURRNAME "रुपय" + LOCALE_SNATIVEDIGITS "०१२३४५६७८९" + LOCALE_SNATIVELANGNAME "कोंकणी" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Deva;" + LOCALE_SSHORTDATE "dd-MM-yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/mar.nls b/dlls/kernel32/nls/mar.nls dissimilarity index 84% index 8d2b151c958..531819599a0 100644 --- a/dlls/kernel32/nls/mar.nls +++ b/dlls/kernel32/nls/mar.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Marathi - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_MARATHI, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"044e" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"044e" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x092e.\x092a\x0942." - LOCALE_S2359 L"\x092e.\x0928\x0902." - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0938\x094b\x092e." - LOCALE_SABBREVDAYNAME2 L"\x092e\x0902\x0917\x0933." - LOCALE_SABBREVDAYNAME3 L"\x092c\x0941\x0927." - LOCALE_SABBREVDAYNAME4 L"\x0917\x0941\x0930\x0941." - LOCALE_SABBREVDAYNAME5 L"\x0936\x0941\x0915\x094d\x0930." - LOCALE_SABBREVDAYNAME6 L"\x0936\x0928\x093f." - LOCALE_SABBREVDAYNAME7 L"\x0930\x0935\x093f." - LOCALE_SABBREVLANGNAME L"MAR" - LOCALE_SABBREVMONTHNAME1 L"\x091c\x093e\x0928\x0947." - LOCALE_SABBREVMONTHNAME2 L"\x092b\x0947\x092c\x094d\x0930\x0941." - LOCALE_SABBREVMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SABBREVMONTHNAME4 L"\x090f\x092a\x094d\x0930\x093f\x0932" - LOCALE_SABBREVMONTHNAME5 L"\x092e\x0947" - LOCALE_SABBREVMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SABBREVMONTHNAME7 L"\x091c\x0941\x0932\x0948" - LOCALE_SABBREVMONTHNAME8 L"\x0911\x0917\x0938\x094d\x091f" - LOCALE_SABBREVMONTHNAME9 L"\x0938\x092a\x094d\x091f\x0947\x0902." - LOCALE_SABBREVMONTHNAME10 L"\x0911\x0915\x094d\x091f\x094b." - LOCALE_SABBREVMONTHNAME11 L"\x0928\x094b\x0935\x094d\x0939\x0947\x0902." - LOCALE_SABBREVMONTHNAME12 L"\x0921\x093f\x0938\x0947\x0902." - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0930\x0941" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0938\x094b\x092e\x0935\x093e\x0930" - LOCALE_SDAYNAME2 L"\x092e\x0902\x0917\x0933\x0935\x093e\x0930" - LOCALE_SDAYNAME3 L"\x092c\x0941\x0927\x0935\x093e\x0930" - LOCALE_SDAYNAME4 L"\x0917\x0941\x0930\x0941\x0935\x093e\x0930" - LOCALE_SDAYNAME5 L"\x0936\x0941\x0915\x094d\x0930\x0935\x093e\x0930" - LOCALE_SDAYNAME6 L"\x0936\x0928\x093f\x0935\x093e\x0930" - LOCALE_SDAYNAME7 L"\x0930\x0935\x093f\x0935\x093e\x0930" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Marathi" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"mr" - LOCALE_SLANGUAGE L"Marathi" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x091c\x093e\x0928\x0947\x0935\x093e\x0930\x0940" - LOCALE_SMONTHNAME2 L"\x092b\x0947\x092c\x094d\x0930\x0941\x0935\x093e\x0930\x0940" - LOCALE_SMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SMONTHNAME4 L"\x090f\x092a\x094d\x0930\x093f\x0932" - LOCALE_SMONTHNAME5 L"\x092e\x0947" - LOCALE_SMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SMONTHNAME7 L"\x091c\x0941\x0932\x0948" - LOCALE_SMONTHNAME8 L"\x0911\x0917\x0938\x094d\x091f" - LOCALE_SMONTHNAME9 L"\x0938\x092a\x094d\x091f\x0947\x0902\x092c\x0930" - LOCALE_SMONTHNAME10 L"\x0911\x0915\x094d\x091f\x094b\x092c\x0930" - LOCALE_SMONTHNAME11 L"\x0928\x094b\x0935\x094d\x0939\x0947\x0902\x092c\x0930" - LOCALE_SMONTHNAME12 L"\x0921\x093f\x0938\x0947\x0902\x092c\x0930" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"mr-IN" - LOCALE_SNATIVECTRYNAME L"\x092d\x093e\x0930\x0924" - LOCALE_SNATIVECURRNAME L"\x0930\x0941\x092a\x092f\x093e" - LOCALE_SNATIVEDIGITS L"\x0966\x0967\x0968\x0969\x096a\x096b\x096c\x096d\x096e\x096f" - LOCALE_SNATIVELANGNAME L"\x092e\x0930\x093e\x0920\x0940" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Mlym;" - LOCALE_SSHORTDATE L"dd-MM-yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Marathi + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_MARATHI, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "044e" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "044e" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "म.पू." + LOCALE_S2359 "म.नं." + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "सोम." + LOCALE_SABBREVDAYNAME2 "मंगळ." + LOCALE_SABBREVDAYNAME3 "बुध." + LOCALE_SABBREVDAYNAME4 "गुरु." + LOCALE_SABBREVDAYNAME5 "शुक्र." + LOCALE_SABBREVDAYNAME6 "शनि." + LOCALE_SABBREVDAYNAME7 "रवि." + LOCALE_SABBREVLANGNAME "MAR" + LOCALE_SABBREVMONTHNAME1 "जाने." + LOCALE_SABBREVMONTHNAME2 "फेब्रु." + LOCALE_SABBREVMONTHNAME3 "मार्च" + LOCALE_SABBREVMONTHNAME4 "एप्रिल" + LOCALE_SABBREVMONTHNAME5 "मे" + LOCALE_SABBREVMONTHNAME6 "जून" + LOCALE_SABBREVMONTHNAME7 "जुलै" + LOCALE_SABBREVMONTHNAME8 "ऑगस्ट" + LOCALE_SABBREVMONTHNAME9 "सप्टें." + LOCALE_SABBREVMONTHNAME10 "ऑक्टो." + LOCALE_SABBREVMONTHNAME11 "नोव्हें." + LOCALE_SABBREVMONTHNAME12 "डिसें." + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "रु" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "सोमवार" + LOCALE_SDAYNAME2 "मंगळवार" + LOCALE_SDAYNAME3 "बुधवार" + LOCALE_SDAYNAME4 "गुरुवार" + LOCALE_SDAYNAME5 "शुक्रवार" + LOCALE_SDAYNAME6 "शनिवार" + LOCALE_SDAYNAME7 "रविवार" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Marathi" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "mr" + LOCALE_SLANGUAGE "Marathi" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "जानेवारी" + LOCALE_SMONTHNAME2 "फेब्रुवारी" + LOCALE_SMONTHNAME3 "मार्च" + LOCALE_SMONTHNAME4 "एप्रिल" + LOCALE_SMONTHNAME5 "मे" + LOCALE_SMONTHNAME6 "जून" + LOCALE_SMONTHNAME7 "जुलै" + LOCALE_SMONTHNAME8 "ऑगस्ट" + LOCALE_SMONTHNAME9 "सप्टेंबर" + LOCALE_SMONTHNAME10 "ऑक्टोबर" + LOCALE_SMONTHNAME11 "नोव्हेंबर" + LOCALE_SMONTHNAME12 "डिसेंबर" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "mr-IN" + LOCALE_SNATIVECTRYNAME "भारत" + LOCALE_SNATIVECURRNAME "रुपया" + LOCALE_SNATIVEDIGITS "०१२३४५६७८९" + LOCALE_SNATIVELANGNAME "मराठी" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Mlym;" + LOCALE_SSHORTDATE "dd-MM-yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/pan.nls b/dlls/kernel32/nls/pan.nls dissimilarity index 83% index 2c237e08693..febaa1d7f52 100644 --- a/dlls/kernel32/nls/pan.nls +++ b/dlls/kernel32/nls/pan.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Punjabi - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_PUNJABI, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8002\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"0" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0446" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0446" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"0" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0a38\x0a35\x0a47\x0a30\x0a47" - LOCALE_S2359 L"\x0a36\x0a3e\x0a2e" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0a38\x0a4b\x0a2e." - LOCALE_SABBREVDAYNAME2 L"\x0a2e\x0a70\x0a17\x0a32." - LOCALE_SABBREVDAYNAME3 L"\x0a2c\x0a41\x0a27." - LOCALE_SABBREVDAYNAME4 L"\x0a35\x0a40\x0a30." - LOCALE_SABBREVDAYNAME5 L"\x0a36\x0a41\x0a15\x0a30." - LOCALE_SABBREVDAYNAME6 L"\x0a36\x0a28\x0a40." - LOCALE_SABBREVDAYNAME7 L"\x0a10\x0a24." - LOCALE_SABBREVLANGNAME L"PAN" - LOCALE_SABBREVMONTHNAME1 L"\x0a1c\x0a28\x0a35\x0a30\x0a40" - LOCALE_SABBREVMONTHNAME2 L"\x0a5e\x0a30\x0a35\x0a30\x0a40" - LOCALE_SABBREVMONTHNAME3 L"\x0a2e\x0a3e\x0a30\x0a1a" - LOCALE_SABBREVMONTHNAME4 L"\x0a05\x0a2a\x0a4d\x0a30\x0a48\x0a32" - LOCALE_SABBREVMONTHNAME5 L"\x0a2e\x0a08" - LOCALE_SABBREVMONTHNAME6 L"\x0a1c\x0a42\x0a28" - LOCALE_SABBREVMONTHNAME7 L"\x0a1c\x0a41\x0a32\x0a3e\x0a08" - LOCALE_SABBREVMONTHNAME8 L"\x0a05\x0a17\x0a38\x0a24" - LOCALE_SABBREVMONTHNAME9 L"\x0a38\x0a24\x0a70\x0a2c\x0a30" - LOCALE_SABBREVMONTHNAME10 L"\x0a05\x0a15\x0a24\x0a42\x0a2c\x0a30" - LOCALE_SABBREVMONTHNAME11 L"\x0a28\x0a35\x0a70\x0a2c\x0a30" - LOCALE_SABBREVMONTHNAME12 L"\x0a26\x0a38\x0a70\x0a2c\x0a30" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0a30\x0a41" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0a38\x0a4b\x0a2e\x0a35\x0a3e\x0a30" - LOCALE_SDAYNAME2 L"\x0a2e\x0a70\x0a17\x0a32\x0a35\x0a3e\x0a30" - LOCALE_SDAYNAME3 L"\x0a2c\x0a41\x0a27\x0a35\x0a3e\x0a30" - LOCALE_SDAYNAME4 L"\x0a35\x0a40\x0a30\x0a35\x0a3e\x0a30" - LOCALE_SDAYNAME5 L"\x0a36\x0a41\x0a71\x0a15\x0a30\x0a35\x0a3e\x0a30" - LOCALE_SDAYNAME6 L"\x0a36\x0a28\x0a40\x0a1a\x0a30\x0a35\x0a3e\x0a30" - LOCALE_SDAYNAME7 L"\x0a10\x0a24\x0a35\x0a3e\x0a30" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Punjabi" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"pa" - LOCALE_SLANGUAGE L"Punjabi" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy dddd" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x0a1c\x0a28\x0a35\x0a30\x0a40" - LOCALE_SMONTHNAME2 L"\x0a5e\x0a30\x0a35\x0a30\x0a40" - LOCALE_SMONTHNAME3 L"\x0a2e\x0a3e\x0a30\x0a1a" - LOCALE_SMONTHNAME4 L"\x0a05\x0a2a\x0a4d\x0a30\x0a48\x0a32" - LOCALE_SMONTHNAME5 L"\x0a2e\x0a08" - LOCALE_SMONTHNAME6 L"\x0a1c\x0a42\x0a28" - LOCALE_SMONTHNAME7 L"\x0a1c\x0a41\x0a32\x0a3e\x0a08" - LOCALE_SMONTHNAME8 L"\x0a05\x0a17\x0a38\x0a24" - LOCALE_SMONTHNAME9 L"\x0a38\x0a24\x0a70\x0a2c\x0a30" - LOCALE_SMONTHNAME10 L"\x0a05\x0a15\x0a24\x0a42\x0a2c\x0a30" - LOCALE_SMONTHNAME11 L"\x0a28\x0a35\x0a70\x0a2c\x0a30" - LOCALE_SMONTHNAME12 L"\x0a26\x0a38\x0a70\x0a2c\x0a30" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"pa-IN" - LOCALE_SNATIVECTRYNAME L"\x0a2d\x0a3e\x0a30\x0a24" - LOCALE_SNATIVECURRNAME L"\x0a30\x0a41\x0a2a\x0a3f\x0a06" - LOCALE_SNATIVEDIGITS L"\x0a66\x0a67\x0a68\x0a69\x0a6a\x0a6b\x0a6c\x0a6d\x0a6e\x0a6f" - LOCALE_SNATIVELANGNAME L"\x0a2a\x0a70\x0a1c\x0a3e\x0a2c\x0a40" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Guru;" - LOCALE_SSHORTDATE L"dd-MM-yy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"tt hh:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Punjabi + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_PUNJABI, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8002\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0446" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0446" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "0" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "ਸਵੇਰੇ" + LOCALE_S2359 "ਸ਼ਾਮ" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "ਸੋਮ." + LOCALE_SABBREVDAYNAME2 "ਮੰਗਲ." + LOCALE_SABBREVDAYNAME3 "ਬੁਧ." + LOCALE_SABBREVDAYNAME4 "ਵੀਰ." + LOCALE_SABBREVDAYNAME5 "ਸ਼ੁਕਰ." + LOCALE_SABBREVDAYNAME6 "ਸ਼ਨੀ." + LOCALE_SABBREVDAYNAME7 "ਐਤ." + LOCALE_SABBREVLANGNAME "PAN" + LOCALE_SABBREVMONTHNAME1 "ਜਨਵਰੀ" + LOCALE_SABBREVMONTHNAME2 "ਫ਼ਰਵਰੀ" + LOCALE_SABBREVMONTHNAME3 "ਮਾਰਚ" + LOCALE_SABBREVMONTHNAME4 "ਅਪ੍ਰੈਲ" + LOCALE_SABBREVMONTHNAME5 "ਮਈ" + LOCALE_SABBREVMONTHNAME6 "ਜੂਨ" + LOCALE_SABBREVMONTHNAME7 "ਜੁਲਾਈ" + LOCALE_SABBREVMONTHNAME8 "ਅਗਸਤ" + LOCALE_SABBREVMONTHNAME9 "ਸਤੰਬਰ" + LOCALE_SABBREVMONTHNAME10 "ਅਕਤੂਬਰ" + LOCALE_SABBREVMONTHNAME11 "ਨਵੰਬਰ" + LOCALE_SABBREVMONTHNAME12 "ਦਸੰਬਰ" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "ਰੁ" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "ਸੋਮਵਾਰ" + LOCALE_SDAYNAME2 "ਮੰਗਲਵਾਰ" + LOCALE_SDAYNAME3 "ਬੁਧਵਾਰ" + LOCALE_SDAYNAME4 "ਵੀਰਵਾਰ" + LOCALE_SDAYNAME5 "ਸ਼ੁੱਕਰਵਾਰ" + LOCALE_SDAYNAME6 "ਸ਼ਨੀਚਰਵਾਰ" + LOCALE_SDAYNAME7 "ਐਤਵਾਰ" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Punjabi" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "pa" + LOCALE_SLANGUAGE "Punjabi" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy dddd" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "ਜਨਵਰੀ" + LOCALE_SMONTHNAME2 "ਫ਼ਰਵਰੀ" + LOCALE_SMONTHNAME3 "ਮਾਰਚ" + LOCALE_SMONTHNAME4 "ਅਪ੍ਰੈਲ" + LOCALE_SMONTHNAME5 "ਮਈ" + LOCALE_SMONTHNAME6 "ਜੂਨ" + LOCALE_SMONTHNAME7 "ਜੁਲਾਈ" + LOCALE_SMONTHNAME8 "ਅਗਸਤ" + LOCALE_SMONTHNAME9 "ਸਤੰਬਰ" + LOCALE_SMONTHNAME10 "ਅਕਤੂਬਰ" + LOCALE_SMONTHNAME11 "ਨਵੰਬਰ" + LOCALE_SMONTHNAME12 "ਦਸੰਬਰ" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "pa-IN" + LOCALE_SNATIVECTRYNAME "ਭਾਰਤ" + LOCALE_SNATIVECURRNAME "ਰੁਪਿਆ" + LOCALE_SNATIVEDIGITS "੦੧੨੩੪੫੬੭੮੯" + LOCALE_SNATIVELANGNAME "ਪੰਜਾਬੀ" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Guru;" + LOCALE_SSHORTDATE "dd-MM-yy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "tt hh:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/san.nls b/dlls/kernel32/nls/san.nls dissimilarity index 84% index ce236d7ce04..d6f353f3858 100644 --- a/dlls/kernel32/nls/san.nls +++ b/dlls/kernel32/nls/san.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Sanskrit - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_SANSKRIT, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"044f" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"6" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"044f" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x092a\x0942\x0930\x094d\x0935\x093e\x0939\x094d\x0928" - LOCALE_S2359 L"\x0905\x092a\x0930\x093e\x0939\x094d\x0928" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0938\x094b\x092e\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVDAYNAME2 L"\x092e\x0919\x094d\x0917\x0932\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVDAYNAME3 L"\x092c\x0941\x0927\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVDAYNAME4 L"\x0917\x0941\x0930\x0941\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVDAYNAME5 L"\x0936\x0941\x0915\x094d\x0930\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVDAYNAME6 L"\x0936\x0928\x093f\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVDAYNAME7 L"\x0930\x0935\x093f\x0935\x093e\x0938\x0930\x0903" - LOCALE_SABBREVLANGNAME L"SAN" - LOCALE_SABBREVMONTHNAME1 L"\x091c\x0928\x0935\x0930\x0940" - LOCALE_SABBREVMONTHNAME2 L"\x092b\x0930\x0935\x0930\x0940" - LOCALE_SABBREVMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SABBREVMONTHNAME4 L"\x0905\x092a\x094d\x0930\x0948\x0932" - LOCALE_SABBREVMONTHNAME5 L"\x092e\x0908" - LOCALE_SABBREVMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SABBREVMONTHNAME7 L"\x091c\x0941\x0932\x093e\x0908" - LOCALE_SABBREVMONTHNAME8 L"\x0905\x0917\x0938\x094d\x0924" - LOCALE_SABBREVMONTHNAME9 L"\x0938\x093f\x0924\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME10 L"\x0905\x0915\x094d\x0924\x0942\x092c\x0930" - LOCALE_SABBREVMONTHNAME11 L"\x0928\x0935\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME12 L"\x0926\x093f\x0938\x092e\x094d\x092c\x0930" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0930\x0941" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0938\x094b\x092e\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDAYNAME2 L"\x092e\x0919\x094d\x0917\x0932\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDAYNAME3 L"\x092c\x0941\x0927\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDAYNAME4 L"\x0917\x0941\x0930\x0941\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDAYNAME5 L"\x0936\x0941\x0915\x094d\x0930\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDAYNAME6 L"\x0936\x0928\x093f\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDAYNAME7 L"\x0930\x0935\x093f\x0935\x093e\x0938\x0930\x0903" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Sanskrit" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"sa" - LOCALE_SLANGUAGE L"Sanskrit" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy dddd" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x091c\x0928\x0935\x0930\x0940" - LOCALE_SMONTHNAME2 L"\x092b\x0930\x0935\x0930\x0940" - LOCALE_SMONTHNAME3 L"\x092e\x093e\x0930\x094d\x091a" - LOCALE_SMONTHNAME4 L"\x0905\x092a\x094d\x0930\x0948\x0932" - LOCALE_SMONTHNAME5 L"\x092e\x0908" - LOCALE_SMONTHNAME6 L"\x091c\x0942\x0928" - LOCALE_SMONTHNAME7 L"\x091c\x0941\x0932\x093e\x0908" - LOCALE_SMONTHNAME8 L"\x0905\x0917\x0938\x094d\x0924" - LOCALE_SMONTHNAME9 L"\x0938\x093f\x0924\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME10 L"\x0905\x0915\x094d\x0924\x0942\x092c\x0930" - LOCALE_SMONTHNAME11 L"\x0928\x0935\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME12 L"\x0926\x093f\x0938\x092e\x094d\x092c\x0930" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"sa-IN" - LOCALE_SNATIVECTRYNAME L"\x092d\x093e\x0930\x0924\x092e\x094d" - LOCALE_SNATIVECURRNAME L"\x0930\x0941\x094d\x092f\x0915\x092e\x094d" - LOCALE_SNATIVEDIGITS L"\x0966\x0967\x0968\x0969\x096a\x096b\x096c\x096d\x096e\x096f" - LOCALE_SNATIVELANGNAME L"\x0938\x0902\x0938\x094d\x0915\x0943\x0924" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Deva;" - LOCALE_SSHORTDATE L"dd-MM-yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Sanskrit + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_SANSKRIT, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x802f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "044f" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "6" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "044f" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "पूर्वाह्न" + LOCALE_S2359 "अपराह्न" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "सोमवासरः" + LOCALE_SABBREVDAYNAME2 "मङ्गलवासरः" + LOCALE_SABBREVDAYNAME3 "बुधवासरः" + LOCALE_SABBREVDAYNAME4 "गुरुवासरः" + LOCALE_SABBREVDAYNAME5 "शुक्रवासरः" + LOCALE_SABBREVDAYNAME6 "शनिवासरः" + LOCALE_SABBREVDAYNAME7 "रविवासरः" + LOCALE_SABBREVLANGNAME "SAN" + LOCALE_SABBREVMONTHNAME1 "जनवरी" + LOCALE_SABBREVMONTHNAME2 "फरवरी" + LOCALE_SABBREVMONTHNAME3 "मार्च" + LOCALE_SABBREVMONTHNAME4 "अप्रैल" + LOCALE_SABBREVMONTHNAME5 "मई" + LOCALE_SABBREVMONTHNAME6 "जून" + LOCALE_SABBREVMONTHNAME7 "जुलाई" + LOCALE_SABBREVMONTHNAME8 "अगस्त" + LOCALE_SABBREVMONTHNAME9 "सितम्बर" + LOCALE_SABBREVMONTHNAME10 "अक्तूबर" + LOCALE_SABBREVMONTHNAME11 "नवम्बर" + LOCALE_SABBREVMONTHNAME12 "दिसम्बर" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "रु" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "सोमवासरः" + LOCALE_SDAYNAME2 "मङ्गलवासरः" + LOCALE_SDAYNAME3 "बुधवासरः" + LOCALE_SDAYNAME4 "गुरुवासरः" + LOCALE_SDAYNAME5 "शुक्रवासरः" + LOCALE_SDAYNAME6 "शनिवासरः" + LOCALE_SDAYNAME7 "रविवासरः" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Sanskrit" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "sa" + LOCALE_SLANGUAGE "Sanskrit" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy dddd" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "जनवरी" + LOCALE_SMONTHNAME2 "फरवरी" + LOCALE_SMONTHNAME3 "मार्च" + LOCALE_SMONTHNAME4 "अप्रैल" + LOCALE_SMONTHNAME5 "मई" + LOCALE_SMONTHNAME6 "जून" + LOCALE_SMONTHNAME7 "जुलाई" + LOCALE_SMONTHNAME8 "अगस्त" + LOCALE_SMONTHNAME9 "सितम्बर" + LOCALE_SMONTHNAME10 "अक्तूबर" + LOCALE_SMONTHNAME11 "नवम्बर" + LOCALE_SMONTHNAME12 "दिसम्बर" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "sa-IN" + LOCALE_SNATIVECTRYNAME "भारतम्" + LOCALE_SNATIVECURRNAME "रु्यकम्" + LOCALE_SNATIVEDIGITS "०१२३४५६७८९" + LOCALE_SNATIVELANGNAME "संस्कृत" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Deva;" + LOCALE_SSHORTDATE "dd-MM-yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/syr.nls b/dlls/kernel32/nls/syr.nls dissimilarity index 84% index 8cead3b864b..45bb96c25a0 100644 --- a/dlls/kernel32/nls/syr.nls +++ b/dlls/kernel32/nls/syr.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Syriac - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_SYRIAC, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x60af\x8000\x3848\x1000\x0088\x0000\x0000\x0800\x0040\x0000\x0000\x2000\x0040\x0000\x0000\x2008" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"963" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"963" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"045a" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"5" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"045a" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"3" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"0" - LOCALE_INEGSIGNPOSN L"2" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"1" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"2" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"0" - LOCALE_ITIMEMARKPOSN L"0" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0729.\x071b" - LOCALE_S2359 L"\x0712.\x071b" - LOCALE_SABBREVCTRYNAME L"SYR" - LOCALE_SABBREVDAYNAME1 L"\x070f\x0712\x00a0\x070f\x0712\x072b" - LOCALE_SABBREVDAYNAME2 L"\x070f\x0713\x00a0\x070f\x0712\x072b" - LOCALE_SABBREVDAYNAME3 L"\x070f\x0715\x00a0\x070f\x0712\x072b" - LOCALE_SABBREVDAYNAME4 L"\x070f\x0717\x00a0\x070f\x0712\x072b" - LOCALE_SABBREVDAYNAME5 L"\x070f\x0725\x072a\x0718\x0712" - LOCALE_SABBREVDAYNAME6 L"\x070f\x072b\x0712" - LOCALE_SABBREVDAYNAME7 L"\x070f\x0710\x00a0\x070f\x0712\x072b" - LOCALE_SABBREVLANGNAME L"SYR" - LOCALE_SABBREVMONTHNAME1 L"\x070f\x071f\x0722\x00a0\x070f\x0712" - LOCALE_SABBREVMONTHNAME2 L"\x072b\x0712\x071b" - LOCALE_SABBREVMONTHNAME3 L"\x0710\x0715\x072a" - LOCALE_SABBREVMONTHNAME4 L"\x0722\x071d\x0723\x0722" - LOCALE_SABBREVMONTHNAME5 L"\x0710\x071d\x072a" - LOCALE_SABBREVMONTHNAME6 L"\x071a\x0719\x071d\x072a\x0722" - LOCALE_SABBREVMONTHNAME7 L"\x072c\x0721\x0718\x0719" - LOCALE_SABBREVMONTHNAME8 L"\x0710\x0712" - LOCALE_SABBREVMONTHNAME9 L"\x0710\x071d\x0720\x0718\x0720" - LOCALE_SABBREVMONTHNAME10 L"\x070f\x072c\x072b\x00a0\x070f\x0710" - LOCALE_SABBREVMONTHNAME11 L"\x070f\x072c\x072b\x00a0\x070f\x0712" - LOCALE_SABBREVMONTHNAME12 L"\x070f\x071f\x0722\x00a0\x070f\x0710" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"Syria" - LOCALE_SCURRENCY L"\x0644.\x0633.\x200f" - LOCALE_SDATE L"/" - LOCALE_SDAYNAME1 L"\x072c\x072a\x071d\x0722\x00a0\x0712\x072b\x0712\x0710" - LOCALE_SDAYNAME2 L"\x072c\x0720\x072c\x0710\x00a0\x0712\x072b\x0712\x0710" - LOCALE_SDAYNAME3 L"\x0710\x072a\x0712\x0725\x0710\x00a0\x0712\x072b\x0712\x0710" - LOCALE_SDAYNAME4 L"\x071a\x0721\x072b\x0710\x00a0\x0712\x072b\x0712\x0710" - LOCALE_SDAYNAME5 L"\x0725\x072a\x0718\x0712\x072c\x0710" - LOCALE_SDAYNAME6 L"\x072b\x0712\x072c\x0710" - LOCALE_SDAYNAME7 L"\x071a\x0715\x00a0\x0712\x072b\x0712\x0710" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"Syria" - LOCALE_SENGCURRNAME L"Syrian Pound" - LOCALE_SENGLANGUAGE L"Syriac" - LOCALE_SGROUPING L"3;0" - LOCALE_SINTLSYMBOL L"SYP" - LOCALE_SISO3166CTRYNAME L"SY" - LOCALE_SISO639LANGNAME L"syr" - LOCALE_SLANGUAGE L"Syriac" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM, yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;0" - LOCALE_SMONTHNAME1 L"\x071f\x0722\x0718\x0722\x00a0\x0710\x071a\x072a\x071d" - LOCALE_SMONTHNAME2 L"\x072b\x0712\x071b" - LOCALE_SMONTHNAME3 L"\x0710\x0715\x072a" - LOCALE_SMONTHNAME4 L"\x0722\x071d\x0723\x0722" - LOCALE_SMONTHNAME5 L"\x0710\x071d\x072a" - LOCALE_SMONTHNAME6 L"\x071a\x0719\x071d\x072a\x0722" - LOCALE_SMONTHNAME7 L"\x072c\x0721\x0718\x0719" - LOCALE_SMONTHNAME8 L"\x0710\x0712" - LOCALE_SMONTHNAME9 L"\x0710\x071d\x0720\x0718\x0720" - LOCALE_SMONTHNAME10 L"\x072c\x072b\x072a\x071d\x00a0\x0729\x0715\x071d\x0721" - LOCALE_SMONTHNAME11 L"\x072c\x072b\x072a\x071d\x00a0\x0710\x071a\x072a\x071d" - LOCALE_SMONTHNAME12 L"\x071f\x0722\x0718\x0722\x00a0\x0729\x0715\x071d\x0721" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"syr-SY" - LOCALE_SNATIVECTRYNAME L"\x0633\x0648\x0631\x064a\x0627" - LOCALE_SNATIVECURRNAME L"\x062c\x0646\x064a\x0647\x00a0\x0633\x0648\x0631\x064a" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"\x0723\x0718\x072a\x071d\x071d\x0710" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"+" - LOCALE_SSCRIPTS L"Syrc;" - LOCALE_SSHORTDATE L"dd/MM/yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"hh:mm:ss tt" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Syriac + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_SYRIAC, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x60af\x8000\x3848\x1000\x0088\x0000\x0000\x0800\x0040\x0000\x0000\x2000\x0040\x0000\x0000\x2008" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "963" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "963" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "045a" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "5" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "045a" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "3" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "0" + LOCALE_INEGSIGNPOSN "2" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "1" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "2" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "0" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "1" + LOCALE_S1159 "ܩ.ܛ" + LOCALE_S2359 "ܒ.ܛ" + LOCALE_SABBREVCTRYNAME "SYR" + LOCALE_SABBREVDAYNAME1 "܏ܒ ܏ܒܫ" + LOCALE_SABBREVDAYNAME2 "܏ܓ ܏ܒܫ" + LOCALE_SABBREVDAYNAME3 "܏ܕ ܏ܒܫ" + LOCALE_SABBREVDAYNAME4 "܏ܗ ܏ܒܫ" + LOCALE_SABBREVDAYNAME5 "܏ܥܪܘܒ" + LOCALE_SABBREVDAYNAME6 "܏ܫܒ" + LOCALE_SABBREVDAYNAME7 "܏ܐ ܏ܒܫ" + LOCALE_SABBREVLANGNAME "SYR" + LOCALE_SABBREVMONTHNAME1 "܏ܟܢ ܏ܒ" + LOCALE_SABBREVMONTHNAME2 "ܫܒܛ" + LOCALE_SABBREVMONTHNAME3 "ܐܕܪ" + LOCALE_SABBREVMONTHNAME4 "ܢܝܣܢ" + LOCALE_SABBREVMONTHNAME5 "ܐܝܪ" + LOCALE_SABBREVMONTHNAME6 "ܚܙܝܪܢ" + LOCALE_SABBREVMONTHNAME7 "ܬܡܘܙ" + LOCALE_SABBREVMONTHNAME8 "ܐܒ" + LOCALE_SABBREVMONTHNAME9 "ܐܝܠܘܠ" + LOCALE_SABBREVMONTHNAME10 "܏ܬܫ ܏ܐ" + LOCALE_SABBREVMONTHNAME11 "܏ܬܫ ܏ܒ" + LOCALE_SABBREVMONTHNAME12 "܏ܟܢ ܏ܐ" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "Syria" + LOCALE_SCURRENCY "ل.س.‏" + LOCALE_SDATE "/" + LOCALE_SDAYNAME1 "ܬܪܝܢ ܒܫܒܐ" + LOCALE_SDAYNAME2 "ܬܠܬܐ ܒܫܒܐ" + LOCALE_SDAYNAME3 "ܐܪܒܥܐ ܒܫܒܐ" + LOCALE_SDAYNAME4 "ܚܡܫܐ ܒܫܒܐ" + LOCALE_SDAYNAME5 "ܥܪܘܒܬܐ" + LOCALE_SDAYNAME6 "ܫܒܬܐ" + LOCALE_SDAYNAME7 "ܚܕ ܒܫܒܐ" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "Syria" + LOCALE_SENGCURRNAME "Syrian Pound" + LOCALE_SENGLANGUAGE "Syriac" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "SYP" + LOCALE_SISO3166CTRYNAME "SY" + LOCALE_SISO639LANGNAME "syr" + LOCALE_SLANGUAGE "Syriac" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM, yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHNAME1 "ܟܢܘܢ ܐܚܪܝ" + LOCALE_SMONTHNAME2 "ܫܒܛ" + LOCALE_SMONTHNAME3 "ܐܕܪ" + LOCALE_SMONTHNAME4 "ܢܝܣܢ" + LOCALE_SMONTHNAME5 "ܐܝܪ" + LOCALE_SMONTHNAME6 "ܚܙܝܪܢ" + LOCALE_SMONTHNAME7 "ܬܡܘܙ" + LOCALE_SMONTHNAME8 "ܐܒ" + LOCALE_SMONTHNAME9 "ܐܝܠܘܠ" + LOCALE_SMONTHNAME10 "ܬܫܪܝ ܩܕܝܡ" + LOCALE_SMONTHNAME11 "ܬܫܪܝ ܐܚܪܝ" + LOCALE_SMONTHNAME12 "ܟܢܘܢ ܩܕܝܡ" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "syr-SY" + LOCALE_SNATIVECTRYNAME "سوريا" + LOCALE_SNATIVECURRNAME "جنيه سوري" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "ܣܘܪܝܝܐ" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "+" + LOCALE_SSCRIPTS "Syrc;" + LOCALE_SSHORTDATE "dd/MM/yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "hh:mm:ss tt" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/tam.nls b/dlls/kernel32/nls/tam.nls dissimilarity index 83% index 00e112bf63d..9820517264b 100644 --- a/dlls/kernel32/nls/tam.nls +++ b/dlls/kernel32/nls/tam.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Tamil - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_TAMIL, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8010\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"1" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"0449" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"0449" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0b95\x0bbe\x0bb2\x0bc8" - LOCALE_S2359 L"\x0bae\x0bbe\x0bb2\x0bc8" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0ba4\x0bbf" - LOCALE_SABBREVDAYNAME2 L"\x0b9a\x0bc6" - LOCALE_SABBREVDAYNAME3 L"\x0baa\x0bc1" - LOCALE_SABBREVDAYNAME4 L"\x0bb5\x0bbf" - LOCALE_SABBREVDAYNAME5 L"\x0bb5\x0bc6" - LOCALE_SABBREVDAYNAME6 L"\x0b9a" - LOCALE_SABBREVDAYNAME7 L"\x0b9e\x0bbe" - LOCALE_SABBREVLANGNAME L"TAM" - LOCALE_SABBREVMONTHNAME1 L"\x0b9c\x0ba9." - LOCALE_SABBREVMONTHNAME2 L"\x0baa\x0bc6\x0baa\x0bcd." - LOCALE_SABBREVMONTHNAME3 L"\x0bae\x0bbe\x0bb0\x0bcd." - LOCALE_SABBREVMONTHNAME4 L"\x0b8f\x0baa\x0bcd." - LOCALE_SABBREVMONTHNAME5 L"\x0bae\x0bc7" - LOCALE_SABBREVMONTHNAME6 L"\x0b9c\x0bc2\x0ba9\x0bcd" - LOCALE_SABBREVMONTHNAME7 L"\x0b9c\x0bc2\x0bb2\x0bc8" - LOCALE_SABBREVMONTHNAME8 L"\x0b86\x0b95." - LOCALE_SABBREVMONTHNAME9 L"\x0b9a\x0bc6\x0baa\x0bcd." - LOCALE_SABBREVMONTHNAME10 L"\x0b85\x0b95\x0bcd." - LOCALE_SABBREVMONTHNAME11 L"\x0ba8\x0bb5." - LOCALE_SABBREVMONTHNAME12 L"\x0b9f\x0bbf\x0b9a." - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0bb0\x0bc2" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0ba4\x0bbf\x0b99\x0bcd\x0b95\x0bb3\x0bcd" - LOCALE_SDAYNAME2 L"\x0b9a\x0bc6\x0bb5\x0bcd\x0bb5\x0bbe\x0baf\x0bcd" - LOCALE_SDAYNAME3 L"\x0baa\x0bc1\x0ba4\x0ba9\x0bcd" - LOCALE_SDAYNAME4 L"\x0bb5\x0bbf\x0baf\x0bbe\x0bb4\x0ba9\x0bcd" - LOCALE_SDAYNAME5 L"\x0bb5\x0bc6\x0bb3\x0bcd\x0bb3\x0bbf" - LOCALE_SDAYNAME6 L"\x0b9a\x0ba9\x0bbf" - LOCALE_SDAYNAME7 L"\x0b9e\x0bbe\x0baf\x0bbf\x0bb1\x0bc1" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Tamil" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"ta" - LOCALE_SLANGUAGE L"Tamil" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x0b9c\x0ba9\x0bb5\x0bb0\x0bbf" - LOCALE_SMONTHNAME2 L"\x0baa\x0bc6\x0baa\x0bcd\x0bb0\x0bb5\x0bb0\x0bbf" - LOCALE_SMONTHNAME3 L"\x0bae\x0bbe\x0bb0\x0bcd\x0b9a\x0bcd" - LOCALE_SMONTHNAME4 L"\x0b8f\x0baa\x0bcd\x0bb0\x0bb2\x0bcd" - LOCALE_SMONTHNAME5 L"\x0bae\x0bc7" - LOCALE_SMONTHNAME6 L"\x0b9c\x0bc2\x0ba9\x0bcd" - LOCALE_SMONTHNAME7 L"\x0b9c\x0bc2\x0bb2\x0bc8" - LOCALE_SMONTHNAME8 L"\x0b86\x0b95\x0bb8\x0bcd\x0b9f\x0bcd" - LOCALE_SMONTHNAME9 L"\x0b9a\x0bc6\x0baa\x0bcd\x0b9f\x0bae\x0bcd\x0baa\x0bb0\x0bcd" - LOCALE_SMONTHNAME10 L"\x0b85\x0b95\x0bcd\x0b9f\x0bcb\x0baa\x0bb0\x0bcd" - LOCALE_SMONTHNAME11 L"\x0ba8\x0bb5\x0bae\x0bcd\x0baa\x0bb0\x0bcd" - LOCALE_SMONTHNAME12 L"\x0b9f\x0bbf\x0b9a\x0bae\x0bcd\x0baa\x0bb0\x0bcd" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"ta-IN" - LOCALE_SNATIVECTRYNAME L"\x0b87\x0ba8\x0bcd\x0ba4\x0bbf\x0baf\x0bbe" - LOCALE_SNATIVECURRNAME L"\x0bb0\x0bc2\x0baa\x0bbe\x0baf\x0bcd" - LOCALE_SNATIVEDIGITS L"0123456789" - LOCALE_SNATIVELANGNAME L"\x0ba4\x0bae\x0bbf\x0bb4\x0bcd" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Taml;" - LOCALE_SSHORTDATE L"dd-MM-yyyy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Tamil + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_TAMIL, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8010\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0449" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0449" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "காலை" + LOCALE_S2359 "மாலை" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "தி" + LOCALE_SABBREVDAYNAME2 "செ" + LOCALE_SABBREVDAYNAME3 "பு" + LOCALE_SABBREVDAYNAME4 "வி" + LOCALE_SABBREVDAYNAME5 "வெ" + LOCALE_SABBREVDAYNAME6 "ச" + LOCALE_SABBREVDAYNAME7 "ஞா" + LOCALE_SABBREVLANGNAME "TAM" + LOCALE_SABBREVMONTHNAME1 "ஜன." + LOCALE_SABBREVMONTHNAME2 "பெப்." + LOCALE_SABBREVMONTHNAME3 "மார்." + LOCALE_SABBREVMONTHNAME4 "ஏப்." + LOCALE_SABBREVMONTHNAME5 "மே" + LOCALE_SABBREVMONTHNAME6 "ஜூன்" + LOCALE_SABBREVMONTHNAME7 "ஜூலை" + LOCALE_SABBREVMONTHNAME8 "ஆக." + LOCALE_SABBREVMONTHNAME9 "செப்." + LOCALE_SABBREVMONTHNAME10 "அக்." + LOCALE_SABBREVMONTHNAME11 "நவ." + LOCALE_SABBREVMONTHNAME12 "டிச." + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "ரூ" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "திங்கள்" + LOCALE_SDAYNAME2 "செவ்வாய்" + LOCALE_SDAYNAME3 "புதன்" + LOCALE_SDAYNAME4 "வியாழன்" + LOCALE_SDAYNAME5 "வெள்ளி" + LOCALE_SDAYNAME6 "சனி" + LOCALE_SDAYNAME7 "ஞாயிறு" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Tamil" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "ta" + LOCALE_SLANGUAGE "Tamil" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "ஜனவரி" + LOCALE_SMONTHNAME2 "பெப்ரவரி" + LOCALE_SMONTHNAME3 "மார்ச்" + LOCALE_SMONTHNAME4 "ஏப்ரல்" + LOCALE_SMONTHNAME5 "மே" + LOCALE_SMONTHNAME6 "ஜூன்" + LOCALE_SMONTHNAME7 "ஜூலை" + LOCALE_SMONTHNAME8 "ஆகஸ்ட்" + LOCALE_SMONTHNAME9 "செப்டம்பர்" + LOCALE_SMONTHNAME10 "அக்டோபர்" + LOCALE_SMONTHNAME11 "நவம்பர்" + LOCALE_SMONTHNAME12 "டிசம்பர்" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "ta-IN" + LOCALE_SNATIVECTRYNAME "இந்தியா" + LOCALE_SNATIVECURRNAME "ரூபாய்" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVELANGNAME "தமிழ்" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Taml;" + LOCALE_SSHORTDATE "dd-MM-yyyy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/nls/tel.nls b/dlls/kernel32/nls/tel.nls dissimilarity index 84% index 72a4991ecf2..370a6c96104 100644 --- a/dlls/kernel32/nls/tel.nls +++ b/dlls/kernel32/nls/tel.nls @@ -1,156 +1,156 @@ -/* - * Locale definitions for Telugu - * - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#pragma code_page(0) /* Unicode only */ - -STRINGTABLE LANGUAGE LANG_TELUGU, SUBLANG_DEFAULT -{ - LOCALE_FONTSIGNATURE L"\x002f\x8020\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" - LOCALE_ICALENDARTYPE L"1" - LOCALE_ICENTURY L"0" - LOCALE_ICOUNTRY L"91" - LOCALE_ICURRDIGITS L"2" - LOCALE_ICURRENCY L"2" - LOCALE_IDATE L"1" - LOCALE_IDAYLZERO L"1" - LOCALE_IDEFAULTANSICODEPAGE L"0" - LOCALE_IDEFAULTCODEPAGE L"1" - LOCALE_IDEFAULTCOUNTRY L"91" - LOCALE_IDEFAULTEBCDICCODEPAGE L"500" - LOCALE_IDEFAULTLANGUAGE L"044a" - LOCALE_IDEFAULTMACCODEPAGE L"2" - LOCALE_IDEFAULTUNIXCODEPAGE L"65001" - LOCALE_IDIGITS L"2" - LOCALE_IDIGITSUBSTITUTION L"1" - LOCALE_IFIRSTDAYOFWEEK L"0" - LOCALE_IFIRSTWEEKOFYEAR L"0" - LOCALE_IINTLCURRDIGITS L"2" - LOCALE_ILANGUAGE L"044a" - LOCALE_ILDATE L"1" - LOCALE_ILZERO L"1" - LOCALE_IMEASURE L"0" - LOCALE_IMONLZERO L"1" - LOCALE_INEGCURR L"12" - LOCALE_INEGNUMBER L"1" - LOCALE_INEGSEPBYSPACE L"1" - LOCALE_INEGSIGNPOSN L"4" - LOCALE_INEGSYMPRECEDES L"1" - LOCALE_IOPTIONALCALENDAR L"0" - LOCALE_IPAPERSIZE L"9" - LOCALE_IPOSSEPBYSPACE L"1" - LOCALE_IPOSSIGNPOSN L"4" - LOCALE_IPOSSYMPRECEDES L"1" - LOCALE_ITIME L"1" - LOCALE_ITIMEMARKPOSN L"1" - LOCALE_ITLZERO L"1" - LOCALE_S1159 L"\x0c2a\x0c42\x0c30\x0c4d\x0c35\x0c3e\x0c39\x0c4d\x0c28" - LOCALE_S2359 L"\x0c05\x0c2a\x0c30\x0c3e\x0c39\x0c4d\x0c28" - LOCALE_SABBREVCTRYNAME L"IND" - LOCALE_SABBREVDAYNAME1 L"\x0c38\x0c4b\x0c2e." - LOCALE_SABBREVDAYNAME2 L"\x0c2e\x0c02\x0c17\x0c33." - LOCALE_SABBREVDAYNAME3 L"\x0c2c\x0c41\x0c27." - LOCALE_SABBREVDAYNAME4 L"\x0c17\x0c41\x0c30\x0c41." - LOCALE_SABBREVDAYNAME5 L"\x0c36\x0c41\x0c15\x0c4d\x0c30." - LOCALE_SABBREVDAYNAME6 L"\x0c36\x0c28\x0c3f." - LOCALE_SABBREVDAYNAME7 L"\x0c06\x0c26\x0c3f." - LOCALE_SABBREVLANGNAME L"TEL" - LOCALE_SABBREVMONTHNAME1 L"\x0c1c\x0c28\x0c35\x0c30\x0c3f" - LOCALE_SABBREVMONTHNAME2 L"\x0c2b\x0c3f\x0c2c\x0c4d\x0c30\x0c35\x0c30\x0c3f" - LOCALE_SABBREVMONTHNAME3 L"\x0c2e\x0c3e\x0c30\x0c4d\x0c1a\x0c3f" - LOCALE_SABBREVMONTHNAME4 L"\x0c0f\x0c2a\x0c4d\x0c30\x0c3f\x0c32\x0c4d" - LOCALE_SABBREVMONTHNAME5 L"\x0c2e\x0c47" - LOCALE_SABBREVMONTHNAME6 L"\x0c1c\x0c42\x0c28\x0c4d" - LOCALE_SABBREVMONTHNAME7 L"\x0c1c\x0c42\x0c32\x0c48" - LOCALE_SABBREVMONTHNAME8 L"\x0c06\x0c17\x0c38\x0c4d\x0c1f\x0c41" - LOCALE_SABBREVMONTHNAME9 L"\x0c38\x0c46\x0c2a\x0c4d\x0c1f\x0c46\x0c02\x0c2c\x0c30\x0c4d" - LOCALE_SABBREVMONTHNAME10 L"\x0c05\x0c15\x0c4d\x0c1f\x0c4b\x0c2c\x0c30\x0c4d" - LOCALE_SABBREVMONTHNAME11 L"\x0c28\x0c35\x0c02\x0c2c\x0c30\x0c4d" - LOCALE_SABBREVMONTHNAME12 L"\x0c21\x0c3f\x0c38\x0c46\x0c02\x0c2c\x0c30\x0c4d" - LOCALE_SABBREVMONTHNAME13 L"" - LOCALE_SCOUNTRY L"India" - LOCALE_SCURRENCY L"\x0c30\x0c42" - LOCALE_SDATE L"-" - LOCALE_SDAYNAME1 L"\x0c38\x0c4b\x0c2e\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDAYNAME2 L"\x0c2e\x0c02\x0c17\x0c33\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDAYNAME3 L"\x0c2c\x0c41\x0c27\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDAYNAME4 L"\x0c17\x0c41\x0c30\x0c41\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDAYNAME5 L"\x0c36\x0c41\x0c15\x0c4d\x0c30\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDAYNAME6 L"\x0c36\x0c28\x0c3f\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDAYNAME7 L"\x0c06\x0c26\x0c3f\x0c35\x0c3e\x0c30\x0c02" - LOCALE_SDECIMAL L"." - LOCALE_SENGCOUNTRY L"India" - LOCALE_SENGCURRNAME L"Indian Rupee" - LOCALE_SENGLANGUAGE L"Telugu" - LOCALE_SGROUPING L"3;2;0" - LOCALE_SINTLSYMBOL L"INR" - LOCALE_SISO3166CTRYNAME L"IN" - LOCALE_SISO639LANGNAME L"te" - LOCALE_SLANGUAGE L"Telugu" - LOCALE_SLIST L"," - LOCALE_SLONGDATE L"dd MMMM yyyy" - LOCALE_SMONDECIMALSEP L"." - LOCALE_SMONGROUPING L"3;2;0" - LOCALE_SMONTHNAME1 L"\x0c1c\x0c28\x0c35\x0c30\x0c3f" - LOCALE_SMONTHNAME2 L"\x0c2b\x0c3f\x0c2c\x0c4d\x0c30\x0c35\x0c30\x0c3f" - LOCALE_SMONTHNAME3 L"\x0c2e\x0c3e\x0c30\x0c4d\x0c1a\x0c3f" - LOCALE_SMONTHNAME4 L"\x0c0f\x0c2a\x0c4d\x0c30\x0c3f\x0c32\x0c4d" - LOCALE_SMONTHNAME5 L"\x0c2e\x0c47" - LOCALE_SMONTHNAME6 L"\x0c1c\x0c42\x0c28\x0c4d" - LOCALE_SMONTHNAME7 L"\x0c1c\x0c42\x0c32\x0c48" - LOCALE_SMONTHNAME8 L"\x0c06\x0c17\x0c38\x0c4d\x0c1f\x0c41" - LOCALE_SMONTHNAME9 L"\x0c38\x0c46\x0c2a\x0c4d\x0c1f\x0c46\x0c02\x0c2c\x0c30\x0c4d" - LOCALE_SMONTHNAME10 L"\x0c05\x0c15\x0c4d\x0c1f\x0c4b\x0c2c\x0c30\x0c4d" - LOCALE_SMONTHNAME11 L"\x0c28\x0c35\x0c02\x0c2c\x0c30\x0c4d" - LOCALE_SMONTHNAME12 L"\x0c21\x0c3f\x0c38\x0c46\x0c02\x0c2c\x0c30\x0c4d" - LOCALE_SMONTHNAME13 L"" - LOCALE_SMONTHOUSANDSEP L"," - LOCALE_SNAME L"te-IN" - LOCALE_SNATIVECTRYNAME L"\x0c2d\x0c3e\x0c30\x0c24\x00a0\x0c26\x0c47\x0c36\x0c02" - LOCALE_SNATIVECURRNAME L"\x0c30\x0c42\x0c2a\x0c3e\x0c2f\x0c3f" - LOCALE_SNATIVEDIGITS L"\x0c66\x0c67\x0c68\x0c69\x0c6a\x0c6b\x0c6c\x0c6d\x0c6e\x0c6f" - LOCALE_SNATIVELANGNAME L"\x0c24\x0c46\x0c32\x0c41\x0c17\x0c41" - LOCALE_SNEGATIVESIGN L"-" - LOCALE_SPOSITIVESIGN L"" - LOCALE_SSCRIPTS L"Telu;" - LOCALE_SSHORTDATE L"dd-MM-yy" - LOCALE_SSORTNAME L"Default" - LOCALE_STHOUSAND L"," - LOCALE_STIME L":" - LOCALE_STIMEFORMAT L"HH:mm:ss" - LOCALE_SYEARMONTH L"MMMM, yyyy" - - LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE L"Western Europe and United States" - LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE L"Central Europe" - LGRPID_BALTIC+LGRPID_RES_BASE L"Baltic" - LGRPID_GREEK+LGRPID_RES_BASE L"Greek" - LGRPID_CYRILLIC+LGRPID_RES_BASE L"Cyrillic" - LGRPID_TURKISH+LGRPID_RES_BASE L"Turkic" - LGRPID_JAPANESE+LGRPID_RES_BASE L"Japanese" - LGRPID_KOREAN+LGRPID_RES_BASE L"Korean" - LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE L"Traditional Chinese" - LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE L"Simplified Chinese" - LGRPID_THAI+LGRPID_RES_BASE L"Thai" - LGRPID_HEBREW+LGRPID_RES_BASE L"Hebrew" - LGRPID_ARABIC+LGRPID_RES_BASE L"Arabic" - LGRPID_VIETNAMESE+LGRPID_RES_BASE L"Vietnamese" - LGRPID_INDIC+LGRPID_RES_BASE L"Indic" - LGRPID_GEORGIAN+LGRPID_RES_BASE L"Georgian" - LGRPID_ARMENIAN+LGRPID_RES_BASE L"Armenian" -} +/* + * Locale definitions for Telugu + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_TELUGU, SUBLANG_DEFAULT +{ + LOCALE_FONTSIGNATURE L"\x002f\x8020\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x0003\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "044a" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "65001" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "044a" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "1" + LOCALE_ITLZERO "1" + LOCALE_S1159 "పూర్వాహ్న" + LOCALE_S2359 "అపరాహ్న" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "సోమ." + LOCALE_SABBREVDAYNAME2 "మంగళ." + LOCALE_SABBREVDAYNAME3 "బుధ." + LOCALE_SABBREVDAYNAME4 "గురు." + LOCALE_SABBREVDAYNAME5 "శుక్ర." + LOCALE_SABBREVDAYNAME6 "శని." + LOCALE_SABBREVDAYNAME7 "ఆది." + LOCALE_SABBREVLANGNAME "TE" + LOCALE_SABBREVMONTHNAME1 "జనవరి" + LOCALE_SABBREVMONTHNAME2 "ఫిబ్రవరి" + LOCALE_SABBREVMONTHNAME3 "మార్చి" + LOCALE_SABBREVMONTHNAME4 "ఏప్రిల్" + LOCALE_SABBREVMONTHNAME5 "మే" + LOCALE_SABBREVMONTHNAME6 "జూన్" + LOCALE_SABBREVMONTHNAME7 "జూలై" + LOCALE_SABBREVMONTHNAME8 "ఆగస్టు" + LOCALE_SABBREVMONTHNAME9 "సెప్టెంబర్" + LOCALE_SABBREVMONTHNAME10 "అక్టోబర్" + LOCALE_SABBREVMONTHNAME11 "నవంబర్" + LOCALE_SABBREVMONTHNAME12 "డిసెంబర్" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "రూ" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "సోమవారం" + LOCALE_SDAYNAME2 "మంగళవారం" + LOCALE_SDAYNAME3 "బుధవారం" + LOCALE_SDAYNAME4 "గురువారం" + LOCALE_SDAYNAME5 "శుక్రవారం" + LOCALE_SDAYNAME6 "శనివారం" + LOCALE_SDAYNAME7 "ఆదివారం" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Telugu" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "te" + LOCALE_SLANGUAGE "Telugu" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "జనవరి" + LOCALE_SMONTHNAME2 "ఫిబ్రవరి" + LOCALE_SMONTHNAME3 "మార్చి" + LOCALE_SMONTHNAME4 "ఏప్రిల్" + LOCALE_SMONTHNAME5 "మే" + LOCALE_SMONTHNAME6 "జూన్" + LOCALE_SMONTHNAME7 "జూలై" + LOCALE_SMONTHNAME8 "ఆగస్టు" + LOCALE_SMONTHNAME9 "సెప్టెంబర్" + LOCALE_SMONTHNAME10 "అక్టోబర్" + LOCALE_SMONTHNAME11 "నవంబర్" + LOCALE_SMONTHNAME12 "డిసెంబర్" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "te-IN" + LOCALE_SNATIVECTRYNAME "భారత దేశం" + LOCALE_SNATIVECURRNAME "రూపాయి" + LOCALE_SNATIVEDIGITS "౦౧౨౩౪౫౬౭౮౯" + LOCALE_SNATIVELANGNAME "తెలుగు" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Telu;" + LOCALE_SSHORTDATE "dd-MM-yy" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "HH:mm:ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 1d684626700..72d829b5187 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2860,19 +2860,55 @@ BOOL WINAPI GetProcessAffinityMask( HANDLE hProcess, /*********************************************************************** * GetProcessVersion (KERNEL32.@) */ -DWORD WINAPI GetProcessVersion( DWORD processid ) +DWORD WINAPI GetProcessVersion( DWORD pid ) { - IMAGE_NT_HEADERS *nt; + HANDLE process; + NTSTATUS status; + PROCESS_BASIC_INFORMATION pbi; + SIZE_T count; + PEB peb; + IMAGE_DOS_HEADER dos; + IMAGE_NT_HEADERS nt; + DWORD ver = 0; - if (processid && processid != GetCurrentProcessId()) + if (!pid || pid == GetCurrentProcessId()) { - FIXME("should use ReadProcessMemory\n"); + IMAGE_NT_HEADERS *nt; + + if ((nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ))) + return ((nt->OptionalHeader.MajorSubsystemVersion << 16) | + nt->OptionalHeader.MinorSubsystemVersion); return 0; } - if ((nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ))) - return ((nt->OptionalHeader.MajorSubsystemVersion << 16) | - nt->OptionalHeader.MinorSubsystemVersion); - return 0; + + process = OpenProcess(PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, FALSE, pid); + if (!process) return 0; + + status = NtQueryInformationProcess(process, ProcessBasicInformation, &pbi, sizeof(pbi), NULL); + if (status) goto err; + + status = NtReadVirtualMemory(process, pbi.PebBaseAddress, &peb, sizeof(peb), &count); + if (status || count != sizeof(peb)) goto err; + + memset(&dos, 0, sizeof(dos)); + status = NtReadVirtualMemory(process, peb.ImageBaseAddress, &dos, sizeof(dos), &count); + if (status || count != sizeof(dos)) goto err; + if (dos.e_magic != IMAGE_DOS_SIGNATURE) goto err; + + memset(&nt, 0, sizeof(nt)); + status = NtReadVirtualMemory(process, (char *)peb.ImageBaseAddress + dos.e_lfanew, &nt, sizeof(nt), &count); + if (status || count != sizeof(nt)) goto err; + if (nt.Signature != IMAGE_NT_SIGNATURE) goto err; + + ver = MAKELONG(nt.OptionalHeader.MinorSubsystemVersion, nt.OptionalHeader.MajorSubsystemVersion); + +err: + CloseHandle(process); + + if (status != STATUS_SUCCESS) + SetLastError(RtlNtStatusToDosError(status)); + + return ver; } diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 3ed2dcddeaf..90aefe572cd 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -115,7 +115,7 @@ static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len, } lstrcpynW( buffer, value, len ); - if (quote && (len >= strlenW(value))) buffer[strlenW(buffer)-1] = '\0'; + if (quote && (len >= lstrlenW(value))) buffer[strlenW(buffer)-1] = '\0'; } /* byte-swaps shorts in-place in a buffer. len is in WCHARs */ diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 321053f7316..40b8cafdc7c 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -24,12 +24,16 @@ #include #include -#include "wine/test.h" +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winuser.h" #include "wincon.h" #include "winnls.h" +#include "winternl.h" + +#include "wine/test.h" static HINSTANCE hkernel32; static LPVOID (WINAPI *pVirtualAllocEx)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD); @@ -124,7 +128,6 @@ static char* decodeA(const char* str) return ptr; } -#if 0 /* This will be needed to decode Unicode strings saved by the child process * when we test Unicode functions. */ @@ -145,7 +148,6 @@ static WCHAR* decodeW(const char* str) ptr[len] = '\0'; return ptr; } -#endif /****************************************************************** * init @@ -407,6 +409,18 @@ static char* getChildString(const char* sect, const char* key) return ret; } +static WCHAR* getChildStringW(const char* sect, const char* key) +{ + char buf[1024+4*MAX_LISTED_ENV_VAR]; + WCHAR* ret; + + GetPrivateProfileStringA(sect, key, "-", buf, sizeof(buf), resfile); + if (buf[0] == '\0' || (buf[0] == '-' && buf[1] == '\0')) return NULL; + assert(!(strlen(buf) & 1)); + ret = decodeW(buf); + return ret; +} + /* FIXME: this may be moved to the wtmain.c file, because it may be needed by * others... (windows uses stricmp while Un*x uses strcasecmp...) */ @@ -442,8 +456,35 @@ static void ok_child_string( int line, const char *sect, const char *key, sect, key, expect ? expect : "(null)", result ); } +static void ok_child_stringWA( int line, const char *sect, const char *key, + const char *expect, int sensitive ) +{ + WCHAR* expectW; + CHAR* resultA; + DWORD len; + WCHAR* result = getChildStringW( sect, key ); + + len = MultiByteToWideChar( CP_ACP, 0, expect, -1, NULL, 0); + expectW = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR)); + MultiByteToWideChar( CP_ACP, 0, expect, -1, expectW, len); + + len = WideCharToMultiByte( CP_ACP, 0, result, -1, NULL, 0, NULL, NULL); + resultA = HeapAlloc(GetProcessHeap(),0,len*sizeof(CHAR)); + WideCharToMultiByte( CP_ACP, 0, result, -1, resultA, len, NULL, NULL); + + if (sensitive) + ok_(__FILE__, line)( lstrcmpW(result, expectW) == 0, "%s:%s expected '%s', got '%s'\n", + sect, key, expect ? expect : "(null)", resultA ); + else + ok_(__FILE__, line)( lstrcmpiW(result, expectW) == 0, "%s:%s expected '%s', got '%s'\n", + sect, key, expect ? expect : "(null)", resultA ); + HeapFree(GetProcessHeap(),0,expectW); + HeapFree(GetProcessHeap(),0,resultA); +} + #define okChildString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 1 ) #define okChildIString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 0 ) +#define okChildStringWA(sect, key, expect) ok_child_stringWA(__LINE__, (sect), (key), (expect), 1 ) /* using !expect ensures that the test will fail if the sect/key isn't present * in result file @@ -727,6 +768,7 @@ static void test_Startup(void) static void test_CommandLine(void) { char buffer[MAX_PATH], fullpath[MAX_PATH], *lpFilePart, *p; + char buffer2[MAX_PATH]; PROCESS_INFORMATION info; STARTUPINFOA startup; DWORD len; @@ -826,7 +868,30 @@ static void test_CommandLine(void) okChildString("Arguments", "argvA0", buffer); release_memory(); assert(DeleteFileA(resfile) != 0); - + + /* Using AppName */ + get_file_name(resfile); + len = GetFullPathNameA(selfname, MAX_PATH, fullpath, &lpFilePart); + assert ( lpFilePart != 0); + *(lpFilePart -1 ) = 0; + p = strrchr(fullpath, '\\'); + assert (p); + /* Use exename to avoid buffer containing things like 'C:' */ + sprintf(buffer, "..%s/%s", p, exename); + sprintf(buffer2, "dummy tests/process.c %s \"a\\\"b\\\\\" c\\\" d", resfile); + SetLastError(0xdeadbeef); + ret = CreateProcessA(buffer, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); + ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); + /* wait for child to terminate */ + ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); + /* child process has changed result file, so let profile functions know about it */ + WritePrivateProfileStringA(NULL, NULL, NULL, resfile); + sprintf(buffer, "tests/process.c %s", resfile); + okChildString("Arguments", "argvA0", "dummy"); + okChildString("Arguments", "CommandLineA", buffer2); + okChildStringWA("Arguments", "CommandLineW", buffer2); + release_memory(); + assert(DeleteFileA(resfile) != 0); } static void test_Directory(void) @@ -1419,6 +1484,41 @@ static void test_OpenProcess(void) ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n"); } +static void test_GetProcessVersion(void) +{ + static char cmdline[] = "winver.exe"; + PROCESS_INFORMATION pi; + STARTUPINFOA si; + DWORD ret; + + SetLastError(0xdeadbeef); + ret = GetProcessVersion(0); + ok(ret, "GetProcessVersion error %u\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = GetProcessVersion(GetCurrentProcessId()); + ok(ret, "GetProcessVersion error %u\n", GetLastError()); + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = SW_HIDE; + ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + SetLastError(0xdeadbeef); + ok(ret, "CreateProcess error %u\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = GetProcessVersion(pi.dwProcessId); + ok(ret, "GetProcessVersion error %u\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = TerminateProcess(pi.hProcess, 0); + ok(ret, "TerminateProcess error %u\n", GetLastError()); + + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); +} + START_TEST(process) { int b = init(); @@ -1439,6 +1539,7 @@ START_TEST(process) test_Console(); test_ExitCode(); test_OpenProcess(); + test_GetProcessVersion(); /* things that can be tested: * lookup: check the way program to be executed is searched * handles: check the handle inheritance stuff (+sec options) diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index 727f326f428..14fcadeccbe 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -27,6 +27,8 @@ static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD static HANDLE (WINAPI *pFindFirstVolumeA)(LPSTR,DWORD); static BOOL (WINAPI *pFindNextVolumeA)(HANDLE,LPSTR,DWORD); static BOOL (WINAPI *pFindVolumeClose)(HANDLE); +static UINT (WINAPI *pGetLogicalDriveStringsA)(UINT,LPSTR); +static UINT (WINAPI *pGetLogicalDriveStringsW)(UINT,LPWSTR); /* ############################### */ @@ -139,6 +141,74 @@ static void test_GetVolumeNameForVolumeMountPointW(void) ok(ret == TRUE, "GetVolumeNameForVolumeMountPointW failed\n"); } +static void test_GetLogicalDriveStringsA(void) +{ + UINT size, size2; + char *buf, *ptr; + + if(!pGetLogicalDriveStringsA) { + win_skip("GetLogicalDriveStringsA not available\n"); + return; + } + + size = pGetLogicalDriveStringsA(0, NULL); + ok(size%4 == 1, "size = %d\n", size); + + buf = HeapAlloc(GetProcessHeap(), 0, size); + + *buf = 0; + size2 = pGetLogicalDriveStringsA(2, buf); + ok(size2 == size, "size2 = %d\n", size2); + ok(!*buf, "buf changed\n"); + + size2 = pGetLogicalDriveStringsA(size, buf); + ok(size2 == size-1, "size2 = %d\n", size2); + + for(ptr = buf; ptr < buf+size2; ptr += 4) { + ok('A' <= *ptr && *ptr <= 'Z', "device name '%c' is not uppercase\n", *ptr); + ok(ptr[1] == ':', "ptr[1] = %c, expected ':'\n", ptr[1]); + ok(ptr[2] == '\\', "ptr[2] = %c expected '\\'\n", ptr[2]); + ok(!ptr[3], "ptr[3] = %c expected nullbyte\n", ptr[3]); + } + ok(!*ptr, "buf[size2] is not nullbyte\n"); + + HeapFree(GetProcessHeap(), 0, buf); +} + +static void test_GetLogicalDriveStringsW(void) +{ + UINT size, size2; + WCHAR *buf, *ptr; + + if(!pGetLogicalDriveStringsW) { + win_skip("GetLogicalDriveStringsW not available\n"); + return; + } + + size = pGetLogicalDriveStringsW(0, NULL); + ok(size%4 == 1, "size = %d\n", size); + + buf = HeapAlloc(GetProcessHeap(), 0, size*sizeof(WCHAR)); + + *buf = 0; + size2 = pGetLogicalDriveStringsW(2, buf); + ok(size2 == size, "size2 = %d\n", size2); + ok(!*buf, "buf changed\n"); + + size2 = pGetLogicalDriveStringsW(size, buf); + ok(size2 == size-1, "size2 = %d\n", size2); + + for(ptr = buf; ptr < buf+size2; ptr += 4) { + ok('A' <= *ptr && *ptr <= 'Z', "device name '%c' is not uppercase\n", *ptr); + ok(ptr[1] == ':', "ptr[1] = %c, expected ':'\n", ptr[1]); + ok(ptr[2] == '\\', "ptr[2] = %c expected '\\'\n", ptr[2]); + ok(!ptr[3], "ptr[3] = %c expected nullbyte\n", ptr[3]); + } + ok(!*ptr, "buf[size2] is not nullbyte\n"); + + HeapFree(GetProcessHeap(), 0, buf); +} + START_TEST(volume) { hdll = GetModuleHandleA("kernel32.dll"); @@ -147,9 +217,13 @@ START_TEST(volume) pFindFirstVolumeA = (void *) GetProcAddress(hdll, "FindFirstVolumeA"); pFindNextVolumeA = (void *) GetProcAddress(hdll, "FindNextVolumeA"); pFindVolumeClose = (void *) GetProcAddress(hdll, "FindVolumeClose"); + pGetLogicalDriveStringsA = (void *) GetProcAddress(hdll, "GetLogicalDriveStringsA"); + pGetLogicalDriveStringsW = (void *) GetProcAddress(hdll, "GetLogicalDriveStringsW"); test_query_dos_deviceA(); test_FindFirstVolume(); test_GetVolumeNameForVolumeMountPointA(); test_GetVolumeNameForVolumeMountPointW(); + test_GetLogicalDriveStringsA(); + test_GetLogicalDriveStringsW(); } diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 74397a9f9bc..823d163008e 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -723,6 +723,10 @@ BOOL WINAPI SetVolumeLabelW( LPCWSTR root, LPCWSTR label ) WCHAR labelW[] = {'A',':','\\','.','w','i','n','d','o','w','s','-','l','a','b','e','l',0}; labelW[0] = device[4]; + + if (!label[0]) /* delete label file when setting an empty label */ + return DeleteFileW( labelW ) || GetLastError() == ERROR_FILE_NOT_FOUND; + handle = CreateFileW( labelW, GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0 ); if (handle != INVALID_HANDLE_VALUE) @@ -730,8 +734,9 @@ BOOL WINAPI SetVolumeLabelW( LPCWSTR root, LPCWSTR label ) char buffer[64]; DWORD size; - if (!WideCharToMultiByte( CP_UNIXCP, 0, label, -1, buffer, sizeof(buffer), NULL, NULL )) - buffer[sizeof(buffer)-1] = 0; + if (!WideCharToMultiByte( CP_UNIXCP, 0, label, -1, buffer, sizeof(buffer)-1, NULL, NULL )) + buffer[sizeof(buffer)-2] = 0; + strcat( buffer, "\n" ); WriteFile( handle, buffer, strlen(buffer), &size, NULL ); CloseHandle( handle ); return TRUE; @@ -1155,7 +1160,7 @@ UINT WINAPI GetLogicalDriveStringsA( UINT len, LPSTR buffer ) { if (drives & (1 << drive)) { - *buffer++ = 'a' + drive; + *buffer++ = 'A' + drive; *buffer++ = ':'; *buffer++ = '\\'; *buffer++ = 0; @@ -1181,7 +1186,7 @@ UINT WINAPI GetLogicalDriveStringsW( UINT len, LPWSTR buffer ) { if (drives & (1 << drive)) { - *buffer++ = 'a' + drive; + *buffer++ = 'A' + drive; *buffer++ = ':'; *buffer++ = '\\'; *buffer++ = 0; diff --git a/dlls/kernel32/vxd.c b/dlls/kernel32/vxd.c index 43d4c4d9181..9227bad22ff 100644 --- a/dlls/kernel32/vxd.c +++ b/dlls/kernel32/vxd.c @@ -272,7 +272,7 @@ done: */ void WINAPI __regs_VxDCall( DWORD service, CONTEXT86 *context ) { - int i; + unsigned int i; VxDCallProc proc = NULL; RtlEnterCriticalSection( &vxd_section ); diff --git a/dlls/mcicda/mcicda.c b/dlls/mcicda/mcicda.c index 6e4a8353b0b..2edb9197ac0 100644 --- a/dlls/mcicda/mcicda.c +++ b/dlls/mcicda/mcicda.c @@ -270,7 +270,7 @@ static DWORD MCICDA_Open(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpOpenPar DWORD ret = MCIERR_HARDWARE; WINE_MCICDAUDIO* wmcda = (WINE_MCICDAUDIO*)mciGetDriverData(wDevID); WCHAR root[7], drive = 0; - int count; + unsigned int count; TRACE("(%04X, %08X, %p);\n", wDevID, dwFlags, lpOpenParms); diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index 9686e9a81d0..ae85f6ed711 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -503,7 +503,7 @@ static LONG dll_count; static UINT DetectJapaneseCode(LPCSTR input, DWORD count) { UINT code = 0; - int i = 0; + DWORD i = 0; unsigned char c1,c2; while ((code == 0 || code == 51932) && i < count) @@ -615,7 +615,7 @@ static int han2zen(unsigned char *p1, unsigned char *p2) static UINT ConvertJIS2SJIS(LPCSTR input, DWORD count, LPSTR output) { - int i = 0; + DWORD i = 0; int j = 0; unsigned char p2,p; int shifted = FALSE; @@ -683,7 +683,7 @@ static inline int enter_shift(LPSTR out, int c) static UINT ConvertSJIS2JIS(LPCSTR input, DWORD count, LPSTR output) { - int i = 0; + DWORD i = 0; int j = 0; unsigned char p2,p; int shifted = FALSE; @@ -1343,7 +1343,7 @@ static const IClassFactoryVtbl MLANGCF_Vtbl = */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) { - int i; + unsigned int i; IClassFactoryImpl *factory; TRACE("%s %s %p\n",debugstr_guid(rclsid), debugstr_guid(iid), ppv); diff --git a/dlls/mlang/tests/mlang.c b/dlls/mlang/tests/mlang.c index f42836dceca..0cec2c74984 100644 --- a/dlls/mlang/tests/mlang.c +++ b/dlls/mlang/tests/mlang.c @@ -1180,21 +1180,21 @@ static void test_JapaneseConversion(void) static CHAR jis_jp[9][27] = { {20,0x31,0x20,0x1b,0x24,0x42,0x24,0x22,0x24,0x24,0x24,0x26,0x24,0x28, 0x24,0x2a,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x22,0x25,0x24,0x25,0x26,0x25,0x28,\ + {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x22,0x25,0x24,0x25,0x26,0x25,0x28, 0x25,0x2a,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x22,0x25,0x24,0x25,0x26,0x25,0x28,\ + {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x22,0x25,0x24,0x25,0x26,0x25,0x28, 0x25,0x2a,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x24,0x21,0x24,0x23,0x24,0x25,0x24,0x27,\ + {20,0x31,0x20,0x1b,0x24,0x42,0x24,0x21,0x24,0x23,0x24,0x25,0x24,0x27, 0x24,0x29,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x21,0x25,0x23,0x25,0x25,0x25,0x27,\ + {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x21,0x25,0x23,0x25,0x25,0x25,0x27, 0x25,0x29,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x21,0x25,0x23,0x25,0x25,0x25,0x27,\ + {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x21,0x25,0x23,0x25,0x25,0x25,0x27, 0x25,0x29,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x21,0x56,0x46,0x7c,0x4b,0x5c,0x38,0x6c,\ + {20,0x31,0x20,0x1b,0x24,0x42,0x21,0x56,0x46,0x7c,0x4b,0x5c,0x38,0x6c, 0x21,0x57,0x1b,0x28,0x42,0x0d,0x0a}, - {16,0x31,0x20,0x1b,0x24,0x42,0x21,0x7e,0x21,0x7e,0x22,0x29,0x1b,0x28,\ + {16,0x31,0x20,0x1b,0x24,0x42,0x21,0x7e,0x21,0x7e,0x22,0x29,0x1b,0x28, 0x42,0x0d,0x0a}, - {26,0x31,0x20,0x1b,0x24,0x42,0x22,0x28,0x21,0x5a,0x1b,0x28,0x42,0x74,\ + {26,0x31,0x20,0x1b,0x24,0x42,0x22,0x28,0x21,0x5a,0x1b,0x28,0x42,0x74, 0x65,0x73,0x74,0x1b,0x24,0x42,0x21,0x5b,0x1b,0x28,0x42,0x0d,0x0a} }; static CHAR sjis_jp[9][15] = { diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 0435f3532ab..0260b5ffd4f 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -35,10 +35,22 @@ #include "wine/library.h" #include "wine/list.h" +#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(mountmgr); +static const WCHAR drive_types[][8] = +{ + { 0 }, /* DRIVE_UNKNOWN */ + { 0 }, /* DRIVE_NO_ROOT_DIR */ + {'f','l','o','p','p','y',0}, /* DRIVE_REMOVABLE */ + {'h','d',0}, /* DRIVE_FIXED */ + {'n','e','t','w','o','r','k',0}, /* DRIVE_REMOTE */ + {'c','d','r','o','m',0}, /* DRIVE_CDROM */ + {'r','a','m','d','i','s','k',0} /* DRIVE_RAMDISK */ +}; + struct dos_drive { struct list entry; @@ -87,7 +99,7 @@ static inline int is_valid_device( struct stat *st ) } /* find or create a DOS drive for the corresponding device */ -static int add_drive( const char *device, const char *type ) +static int add_drive( const char *device, DWORD type ) { char *path, *p; char in_use[26]; @@ -103,7 +115,7 @@ static int add_drive( const char *device, const char *type ) first = 2; last = 26; - if (type && !strcmp( type, "floppy" )) + if (type == DRIVE_REMOVABLE) { first = 0; last = 2; @@ -186,7 +198,7 @@ static BOOL set_mount_point( struct dos_drive *drive, const char *mount_point ) } BOOL add_dos_device( const char *udi, const char *device, - const char *mount_point, const char *type ) + const char *mount_point, DWORD type ) { struct dos_drive *drive; @@ -213,17 +225,22 @@ found: set_mount_point( drive, mount_point ); - TRACE( "added device %c: udi %s for %s on %s type %s\n", + TRACE( "added device %c: udi %s for %s on %s type %u\n", 'a' + drive->drive, wine_dbgstr_a(udi), wine_dbgstr_a(device), - wine_dbgstr_a(mount_point), wine_dbgstr_a(type) ); + wine_dbgstr_a(mount_point), type ); /* hack: force the drive type in the registry */ if (!RegCreateKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Drives", &hkey )) { - char name[3] = "a:"; + const WCHAR *type_name = drive_types[type]; + WCHAR name[3] = {'a',':',0}; + name[0] += drive->drive; - if (!type || strcmp( type, "cdrom" )) type = "floppy"; /* FIXME: default to floppy */ - RegSetValueExA( hkey, name, 0, REG_SZ, (const BYTE *)type, strlen(type) + 1 ); + if (type_name[0]) + RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)type_name, + (strlenW(type_name) + 1) * sizeof(WCHAR) ); + else + RegDeleteValueW( hkey, name ); RegCloseKey( hkey ); } @@ -248,9 +265,9 @@ BOOL remove_dos_device( const char *udi ) /* clear the registry key too */ if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Drives", &hkey )) { - char name[3] = "a:"; + WCHAR name[3] = {'a',':',0}; name[0] += drive->drive; - RegDeleteValueA( hkey, name ); + RegDeleteValueW( hkey, name ); RegCloseKey( hkey ); } diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index d5f3d61062b..4f18d522f4e 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -47,7 +47,7 @@ static void appeared_callback( DADiskRef disk, void *context ) const void *ref; char device[64]; char mount_point[PATH_MAX]; - const char *type = NULL; + DWORD type = DRIVE_UNKNOWN; if (!dict) return; @@ -69,7 +69,7 @@ static void appeared_callback( DADiskRef disk, void *context ) { if (!CFStringCompare( ref, CFSTR("cd9660"), 0 ) || !CFStringCompare( ref, CFSTR("udf"), 0 )) - type = "cdrom"; + type = DRIVE_CDROM; } TRACE( "got mount notification for '%s' on '%s'\n", device, mount_point ); diff --git a/dlls/mountmgr.sys/hal.c b/dlls/mountmgr.sys/hal.c index 615edf05da5..c1d6e708794 100644 --- a/dlls/mountmgr.sys/hal.c +++ b/dlls/mountmgr.sys/hal.c @@ -117,6 +117,7 @@ static void new_device( LibHalContext *ctx, const char *udi ) char *mount_point = NULL; char *device = NULL; char *type = NULL; + DWORD drive_type; p_dbus_error_init( &error ); @@ -135,7 +136,10 @@ static void new_device( LibHalContext *ctx, const char *udi ) if (!(type = p_libhal_device_get_property_string( ctx, parent, "storage.drive_type", &error ))) p_dbus_error_free( &error ); /* ignore error */ - add_dos_device( udi, device, mount_point, type ); + if (type && !strcmp( type, "cdrom" )) drive_type = DRIVE_CDROM; + else drive_type = DRIVE_REMOVABLE; /* FIXME: default to removable */ + + add_dos_device( udi, device, mount_point, drive_type ); /* add property watch for mount point */ p_libhal_device_add_property_watch( ctx, udi, &error ); diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index b9e96dcb5e5..e24394a175b 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -291,6 +291,8 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize, if (!matching_mount_point( &mount_points[i], input )) continue; size += get_device_name(mount_points[i].device)->Length; size += mount_points[i].link.Length; + size += strlen(mount_points[i].id) + 1; + size = (size + sizeof(WCHAR) - 1) & ~(sizeof(WCHAR) - 1); j++; } pos = FIELD_OFFSET( MOUNTMGR_MOUNT_POINTS, MountPoints[j] ); @@ -308,8 +310,6 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize, { if (!mount_points[i].device) continue; if (!matching_mount_point( &mount_points[i], input )) continue; - info->MountPoints[j].UniqueIdOffset = 0; /* FIXME */ - info->MountPoints[j].UniqueIdLength = 0; dev_name = get_device_name( mount_points[i].device ); info->MountPoints[j].DeviceNameOffset = pos; @@ -321,6 +321,12 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize, info->MountPoints[j].SymbolicLinkNameLength = mount_points[i].link.Length; memcpy( (char *)out_buff + pos, mount_points[i].link.Buffer, mount_points[i].link.Length ); pos += mount_points[i].link.Length; + + info->MountPoints[j].UniqueIdOffset = pos; + info->MountPoints[j].UniqueIdLength = strlen(mount_points[i].id) + 1; + memcpy( (char *)out_buff + pos, mount_points[i].id, strlen(mount_points[i].id) + 1 ); + pos += strlen(mount_points[i].id) + 1; + pos = (pos + sizeof(WCHAR) - 1) & ~(sizeof(WCHAR) - 1); j++; } info->Size = pos; diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h index 1e1ce85be4b..2d34624b839 100644 --- a/dlls/mountmgr.sys/mountmgr.h +++ b/dlls/mountmgr.sys/mountmgr.h @@ -21,5 +21,5 @@ extern void initialize_hal(void); extern void initialize_diskarbitration(void); extern BOOL add_dos_device( const char *udi, const char *device, - const char *mount_point, const char *type ); + const char *mount_point, DWORD type ); extern BOOL remove_dos_device( const char *udi ); diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index bf4ddb85807..959efb3b4c1 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -1418,7 +1418,7 @@ DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource, if (!(lpBuffer)) ret = WN_OUT_OF_MEMORY; - else + else if (providerTable != NULL) { /* FIXME: For function value of a variable is indifferent, it does * search of all providers in a network. diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index fcabaa16e6f..7fc6f30ea69 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1664,7 +1664,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocument **ret) HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject) { HTMLDocument *doc; - nsIDOMWindow *nswindow; + nsIDOMWindow *nswindow = NULL; HRESULT hres; TRACE("(%p %s %p)\n", pUnkOuter, debugstr_guid(riid), ppvObject); diff --git a/dlls/mshtml/htmldoc3.c b/dlls/mshtml/htmldoc3.c index b0efb7c4b8e..533dedd647a 100644 --- a/dlls/mshtml/htmldoc3.c +++ b/dlls/mshtml/htmldoc3.c @@ -569,8 +569,33 @@ static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdM static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface) { HTMLDocument *This = HTMLDOC4_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + nsIDOMNSHTMLElement *nselem; + nsIDOMHTMLElement *nsbody; + nsresult nsres; + + TRACE("(%p)->()\n", This); + + nsres = nsIDOMHTMLDocument_GetBody(This->nsdoc, &nsbody); + if(NS_FAILED(nsres) || !nsbody) { + ERR("GetBody failed: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMHTMLElement_QueryInterface(nsbody, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + nsIDOMHTMLElement_Release(nsbody); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMNSHTMLElement: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMNSHTMLElement_focus(nselem); + nsIDOMNSHTMLElement_Release(nselem); + if(NS_FAILED(nsres)) { + ERR("Focus failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index a8c0786bea2..4e7b747a6d0 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -832,15 +832,56 @@ static HRESULT WINAPI HTMLElement_get_innerHTML(IHTMLElement *iface, BSTR *p) static HRESULT WINAPI HTMLElement_put_innerText(IHTMLElement *iface, BSTR v) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsIDOMNode *nschild, *tmp; + nsIDOMText *text_node; + nsAString text_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + while(1) { + nsres = nsIDOMHTMLElement_GetLastChild(This->nselem, &nschild); + if(NS_FAILED(nsres)) { + ERR("GetLastChild failed: %08x\n", nsres); + return E_FAIL; + } + if(!nschild) + break; + + nsres = nsIDOMHTMLElement_RemoveChild(This->nselem, nschild, &tmp); + nsIDOMNode_Release(nschild); + if(NS_FAILED(nsres)) { + ERR("RemoveChild failed: %08x\n", nsres); + return E_FAIL; + } + nsIDOMNode_Release(tmp); + } + + nsAString_Init(&text_str, v); + nsres = nsIDOMHTMLDocument_CreateTextNode(This->node.doc->nsdoc, &text_str, &text_node); + nsAString_Finish(&text_str); + if(NS_FAILED(nsres)) { + ERR("CreateTextNode failed: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMHTMLElement_AppendChild(This->nselem, (nsIDOMNode*)text_node, &tmp); + if(NS_FAILED(nsres)) { + ERR("AppendChild failed: %08x\n", nsres); + return E_FAIL; + } + + nsIDOMNode_Release(tmp); + return S_OK; } static HRESULT WINAPI HTMLElement_get_innerText(IHTMLElement *iface, BSTR *p) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_text(&This->node, p); } static HRESULT WINAPI HTMLElement_put_outerHTML(IHTMLElement *iface, BSTR v) diff --git a/dlls/mshtml/htmlimg.c b/dlls/mshtml/htmlimg.c index 795d6f9965d..e5c03722068 100644 --- a/dlls/mshtml/htmlimg.c +++ b/dlls/mshtml/htmlimg.c @@ -280,8 +280,25 @@ static HRESULT WINAPI HTMLImgElement_put_src(IHTMLImgElement *iface, BSTR v) static HRESULT WINAPI HTMLImgElement_get_src(IHTMLImgElement *iface, BSTR *p) { HTMLImgElement *This = HTMLIMG_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + const PRUnichar *src; + nsAString src_str; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&src_str, NULL); + nsres = nsIDOMHTMLImageElement_GetSrc(This->nsimg, &src_str); + if(NS_FAILED(nsres)) { + ERR("GetSrc failed: %08x\n", nsres); + return E_FAIL; + } + + nsAString_GetData(&src_str, &src); + hres = nsuri_to_url(src, p); + nsAString_Finish(&src_str); + + return hres; } static HRESULT WINAPI HTMLImgElement_put_lowsrc(IHTMLImgElement *iface, BSTR v) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index fa120d0eda0..abb6e2e800a 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -381,22 +381,51 @@ static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *ifac static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v) { HTMLInputElement *This = HTMLINPUT_THIS(iface); - FIXME("(%p)->(%x)\n", This, v); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%x)\n", This, v); + + nsres = nsIDOMHTMLInputElement_SetDefaultChecked(This->nsinput, v != VARIANT_FALSE); + if(NS_FAILED(nsres)) { + ERR("SetDefaultChecked failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p) { HTMLInputElement *This = HTMLINPUT_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + PRBool default_checked = FALSE; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLInputElement_GetDefaultChecked(This->nsinput, &default_checked); + if(NS_FAILED(nsres)) { + ERR("GetDefaultChecked failed: %08x\n", nsres); + return E_FAIL; + } + + *p = default_checked ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; } static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v) { HTMLInputElement *This = HTMLINPUT_THIS(iface); - FIXME("(%p)->(%x)\n", This, v); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%x)\n", This, v); + + nsres = nsIDOMHTMLInputElement_SetChecked(This->nsinput, v != VARIANT_FALSE); + if(NS_FAILED(nsres)) { + ERR("SetChecked failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p) diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index a3eaaaf395e..bee0376636e 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -446,8 +446,48 @@ static HRESULT WINAPI HTMLDOMNode_insertBefore(IHTMLDOMNode *iface, IHTMLDOMNode VARIANT refChild, IHTMLDOMNode **node) { HTMLDOMNode *This = HTMLDOMNODE_THIS(iface); - FIXME("(%p)->(%p v %p)\n", This, newChild, node); - return E_NOTIMPL; + nsIDOMNode *nsnode, *nsref = NULL; + HTMLDOMNode *new_child; + nsresult nsres; + + TRACE("(%p)->(%p %s %p)\n", This, newChild, debugstr_variant(&refChild), node); + + new_child = get_node_obj(This->doc, (IUnknown*)newChild); + if(!new_child) { + ERR("invalid newChild\n"); + return E_INVALIDARG; + } + + switch(V_VT(&refChild)) { + case VT_NULL: + break; + case VT_DISPATCH: { + HTMLDOMNode *ref_node; + + ref_node = get_node_obj(This->doc, (IUnknown*)V_DISPATCH(&refChild)); + if(!ref_node) { + ERR("unvalid node\n"); + return E_FAIL; + } + + nsref = ref_node->nsnode; + break; + } + default: + FIXME("unimplemented vt %d\n", V_VT(&refChild)); + return E_NOTIMPL; + } + + nsres = nsIDOMNode_InsertBefore(This->nsnode, new_child->nsnode, nsref, &nsnode); + if(NS_FAILED(nsres)) { + ERR("InsertBefore failed: %08x\n", nsres); + return E_FAIL; + } + + *node = HTMLDOMNODE(get_node(This->doc, nsnode, TRUE)); + nsIDOMNode_Release(nsnode); + IHTMLDOMNode_AddRef(*node); + return S_OK; } static HRESULT WINAPI HTMLDOMNode_removeChild(IHTMLDOMNode *iface, IHTMLDOMNode *oldChild, @@ -472,6 +512,7 @@ static HRESULT WINAPI HTMLDOMNode_removeChild(IHTMLDOMNode *iface, IHTMLDOMNode /* FIXME: Make sure that node != newChild */ *node = HTMLDOMNODE(get_node(This->doc, nsnode, TRUE)); + nsIDOMNode_Release(nsnode); IHTMLDOMNode_AddRef(*node); return S_OK; } @@ -532,8 +573,8 @@ static HRESULT WINAPI HTMLDOMNode_appendChild(IHTMLDOMNode *iface, IHTMLDOMNode nsres = nsIDOMNode_AppendChild(This->nsnode, node_obj->nsnode, &nsnode); if(NS_FAILED(nsres)) { - ERR("AppendChild failed: %08x\n", nsres); - return E_FAIL; + WARN("AppendChild failed: %08x\n", nsres); + nsnode = node_obj->nsnode; } /* FIXME: Make sure that node != newChild */ diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 8d6564d0eb6..e90d723add2 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -221,6 +221,24 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW return S_OK; } +static HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags) +{ + switch(V_VT(value)) { + case VT_NULL: + return set_nsstyle_attr(nsstyle, sid, emptyW, flags); + + case VT_BSTR: + return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags); + + default: + FIXME("not implemented vt %d\n", V_VT(value)); + return E_NOTIMPL; + + } + + return S_OK; +} + static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags) { return set_nsstyle_attr(This->nsstyle, sid, value, flags); @@ -1581,15 +1599,7 @@ static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v) TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); - switch(V_VT(&v)) { - case VT_BSTR: - return set_style_attr(This, STYLEID_TOP, V_BSTR(&v), 0); - default: - FIXME("unimplemented vt %d\n", V_VT(&v)); - return E_NOTIMPL; - } - - return S_OK; + return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0); } static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p) @@ -1615,15 +1625,7 @@ static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v) TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); - switch(V_VT(&v)) { - case VT_BSTR: - return set_style_attr(This, STYLEID_LEFT, V_BSTR(&v), 0); - default: - FIXME("unimplemented vt %d\n", V_VT(&v)); - return E_NOTIMPL; - } - - return S_OK; + return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0); } static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index cdd42937fc0..888669f60a0 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -502,6 +502,8 @@ void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*); void init_nsio(nsIComponentManager*,nsIComponentRegistrar*); BOOL install_wine_gecko(BOOL); +HRESULT nsuri_to_url(LPCWSTR,BSTR*); + void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD); void call_property_onchanged(ConnectionPoint*,DISPID); @@ -550,6 +552,7 @@ IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetLis void detach_selection(HTMLDocument*); void detach_ranges(HTMLDocument*); +HRESULT get_node_text(HTMLDOMNode*,BSTR*); HTMLDOMNode *HTMLDOMTextNode_Create(HTMLDocument*,nsIDOMNode*); diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index dc54322393a..806e9eb6d4b 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -1,5 +1,5 @@ /* - * Copyright 2007 Jacek Caban for CodeWeavers + * Copyright 2007-2008 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -175,11 +175,149 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event return NS_OK; } +#define IE_MAJOR_VERSION 7 +#define IE_MINOR_VERSION 0 + +static BOOL handle_insert_comment(HTMLDocument *doc, const PRUnichar *comment) +{ + DWORD len; + int majorv = 0, minorv = 0; + const PRUnichar *ptr, *end; + nsAString nsstr; + PRUnichar *buf; + nsresult nsres; + + enum { + CMP_EQ, + CMP_LT, + CMP_LTE, + CMP_GT, + CMP_GTE + } cmpt = CMP_EQ; + + static const PRUnichar endifW[] = {'<','!','[','e','n','d','i','f',']'}; + + if(comment[0] != '[' || comment[1] != 'i' || comment[2] != 'f') + return FALSE; + + ptr = comment+3; + while(isspaceW(*ptr)) + ptr++; + + if(ptr[0] == 'l' && ptr[1] == 't') { + ptr += 2; + if(*ptr == 'e') { + cmpt = CMP_LTE; + ptr++; + }else { + cmpt = CMP_LT; + } + }else if(ptr[0] == 'g' && ptr[1] == 't') { + ptr += 2; + if(*ptr == 'e') { + cmpt = CMP_GTE; + ptr++; + }else { + cmpt = CMP_GT; + } + } + + if(!isspaceW(*ptr++)) + return FALSE; + while(isspaceW(*ptr)) + ptr++; + + if(ptr[0] != 'I' || ptr[1] != 'E') + return FALSE; + + ptr +=2; + if(!isspaceW(*ptr++)) + return FALSE; + while(isspaceW(*ptr)) + ptr++; + + if(!isdigitW(*ptr)) + return FALSE; + while(isdigitW(*ptr)) + majorv = majorv*10 + (*ptr++ - '0'); + + if(*ptr == '.') { + if(!isdigitW(*ptr)) + return FALSE; + while(isdigitW(*ptr)) + minorv = minorv*10 + (*ptr++ - '0'); + } + + while(isspaceW(*ptr)) + ptr++; + if(ptr[0] != ']' || ptr[1] != '>') + return FALSE; + ptr += 2; + + len = strlenW(ptr); + if(len < sizeof(endifW)/sizeof(WCHAR)) + return FALSE; + + end = ptr + len-sizeof(endifW)/sizeof(WCHAR); + if(memcmp(end, endifW, sizeof(endifW))) + return FALSE; + + switch(cmpt) { + case CMP_EQ: + if(majorv == IE_MAJOR_VERSION && minorv == IE_MINOR_VERSION) + break; + return FALSE; + case CMP_LT: + if(majorv > IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv > IE_MINOR_VERSION) + break; + return FALSE; + case CMP_LTE: + if(majorv > IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv >= IE_MINOR_VERSION) + break; + return FALSE; + case CMP_GT: + if(majorv < IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv < IE_MINOR_VERSION) + break; + return FALSE; + case CMP_GTE: + if(majorv < IE_MAJOR_VERSION) + break; + if(majorv == IE_MAJOR_VERSION && minorv <= IE_MINOR_VERSION) + break; + return FALSE; + } + + buf = heap_alloc((end-ptr+1)*sizeof(WCHAR)); + if(!buf) + return FALSE; + + memcpy(buf, ptr, (end-ptr)*sizeof(WCHAR)); + buf[end-ptr] = 0; + nsAString_Init(&nsstr, buf); + heap_free(buf); + + /* FIXME: Find better way to insert HTML to document. */ + nsres = nsIDOMHTMLDocument_Write(doc->nsdoc, &nsstr); + nsAString_Finish(&nsstr); + if(NS_FAILED(nsres)) { + ERR("Write failed: %08x\n", nsres); + return FALSE; + } + + return TRUE; +} + static nsresult NSAPI handle_node_insert(nsIDOMEventListener *iface, nsIDOMEvent *event) { NSContainer *This = NSEVENTLIST_THIS(iface)->This; - nsIDOMHTMLScriptElement *script; nsIDOMEventTarget *target; + nsIDOMComment *nscomment; nsIDOMElement *elem; nsresult nsres; @@ -192,19 +330,50 @@ static nsresult NSAPI handle_node_insert(nsIDOMEventListener *iface, nsIDOMEvent } nsres = nsIDOMEventTarget_QueryInterface(target, &IID_nsIDOMElement, (void**)&elem); - nsIDOMEventTarget_Release(target); - if(NS_FAILED(nsres)) - return NS_OK; + if(NS_SUCCEEDED(nsres)) { + nsIDOMHTMLScriptElement *script; + + nsres = nsIDOMElement_QueryInterface(elem, &IID_nsIDOMHTMLScriptElement, (void**)&script); + if(NS_SUCCEEDED(nsres)) { + doc_insert_script(This->doc, script); + nsIDOMHTMLScriptElement_Release(script); + } - nsres = nsIDOMElement_QueryInterface(elem, &IID_nsIDOMHTMLScriptElement, (void**)&script); - if(SUCCEEDED(nsres)) { - doc_insert_script(This->doc, script); - nsIDOMHTMLScriptElement_Release(script); + check_event_attr(This->doc, elem); + + nsIDOMEventTarget_Release(target); + nsIDOMNode_Release(elem); + return NS_OK; } - check_event_attr(This->doc, elem); + nsres = nsIDOMEventTarget_QueryInterface(target, &IID_nsIDOMComment, (void**)&nscomment); + if(NS_SUCCEEDED(nsres)) { + nsAString comment_str; + BOOL remove_comment = FALSE; + + nsAString_Init(&comment_str, NULL); + nsres = nsIDOMComment_GetData(nscomment, &comment_str); + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *comment; + + nsAString_GetData(&comment_str, &comment); + remove_comment = handle_insert_comment(This->doc, comment); + } + + nsAString_Finish(&comment_str); + + if(remove_comment) { + nsIDOMNode *nsparent, *tmp; + + nsIDOMComment_GetParentNode(nscomment, &nsparent); + nsIDOMNode_RemoveChild(nsparent, (nsIDOMNode*)nscomment, &tmp); + nsIDOMNode_Release(nsparent); + nsIDOMNode_Release(tmp); + } + + nsIDOMComment_Release(nscomment); + } - nsIDOMNode_Release(elem); return NS_OK; } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index f23254ab195..82f7c0defaa 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -67,6 +67,23 @@ typedef struct { static nsresult create_uri(nsIURI*,NSContainer*,nsIWineURI**); +HRESULT nsuri_to_url(LPCWSTR nsuri, BSTR *ret) +{ + const WCHAR *ptr = nsuri; + + static const WCHAR wine_prefixW[] = {'w','i','n','e',':'}; + + if(!strncmpW(nsuri, wine_prefixW, sizeof(wine_prefixW)/sizeof(WCHAR))) + ptr += sizeof(wine_prefixW)/sizeof(WCHAR); + + *ret = SysAllocString(ptr); + if(!*ret) + return E_OUTOFMEMORY; + + TRACE("%s -> %s\n", debugstr_w(nsuri), debugstr_w(*ret)); + return S_OK; +} + static BOOL exec_shldocvw_67(HTMLDocument *doc, LPCWSTR url) { IOleCommandTarget *cmdtrg = NULL; diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 32bd9bf7493..9ea6df83dfb 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -146,8 +146,21 @@ static HRESULT WINAPI OmNavigator_get_appName(IOmNavigator *iface, BSTR *p) static HRESULT WINAPI OmNavigator_get_appVersion(IOmNavigator *iface, BSTR *p) { OmNavigator *This = OMNAVIGATOR_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + /* FIXME: Should we return something smarter? */ + static const WCHAR app_verW[] = + {'4','.','0',' ','(','c','o','m','p','a','t','i','b','l','e',';', + ' ','M','S','I','E',' ','7','.','0',';', + ' ','W','i','n','d','o','w','s',' ','N','T',' ','5','.','1',';', + ' ','M','o','z','i','l','l','a','/','4','.','0',')',0}; + + TRACE("(%p)->(%p)\n", This, p); + + *p = SysAllocString(app_verW); + if(!*p) + return E_OUTOFMEMORY; + + return S_OK; } static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 87d372d355b..7a14c295a99 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -53,6 +53,10 @@ static const char elem_test_str[] = ""; static const char indent_test_str[] = "testabc
123"; +static const char cond_comment_str[] = + "test" + "" + ""; static const WCHAR noneW[] = {'N','o','n','e',0}; @@ -559,6 +563,58 @@ static void _test_elem_type(unsigned line, IUnknown *unk, elem_type_t type) _test_disp(line, unk, elem_type_infos[type].dispiid); } +#define get_node_type(n) _get_node_type(__LINE__,n) +static long _get_node_type(unsigned line, IUnknown *unk) +{ + IHTMLDOMNode *node = _get_node_iface(line, unk); + long type = -1; + HRESULT hres; + + hres = IHTMLDOMNode_get_nodeType(node, &type); + ok(hres == S_OK, "get_nodeType failed: %08x\n", hres); + + IHTMLDOMNode_Release(node); + + return type; +} + +#define get_child_nodes(u) _get_child_nodes(__LINE__,u) +static IHTMLDOMChildrenCollection *_get_child_nodes(unsigned line, IUnknown *unk) +{ + IHTMLDOMNode *node = _get_node_iface(line, unk); + IHTMLDOMChildrenCollection *col = NULL; + IDispatch *disp; + HRESULT hres; + + hres = IHTMLDOMNode_get_childNodes(node, &disp); + IHTMLDOMNode_Release(node); + ok_(__FILE__,line) (hres == S_OK, "get_childNodes failed: %08x\n", hres); + if(FAILED(hres)) + return NULL; + + hres = IDispatch_QueryInterface(disp, &IID_IHTMLDOMChildrenCollection, (void**)&col); + IDispatch_Release(disp); + ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMChildrenCollection: %08x\n", hres); + + return col; +} + +#define get_child_item(c,i) _get_child_item(__LINE__,c,i) +static IHTMLDOMNode *_get_child_item(unsigned line, IHTMLDOMChildrenCollection *col, long idx) +{ + IHTMLDOMNode *node = NULL; + IDispatch *disp; + HRESULT hres; + + hres = IHTMLDOMChildrenCollection_item(col, idx, &disp); + ok(hres == S_OK, "item failed: %08x\n", hres); + + node = _get_node_iface(line, (IUnknown*)disp); + IDispatch_Release(disp); + + return node; +} + #define test_elem_attr(e,n,v) _test_elem_attr(__LINE__,e,n,v) static void _test_elem_attr(unsigned line, IHTMLElement *elem, LPCWSTR name, LPCWSTR exval) { @@ -1014,6 +1070,57 @@ static void _test_elem_getelembytag(unsigned line, IUnknown *unk, elem_type_t ty HeapFree(GetProcessHeap(), 0, types); } +#define test_elem_innertext(e,t) _test_elem_innertext(__LINE__,e,t) +static void _test_elem_innertext(unsigned line, IHTMLElement *elem, const char *extext) +{ + BSTR text = NULL; + HRESULT hres; + + hres = IHTMLElement_get_innerText(elem, &text); + ok_(__FILE__,line) (hres == S_OK, "get_innerText failed: %08x\n", hres); + ok_(__FILE__,line) (!strcmp_wa(text, extext), "get_innerText returned %s expected %s\n", + dbgstr_w(text), extext); + SysFreeString(text); +} + +#define test_elem_set_innertext(e,t) _test_elem_set_innertext(__LINE__,e,t) +static void _test_elem_set_innertext(unsigned line, IHTMLElement *elem, const char *text) +{ + IHTMLDOMChildrenCollection *col; + BSTR str; + HRESULT hres; + + str = a2bstr(text); + hres = IHTMLElement_put_innerText(elem, str); + ok_(__FILE__,line) (hres == S_OK, "put_innerText failed: %08x\n", hres); + SysFreeString(str); + + _test_elem_innertext(line, elem, text); + + + col = _get_child_nodes(line, (IUnknown*)elem); + ok(col != NULL, "col == NULL\n"); + if(col) { + long length = 0, type; + IHTMLDOMNode *node; + + hres = IHTMLDOMChildrenCollection_get_length(col, &length); + ok(hres == S_OK, "get_length failed: %08x\n", hres); + ok(length == 1, "length = %ld\n", length); + + node = _get_child_item(line, col, 0); + ok(node != NULL, "node == NULL\n"); + if(node) { + type = _get_node_type(line, (IUnknown*)node); + ok(type == 3, "type=%ld\n", type); + IHTMLDOMNode_Release(node); + } + + IHTMLDOMChildrenCollection_Release(col); + } + +} + #define get_first_child(n) _get_first_child(__LINE__,n) static IHTMLDOMNode *_get_first_child(unsigned line, IUnknown *unk) { @@ -1056,21 +1163,6 @@ static IHTMLDOMNode *_test_node_get_parent(unsigned line, IUnknown *unk) return parent; } -#define get_node_type(n) _get_node_type(__LINE__,n) -static long _get_node_type(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode *node = _get_node_iface(line, unk); - long type = -1; - HRESULT hres; - - hres = IHTMLDOMNode_get_nodeType(node, &type); - ok(hres == S_OK, "get_nodeType failed: %08x\n", hres); - - IHTMLDOMNode_Release(node); - - return type; -} - #define test_elem_get_parent(u) _test_elem_get_parent(__LINE__,u) static IHTMLElement *_test_elem_get_parent(unsigned line, IUnknown *unk) { @@ -1228,6 +1320,20 @@ static void _elem_get_scroll_left(unsigned line, IUnknown *unk) ok(l == l2, "unexpected left %ld, expected %ld\n", l2, l); } +#define test_img_src(i,s) _test_img_src(__LINE__,i,s) +static void _test_img_src(unsigned line, IUnknown *unk, const char *exsrc) +{ + IHTMLImgElement *img = _get_img_iface(line, unk); + BSTR src; + HRESULT hres; + + hres = IHTMLImgElement_get_src(img, &src); + IHTMLImgElement_Release(img); + ok_(__FILE__,line) (hres == S_OK, "get_src failed: %08x\n", hres); + ok_(__FILE__,line) (!strcmp_wa(src, exsrc), "get_src returned %s expected %s\n", dbgstr_w(src), exsrc); + SysFreeString(src); +} + #define test_img_set_src(u,s) _test_img_set_src(__LINE__,u,s) static void _test_img_set_src(unsigned line, IUnknown *unk, const char *src) { @@ -1240,6 +1346,8 @@ static void _test_img_set_src(unsigned line, IUnknown *unk, const char *src) IHTMLImgElement_Release(img); SysFreeString(tmp); ok_(__FILE__,line) (hres == S_OK, "put_src failed: %08x\n", hres); + + _test_img_src(line, unk, src); } #define test_img_alt(u,a) _test_img_alt(__LINE__,u,a) @@ -1297,6 +1405,50 @@ static void _test_input_set_disabled(unsigned line, IHTMLInputElement *input, VA _test_input_get_disabled(line, input, b); } +#define test_input_get_defaultchecked(i,b) _test_input_get_defaultchecked(__LINE__,i,b) +static void _test_input_get_defaultchecked(unsigned line, IHTMLInputElement *input, VARIANT_BOOL exb) +{ + VARIANT_BOOL checked = 100; + HRESULT hres; + + hres = IHTMLInputElement_get_defaultChecked(input, &checked); + ok_(__FILE__,line) (hres == S_OK, "get_defaultChecked failed: %08x\n", hres); + ok_(__FILE__,line) (checked == exb, "checked=%x, expected %x\n", checked, exb); +} + +#define test_input_set_defaultchecked(i,b) _test_input_set_defaultchecked(__LINE__,i,b) +static void _test_input_set_defaultchecked(unsigned line, IHTMLInputElement *input, VARIANT_BOOL b) +{ + HRESULT hres; + + hres = IHTMLInputElement_put_defaultChecked(input, b); + ok_(__FILE__,line) (hres == S_OK, "get_defaultChecked failed: %08x\n", hres); + + _test_input_get_defaultchecked(line, input, b); +} + +#define test_input_get_checked(i,b) _test_input_get_checked(__LINE__,i,b) +static void _test_input_get_checked(unsigned line, IHTMLInputElement *input, VARIANT_BOOL exb) +{ + VARIANT_BOOL checked = 100; + HRESULT hres; + + hres = IHTMLInputElement_get_checked(input, &checked); + ok_(__FILE__,line) (hres == S_OK, "get_checked failed: %08x\n", hres); + ok_(__FILE__,line) (checked == exb, "checked=%x, expected %x\n", checked, exb); +} + +#define test_input_set_checked(i,b) _test_input_set_checked(__LINE__,i,b) +static void _test_input_set_checked(unsigned line, IHTMLInputElement *input, VARIANT_BOOL b) +{ + HRESULT hres; + + hres = IHTMLInputElement_put_checked(input, b); + ok_(__FILE__,line) (hres == S_OK, "get_checked failed: %08x\n", hres); + + _test_input_get_checked(line, input, b); +} + #define test_input_value(o,t) _test_input_value(__LINE__,o,t) static void _test_input_value(unsigned line, IUnknown *unk, const char *exval) { @@ -1338,27 +1490,6 @@ static void _test_input_put_value(unsigned line, IUnknown *unk, const char *val) IHTMLInputElement_Release(input); } -#define get_child_nodes(u) _get_child_nodes(__LINE__,u) -static IHTMLDOMChildrenCollection *_get_child_nodes(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode *node = _get_node_iface(line, unk); - IHTMLDOMChildrenCollection *col = NULL; - IDispatch *disp; - HRESULT hres; - - hres = IHTMLDOMNode_get_childNodes(node, &disp); - IHTMLDOMNode_Release(node); - ok_(__FILE__,line) (hres == S_OK, "get_childNodes failed: %08x\n", hres); - if(FAILED(hres)) - return NULL; - - hres = IDispatch_QueryInterface(disp, &IID_IHTMLDOMChildrenCollection, (void**)&col); - IDispatch_Release(disp); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMChildrenCollection: %08x\n", hres); - - return col; -} - #define test_elem_class(u,c) _test_elem_class(__LINE__,u,c) static void _test_elem_class(unsigned line, IUnknown *unk, const char *exclass) { @@ -1418,22 +1549,6 @@ static void _test_elem_set_class(unsigned line, IUnknown *unk, const char *class _test_elem_class(line, unk, class); } -#define get_child_item(c,i) _get_child_item(__LINE__,c,i) -static IHTMLDOMNode *_get_child_item(unsigned line, IHTMLDOMChildrenCollection *col, long idx) -{ - IHTMLDOMNode *node = NULL; - IDispatch *disp; - HRESULT hres; - - hres = IHTMLDOMChildrenCollection_item(col, idx, &disp); - ok(hres == S_OK, "item failed: %08x\n", hres); - - node = _get_node_iface(line, (IUnknown*)disp); - IDispatch_Release(disp); - - return node; -} - #define test_elem_id(e,i) _test_elem_id(__LINE__,e,i) static void _test_elem_id(unsigned line, IUnknown *unk, const char *exid) { @@ -1607,6 +1722,23 @@ static IHTMLDOMNode *_test_node_append_child(unsigned line, IUnknown *node_unk, return new_child; } +#define test_node_insertbefore(n,c,v) _test_node_insertbefore(__LINE__,n,c,v) +static IHTMLDOMNode *_test_node_insertbefore(unsigned line, IUnknown *node_unk, IHTMLDOMNode *child, VARIANT *var) +{ + IHTMLDOMNode *node = _get_node_iface(line, node_unk); + IHTMLDOMNode *new_child = NULL; + HRESULT hres; + + hres = IHTMLDOMNode_insertBefore(node, child, *var, &new_child); + ok_(__FILE__,line) (hres == S_OK, "insertBefore failed: %08x\n", hres); + ok_(__FILE__,line) (new_child != NULL, "new_child == NULL\n"); + /* TODO ok_(__FILE__,line) (new_child != child, "new_child == child\n"); */ + + IHTMLDOMNode_Release(node); + + return new_child; +} + #define test_node_remove_child(n,c) _test_node_remove_child(__LINE__,n,c) static void _test_node_remove_child(unsigned line, IUnknown *unk, IHTMLDOMNode *child) { @@ -1615,7 +1747,7 @@ static void _test_node_remove_child(unsigned line, IUnknown *unk, IHTMLDOMNode * HRESULT hres; hres = IHTMLDOMNode_removeChild(node, child, &new_node); - ok_(__FILE__,line) (hres == S_OK, "appendChild failed: %08x\n", hres); + ok_(__FILE__,line) (hres == S_OK, "removeChild failed: %08x\n", hres); ok_(__FILE__,line) (new_node != NULL, "new_node == NULL\n"); /* TODO ok_(__FILE__,line) (new_node != child, "new_node == child\n"); */ @@ -2068,6 +2200,8 @@ static void test_navigator(IHTMLDocument2 *doc) BSTR bstr; HRESULT hres; + static const WCHAR v40[] = {'4','.','0'}; + hres = IHTMLDocument2_get_parentWindow(doc, &window); ok(hres == S_OK, "parentWidnow failed: %08x\n", hres); @@ -2090,10 +2224,16 @@ static void test_navigator(IHTMLDocument2 *doc) bstr = NULL; hres = IOmNavigator_get_platform(navigator, &bstr); - ok(hres == S_OK, "get_appMinorVersion failed: %08x\n", hres); + ok(hres == S_OK, "get_platform failed: %08x\n", hres); ok(!strcmp_wa(bstr, "Win32"), "unexpected platform %s\n", dbgstr_w(bstr)); SysFreeString(bstr); + bstr = NULL; + hres = IOmNavigator_get_appVersion(navigator, &bstr); + ok(hres == S_OK, "get_appVersion failed: %08x\n", hres); + ok(!memcmp(bstr, v40, sizeof(v40)), "appVersion is %s\n", dbgstr_w(bstr)); + SysFreeString(bstr); + ref = IOmNavigator_Release(navigator); ok(!ref, "navigator should be destroyed here\n"); } @@ -2255,6 +2395,17 @@ static void test_default_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); VariantClear(&v); + V_VT(&v) = VT_NULL; + hres = IHTMLStyle_put_left(style, v); + ok(hres == S_OK, "put_left failed: %08x\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_left(style, &v); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); + VariantClear(&v); + V_VT(&v) = VT_EMPTY; hres = IHTMLStyle_get_top(style, &v); ok(hres == S_OK, "get_top failed: %08x\n", hres); @@ -2275,6 +2426,17 @@ static void test_default_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); VariantClear(&v); + V_VT(&v) = VT_NULL; + hres = IHTMLStyle_put_top(style, v); + ok(hres == S_OK, "put_top failed: %08x\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_top(style, &v); + ok(hres == S_OK, "get_top failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); + VariantClear(&v); + V_VT(&v) = VT_EMPTY; hres = IHTMLStyle_get_height(style, &v); ok(hres == S_OK, "get_height failed: %08x\n", hres); @@ -2942,6 +3104,8 @@ static void test_elems(IHTMLDocument2 *doc) test_elem_getelembytag((IUnknown*)elem, ET_SELECT, 0); test_elem_getelembytag((IUnknown*)elem, ET_HTML, 0); + test_elem_innertext(elem, "opt1opt2"); + IHTMLElement_Release(elem); } @@ -3018,12 +3182,21 @@ static void test_elems(IHTMLDocument2 *doc) test_elem_set_tabindex((IUnknown*)elem, 3); test_elem_title((IUnknown*)elem, "test title"); + test_input_get_defaultchecked(input, VARIANT_FALSE); + test_input_set_defaultchecked(input, VARIANT_TRUE); + test_input_set_defaultchecked(input, VARIANT_FALSE); + + test_input_get_checked(input, VARIANT_FALSE); + test_input_set_checked(input, VARIANT_TRUE); + test_input_set_checked(input, VARIANT_FALSE); + IHTMLInputElement_Release(input); IHTMLElement_Release(elem); } elem = get_elem_by_id(doc, imgidW, TRUE); if(elem) { + test_img_src((IUnknown*)elem, ""); test_img_set_src((IUnknown*)elem, "about:blank"); test_img_alt((IUnknown*)elem, NULL); test_img_set_alt((IUnknown*)elem, "alt test"); @@ -3126,6 +3299,11 @@ static void test_elems(IHTMLDocument2 *doc) test_stylesheets(doc); test_create_option_elem(doc); + elem = get_doc_elem_by_id(doc, tblW); + ok(elem != NULL, "elem = NULL\n"); + test_elem_set_innertext(elem, "inner text"); + IHTMLElement_Release(elem); + test_doc_title(doc, "test"); test_doc_set_title(doc, "test title"); test_doc_title(doc, "test title"); @@ -3134,8 +3312,9 @@ static void test_elems(IHTMLDocument2 *doc) static void test_create_elems(IHTMLDocument2 *doc) { IHTMLElement *elem, *body, *elem2; - IHTMLDOMNode *node; + IHTMLDOMNode *node, *node2, *node3; IDispatch *disp; + VARIANT var; long type; HRESULT hres; @@ -3170,14 +3349,29 @@ static void test_create_elems(IHTMLDocument2 *doc) IDispatch_Release(disp); test_node_has_child((IUnknown*)body, VARIANT_FALSE); - IHTMLElement_Release(body); IHTMLElement_Release(elem); IHTMLDOMNode_Release(node); node = test_create_text(doc, "test"); test_ifaces((IUnknown*)node, text_iids); test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode); + + V_VT(&var) = VT_NULL; + node2 = test_node_insertbefore((IUnknown*)body, node, &var); + IHTMLDOMNode_Release(node); + + node = test_create_text(doc, "insert "); + + V_VT(&var) = VT_DISPATCH; + V_DISPATCH(&var) = (IDispatch*)node2; + node3 = test_node_insertbefore((IUnknown*)body, node, &var); IHTMLDOMNode_Release(node); + IHTMLDOMNode_Release(node2); + IHTMLDOMNode_Release(node3); + + test_elem_innertext(body, "insert test"); + + IHTMLElement_Release(body); } static void test_exec(IUnknown *unk, const GUID *grpid, DWORD cmdid, VARIANT *in, VARIANT *out) @@ -3235,6 +3429,25 @@ static void test_indent(IHTMLDocument2 *doc) IHTMLElementCollection_Release(col); } +static void test_cond_comment(IHTMLDocument2 *doc) +{ + IHTMLElementCollection *col; + HRESULT hres; + + static const elem_type_t all_types[] = { + ET_HTML, + ET_HEAD, + ET_TITLE, + ET_BODY, + ET_BR + }; + + hres = IHTMLDocument2_get_all(doc, &col); + ok(hres == S_OK, "get_all failed: %08x\n", hres); + test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0])); + IHTMLElementCollection_Release(col); +} + static IHTMLDocument2 *notif_doc; static BOOL doc_complete; @@ -3418,6 +3631,7 @@ START_TEST(dom) run_domtest(doc_blank, test_create_elems); run_domtest(doc_blank, test_defaults); run_domtest(indent_test_str, test_indent); + run_domtest(cond_comment_str, test_cond_comment); CoUninitialize(); gecko_installer_workaround(FALSE); diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index 3f383d11ae7..5a71ab30386 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -193,7 +193,7 @@ static inline void wstrbuf_finish(wstrbuf_t *buf) static void wstrbuf_append_len(wstrbuf_t *buf, LPCWSTR str, int len) { if(buf->len+len >= buf->size) { - buf->size = 2*buf->len+len; + buf->size = 2*buf->size+len; buf->buf = heap_realloc(buf->buf, buf->size * sizeof(WCHAR)); } @@ -210,7 +210,7 @@ static void wstrbuf_append_nodetxt(wstrbuf_t *buf, LPCWSTR str, int len) TRACE("%s\n", debugstr_wn(str, len)); if(buf->len+len >= buf->size) { - buf->size = 2*buf->len+len; + buf->size = 2*buf->size+len; buf->buf = heap_realloc(buf->buf, buf->size * sizeof(WCHAR)); } @@ -252,7 +252,7 @@ static void wstrbuf_append_node(wstrbuf_t *buf, nsIDOMNode *node) wstrbuf_append_nodetxt(buf, data, strlenW(data)); nsAString_Finish(&data_str); - nsIDOMText_Release(nstext); + nsIDOMText_Release(nstext); break; } @@ -267,6 +267,21 @@ static void wstrbuf_append_node(wstrbuf_t *buf, nsIDOMNode *node) } } +static void wstrbuf_append_node_rec(wstrbuf_t *buf, nsIDOMNode *node) +{ + nsIDOMNode *iter, *tmp; + + wstrbuf_append_node(buf, node); + + nsIDOMNode_GetFirstChild(node, &iter); + while(iter) { + wstrbuf_append_node_rec(buf, iter); + nsIDOMNode_GetNextSibling(iter, &tmp); + nsIDOMNode_Release(iter); + iter = tmp; + } +} + static BOOL fill_nodestr(dompos_t *pos) { nsIDOMText *text; @@ -529,6 +544,27 @@ static void range_to_string(HTMLTxtRange *This, wstrbuf_t *buf) } } +HRESULT get_node_text(HTMLDOMNode *node, BSTR *ret) +{ + wstrbuf_t buf; + HRESULT hres = S_OK; + + wstrbuf_init(&buf); + wstrbuf_append_node_rec(&buf, node->nsnode); + if(buf.buf) { + *ret = SysAllocString(buf.buf); + if(!*ret) + hres = E_OUTOFMEMORY; + }else { + *ret = NULL; + } + wstrbuf_finish(&buf); + + if(SUCCEEDED(hres)) + TRACE("ret %s\n", debugstr_w(*ret)); + return hres; +} + static WCHAR get_pos_char(const dompos_t *pos) { switch(pos->type) { diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 7f73eaa9cbc..0c574178914 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1481,8 +1481,12 @@ static UINT load_file(MSIRECORD *row, LPVOID param) /* if the compressed bits are not set in the file attributes, * then read the information from the package word count property */ - if (file->Attributes & - (msidbFileAttributesCompressed | msidbFileAttributesPatchAdded)) + if (package->WordCount & msidbSumInfoSourceTypeAdminImage) + { + file->IsCompressed = FALSE; + } + else if (file->Attributes & + (msidbFileAttributesCompressed | msidbFileAttributesPatchAdded)) { file->IsCompressed = TRUE; } diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index 70bf13aafd6..b33594658f9 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -743,20 +743,21 @@ static UINT ACTION_SearchDirectory(MSIPACKAGE *package, MSISIGNATURE *sig, LPCWSTR path, int depth, LPWSTR *appValue) { UINT rc; + LPWSTR val = NULL; TRACE("%p, %p, %s, %d, %p\n", package, sig, debugstr_w(path), depth, appValue); + if (ACTION_IsFullPath(path)) { if (sig->File) - rc = ACTION_RecurseSearchDirectory(package, appValue, sig, - path, depth); + rc = ACTION_RecurseSearchDirectory(package, &val, sig, path, depth); else { /* Recursively searching a directory makes no sense when the * directory to search is the thing you're trying to find. */ - rc = ACTION_CheckDirectory(package, path, appValue); + rc = ACTION_CheckDirectory(package, path, &val); } } else @@ -766,24 +767,37 @@ static UINT ACTION_SearchDirectory(MSIPACKAGE *package, MSISIGNATURE *sig, int i; rc = ERROR_SUCCESS; - *appValue = NULL; - for (i = 0; rc == ERROR_SUCCESS && !*appValue && i < 26; i++) - if (drives & (1 << i)) - { - pathWithDrive[0] = 'A' + i; - if (GetDriveTypeW(pathWithDrive) == DRIVE_FIXED) - { - lstrcpynW(pathWithDrive + 3, path, - sizeof(pathWithDrive) / sizeof(pathWithDrive[0]) - 3); - if (sig->File) - rc = ACTION_RecurseSearchDirectory(package, appValue, - sig, pathWithDrive, depth); - else - rc = ACTION_CheckDirectory(package, pathWithDrive, - appValue); - } - } + for (i = 0; rc == ERROR_SUCCESS && !val && i < 26; i++) + { + if (!(drives & (1 << i))) + continue; + + pathWithDrive[0] = 'A' + i; + if (GetDriveTypeW(pathWithDrive) != DRIVE_FIXED) + continue; + + lstrcpynW(pathWithDrive + 3, path, + sizeof(pathWithDrive) / sizeof(pathWithDrive[0]) - 3); + + if (sig->File) + rc = ACTION_RecurseSearchDirectory(package, &val, sig, + pathWithDrive, depth); + else + rc = ACTION_CheckDirectory(package, pathWithDrive, &val); + } + } + + if (val && val[lstrlenW(val) - 1] != '\\') + { + val = msi_realloc(val, (lstrlenW(val) + 2) * sizeof(WCHAR)); + if (!val) + rc = ERROR_OUTOFMEMORY; + else + PathAddBackslashW(val); } + + *appValue = val; + TRACE("returning %d\n", rc); return rc; } @@ -799,10 +813,12 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU 'D','r','L','o','c','a','t','o','r',' ', 'w','h','e','r','e',' ', 'S','i','g','n','a','t','u','r','e','_',' ','=',' ', '\'','%','s','\'',0}; - LPWSTR parentName = NULL, path = NULL, parent = NULL; + LPWSTR parentName = NULL, parent = NULL; + WCHAR path[MAX_PATH]; WCHAR expanded[MAX_PATH]; MSIRECORD *row; int depth; + DWORD sz; UINT rc; TRACE("%s\n", debugstr_w(sig->Name)); @@ -829,33 +845,29 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU ACTION_FreeSignature(&parentSig); msi_free(parentName); } - /* now look for path */ - path = msi_dup_record_field(row,3); + + sz = MAX_PATH; + MSI_RecordGetStringW(row, 3, path, &sz); + if (MSI_RecordIsNull(row,4)) depth = 0; else depth = MSI_RecordGetInteger(row,4); + ACTION_ExpandAnyPath(package, path, expanded, MAX_PATH); - msi_free(path); + if (parent) { - path = msi_alloc((strlenW(parent) + strlenW(expanded) + 1) * sizeof(WCHAR)); - if (!path) - { - rc = ERROR_OUTOFMEMORY; - goto end; - } strcpyW(path, parent); strcatW(path, expanded); } else - path = expanded; + strcpyW(path, expanded); + + PathAddBackslashW(path); rc = ACTION_SearchDirectory(package, sig, path, depth, appValue); -end: - if (path != expanded) - msi_free(path); msi_free(parent); msiobj_release(&row->hdr); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 7f40e32c972..8d04ff6e43e 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -768,6 +768,17 @@ static const CHAR mcomp_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVers "lithium\tlithium\tlithium\t0\t\t\t8192\t1\n" "beryllium\tmissingcomp\tberyllium\t0\t\t\t8192\t1"; +static const CHAR ai_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n" + "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n" + "one.txt\tOne\tone.txt\t1000\t\t\t16384\t1\n" + "three.txt\tThree\tthree.txt\t1000\t\t\t16384\t3\n" + "two.txt\tTwo\ttwo.txt\t1000\t\t\t16384\t2\n" + "file\tcomponent\tfilename\t100\t\t\t8192\t1\n" + "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1"; + typedef struct _msi_table { const CHAR *filename; @@ -1166,6 +1177,18 @@ static const msi_table mcomp_tables[] = ADD_TABLE(property), }; +static const msi_table ai_tables[] = +{ + ADD_TABLE(component), + ADD_TABLE(directory), + ADD_TABLE(feature), + ADD_TABLE(feature_comp), + ADD_TABLE(ai_file), + ADD_TABLE(install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -1552,7 +1575,7 @@ static void write_file(const CHAR *filename, const char *data, int data_size) CloseHandle(hf); } -static void write_msi_summary_info(MSIHANDLE db) +static void write_msi_summary_info(MSIHANDLE db, INT wordcount) { MSIHANDLE summary; UINT r; @@ -1570,7 +1593,7 @@ static void write_msi_summary_info(MSIHANDLE db) r = MsiSummaryInfoSetPropertyA(summary, PID_PAGECOUNT, VT_I4, 100, NULL, NULL); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - r = MsiSummaryInfoSetPropertyA(summary, PID_WORDCOUNT, VT_I4, 0, NULL, NULL); + r = MsiSummaryInfoSetPropertyA(summary, PID_WORDCOUNT, VT_I4, wordcount, NULL, NULL); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); r = MsiSummaryInfoSetPropertyA(summary, PID_TITLE, VT_LPSTR, 0, NULL, "MSITEST"); @@ -1583,7 +1606,11 @@ static void write_msi_summary_info(MSIHANDLE db) MsiCloseHandle(summary); } -static void create_database(const CHAR *name, const msi_table *tables, int num_tables) +#define create_database(name, tables, num_tables) \ + create_database_wordcount(name, tables, num_tables, 0); + +static void create_database_wordcount(const CHAR *name, const msi_table *tables, + int num_tables, INT wordcount) { MSIHANDLE db; UINT r; @@ -1605,7 +1632,7 @@ static void create_database(const CHAR *name, const msi_table *tables, int num_t DeleteFileA(table->filename); } - write_msi_summary_info(db); + write_msi_summary_info(db, wordcount); r = MsiDatabaseCommit(db); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); @@ -5474,6 +5501,58 @@ static void test_sourcedirprop(void) RemoveDirectory("altsource"); } +static void test_adminimage(void) +{ + UINT r; + + CreateDirectoryA("msitest", NULL); + CreateDirectoryA("msitest\\first", NULL); + CreateDirectoryA("msitest\\second", NULL); + CreateDirectoryA("msitest\\cabout", NULL); + CreateDirectoryA("msitest\\cabout\\new", NULL); + create_file("msitest\\one.txt", 100); + create_file("msitest\\first\\two.txt", 100); + create_file("msitest\\second\\three.txt", 100); + create_file("msitest\\cabout\\four.txt", 100); + create_file("msitest\\cabout\\new\\five.txt", 100); + create_file("msitest\\filename", 100); + create_file("msitest\\service.exe", 100); + + create_database_wordcount(msifile, ai_tables, + sizeof(ai_tables) / sizeof(msi_table), + msidbSumInfoSourceTypeAdminImage); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); + ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); + + DeleteFileA("msitest.msi"); + DeleteFileA("msitest\\cabout\\new\\five.txt"); + DeleteFileA("msitest\\cabout\\four.txt"); + DeleteFileA("msitest\\second\\three.txt"); + DeleteFileA("msitest\\first\\two.txt"); + DeleteFileA("msitest\\one.txt"); + DeleteFileA("msitest\\service.exe"); + DeleteFileA("msitest\\filename"); + RemoveDirectoryA("msitest\\cabout\\new"); + RemoveDirectoryA("msitest\\cabout"); + RemoveDirectoryA("msitest\\second"); + RemoveDirectoryA("msitest\\first"); + RemoveDirectoryA("msitest"); +} + START_TEST(install) { DWORD len; @@ -5545,6 +5624,7 @@ START_TEST(install) test_MsiConfigureProductEx(); test_missingcomponent(); test_sourcedirprop(); + test_adminimage(); DeleteFileA("msitest.log"); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 581ffd5ddd5..b6b3a789508 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -6379,10 +6379,7 @@ static void test_appsearch_reglocator(void) sprintf(path, "%s\\", CURR_DIR); r = MsiGetPropertyA(hpkg, "SIGPROP13", prop, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - } + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); size = MAX_PATH; r = MsiGetPropertyA(hpkg, "SIGPROP14", prop, &size); @@ -6783,19 +6780,13 @@ static void test_appsearch_drlocator(void) sprintf(path, "%s\\", CURR_DIR); r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - } + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); size = MAX_PATH; sprintf(path, "%s\\", CURR_DIR); r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - } + ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); size = MAX_PATH; r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size); diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c index bc1202a418a..1914ca88fa4 100644 --- a/dlls/msxml3/bsc.c +++ b/dlls/msxml3/bsc.c @@ -69,7 +69,7 @@ static HRESULT WINAPI bsc_QueryInterface( return S_OK; } - FIXME("interface %s not implemented\n", debugstr_guid(riid)); + TRACE("interface %s not implemented\n", debugstr_guid(riid)); return E_NOINTERFACE; } diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c index 927206879a2..ab9d909035e 100644 --- a/dlls/msxml3/dispex.c +++ b/dlls/msxml3/dispex.c @@ -436,18 +436,37 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW } if(grfdex & fdexNameEnsure) { + dispex_dynamic_data_t *dynamic_data; + TRACE("creating dynamic prop %s\n", debugstr_w(bstrName)); - if(!This->dynamic_data) { - This->dynamic_data = heap_alloc_zero(sizeof(dispex_dynamic_data_t)); - This->dynamic_data->props = heap_alloc(This->dynamic_data->buf_size = 4); - }else if(This->dynamic_data->buf_size == This->dynamic_data->prop_cnt) { - This->dynamic_data->props = heap_realloc(This->dynamic_data->props, This->dynamic_data->buf_size<<=1); + if(This->dynamic_data) { + dynamic_data = This->dynamic_data; + }else { + dynamic_data = This->dynamic_data = heap_alloc_zero(sizeof(dispex_dynamic_data_t)); + if(!dynamic_data) + return E_OUTOFMEMORY; + } + + if(!dynamic_data->buf_size) { + dynamic_data->props = heap_alloc(sizeof(dynamic_prop_t)*4); + if(!dynamic_data->props) + return E_OUTOFMEMORY; + dynamic_data->buf_size = 4; + }else if(dynamic_data->buf_size == dynamic_data->prop_cnt) { + dynamic_prop_t *new_props; + + new_props = heap_realloc(dynamic_data->props, sizeof(dynamic_prop_t)*(dynamic_data->buf_size<<1)); + if(!new_props) + return E_OUTOFMEMORY; + + dynamic_data->props = new_props; + dynamic_data->buf_size <<= 1; } - This->dynamic_data->props[This->dynamic_data->prop_cnt].name = heap_strdupW(bstrName); - VariantInit(&This->dynamic_data->props[This->dynamic_data->prop_cnt].var); - *pid = DISPID_DYNPROP_0 + This->dynamic_data->prop_cnt++; + dynamic_data->props[dynamic_data->prop_cnt].name = heap_strdupW(bstrName); + VariantInit(&dynamic_data->props[dynamic_data->prop_cnt].var); + *pid = DISPID_DYNPROP_0 + dynamic_data->prop_cnt++; return S_OK; } diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index d03d8c7742f..c685889a953 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -330,6 +330,7 @@ static HRESULT WINAPI xmldoc_IPersistStream_Load( return E_FAIL; } + xmldoc->_private = create_priv(); attach_xmlnode( This->node, (xmlNodePtr)xmldoc ); return S_OK; @@ -921,6 +922,7 @@ static HRESULT WINAPI domdoc_put_documentElement( { domdoc *This = impl_from_IXMLDOMDocument2( iface ); IXMLDOMNode *elementNode; + xmlNodePtr oldRoot; xmlnode *xmlNode; HRESULT hr; @@ -931,9 +933,17 @@ static HRESULT WINAPI domdoc_put_documentElement( return hr; xmlNode = impl_from_IXMLDOMNode( elementNode ); - xmlDocSetRootElement( get_doc(This), xmlNode->node); + + if(!xmlNode->node->parent) + if(xmldoc_remove_orphan(xmlNode->node->doc, xmlNode->node) != S_OK) + WARN("%p is not an orphan of %p\n", xmlNode->node->doc, xmlNode->node); + + oldRoot = xmlDocSetRootElement( get_doc(This), xmlNode->node); IXMLDOMNode_Release( elementNode ); + if(oldRoot) + xmldoc_add_orphan(oldRoot->doc, oldRoot); + return S_OK; } diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 1ed30402e94..4a20d5e6be4 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -153,6 +153,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, irp.UserBuffer = out_buff; irp.MdlAddress = &mdl; irp.Tail.Overlay.s.u.CurrentStackLocation = &irpsp; + irp.UserIosb = NULL; irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL; irpsp.Parameters.DeviceIoControl.OutputBufferLength = *out_size; @@ -160,6 +161,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, irpsp.Parameters.DeviceIoControl.IoControlCode = code; irpsp.Parameters.DeviceIoControl.Type3InputBuffer = in_buff; irpsp.DeviceObject = device; + irpsp.CompletionRoutine = NULL; mdl.Next = NULL; mdl.Size = 0; diff --git a/dlls/oleacc/Makefile.in b/dlls/oleacc/Makefile.in index 5822916d8df..01b03ae6775 100644 --- a/dlls/oleacc/Makefile.in +++ b/dlls/oleacc/Makefile.in @@ -4,11 +4,13 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = oleacc.dll IMPORTLIB = oleacc -IMPORTS = kernel32 +IMPORTS = user32 kernel32 C_SRCS = \ main.c +RC_SRCS = oleacc.rc + @MAKE_DLL_RULES@ @DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c index 9a6f765769a..5076e001866 100644 --- a/dlls/oleacc/main.c +++ b/dlls/oleacc/main.c @@ -24,10 +24,13 @@ #include "winuser.h" #include "ole2.h" +#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(oleacc); +static HINSTANCE oleacc_handle = 0; + HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject, REFIID riidInterface, void** ppvObject ) { @@ -50,6 +53,21 @@ HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID, return E_NOTIMPL; } +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, + LPVOID lpvReserved) +{ + TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + oleacc_handle = hinstDLL; + DisableThreadLibraryCalls(hinstDLL); + break; + } + return TRUE; +} + HRESULT WINAPI DllRegisterServer(void) { FIXME("\n"); @@ -67,3 +85,59 @@ void WINAPI GetOleaccVersionInfo(DWORD* pVersion, DWORD* pBuild) *pVersion = MAKELONG(2,4); /* Windows XP version of oleacc: 4.2.5406.0 */ *pBuild = MAKELONG(0,5406); } + +UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax) +{ + INT ret; + WCHAR *resptr; + + TRACE("%u %p %u\n", role, lpRole, rolemax); + + /* return role text length */ + if(!lpRole) + return LoadStringW(oleacc_handle, role, (LPWSTR)&resptr, 0); + + ret = LoadStringW(oleacc_handle, role, lpRole, rolemax); + if(!(ret > 0)){ + if(rolemax > 0) lpRole[0] = '\0'; + return 0; + } + + return ret; +} + +UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax) +{ + UINT length; + WCHAR *roletextW; + + TRACE("%u %p %u\n", role, lpRole, rolemax); + + length = GetRoleTextW(role, NULL, 0); + if((length == 0) || (lpRole && !rolemax)) + return 0; + + roletextW = HeapAlloc(GetProcessHeap(), 0, (length + 1)*sizeof(WCHAR)); + if(!roletextW) + return 0; + + GetRoleTextW(role, roletextW, length + 1); + + length = WideCharToMultiByte( CP_ACP, 0, roletextW, -1, NULL, 0, NULL, NULL ); + + if(!lpRole){ + HeapFree(GetProcessHeap(), 0, roletextW); + return length - 1; + } + + WideCharToMultiByte( CP_ACP, 0, roletextW, -1, lpRole, rolemax, NULL, NULL ); + + if(rolemax < length){ + lpRole[rolemax-1] = '\0'; + length = rolemax; + } + + HeapFree(GetProcessHeap(), 0, roletextW); + + return length - 1; +} diff --git a/include/dxgi.idl b/dlls/oleacc/oleacc.rc similarity index 84% copy from include/dxgi.idl copy to dlls/oleacc/oleacc.rc index 85f561f65f7..0795a9b9488 100644 --- a/include/dxgi.idl +++ b/dlls/oleacc/oleacc.rc @@ -1,5 +1,7 @@ /* - * Copyright 2007 Andras Kovacs + * Top level resource file for oleacc + * + * Copyright 2008 Nikolay Sivov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,4 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -import "dxgitype.idl"; +#include "windef.h" +#include "oleacc.h" + +#include "oleacc_En.rc" diff --git a/dlls/oleacc/oleacc.spec b/dlls/oleacc/oleacc.spec index 23b84b3f3de..2baeb2b383f 100644 --- a/dlls/oleacc/oleacc.spec +++ b/dlls/oleacc/oleacc.spec @@ -8,8 +8,8 @@ @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() @ stdcall GetOleaccVersionInfo(ptr ptr) -@ stub GetRoleTextA -@ stub GetRoleTextW +@ stdcall GetRoleTextA(long ptr long) +@ stdcall GetRoleTextW(long ptr long) @ stub GetStateTextA @ stub GetStateTextW @ stub IID_IAccessible diff --git a/dlls/oleacc/oleacc_En.rc b/dlls/oleacc/oleacc_En.rc new file mode 100644 index 00000000000..992d29c93f0 --- /dev/null +++ b/dlls/oleacc/oleacc_En.rc @@ -0,0 +1,90 @@ +/* + * English resources for oleacc + * + * Copyright 2008 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +{ + 0 "unknown object" /* undocumented */ + ROLE_SYSTEM_TITLEBAR "title bar" + ROLE_SYSTEM_MENUBAR "menu bar" + ROLE_SYSTEM_SCROLLBAR "scroll bar" + ROLE_SYSTEM_GRIP "grip" + ROLE_SYSTEM_SOUND "sound" + ROLE_SYSTEM_CURSOR "cursor" + ROLE_SYSTEM_CARET "caret" + ROLE_SYSTEM_ALERT "alert" + ROLE_SYSTEM_WINDOW "window" + ROLE_SYSTEM_CLIENT "client" + ROLE_SYSTEM_MENUPOPUP "popup menu" + ROLE_SYSTEM_MENUITEM "menu item" + ROLE_SYSTEM_TOOLTIP "tool tip" + ROLE_SYSTEM_APPLICATION "application" + ROLE_SYSTEM_DOCUMENT "document" + ROLE_SYSTEM_PANE "pane" + ROLE_SYSTEM_CHART "chart" + ROLE_SYSTEM_DIALOG "dialog" + ROLE_SYSTEM_BORDER "border" + ROLE_SYSTEM_GROUPING "grouping" + ROLE_SYSTEM_SEPARATOR "separator" + ROLE_SYSTEM_TOOLBAR "tool bar" + ROLE_SYSTEM_STATUSBAR "status bar" + ROLE_SYSTEM_TABLE "table" + ROLE_SYSTEM_COLUMNHEADER "column header" + ROLE_SYSTEM_ROWHEADER "row header" + ROLE_SYSTEM_COLUMN "column" + ROLE_SYSTEM_ROW "row" + ROLE_SYSTEM_CELL "cell" + ROLE_SYSTEM_LINK "link" + ROLE_SYSTEM_HELPBALLOON "help balloon" + ROLE_SYSTEM_CHARACTER "character" + ROLE_SYSTEM_LIST "list" + ROLE_SYSTEM_LISTITEM "list item" + ROLE_SYSTEM_OUTLINE "outline" + ROLE_SYSTEM_OUTLINEITEM "outline item" + ROLE_SYSTEM_PAGETAB "page tab" + ROLE_SYSTEM_PROPERTYPAGE "property page" + ROLE_SYSTEM_INDICATOR "indicator" + ROLE_SYSTEM_GRAPHIC "graphic" + ROLE_SYSTEM_STATICTEXT "static text" + ROLE_SYSTEM_TEXT "text" + ROLE_SYSTEM_PUSHBUTTON "push button" + ROLE_SYSTEM_CHECKBUTTON "check button" + ROLE_SYSTEM_RADIOBUTTON "radio button" + ROLE_SYSTEM_COMBOBOX "combo box" + ROLE_SYSTEM_DROPLIST "drop down" + ROLE_SYSTEM_PROGRESSBAR "progress bar" + ROLE_SYSTEM_DIAL "dial" + ROLE_SYSTEM_HOTKEYFIELD "hot key field" + ROLE_SYSTEM_SLIDER "slider" + ROLE_SYSTEM_SPINBUTTON "spin box" + ROLE_SYSTEM_DIAGRAM "diagram" + ROLE_SYSTEM_ANIMATION "animation" + ROLE_SYSTEM_EQUATION "equation" + ROLE_SYSTEM_BUTTONDROPDOWN "drop down button" + ROLE_SYSTEM_BUTTONMENU "menu button" + ROLE_SYSTEM_BUTTONDROPDOWNGRID "grid drop down button" + ROLE_SYSTEM_WHITESPACE "white space" + ROLE_SYSTEM_PAGETABLIST "page tab list" + ROLE_SYSTEM_CLOCK "clock" + ROLE_SYSTEM_SPLITBUTTON "split button" + ROLE_SYSTEM_IPADDRESS "IP address" + ROLE_SYSTEM_OUTLINEBUTTON "outline button" +} diff --git a/dlls/oleacc/Makefile.in b/dlls/oleacc/tests/Makefile.in similarity index 58% copy from dlls/oleacc/Makefile.in copy to dlls/oleacc/tests/Makefile.in index 5822916d8df..6e2bc8dc489 100644 --- a/dlls/oleacc/Makefile.in +++ b/dlls/oleacc/tests/Makefile.in @@ -1,14 +1,13 @@ TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. +TOPOBJDIR = ../../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = oleacc.dll -IMPORTLIB = oleacc -IMPORTS = kernel32 +TESTDLL = oleacc.dll +IMPORTS = kernel32 oleacc -C_SRCS = \ +CTESTS = \ main.c -@MAKE_DLL_RULES@ +@MAKE_TEST_RULES@ @DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c new file mode 100644 index 00000000000..66b25af1737 --- /dev/null +++ b/dlls/oleacc/tests/main.c @@ -0,0 +1,121 @@ +/* + * oleacc tests + * + * Copyright 2008 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include "wine/test.h" + +static void test_getroletext(void) +{ + INT ret, role; + CHAR buf[2], *buff, buff2[100]; + WCHAR bufW[2], *buffW, buff2W[100]; + + /* wrong role number */ + ret = GetRoleTextA(-1, NULL, 0); + ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); + buf[0] = '*'; + ret = GetRoleTextA(-1, buf, 2); + ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); + ok(buf[0] == '*', "GetRoleTextA modified buffer on wrong role number\n"); + buf[0] = '*'; + ret = GetRoleTextA(-1, buf, 0); + ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); + ok(buf[0] == '*', "GetRoleTextA modified buffer on wrong role number\n"); + + ret = GetRoleTextW(-1, NULL, 0); + ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); + bufW[0] = '*'; + ret = GetRoleTextW(-1, bufW, 2); + ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); + ok(bufW[0] == '\0', "GetRoleTextW doesn't return NULL char on wrong role number\n"); + bufW[0] = '*'; + ret = GetRoleTextW(-1, bufW, 0); + ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); + /* don't know why this char */ + todo_wine ok(bufW[0] == 0x1e90, "GetRoleTextW returned wrong char, got %u\n", bufW[0]); + + /* zero role number - not documented */ + ret = GetRoleTextA(0, NULL, 0); + ok(ret > 0, "GetRoleTextA doesn't return (>0) for zero role number, got %d\n", ret); + ret = GetRoleTextW(0, NULL, 0); + ok(ret > 0, "GetRoleTextW doesn't return (>0) for zero role number, got %d\n", ret); + + /* NULL buffer, return length */ + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0); + ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret); + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 1); + ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret); + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0); + ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret); + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 1); + ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret); + + /* use a smaller buffer */ + buf[0] = '*'; + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 1); + ok(ret == 0, "GetRoleTextA returned wrong length\n"); + ok(buf[0] == '\0', "GetRoleTextA returned not zero-length buffer\n"); + buf[1] = '*'; + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 2); + ok(ret == 1, "GetRoleTextA returned wrong length, got %d, expected 1\n", ret); + ok(buf[1] == '\0', "GetRoleTextA returned not zero-length buffer\n"); + + bufW[0] = '*'; + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 1); + ok(ret == 0, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret); + ok(bufW[0] == '\0', "GetRoleTextW returned not zero-length buffer\n"); + bufW[1] = '*'; + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 2); + ok(ret == 1, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret); + ok(bufW[1] == '\0', "GetRoleTextW returned not zero-length buffer\n"); + + /* use bigger buffer */ + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0); + buff = HeapAlloc(GetProcessHeap(), 0, 2*ret); + buff[2*ret-1] = '*'; + ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buff, 2*ret); + ok(buff[2*ret-1] == '*', "GetRoleTextA shouldn't modify this part of buffer\n"); + HeapFree(GetProcessHeap(), 0, buff); + + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0); + buffW = HeapAlloc(GetProcessHeap(), 0, 2*ret*sizeof(WCHAR)); + buffW[2*ret-1] = '*'; + ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, buffW, 2*ret); + ok(buffW[2*ret-1] == '*', "GetRoleTextW shouldn't modify this part of buffer\n"); + HeapFree(GetProcessHeap(), 0, buffW); + + /* check returned length for all roles */ + for(role = 0; role <= ROLE_SYSTEM_OUTLINEBUTTON; role++){ + ret = GetRoleTextA(role, NULL, 0); + GetRoleTextA(role, buff2, sizeof(buff2)); + ok(ret == lstrlenA(buff2), + "GetRoleTextA: returned length doesn't match returned buffer for role %d\n", role); + + ret = GetRoleTextW(role, NULL, 0); + GetRoleTextW(role, buff2W, sizeof(buff2W)/sizeof(WCHAR)); + ok(ret == lstrlenW(buff2W), + "GetRoleTextW: returned length doesn't match returned buffer for role %d\n", role); + } +} + +START_TEST(main) +{ + test_getroletext(); +} diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 09d2c32b2b6..93b932f7a05 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -509,7 +509,6 @@ static void OLEPicture_SendNotify(OLEPictureImpl* this, DISPID dispID) IUnknown_Release(CD.pUnk); } IEnumConnections_Release(pEnum); - return; } /************************************************************************ @@ -1036,7 +1035,7 @@ static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) { struct gifdata *gd = (struct gifdata*)gif->UserData; if (len+gd->curoff > gd->len) { - FIXME("Trying to read %d bytes, but only %d available.\n",len, gd->len-gd->curoff); + ERR("Trying to read %d bytes, but only %d available.\n",len, gd->len-gd->curoff); len = gd->len - gd->curoff; } memcpy(data, gd->data+gd->curoff, len); @@ -1066,14 +1065,14 @@ static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xr gif = DGifOpen((void*)&gd, _gif_inputfunc); ret = DGifSlurp(gif); if (ret == GIF_ERROR) { - FIXME("Failed reading GIF using libgif.\n"); + ERR("Failed reading GIF using libgif.\n"); return E_FAIL; } TRACE("screen height %d, width %d\n", gif->SWidth, gif->SHeight); TRACE("color res %d, backgcolor %d\n", gif->SColorResolution, gif->SBackGroundColor); TRACE("imgcnt %d\n", gif->ImageCount); if (gif->ImageCount<1) { - FIXME("GIF stream does not have images inside?\n"); + ERR("GIF stream does not have images inside?\n"); return E_FAIL; } TRACE("curimage: %d x %d, on %dx%d, interlace %d\n", @@ -1259,7 +1258,7 @@ static HRESULT OLEPictureImpl_LoadJpeg(OLEPictureImpl *This, BYTE *xbuf, ULONG x if(!libjpeg_handle) { if(!load_libjpeg()) { - FIXME("Failed reading JPEG because unable to find %s\n", SONAME_LIBJPEG); + ERR("Failed reading JPEG because unable to find %s\n", SONAME_LIBJPEG); return E_FAIL; } } @@ -1298,7 +1297,7 @@ static HRESULT OLEPictureImpl_LoadJpeg(OLEPictureImpl *This, BYTE *xbuf, ULONG x while ( jd.output_scanlinedesc.picType = PICTYPE_ICON; @@ -1801,8 +1800,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) { do { hr=IStream_Read(pStm,header,8,&xread); if (hr || xread!=8) { - FIXME("Failure while reading picture header (hr is %x, nread is %d).\n",hr,xread); - return hr; + ERR("Failure while reading picture header (hr is %x, nread is %d).\n",hr,xread); + return (hr?hr:E_FAIL); } headerread += xread; xread = 0; @@ -1879,7 +1878,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) { break; } if (xread != This->datalen) - FIXME("Could only read %d of %d bytes out of stream?\n",xread,This->datalen); + ERR("Could only read %d of %d bytes out of stream?\n",xread,This->datalen); } if (This->datalen == 0) { /* Marks the "NONE" picture */ This->desc.picType = PICTYPE_NONE; @@ -2637,7 +2636,7 @@ HRESULT WINAPI OleLoadPicture( LPSTREAM lpstream, LONG lSize, BOOL fRunmode, return hr; hr = IPicture_QueryInterface(newpic,&IID_IPersistStream, (LPVOID*)&ps); if (hr) { - FIXME("Could not get IPersistStream iface from Ole Picture?\n"); + ERR("Could not get IPersistStream iface from Ole Picture?\n"); IPicture_Release(newpic); *ppvObj = NULL; return hr; @@ -2653,7 +2652,7 @@ HRESULT WINAPI OleLoadPicture( LPSTREAM lpstream, LONG lSize, BOOL fRunmode, } hr = IPicture_QueryInterface(newpic,riid,ppvObj); if (hr) - FIXME("Failed to get interface %s from IPicture.\n",debugstr_guid(riid)); + ERR("Failed to get interface %s from IPicture.\n",debugstr_guid(riid)); IPicture_Release(newpic); return hr; } @@ -2676,7 +2675,7 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode, return hr; hr = IPicture_QueryInterface(newpic,&IID_IPersistStream, (LPVOID*)&ps); if (hr) { - FIXME("Could not get IPersistStream iface from Ole Picture?\n"); + ERR("Could not get IPersistStream iface from Ole Picture?\n"); IPicture_Release(newpic); *ppvObj = NULL; return hr; @@ -2692,7 +2691,7 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode, } hr = IPicture_QueryInterface(newpic,riid,ppvObj); if (hr) - FIXME("Failed to get interface %s from IPicture.\n",debugstr_guid(riid)); + ERR("Failed to get interface %s from IPicture.\n",debugstr_guid(riid)); IPicture_Release(newpic); return hr; } @@ -2798,7 +2797,7 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller, hRes = IPicture_QueryInterface(ipicture,riid,ppvRet); if (hRes) - FIXME("Failed to get interface %s from IPicture.\n",debugstr_guid(riid)); + ERR("Failed to get interface %s from IPicture.\n",debugstr_guid(riid)); IPicture_Release(ipicture); return hRes; diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index b931999e348..8b5aa4aa799 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -541,14 +541,6 @@ START_TEST(opengl) 0, 0, 0 /* layer masks */ }; - init_functions(); - /* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */ - if (!pwglGetExtensionsStringARB) - { - skip("wglGetExtensionsStringARB is not available\n"); - return; - } - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); @@ -585,6 +577,22 @@ START_TEST(opengl) trace("OpenGL driver version: %s\n", glGetString(GL_VERSION)); trace("OpenGL vendor: %s\n", glGetString(GL_VENDOR)); } + else + { + skip("Skipping OpenGL tests without a current context\n"); + return; + } + + /* Initialisation of WGL functions depends on an implicit WGL context. For this reason we can't load them before making + * any WGL call :( On Wine this would work but not on real Windows because there can be different implementations (software, ICD, MCD). + */ + init_functions(); + /* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */ + if (!pwglGetExtensionsStringARB) + { + skip("wglGetExtensionsStringARB is not available\n"); + return; + } test_makecurrent(hdc); test_setpixelformat(hdc); diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index e035b63a5e7..08b913bacf8 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -4578,26 +4578,26 @@ static void test_EM_STREAMIN(void) const char * streamText0b = "{\\rtf1 TestSomeText\\par\\par}"; const char * streamText1 = - "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n" \ - "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n" \ + "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n" + "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n" "}\r\n"; /* In richedit 2.0 mode, this should NOT be accepted, unlike 1.0 */ const char * streamText2 = - "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;" \ - "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255" \ - "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 " \ - "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 " \ - "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 " \ - "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 " \ + "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;" + "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255" + "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 " + "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 " + "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 " + "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 " "\\tx11448 \\tx11872 \\tx12296 \\tx12720 \\tx13144 \\cf2 RichEdit1\\line }"; const char * streamText3 = "RichEdit1"; struct StringWithLength cookieForStream4; const char * streamText4 = - "This text just needs to be long enough to cause run to be split onto "\ - "two separate lines and make sure the null terminating character is "\ + "This text just needs to be long enough to cause run to be split onto " + "two separate lines and make sure the null terminating character is " "handled properly.\0"; int length4 = strlen(streamText4) + 1; cookieForStream4.buffer = (char *)streamText4; diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index 63a63f13018..1d07b8d81da 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -184,18 +184,18 @@ static void test_EM_STREAMIN(void) const char * streamText0b = "{\\rtf1 TestSomeText\\par\\par}"; const char * streamText1 = - "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n" \ - "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n" \ + "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n" + "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n" "}\r\n"; /* This should be accepted in richedit 1.0 emulation. See bug #8326 */ const char * streamText2 = - "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;" \ - "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255" \ - "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 " \ - "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 " \ - "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 " \ - "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 " \ + "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;" + "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255" + "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 " + "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 " + "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 " + "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 " "\\tx11448 \\tx11872 \\tx12296 \\tx12720 \\tx13144 \\cf2 RichEdit1\\line }"; const char * streamText3 = "RichEdit1"; diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 763d38731a9..61155bda09d 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -761,6 +761,74 @@ static void test_RpcStringBindingFromBinding(void) ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status); } +static char *printGuid(char *buf, const UUID *guid) +{ + sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", + guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1], + guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5], + guid->Data4[6], guid->Data4[7]); + return buf; +} + +static void test_UuidCreate(void) +{ + UUID guid; + BYTE version; + + UuidCreate(&guid); + version = (guid.Data3 & 0xf000) >> 12; + todo_wine + ok(version == 4 || broken(version == 1), "unexpected version %d\n", + version); + if (version == 4) + { + static UUID v4and = { 0, 0, 0x4000, { 0x80,0,0,0,0,0,0,0 } }; + static UUID v4or = { 0xffffffff, 0xffff, 0x4fff, + { 0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff } }; + UUID and, or; + RPC_STATUS rslt; + int i; + char buf[39]; + + memcpy(&and, &guid, sizeof(guid)); + memcpy(&or, &guid, sizeof(guid)); + /* Generate a bunch of UUIDs and mask them. By the end, we expect + * every randomly generated bit to have been zero at least once, + * resulting in no bits set in the and mask except those which are not + * randomly generated: the version number and the topmost bits of the + * Data4 field (treated as big-endian.) Similarly, we expect only + * the bits which are not randomly set to be cleared in the or mask. + */ + for (i = 0; i < 1000; i++) + { + LPBYTE src, dst; + + UuidCreate(&guid); + for (src = (LPBYTE)&guid, dst = (LPBYTE)∧ + src - (LPBYTE)&guid < sizeof(guid); src++, dst++) + *dst &= *src; + for (src = (LPBYTE)&guid, dst = (LPBYTE)∨ + src - (LPBYTE)&guid < sizeof(guid); src++, dst++) + *dst |= *src; + } + ok(UuidEqual(&and, &v4and, &rslt), + "unexpected bits set in V4 UUID: %s\n", printGuid(buf, &and)); + ok(UuidEqual(&or, &v4or, &rslt), + "unexpected bits set in V4 UUID: %s\n", printGuid(buf, &or)); + } + else + { + /* Older versions of Windows generate V1 UUIDs. For these, there are + * many stable bits, including at least the MAC address if one is + * present. Just check that Data4[0]'s most significant bits are + * set as expected. + */ + todo_wine + ok((guid.Data4[0] & 0xc0) == 0x80, + "unexpected value in Data4[0]: %02x\n", guid.Data4[0] & 0xc0); + } +} + START_TEST( rpc ) { static unsigned char ncacn_np[] = "ncacn_np"; @@ -779,4 +847,5 @@ START_TEST( rpc ) test_endpoint_mapper(ncacn_np, np_address, np_endpoint); test_endpoint_mapper(ncalrpc, NULL, lrpc_endpoint); test_RpcStringBindingFromBinding(); + test_UuidCreate(); } diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index 78a8bffb7f2..a2d72de90f1 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -990,27 +990,27 @@ us_t_UserFree(ULONG *flags, us_t *pus) ULONG __RPC_USER bstr_t_UserSize(ULONG *flags, ULONG start, bstr_t *b) { - return start + FIELD_OFFSET(wire_bstr_t, data[(*b)[-1]]); + return start + FIELD_OFFSET(user_bstr_t, data[(*b)[-1]]); } unsigned char * __RPC_USER bstr_t_UserMarshal(ULONG *flags, unsigned char *buffer, bstr_t *b) { - wire_bstr_t *wb = (wire_bstr_t *) buffer; + wire_bstr_t wb = (wire_bstr_t) buffer; wb->n = (*b)[-1]; memcpy(&wb->data, *b, wb->n * sizeof wb->data[0]); - return buffer + FIELD_OFFSET(wire_bstr_t, data[wb->n]); + return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]); } unsigned char * __RPC_USER bstr_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, bstr_t *b) { - wire_bstr_t *wb = (wire_bstr_t *) buffer; + wire_bstr_t wb = (wire_bstr_t) buffer; short *data = HeapAlloc(GetProcessHeap(), 0, (wb->n + 1) * sizeof *data); data[0] = wb->n; memcpy(&data[1], wb->data, wb->n * sizeof data[1]); *b = &data[1]; - return buffer + FIELD_OFFSET(wire_bstr_t, data[wb->n]); + return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]); } void __RPC_USER diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl index 26d337304f9..53ec01627ce 100644 --- a/dlls/rpcrt4/tests/server.idl +++ b/dlls/rpcrt4/tests/server.idl @@ -299,8 +299,9 @@ cpp_quote("#endif") { short n; [size_is(n)] short data[]; - } wire_bstr_t; + } user_bstr_t; + typedef [unique] user_bstr_t *wire_bstr_t; typedef [wire_marshal(wire_bstr_t)] short *bstr_t; unsigned hash_bstr(bstr_t s); diff --git a/dlls/rsaenh/mpi.c b/dlls/rsaenh/mpi.c index 20c04fcff35..5e10ec8dae2 100644 --- a/dlls/rsaenh/mpi.c +++ b/dlls/rsaenh/mpi.c @@ -39,13 +39,26 @@ static const int KARATSUBA_MUL_CUTOFF = 88, /* Min. number of digits before Karatsuba multiplication is used. */ KARATSUBA_SQR_CUTOFF = 128; /* Min. number of digits before Karatsuba squaring is used. */ +static void bn_reverse(unsigned char *s, int len); +static int s_mp_add(mp_int *a, mp_int *b, mp_int *c); +static int s_mp_exptmod (const mp_int * G, const mp_int * X, mp_int * P, mp_int * Y); +#define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1) +static int s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs); +static int s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs); +static int s_mp_sqr(const mp_int *a, mp_int *b); +static int s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c); +static int mp_exptmod_fast(const mp_int *G, const mp_int *X, mp_int *P, mp_int *Y, int mode); +static int mp_invmod_slow (const mp_int * a, mp_int * b, mp_int * c); +static int mp_karatsuba_mul(const mp_int *a, const mp_int *b, mp_int *c); +static int mp_karatsuba_sqr(const mp_int *a, mp_int *b); + /* computes the modular inverse via binary extended euclidean algorithm, * that is c = 1/a mod b * * Based on slow invmod except this is optimized for the case where b is * odd as per HAC Note 14.64 on pp. 610 */ -int +static int fast_mp_invmod (const mp_int * a, mp_int * b, mp_int * c) { mp_int x, y, u, v, B, D; @@ -175,7 +188,7 @@ __ERR:mp_clear_multi (&x, &y, &u, &v, &B, &D, NULL); * * Based on Algorithm 14.32 on pp.601 of HAC. */ -int +static int fast_mp_montgomery_reduce (mp_int * x, const mp_int * n, mp_digit rho) { int ix, res, olduse; @@ -335,7 +348,7 @@ fast_mp_montgomery_reduce (mp_int * x, const mp_int * n, mp_digit rho) * Based on Algorithm 14.12 on pp.595 of HAC. * */ -int +static int fast_s_mp_mul_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) { int olduse, res, pa, ix, iz; @@ -414,7 +427,7 @@ fast_s_mp_mul_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) * * Based on Algorithm 14.12 on pp.595 of HAC. */ -int +static int fast_s_mp_mul_high_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) { int olduse, res, pa, ix, iz; @@ -512,7 +525,7 @@ Remove W2 and don't memset W */ -int fast_s_mp_sqr (const mp_int * a, mp_int * b) +static int fast_s_mp_sqr (const mp_int * a, mp_int * b) { int olduse, res, pa, ix, iz; mp_digit W[MP_WARRAY], *tmpx; @@ -3847,7 +3860,7 @@ mp_zero (mp_int * a) } /* reverse an array, used for radix code */ -void +static void bn_reverse (unsigned char *s, int len) { int ix, iy; @@ -3865,7 +3878,7 @@ bn_reverse (unsigned char *s, int len) } /* low level addition, based on HAC pp.594, Algorithm 14.7 */ -int +static int s_mp_add (mp_int * a, mp_int * b, mp_int * c) { mp_int *x; @@ -3952,7 +3965,7 @@ s_mp_add (mp_int * a, mp_int * b, mp_int * c) return MP_OKAY; } -int s_mp_exptmod (const mp_int * G, const mp_int * X, mp_int * P, mp_int * Y) +static int s_mp_exptmod (const mp_int * G, const mp_int * X, mp_int * P, mp_int * Y) { mp_int M[256], res, mu; mp_digit buf; @@ -4163,7 +4176,7 @@ __M: * HAC pp. 595, Algorithm 14.12 Modified so you can control how * many digits of output are created. */ -int +static int s_mp_mul_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) { mp_int t; @@ -4232,7 +4245,7 @@ s_mp_mul_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) /* multiplies |a| * |b| and does not compute the lower digs digits * [meant to get the higher part of the product] */ -int +static int s_mp_mul_high_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) { mp_int t; @@ -4288,7 +4301,7 @@ s_mp_mul_high_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) } /* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */ -int +static int s_mp_sqr (const mp_int * a, mp_int * b) { mp_int t; diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index e681d69f7dd..b935ee33b5c 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -1259,7 +1259,7 @@ static BOOL build_hash_signature(BYTE *pbSignature, DWORD dwLen, ALG_ID aiAlgid, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10 } }, { CALG_SHA, 15, { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 } }, - { 0, 0, {} } + { 0, 0, { 0 } } }; DWORD dwIdxOID, i, j; diff --git a/dlls/rsaenh/tomcrypt.h b/dlls/rsaenh/tomcrypt.h index b76757cef41..4348620f868 100644 --- a/dlls/rsaenh/tomcrypt.h +++ b/dlls/rsaenh/tomcrypt.h @@ -574,27 +574,6 @@ int mp_fwrite(mp_int *a, int radix, FILE *stream); #define mp_todecimal(M, S) mp_toradix((M), (S), 10) #define mp_tohex(M, S) mp_toradix((M), (S), 16) -/* lowlevel functions, do not call! */ -int s_mp_add(mp_int *a, mp_int *b, mp_int *c); -int s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c); -#define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1) -int fast_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs); -int s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs); -int fast_s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs); -int s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs); -int fast_s_mp_sqr(const mp_int *a, mp_int *b); -int s_mp_sqr(const mp_int *a, mp_int *b); -int mp_karatsuba_mul(const mp_int *a, const mp_int *b, mp_int *c); -int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c); -int mp_karatsuba_sqr(const mp_int *a, mp_int *b); -int mp_toom_sqr(mp_int *a, mp_int *b); -int fast_mp_invmod(const mp_int *a, mp_int *b, mp_int *c); -int mp_invmod_slow (const mp_int * a, mp_int * b, mp_int * c); -int fast_mp_montgomery_reduce(mp_int *a, const mp_int *m, mp_digit mp); -int mp_exptmod_fast(const mp_int *G, const mp_int *X, mp_int *P, mp_int *Y, int mode); -int s_mp_exptmod (const mp_int * G, const mp_int * X, mp_int * P, mp_int * Y); -void bn_reverse(unsigned char *s, int len); - extern const char *mp_s_rmap; #define PK_PRIVATE 0 /* PK private keys */ diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/shdocvw/tests/intshcut.c index c9e3ab0e257..cf0b2251b93 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/shdocvw/tests/intshcut.c @@ -20,7 +20,6 @@ #include #include -#include #define COBJMACROS diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index b64d3063d07..77eea186bf8 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -49,7 +49,7 @@ typedef struct UINT uFlags ; } RUNFILEDLGPARAMS ; -typedef BOOL (*WINAPI LPFNOFN) (OPENFILENAMEW *) ; +typedef BOOL (WINAPI * LPFNOFN) (OPENFILENAMEW *) ; WINE_DEFAULT_DEBUG_CHANNEL(shell); static INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ; diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index c890e0d5dcb..e3727ba8aa7 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -78,7 +78,7 @@ typedef struct typedef struct { - const IShellViewVtbl* lpVtbl; + const IShellView2Vtbl* lpVtbl; LONG ref; const IOleCommandTargetVtbl* lpvtblOleCommandTarget; const IDropTargetVtbl* lpvtblDropTarget; @@ -109,7 +109,7 @@ typedef struct POINT ptLastMousePos; /* Mouse position at last DragOver call */ } IShellViewImpl; -static const IShellViewVtbl svvt; +static const IShellView2Vtbl svvt; static const IOleCommandTargetVtbl ctvt; static const IDropTargetVtbl dtvt; static const IDropSourceVtbl dsvt; @@ -316,7 +316,12 @@ static BOOL ShellView_CreateList (IShellViewImpl * This) case FVM_DETAILS: dwStyle |= LVS_REPORT; break; case FVM_SMALLICON: dwStyle |= LVS_SMALLICON; break; case FVM_LIST: dwStyle |= LVS_LIST; break; - default: dwStyle |= LVS_LIST; break; + default: + { + FIXME("ViewMode %d not implemented\n", This->FolderSettings.ViewMode); + dwStyle |= LVS_LIST; + break; + } } if (This->FolderSettings.fFlags & FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE; @@ -1668,7 +1673,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara ********************************************************** * IShellView_QueryInterface */ -static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid, LPVOID *ppvObj) +static HRESULT WINAPI IShellView_fnQueryInterface(IShellView2 * iface,REFIID riid, LPVOID *ppvObj) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1684,6 +1689,10 @@ static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid { *ppvObj = (IShellView*)This; } + else if(IsEqualIID(riid, &IID_IShellView2)) + { + *ppvObj = (IShellView2*)This; + } else if(IsEqualIID(riid, &IID_IOleCommandTarget)) { *ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget); @@ -1714,7 +1723,7 @@ static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid /********************************************************** * IShellView_AddRef */ -static ULONG WINAPI IShellView_fnAddRef(IShellView * iface) +static ULONG WINAPI IShellView_fnAddRef(IShellView2 * iface) { IShellViewImpl *This = (IShellViewImpl *)iface; ULONG refCount = InterlockedIncrement(&This->ref); @@ -1726,7 +1735,7 @@ static ULONG WINAPI IShellView_fnAddRef(IShellView * iface) /********************************************************** * IShellView_Release */ -static ULONG WINAPI IShellView_fnRelease(IShellView * iface) +static ULONG WINAPI IShellView_fnRelease(IShellView2 * iface) { IShellViewImpl *This = (IShellViewImpl *)iface; ULONG refCount = InterlockedDecrement(&This->ref); @@ -1758,7 +1767,7 @@ static ULONG WINAPI IShellView_fnRelease(IShellView * iface) /********************************************************** * ShellView_GetWindow */ -static HRESULT WINAPI IShellView_fnGetWindow(IShellView * iface,HWND * phWnd) +static HRESULT WINAPI IShellView_fnGetWindow(IShellView2 * iface,HWND * phWnd) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1769,7 +1778,7 @@ static HRESULT WINAPI IShellView_fnGetWindow(IShellView * iface,HWND * phWnd) return S_OK; } -static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView * iface,BOOL fEnterMode) +static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView2 * iface,BOOL fEnterMode) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1784,7 +1793,7 @@ static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView * iface,BOOL * FIXME: * use the accel functions */ -static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG lpmsg) +static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView2 * iface,LPMSG lpmsg) { #if 0 IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1799,7 +1808,7 @@ static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG return S_FALSE; /* not handled */ } -static HRESULT WINAPI IShellView_fnEnableModeless(IShellView * iface,BOOL fEnable) +static HRESULT WINAPI IShellView_fnEnableModeless(IShellView2 * iface,BOOL fEnable) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1808,7 +1817,7 @@ static HRESULT WINAPI IShellView_fnEnableModeless(IShellView * iface,BOOL fEnabl return E_NOTIMPL; } -static HRESULT WINAPI IShellView_fnUIActivate(IShellView * iface,UINT uState) +static HRESULT WINAPI IShellView_fnUIActivate(IShellView2 * iface,UINT uState) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1851,7 +1860,7 @@ static HRESULT WINAPI IShellView_fnUIActivate(IShellView * iface,UINT uState) return S_OK; } -static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface) +static HRESULT WINAPI IShellView_fnRefresh(IShellView2 * iface) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1863,82 +1872,28 @@ static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface) return S_OK; } -static HRESULT WINAPI IShellView_fnCreateViewWindow( - IShellView * iface, - IShellView *lpPrevView, - LPCFOLDERSETTINGS lpfs, - IShellBrowser * psb, - RECT * prcView, - HWND *phWnd) +static HRESULT WINAPI IShellView_fnCreateViewWindow(IShellView2 *iface, IShellView *lpPrevView, + LPCFOLDERSETTINGS lpfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd) { - IShellViewImpl *This = (IShellViewImpl *)iface; - - WNDCLASSW wc; - *phWnd = 0; - - - TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd); - TRACE("-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom); - - /*set up the member variables*/ - This->pShellBrowser = psb; - This->FolderSettings = *lpfs; - - /*get our parent window*/ - IShellBrowser_AddRef(This->pShellBrowser); - IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent)); - - /* try to get the ICommDlgBrowserInterface, adds a reference !!! */ - This->pCommDlgBrowser=NULL; - if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser, - (REFIID)&IID_ICommDlgBrowser, (LPVOID*) &This->pCommDlgBrowser))) - { - TRACE("-- CommDlgBrowser\n"); - } - - /*if our window class has not been registered, then do so*/ - if(!GetClassInfoW(shell32_hInstance, SV_CLASS_NAME, &wc)) - { - ZeroMemory(&wc, sizeof(wc)); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = ShellView_WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = shell32_hInstance; - wc.hIcon = 0; - wc.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); - wc.lpszMenuName = NULL; - wc.lpszClassName = SV_CLASS_NAME; - - if(!RegisterClassW(&wc)) - return E_FAIL; - } - - *phWnd = CreateWindowExW(0, - SV_CLASS_NAME, - NULL, - WS_CHILD | WS_TABSTOP, - prcView->left, - prcView->top, - prcView->right - prcView->left, - prcView->bottom - prcView->top, - This->hWndParent, - 0, - shell32_hInstance, - (LPVOID)This); - - CheckToolbar(This); + HRESULT hr; + SV2CVW2_PARAMS view_params; + view_params.cbSize = sizeof(view_params); + view_params.psvPrev = lpPrevView; + view_params.pfs = lpfs; + view_params.psbOwner = psb; + view_params.prcView = prcView; + view_params.pvid = NULL; + view_params.hwndView = 0; - if(!*phWnd) return E_FAIL; + TRACE("(%p) Forwarding to CreateViewWindow2\n", iface); - SetWindowPos(*phWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); - UpdateWindow(*phWnd); + hr = IShellView2_CreateViewWindow2(iface, &view_params); + *phWnd = view_params.hwndView; - return S_OK; + return hr; } -static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView * iface) +static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView2 * iface) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1960,7 +1915,7 @@ static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView * iface) return S_OK; } -static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView * iface, LPFOLDERSETTINGS lpfs) +static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView2 * iface, LPFOLDERSETTINGS lpfs) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1973,7 +1928,7 @@ static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView * iface, LPFOLDERSE return NOERROR; } -static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView * iface, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) +static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView2 * iface, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1982,7 +1937,7 @@ static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView * iface, DWO return E_NOTIMPL; } -static HRESULT WINAPI IShellView_fnSaveViewState(IShellView * iface) +static HRESULT WINAPI IShellView_fnSaveViewState(IShellView2 * iface) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -1992,7 +1947,7 @@ static HRESULT WINAPI IShellView_fnSaveViewState(IShellView * iface) } static HRESULT WINAPI IShellView_fnSelectItem( - IShellView * iface, + IShellView2 * iface, LPCITEMIDLIST pidl, UINT uFlags) { @@ -2044,7 +1999,7 @@ static HRESULT WINAPI IShellView_fnSelectItem( return S_OK; } -static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, REFIID riid, LPVOID *ppvOut) +static HRESULT WINAPI IShellView_fnGetItemObject(IShellView2 * iface, UINT uItem, REFIID riid, LPVOID *ppvOut) { IShellViewImpl *This = (IShellViewImpl *)iface; @@ -2070,7 +2025,123 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, return S_OK; } -static const IShellViewVtbl svvt = +static HRESULT WINAPI IShellView2_fnGetView(IShellView2* iface, SHELLVIEWID *view_guid, ULONG view_type) +{ + FIXME("(%p)->(view_guid %s, view_type %#x) stub!\n", iface, debugstr_guid(view_guid), view_type); + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2* iface, LPSV2CVW2_PARAMS view_params) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + WNDCLASSW wc; + HWND wnd; + + TRACE("(%p)->(view_params %p)\n", iface, view_params); + + if (view_params->cbSize != sizeof(*view_params)) + { + FIXME("Got unexpected cbSize %#x\n", view_params->cbSize); + return E_FAIL; + } + + TRACE("-- psvPrev %p, pfs %p, psbOwner %p, prcView %p\n", + view_params->psvPrev, view_params->pfs, view_params->psbOwner, view_params->prcView); + TRACE("-- vmode %#x, flags %#x, left %d, top %d, right %d, bottom %d\n", + view_params->pfs->ViewMode, view_params->pfs->fFlags, view_params->prcView->left, + view_params->prcView->top, view_params->prcView->right, view_params->prcView->bottom); + + /* Set up the member variables */ + This->pShellBrowser = view_params->psbOwner; + This->FolderSettings = *view_params->pfs; + + if (view_params->pvid) + { + if (IsEqualGUID(view_params->pvid, &VID_LargeIcons)) + This->FolderSettings.ViewMode = FVM_ICON; + else if (IsEqualGUID(view_params->pvid, &VID_SmallIcons)) + This->FolderSettings.ViewMode = FVM_SMALLICON; + else if (IsEqualGUID(view_params->pvid, &VID_List)) + This->FolderSettings.ViewMode = FVM_LIST; + else if (IsEqualGUID(view_params->pvid, &VID_Details)) + This->FolderSettings.ViewMode = FVM_DETAILS; + else if (IsEqualGUID(view_params->pvid, &VID_Thumbnails)) + This->FolderSettings.ViewMode = FVM_THUMBNAIL; + else if (IsEqualGUID(view_params->pvid, &VID_Tile)) + This->FolderSettings.ViewMode = FVM_TILE; + else if (IsEqualGUID(view_params->pvid, &VID_ThumbStrip)) + This->FolderSettings.ViewMode = FVM_THUMBSTRIP; + else + FIXME("Ignoring unrecognized VID %s\n", debugstr_guid(view_params->pvid)); + } + + /* Get our parent window */ + IShellBrowser_AddRef(This->pShellBrowser); + IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent)); + + /* Try to get the ICommDlgBrowserInterface, adds a reference !!! */ + This->pCommDlgBrowser = NULL; + if (SUCCEEDED(IShellBrowser_QueryInterface(This->pShellBrowser, &IID_ICommDlgBrowser, (void **)&This->pCommDlgBrowser))) + { + TRACE("-- CommDlgBrowser %p\n", This->pCommDlgBrowser); + } + + /* If our window class has not been registered, then do so */ + if (!GetClassInfoW(shell32_hInstance, SV_CLASS_NAME, &wc)) + { + ZeroMemory(&wc, sizeof(wc)); + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = ShellView_WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = shell32_hInstance; + wc.hIcon = 0; + wc.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + wc.lpszMenuName = NULL; + wc.lpszClassName = SV_CLASS_NAME; + + if (!RegisterClassW(&wc)) return E_FAIL; + } + + wnd = CreateWindowExW(0, + SV_CLASS_NAME, + NULL, + WS_CHILD | WS_TABSTOP, + view_params->prcView->left, + view_params->prcView->top, + view_params->prcView->right - view_params->prcView->left, + view_params->prcView->bottom - view_params->prcView->top, + This->hWndParent, + 0, + shell32_hInstance, + (LPVOID)This); + + CheckToolbar(This); + + if (!wnd) return E_FAIL; + + SetWindowPos(wnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); + UpdateWindow(wnd); + + view_params->hwndView = wnd; + + return S_OK; +} + +static HRESULT WINAPI IShellView2_fnHandleRename(IShellView2* iface, LPCITEMIDLIST new_pidl) +{ + FIXME("(%p)->(new_pidl %p) stub!\n", iface, new_pidl); + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellView2_fnSelectAndPositionItem(IShellView2* iface, LPCITEMIDLIST item, UINT flags, POINT *point) +{ + FIXME("(%p)->(item %p, flags %#x, point %p) stub!\n", iface, item, flags, point); + return E_NOTIMPL; +} + +static const IShellView2Vtbl svvt = { IShellView_fnQueryInterface, IShellView_fnAddRef, @@ -2087,7 +2158,11 @@ static const IShellViewVtbl svvt = IShellView_fnAddPropertySheetPages, IShellView_fnSaveViewState, IShellView_fnSelectItem, - IShellView_fnGetItemObject + IShellView_fnGetItemObject, + IShellView2_fnGetView, + IShellView2_fnCreateViewWindow2, + IShellView2_fnHandleRename, + IShellView2_fnSelectAndPositionItem, }; diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index a1cf2d37707..4d87e8dadbc 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -272,10 +272,8 @@ static const char *getFolderName(int folder) } } -static const char *printGUID(const GUID *guid) +static const char *printGUID(const GUID *guid, char * guidSTR) { - static char guidSTR[39]; - if (!guid) return NULL; sprintf(guidSTR, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", @@ -551,10 +549,11 @@ static void matchGUID(int folder, const GUID *guid) pidlLast->mkid.abID[0] == PT_GUID)) { GUID *shellGuid = (GUID *)(pidlLast->mkid.abID + 2); + char shellGuidStr[39], guidStr[39]; ok(IsEqualIID(shellGuid, guid), "%s: got GUID %s, expected %s\n", getFolderName(folder), - printGUID(shellGuid), printGUID(guid)); + printGUID(shellGuid, shellGuidStr), printGUID(guid, guidStr)); } IMalloc_Free(pMalloc, pidl); } diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 3c62ac2148a..ac7915a590c 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1605,6 +1605,74 @@ static void cleanup_test(void) CoUninitialize(); } +static void test_commandline(void) +{ + static const WCHAR one[] = {'o','n','e',0}; + static const WCHAR two[] = {'t','w','o',0}; + static const WCHAR three[] = {'t','h','r','e','e',0}; + static const WCHAR four[] = {'f','o','u','r',0}; + + static const WCHAR fmt1[] = {'%','s',' ','%','s',' ','%','s',' ','%','s',0}; + static const WCHAR fmt2[] = {' ','%','s',' ','%','s',' ','%','s',' ','%','s',0}; + static const WCHAR fmt3[] = {'%','s','=','%','s',' ','%','s','=','\"','%','s','\"',0}; + static const WCHAR fmt4[] = {'\"','%','s','\"',' ','\"','%','s',' ','%','s','\"',' ','%','s',0}; + static const WCHAR fmt5[] = {'\\','\"','%','s','\"',' ','%','s','=','\"','%','s','\\','\"',' ','\"','%','s','\\','\"',0}; + + static const WCHAR chkfmt1[] = {'%','s','=','%','s',0}; + static const WCHAR chkfmt2[] = {'%','s',' ','%','s',0}; + static const WCHAR chkfmt3[] = {'\\','\"','%','s','\"',0}; + static const WCHAR chkfmt4[] = {'%','s','=','%','s','\"',' ','%','s','\"',0}; + WCHAR cmdline[255]; + LPWSTR *args = (LPWSTR*)0xdeadcafe; + INT numargs = -1; + + wsprintfW(cmdline,fmt1,one,two,three,four); + args=CommandLineToArgvW(cmdline,&numargs); + if (args == NULL && numargs == -1) + { + win_skip("CommandLineToArgvW not implemented, skipping\n"); + return; + } + ok(numargs == 4, "expected 4 args, got %i\n",numargs); + ok(lstrcmpW(args[0],one)==0,"arg0 is not as expected\n"); + ok(lstrcmpW(args[1],two)==0,"arg1 is not as expected\n"); + ok(lstrcmpW(args[2],three)==0,"arg2 is not as expected\n"); + ok(lstrcmpW(args[3],four)==0,"arg3 is not as expected\n"); + + wsprintfW(cmdline,fmt2,one,two,three,four); + args=CommandLineToArgvW(cmdline,&numargs); + ok(numargs == 5, "expected 5 args, got %i\n",numargs); + ok(args[0][0]==0,"arg0 is not as expected\n"); + ok(lstrcmpW(args[1],one)==0,"arg1 is not as expected\n"); + ok(lstrcmpW(args[2],two)==0,"arg2 is not as expected\n"); + ok(lstrcmpW(args[3],three)==0,"arg3 is not as expected\n"); + ok(lstrcmpW(args[4],four)==0,"arg4 is not as expected\n"); + + wsprintfW(cmdline,fmt3,one,two,three,four); + args=CommandLineToArgvW(cmdline,&numargs); + ok(numargs == 2, "expected 2 args, got %i\n",numargs); + wsprintfW(cmdline,chkfmt1,one,two); + ok(lstrcmpW(args[0],cmdline)==0,"arg0 is not as expected\n"); + wsprintfW(cmdline,chkfmt1,three,four); + ok(lstrcmpW(args[1],cmdline)==0,"arg1 is not as expected\n"); + + wsprintfW(cmdline,fmt4,one,two,three,four); + args=CommandLineToArgvW(cmdline,&numargs); + ok(numargs == 3, "expected 3 args, got %i\n",numargs); + ok(lstrcmpW(args[0],one)==0,"arg0 is not as expected\n"); + wsprintfW(cmdline,chkfmt2,two,three); + ok(lstrcmpW(args[1],cmdline)==0,"arg1 is not as expected\n"); + ok(lstrcmpW(args[2],four)==0,"arg2 is not as expected\n"); + + wsprintfW(cmdline,fmt5,one,two,three,four); + args=CommandLineToArgvW(cmdline,&numargs); + ok(numargs == 2, "expected 2 args, got %i\n",numargs); + wsprintfW(cmdline,chkfmt3,one); + todo_wine ok(lstrcmpW(args[0],cmdline)==0,"arg0 is not as expected\n"); + wsprintfW(cmdline,chkfmt4,two,three,four); + todo_wine ok(lstrcmpW(args[1],cmdline)==0,"arg1 is not as expected\n"); +} + START_TEST(shlexec) { @@ -1624,6 +1692,7 @@ START_TEST(shlexec) test_exes_long(); test_dde(); test_dde_default_app(); + test_commandline(); cleanup_test(); } diff --git a/dlls/shlwapi/assoc.c b/dlls/shlwapi/assoc.c index 0d8baa0a9ee..31a842068b7 100644 --- a/dlls/shlwapi/assoc.c +++ b/dlls/shlwapi/assoc.c @@ -27,6 +27,7 @@ #include "objbase.h" #include "shlguid.h" #include "shlwapi.h" +#include "ver.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -590,6 +591,133 @@ static HRESULT ASSOC_GetValue(HKEY hkey, WCHAR ** pszText) return S_OK; } +static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This, + LPCWSTR pszExtra, LPWSTR path, + DWORD pathlen, DWORD *len) +{ + HKEY hkeyCommand; + HKEY hkeyFile; + HKEY hkeyShell; + HKEY hkeyVerb; + HRESULT hr; + LONG ret; + WCHAR * pszCommand; + WCHAR * pszEnd; + WCHAR * pszExtraFromReg = NULL; + WCHAR * pszFileType; + WCHAR * pszStart; + static const WCHAR commandW[] = { 'c','o','m','m','a','n','d',0 }; + static const WCHAR shellW[] = { 's','h','e','l','l',0 }; + + assert(len); + + hr = ASSOC_GetValue(This->hkeySource, &pszFileType); + if (FAILED(hr)) + return hr; + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, pszFileType, 0, KEY_READ, &hkeyFile); + HeapFree(GetProcessHeap(), 0, pszFileType); + if (ret != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(ret); + + ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell); + RegCloseKey(hkeyFile); + if (ret != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(ret); + + if (!pszExtra) + { + hr = ASSOC_GetValue(hkeyShell, &pszExtraFromReg); + /* if no default action */ + if (hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) + { + DWORD rlen; + ret = RegQueryInfoKeyW(hkeyShell, 0, 0, 0, 0, &rlen, 0, 0, 0, 0, 0, 0); + if (ret != ERROR_SUCCESS) + { + RegCloseKey(hkeyShell); + return HRESULT_FROM_WIN32(ret); + } + rlen++; + pszExtraFromReg = HeapAlloc(GetProcessHeap(), 0, rlen * sizeof(WCHAR)); + if (!pszExtraFromReg) + { + RegCloseKey(hkeyShell); + return E_OUTOFMEMORY; + } + ret = RegEnumKeyExW(hkeyShell, 0, pszExtraFromReg, &rlen, 0, NULL, NULL, NULL); + if (ret != ERROR_SUCCESS) + { + RegCloseKey(hkeyShell); + return HRESULT_FROM_WIN32(ret); + } + } + else if (FAILED(hr)) + { + RegCloseKey(hkeyShell); + return hr; + } + } + + ret = RegOpenKeyExW(hkeyShell, pszExtra ? pszExtra : pszExtraFromReg, 0, + KEY_READ, &hkeyVerb); + HeapFree(GetProcessHeap(), 0, pszExtraFromReg); + RegCloseKey(hkeyShell); + if (ret != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(ret); + + ret = RegOpenKeyExW(hkeyVerb, commandW, 0, KEY_READ, &hkeyCommand); + RegCloseKey(hkeyVerb); + if (ret != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(ret); + hr = ASSOC_GetValue(hkeyCommand, &pszCommand); + RegCloseKey(hkeyCommand); + if (FAILED(hr)) + return hr; + + /* cleanup pszCommand */ + if (pszCommand[0] == '"') + { + pszStart = pszCommand + 1; + pszEnd = strchrW(pszStart, '"'); + } + else + { + pszStart = pszCommand; + pszEnd = strchrW(pszStart, ' '); + } + if (pszEnd) + *pszEnd = 0; + + *len = SearchPathW(NULL, pszStart, NULL, pathlen, path, NULL); + HeapFree(GetProcessHeap(), 0, pszCommand); + if (!*len) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + return S_OK; +} + +static HRESULT ASSOC_ReturnData(LPWSTR out, DWORD *outlen, LPCWSTR data, + DWORD datalen) +{ + assert(outlen); + + if (out) + { + if (*outlen < datalen) + { + *outlen = datalen; + return E_POINTER; + } + *outlen = datalen; + lstrcpynW(out, data, datalen); + return S_OK; + } + else + { + *outlen = datalen; + return S_FALSE; + } +} + /************************************************************************** * IQueryAssociations_GetString {SHLWAPI} * @@ -617,21 +745,9 @@ static HRESULT WINAPI IQueryAssociations_fnGetString( { IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface; const ASSOCF cfUnimplemented = ~(0); - DWORD len; - HKEY hkeyCommand; - HKEY hkeyFile; - HKEY hkeyShell; - HKEY hkeyVerb; + DWORD len = 0; HRESULT hr; - LONG ret; WCHAR path[MAX_PATH]; - WCHAR * pszCommand; - WCHAR * pszEnd; - WCHAR * pszExtraFromReg; - WCHAR * pszFileType; - WCHAR * pszStart; - static const WCHAR commandW[] = { 'c','o','m','m','a','n','d',0 }; - static const WCHAR shellW[] = { 's','h','e','l','l',0 }; TRACE("(%p,0x%8x,0x%8x,%s,%p,%p)\n", This, cfFlags, str, debugstr_w(pszExtra), pszOut, pcchOut); @@ -646,83 +762,64 @@ static HRESULT WINAPI IQueryAssociations_fnGetString( { case ASSOCSTR_EXECUTABLE: { - hr = ASSOC_GetValue(This->hkeySource, &pszFileType); + hr = ASSOC_GetExecutable(This, pszExtra, path, MAX_PATH, &len); if (FAILED(hr)) return hr; - ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, pszFileType, 0, KEY_READ, - &hkeyFile); - HeapFree(GetProcessHeap(), 0, pszFileType); - if (ret != ERROR_SUCCESS) - return HRESULT_FROM_WIN32(ret); - - ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell); - RegCloseKey(hkeyFile); - if (ret != ERROR_SUCCESS) - return HRESULT_FROM_WIN32(ret); - - if (!pszExtra) - { - hr = ASSOC_GetValue(hkeyShell, &pszExtraFromReg); - if (FAILED(hr)) - { - RegCloseKey(hkeyShell); - return hr; - } - } - - ret = RegOpenKeyExW(hkeyShell, pszExtra ? pszExtra : pszExtraFromReg, - 0, KEY_READ, &hkeyVerb); - HeapFree(GetProcessHeap(), 0, pszExtraFromReg); - RegCloseKey(hkeyShell); - if (ret != ERROR_SUCCESS) - return HRESULT_FROM_WIN32(ret); + len++; + return ASSOC_ReturnData(pszOut, pcchOut, path, len); + } - ret = RegOpenKeyExW(hkeyVerb, commandW, 0, KEY_READ, &hkeyCommand); - RegCloseKey(hkeyVerb); - if (ret != ERROR_SUCCESS) - return HRESULT_FROM_WIN32(ret); - hr = ASSOC_GetValue(hkeyCommand, &pszCommand); - RegCloseKey(hkeyCommand); + case ASSOCSTR_FRIENDLYAPPNAME: + { + PVOID verinfoW = NULL; + DWORD size, retval = 0; + UINT flen; + WCHAR *bufW; + static const WCHAR translationW[] = { + '\\','V','a','r','F','i','l','e','I','n','f','o', + '\\','T','r','a','n','s','l','a','t','i','o','n',0 + }; + static const WCHAR fileDescFmtW[] = { + '\\','S','t','r','i','n','g','F','i','l','e','I','n','f','o', + '\\','%','0','4','x','%','0','4','x', + '\\','F','i','l','e','D','e','s','c','r','i','p','t','i','o','n',0 + }; + WCHAR fileDescW[41]; + + hr = ASSOC_GetExecutable(This, pszExtra, path, MAX_PATH, &len); if (FAILED(hr)) return hr; - /* cleanup pszCommand */ - if (pszCommand[0] == '"') + retval = GetFileVersionInfoSizeW(path, &size); + if (!retval) + goto get_friendly_name_fail; + verinfoW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, retval); + if (!verinfoW) + return E_OUTOFMEMORY; + if (!GetFileVersionInfoW(path, 0, retval, verinfoW)) + goto get_friendly_name_fail; + if (VerQueryValueW(verinfoW, translationW, (LPVOID *)&bufW, &flen)) { - pszStart = pszCommand + 1; - pszEnd = strchrW(pszStart, '"'); - } - else - { - pszStart = pszCommand; - pszEnd = strchrW(pszStart, ' '); - } - if (pszEnd) - *pszEnd = 0; - - len = SearchPathW(NULL, pszStart, NULL, MAX_PATH, path, NULL); - HeapFree(GetProcessHeap(), 0, pszCommand); - if (!len) - return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - - len++; - if (pszOut) - { - if (*pcchOut < len) + int i; + DWORD *langCodeDesc = (DWORD *)bufW; + for (i = 0; i < flen / sizeof(DWORD); i++) { - *pcchOut = len; - return E_POINTER; + sprintfW(fileDescW, fileDescFmtW, LOWORD(langCodeDesc[i]), + HIWORD(langCodeDesc[i])); + if (VerQueryValueW(verinfoW, fileDescW, (LPVOID *)&bufW, &flen)) + { + /* Does strlenW(bufW) == 0 mean we use the filename? */ + len = strlenW(bufW) + 1; + TRACE("found FileDescription: %s\n", debugstr_w(bufW)); + return ASSOC_ReturnData(pszOut, pcchOut, bufW, len); + } } - *pcchOut = len; - lstrcpynW(pszOut, path, len); - return S_OK; - } - else - { - *pcchOut = len; - return S_FALSE; } - break; +get_friendly_name_fail: + PathRemoveExtensionW(path); + PathStripPathW(path); + TRACE("using filename: %s\n", debugstr_w(path)); + return ASSOC_ReturnData(pszOut, pcchOut, path, strlenW(path) + 1); } default: diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 6b1e33fa81b..7b6ae226d2a 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -3692,6 +3692,30 @@ DWORD WINAPI MLClearMLHInstance(DWORD x) } /************************************************************************* + * @ [SHLWAPI.432] + * + * See SHSendMessageBroadcastW + * + */ +DWORD WINAPI SHSendMessageBroadcastA(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + return SendMessageTimeoutA(HWND_BROADCAST, uMsg, wParam, lParam, + SMTO_ABORTIFHUNG, 2000, NULL); +} + +/************************************************************************* + * @ [SHLWAPI.433] + * + * A wrapper for sending Broadcast Messages to all top level Windows + * + */ +DWORD WINAPI SHSendMessageBroadcastW(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + return SendMessageTimeoutW(HWND_BROADCAST, uMsg, wParam, lParam, + SMTO_ABORTIFHUNG, 2000, NULL); +} + +/************************************************************************* * @ [SHLWAPI.436] * * Convert an Unicode string CLSID into a CLSID. diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index f86bd7cd1a0..0b1cd4c569d 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -429,8 +429,8 @@ 429 stdcall -noname MLIsMLHInstance(long) 430 stdcall -noname MLSetMLHInstance(long long) 431 stdcall -noname MLClearMLHInstance(long) -432 stub -noname SHSendMessageBroadcastA -433 stub -noname SHSendMessageBroadcastW +432 stdcall -noname SHSendMessageBroadcastA(long long long) +433 stdcall -noname SHSendMessageBroadcastW(long long long) 434 stdcall -noname SendMessageTimeoutWrapW(long long long long long long ptr) user32.SendMessageTimeoutW 435 stdcall -noname CLSIDFromProgIDWrap(wstr ptr) ole32.CLSIDFromProgID 436 stdcall -noname CLSIDFromStringWrap(wstr ptr) diff --git a/dlls/shlwapi/tests/assoc.c b/dlls/shlwapi/tests/assoc.c index bb1c4d6fc05..2e383bb959e 100644 --- a/dlls/shlwapi/tests/assoc.c +++ b/dlls/shlwapi/tests/assoc.c @@ -32,6 +32,19 @@ static const WCHAR dotBad[] = { '.','b','a','d',0 }; static const WCHAR open[] = { 'o','p','e','n',0 }; static const WCHAR invalid[] = { 'i','n','v','a','l','i','d',0 }; +/* copied from libs/wine/string.c */ +WCHAR *strstrW(const WCHAR *str, const WCHAR *sub) +{ + while (*str) + { + const WCHAR *p1 = str, *p2 = sub; + while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; } + if (!*p2) return (WCHAR *)str; + str++; + } + return NULL; +} + static void test_getstring_bad(void) { HRESULT hr; @@ -59,7 +72,7 @@ static void test_getstring_bad(void) expect_hr(E_FAIL, hr); hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, invalid, NULL, &len); - todo_wine expect_hr(0x80070002, hr); /* NOT FOUND */ + expect_hr(0x80070002, hr); /* NOT FOUND */ hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, NULL, NULL); expect_hr(E_UNEXPECTED, hr); @@ -98,7 +111,7 @@ static void test_getstring_basic(void) hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, NULL, &len); - todo_wine expect_hr(S_FALSE, hr); + expect_hr(S_FALSE, hr); if (hr != S_FALSE) { HeapFree(GetProcessHeap(), 0, executableName); @@ -127,8 +140,67 @@ static void test_getstring_basic(void) HeapFree(GetProcessHeap(), 0, friendlyName); } +static void test_getstring_no_extra(void) +{ + LONG ret; + HKEY hkey; + HRESULT hr; + static const WCHAR dotWinetest[] = { + '.','w','i','n','e','t','e','s','t',0 + }; + static const WCHAR winetestfile[] = { + 'w','i','n','e','t','e','s','t', 'f','i','l','e',0 + }; + static const WCHAR winetestfileAction[] = { + 'w','i','n','e','t','e','s','t','f','i','l','e', + '\\','s','h','e','l','l', + '\\','f','o','o', + '\\','c','o','m','m','a','n','d',0 + }; + static const WCHAR action[] = { + 'n','o','t','e','p','a','d','.','e','x','e',0 + }; + WCHAR buf[MAX_PATH]; + DWORD len = MAX_PATH; + + ret = RegCreateKeyW(HKEY_CLASSES_ROOT, dotWinetest, &hkey); + if (ret != ERROR_SUCCESS) + skip("failed to create dotWinetest key\n"); + ret = RegSetValueW(hkey, NULL, REG_SZ, winetestfile, + lstrlenW(winetestfile)); + RegCloseKey(hkey); + if (ret != ERROR_SUCCESS) + { + RegDeleteTreeW(HKEY_CLASSES_ROOT, dotWinetest); + skip("failed to set dotWinetest key\n"); + } + + ret = RegCreateKeyW(HKEY_CLASSES_ROOT, winetestfileAction, &hkey); + if (ret != ERROR_SUCCESS) + { + RegDeleteTreeW(HKEY_CLASSES_ROOT, dotWinetest); + skip("failed to create winetestfileAction key\n"); + } + ret = RegSetValueW(hkey, NULL, REG_SZ, action, lstrlenW(action)); + RegCloseKey(hkey); + if (ret != ERROR_SUCCESS) + { + RegDeleteTreeW(HKEY_CLASSES_ROOT, dotWinetest); + RegDeleteTreeW(HKEY_CLASSES_ROOT, winetestfile); + skip("failed to set winetestfileAction key\n"); + } + + hr = AssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotWinetest, NULL, + buf, &len); + expect_hr(S_OK, hr); + ok(strstrW(buf, action) != NULL, "exe path does not contain notepad\n"); + RegDeleteTreeW(HKEY_CLASSES_ROOT, dotWinetest); + RegDeleteTreeW(HKEY_CLASSES_ROOT, winetestfile); +} + START_TEST(assoc) { test_getstring_bad(); test_getstring_basic(); + test_getstring_no_extra(); } diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index dcf95507543..ba767867202 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -430,6 +430,12 @@ static inline LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM return DefWindowProcA(hwnd, msg, wParam, lParam); } +static inline INT get_vertical_line_count(EDITSTATE *es) +{ + INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + return max(1,vlc); +} + /********************************************************************* * * EditWndProc_common @@ -1807,7 +1813,7 @@ static void EDIT_SL_InvalidateText(EDITSTATE *es, INT start, INT end) */ static void EDIT_ML_InvalidateText(EDITSTATE *es, INT start, INT end) { - INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + INT vlc = get_vertical_line_count(es); INT sl = EDIT_EM_LineFromChar(es, start); INT el = EDIT_EM_LineFromChar(es, end); INT sc; @@ -2234,7 +2240,8 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) LRESULT pos; if (es->style & ES_MULTILINE) { - INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + INT vlc = get_vertical_line_count(es); + if ((line < es->y_offset) || (line > es->y_offset + vlc) || (line >= es->line_count)) return; } else if (line) @@ -2361,8 +2368,8 @@ static void EDIT_AdjustFormatRect(EDITSTATE *es) { INT fw, vlc, max_x_offset, max_y_offset; - vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; - es->format_rect.bottom = es->format_rect.top + max(1, vlc) * es->line_height; + vlc = get_vertical_line_count(es); + es->format_rect.bottom = es->format_rect.top + vlc * es->line_height; /* correct es->x_offset */ fw = es->format_rect.right - es->format_rect.left; @@ -3256,7 +3263,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac if (es->style & ES_MULTILINE) { INT st = min(es->selection_start, es->selection_end); - INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + INT vlc = get_vertical_line_count(es); hrgn = CreateRectRgn(0, 0, 0, 0); EDIT_BuildLineDefs_ML(es, st, st + strl, @@ -3420,7 +3427,7 @@ static LRESULT EDIT_EM_Scroll(EDITSTATE *es, INT action) return (LRESULT)FALSE; } if (dy) { - INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + INT vlc = get_vertical_line_count(es); /* check if we are going to move too far */ if(es->y_offset + dy > es->line_count - vlc) dy = es->line_count - vlc - es->y_offset; @@ -3451,7 +3458,7 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es) l = EDIT_EM_LineFromChar(es, es->selection_end); x = (short)LOWORD(EDIT_EM_PosFromChar(es, es->selection_end, es->flags & EF_AFTER_WRAP)); - vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + vlc = get_vertical_line_count(es); if (l >= es->y_offset + vlc) dy = l - vlc + 1 - es->y_offset; if (l < es->y_offset) @@ -4103,19 +4110,19 @@ static void EDIT_WM_Command(EDITSTATE *es, INT code, INT id, HWND control) switch (id) { case EM_UNDO: - EDIT_EM_Undo(es); + SendMessageW(es->hwndSelf, WM_UNDO, 0, 0); break; case WM_CUT: - EDIT_WM_Cut(es); + SendMessageW(es->hwndSelf, WM_CUT, 0, 0); break; case WM_COPY: - EDIT_WM_Copy(es); + SendMessageW(es->hwndSelf, WM_COPY, 0, 0); break; case WM_PASTE: - EDIT_WM_Paste(es); + SendMessageW(es->hwndSelf, WM_PASTE, 0, 0); break; case WM_CLEAR: - EDIT_WM_Clear(es); + SendMessageW(es->hwndSelf, WM_CLEAR, 0, 0); break; case EM_SETSEL: EDIT_EM_SetSel(es, 0, (UINT)-1, FALSE); @@ -4956,7 +4963,7 @@ static void EDIT_WM_Paint(EDITSTATE *es, HDC hdc) SetTextColor(dc, GetSysColor(COLOR_GRAYTEXT)); GetClipBox(dc, &rcRgn); if (es->style & ES_MULTILINE) { - INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + INT vlc = get_vertical_line_count(es); for (i = es->y_offset ; i <= min(es->y_offset + vlc, es->y_offset + es->line_count - 1) ; i++) { EDIT_GetLineRect(es, i, 0, -1, &rcLine); if (IntersectRect(&rc, &rcRgn, &rcLine)) @@ -5301,7 +5308,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos) INT vlc, new_y; /* Sanity check */ if(pos < 0 || pos > 100) return 0; - vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + vlc = get_vertical_line_count(es); new_y = pos * (es->line_count - vlc) / 100; dy = es->line_count ? (new_y - es->y_offset) : 0; TRACE("line_count=%d, y_offset=%d, pos=%d, dy = %d\n", @@ -5319,7 +5326,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos) INT vlc, new_y; /* Sanity check */ if(pos < 0 || pos > 100) return 0; - vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + vlc = get_vertical_line_count(es); new_y = pos * (es->line_count - vlc) / 100; dy = es->line_count ? (new_y - es->y_offset) : 0; TRACE("line_count=%d, y_offset=%d, pos=%d, dy = %d\n", @@ -5350,7 +5357,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos) else { /* Assume default scroll range 0-100 */ - INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; + INT vlc = get_vertical_line_count(es); ret = es->line_count ? es->y_offset * 100 / (es->line_count - vlc) : 0; } TRACE("EM_GETTHUMB: returning %ld\n", ret); diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 0c5a6786188..b70dae53c31 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1989,6 +1989,53 @@ static void UnregisterWindowClasses (void) UnregisterClassA(szEditTextPositionClass, hinst); } +void test_fontsize(void) +{ + HWND hwEdit; + HFONT hfont; + LOGFONT lf; + LONG r; + char szLocalString[MAXLEN]; + + memset(&lf,0,sizeof(LOGFONTA)); + strcpy(lf.lfFaceName,"Arial"); + lf.lfHeight = -300; /* taller than the edit box */ + lf.lfWeight = 500; + hfont = CreateFontIndirect(&lf); + + trace("EDIT: Oversized font (Multi line)\n"); + hwEdit= CreateWindow("EDIT", NULL, ES_MULTILINE|ES_AUTOHSCROLL, + 0, 0, 150, 50, NULL, NULL, hinst, NULL); + + SendMessage(hwEdit,WM_SETFONT,(WPARAM)hfont,0); + + if (winetest_interactive) + ShowWindow (hwEdit, SW_SHOW); + + r = SendMessage(hwEdit, WM_CHAR, 'A', 1); + ok(1 == r, "Expected: %d, got: %d\n", 1, r); + r = SendMessage(hwEdit, WM_CHAR, 'B', 1); + ok(1 == r, "Expected: %d, got: %d\n", 1, r); + r = SendMessage(hwEdit, WM_CHAR, 'C', 1); + ok(1 == r, "Expected: %d, got: %d\n", 1, r); + + GetWindowText(hwEdit, szLocalString, MAXLEN); + ok(lstrcmp(szLocalString, "ABC")==0, + "Wrong contents of edit: %s\n", szLocalString); + + r = SendMessage(hwEdit, EM_POSFROMCHAR,0,0); + ok(r != -1,"EM_POSFROMCHAR failed index 0\n"); + r = SendMessage(hwEdit, EM_POSFROMCHAR,1,0); + ok(r != -1,"EM_POSFROMCHAR failed index 1\n"); + r = SendMessage(hwEdit, EM_POSFROMCHAR,2,0); + ok(r != -1,"EM_POSFROMCHAR failed index 2\n"); + r = SendMessage(hwEdit, EM_POSFROMCHAR,3,0); + ok(r == -1,"EM_POSFROMCHAR succeeded index 3\n"); + + DestroyWindow (hwEdit); + DeleteObject(hfont); +} + START_TEST(edit) { hinst = GetModuleHandleA(NULL); @@ -2012,6 +2059,7 @@ START_TEST(edit) test_wantreturn_edit_dialog(); test_singleline_wantreturn_edit_dialog(); test_child_edit_wmkeydown(); + test_fontsize(); UnregisterWindowClasses(); } diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c index 5523ff298b6..f3849cc972c 100644 --- a/dlls/user32/tests/text.c +++ b/dlls/user32/tests/text.c @@ -27,6 +27,9 @@ #include "winuser.h" #include "winerror.h" +#define MODIFIED(rect) (rect.left = 10 && rect.right != 100 && rect.top == 10 && rect.bottom != 100) +#define SAME(rect) (rect.left = 10 && rect.right == 100 && rect.top == 10 && rect.bottom == 100) +#define EMPTY(rect) (rect.left == rect.right && rect.bottom == rect.top) static void test_DrawTextCalcRect(void) { @@ -40,9 +43,11 @@ static void test_DrawTextCalcRect(void) 's','t','r','i','n','g','\0'}; static CHAR emptystring[] = ""; static WCHAR emptystringW[] = { 0 }; - INT textlen, textheight; + INT textlen, textheight, heightcheck; RECT rect = { 0, 0, 100, 0 }; BOOL ret; + DRAWTEXTPARAMS dtp; + BOOL conform_xp = TRUE; /* Initialization */ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, @@ -105,63 +110,426 @@ static void test_DrawTextCalcRect(void) rect.bottom); /* empty or null text should in some cases calc an empty rectangle */ - /* note: testing the function's return value is useless, it differs - * ( 0 or 1) on every Windows version I tried */ + SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextExA(hdc, text, 0, &rect, DT_CALCRECT, NULL ); - ok( !(rect.left == rect.right && rect.bottom == rect.top), + heightcheck = textheight = DrawTextExA(hdc, text, 0, &rect, DT_CALCRECT, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), "rectangle should NOT be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (textheight != 0) /* Windows 98 */ + { + win_skip("XP conformity failed, skipping XP tests. Probibly win9x\n"); + conform_xp = FALSE; + } + else + ok(textheight==0,"Got textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, text, 0, &rect, DT_CALCRECT); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + SetRect( &rect, 10,10, 100, 100); SetLastError( 0); - textheight = DrawTextExA(hdc, emptystring, -1, &rect, DT_CALCRECT, NULL ); - ok( (rect.left == rect.right && rect.bottom == rect.top), + heightcheck = textheight = DrawTextExA(hdc, emptystring, -1, &rect, DT_CALCRECT, NULL ); + ok( EMPTY(rect), "rectangle should be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT); + ok( EMPTY(rect), + "rectangle should be empty got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + SetRect( &rect, 10,10, 100, 100); SetLastError( 0); - textheight = DrawTextExA(hdc, NULL, -1, &rect, DT_CALCRECT, NULL ); - ok( (rect.left == rect.right && rect.bottom == rect.top), - "rectangle should be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + heightcheck = textheight = DrawTextExA(hdc, NULL, -1, &rect, DT_CALCRECT, NULL ); + ok( EMPTY(rect) || !MODIFIED(rect), + "rectangle should be empty or not modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (!textheight) /* Windows NT 4 */ + { + if (conform_xp) + win_skip("XP conformity failed, skipping XP tests. Probibly winNT\n"); + conform_xp = FALSE; + } + else + ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, NULL, -1, &rect, DT_CALCRECT); + ok( EMPTY(rect) || !MODIFIED(rect), + "rectangle should be empty or NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExA(hdc, NULL, 0, &rect, DT_CALCRECT, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, NULL, 0, &rect, DT_CALCRECT); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + /* DT_SINGLELINE tests */ + SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextExA(hdc, NULL, 0, &rect, DT_CALCRECT, NULL ); - ok( !(rect.left == rect.right && rect.bottom == rect.top), + heightcheck = textheight = DrawTextExA(hdc, text, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), "rectangle should NOT be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, text, 0, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + SetLastError( 0); + heightcheck = textheight = DrawTextExA(hdc, emptystring, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && MODIFIED(rect), + "rectangle should be modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && MODIFIED (rect), + "rectangle should be modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + SetLastError( 0); + heightcheck = textheight = DrawTextExA(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( (!EMPTY(rect) && MODIFIED(rect)) || !MODIFIED(rect), + "rectangle should be modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( (!EMPTY(rect) && MODIFIED(rect)) || !MODIFIED(rect), + "rectangle should be modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExA(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExA\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextA(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + /* further tests with 0 count, NULL and empty strings */ + heightcheck = textheight = DrawTextA(hdc, text, 0, &rect, 0); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + textheight = DrawTextExA(hdc, text, 0, &rect, 0, NULL ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextA(hdc, emptystring, 0, &rect, 0); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + textheight = DrawTextExA(hdc, emptystring, 0, &rect, 0, NULL ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextA(hdc, NULL, 0, &rect, 0); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextA\n"); + textheight = DrawTextExA(hdc, NULL, 0, &rect, 0, NULL ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextA(hdc, emptystring, -1, &rect, 0); + ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); + textheight = DrawTextExA(hdc, emptystring, -1, &rect, 0, NULL ); + ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextA(hdc, NULL, -1, &rect, 0); + if (conform_xp) + ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); + textheight = DrawTextExA(hdc, NULL, -1, &rect, 0, NULL ); + if (conform_xp) + ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextA(hdc, NULL, 10, &rect, 0); + ok(textheight==0,"Got textheight from DrawTextA\n"); + textheight = DrawTextExA(hdc, NULL, 10, &rect, 0, NULL ); + ok(textheight==0,"Got textheight from DrawTextA\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + + /* invalid dtp size test */ + dtp.cbSize = -1; /* Invalid */ + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExA(hdc, text, 0, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExA(hdc, emptystring, 0, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExA(hdc, NULL, 0, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExA(hdc, emptystring, -1, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExA(hdc, NULL, -1, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExA\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); /* Wide char versions */ SetRect( &rect, 10,10, 100, 100); SetLastError( 0); - textheight = DrawTextExW(hdc, textW, 0, &rect, DT_CALCRECT, NULL ); + heightcheck = textheight = DrawTextExW(hdc, textW, 0, &rect, DT_CALCRECT, NULL ); if( GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) { - ok( !(rect.left == rect.right && rect.bottom == rect.top), - "rectangle should NOT be empty got %d,%d-%d,%d\n", + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextExW(hdc, emptystringW, -1, &rect, DT_CALCRECT, NULL ); - ok( (rect.left == rect.right && rect.bottom == rect.top), + textheight = DrawTextW(hdc, textW, 0, &rect, DT_CALCRECT); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExW(hdc, emptystringW, -1, &rect, DT_CALCRECT, NULL ); + ok( EMPTY(rect), "rectangle should be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - if (0) { + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT); + ok( EMPTY(rect), + "rectangle should be empty got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExW(hdc, NULL, 0, &rect, DT_CALCRECT, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (textheight) /* windows 2000 */ + { + if (conform_xp) + win_skip("XP conformity failed, skipping XP tests. probibly win 2000\n"); + conform_xp = FALSE; + } + else + ok(textheight==0,"Got textheight from DrawTextExW\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextW(hdc, NULL, 0, &rect, DT_CALCRECT); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + if (conform_xp) { + /* Crashes on NT4 */ SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExW(hdc, NULL, -1, &rect, DT_CALCRECT, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight==0,"Got textheight from DrawTextExW\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextW(hdc, NULL, -1, &rect, DT_CALCRECT); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight==0,"Got textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + } + + + /* DT_SINGLELINE tests */ + + heightcheck = textheight = DrawTextExW(hdc, textW, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextW(hdc, textW, 0, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExW(hdc, emptystringW, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && MODIFIED(rect), + "rectangle should be modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && MODIFIED(rect), + "rectangle should be modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + if (conform_xp) { /* Crashes on NT4 */ - textheight = DrawTextExW(hdc, NULL, -1, &rect, DT_CALCRECT, NULL ); - ok( !(rect.left == rect.right && rect.bottom == rect.top), - "rectangle should NOT be empty got %d,%d-%d,%d\n", + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExW(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight==0,"Got textheight from DrawTextExW\n"); + + SetRect( &rect, 10,10, 100, 100); + textheight = DrawTextW(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + ok(textheight==0,"Got textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); } + + SetRect( &rect, 10,10, 100, 100); + heightcheck = textheight = DrawTextExW(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", + rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExW\n"); + SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextExW(hdc, NULL, 0, &rect, DT_CALCRECT, NULL ); - ok( !(rect.left == rect.right && rect.bottom == rect.top), - "rectangle should NOT be empty got %d,%d-%d,%d\n", + textheight = DrawTextW(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE); + ok( !EMPTY(rect) && !MODIFIED(rect), + "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + + /* further tests with NULL and empty strings */ + heightcheck = textheight = DrawTextW(hdc, textW, 0, &rect, 0); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + textheight = DrawTextExW(hdc, textW, 0, &rect, 0, NULL ); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextW(hdc, emptystringW, 0, &rect, 0); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + textheight = DrawTextExW(hdc, emptystringW, 0, &rect, 0, NULL ); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextW(hdc, NULL, 0, &rect, 0); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextW\n"); + textheight = DrawTextExW(hdc, NULL, 0, &rect, 0, NULL ); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextW(hdc, emptystringW, -1, &rect, 0); + ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); + textheight = DrawTextExW(hdc, emptystringW, -1, &rect, 0, NULL ); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + if (conform_xp) { + /* Crashes on NT4 */ + heightcheck = textheight = DrawTextW(hdc, NULL, -1, &rect, 0); + ok(textheight==0,"Got textheight from DrawTextW\n"); + textheight = DrawTextExW(hdc, NULL, -1, &rect, 0, NULL ); + ok(textheight==0,"Got textheight from DrawTextExW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + heightcheck = textheight = DrawTextW(hdc, NULL, 10, &rect, 0); + ok(textheight==0,"Got textheight from DrawTextW\n"); + textheight = DrawTextExW(hdc, NULL, 10, &rect, 0, NULL ); + ok(textheight==0,"Got textheight from DrawTextW\n"); + ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); + } + + dtp.cbSize = -1; /* Invalid */ + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExW(hdc, textW, 0, &rect, 0, &dtp); + ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExW(hdc, emptystringW, 0, &rect, 0, &dtp); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExW\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExW(hdc, NULL, 0, &rect, 0, &dtp); + if (conform_xp) + ok(textheight==0,"Got textheight from DrawTextExW\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExW(hdc, emptystringW, -1, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExW\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + if (conform_xp) { + /* Crashes on NT4 */ + dtp.uiLengthDrawn = 1337; + textheight = DrawTextExW(hdc, NULL, -1, &rect, 0, &dtp); + ok(textheight==0,"Got textheight from DrawTextExW\n"); + ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); + } } /* More test cases from bug 12226 */ SetRect(&rect, 0, 0, 0, 0); textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE); - todo_wine ok(textheight, "DrawTextA error %u\n", GetLastError()); + ok(textheight, "DrawTextA error %u\n", GetLastError()); ok(0 == rect.left, "expected 0, got %d\n", rect.left); ok(0 == rect.right, "expected 0, got %d\n", rect.right); ok(0 == rect.top, "expected 0, got %d\n", rect.top); - todo_wine ok(rect.bottom, "rect.bottom should not be 0\n"); + ok(rect.bottom, "rect.bottom should not be 0\n"); SetRect(&rect, 0, 0, 0, 0); textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE); @@ -171,11 +539,11 @@ static void test_DrawTextCalcRect(void) } else { - todo_wine ok(textheight, "DrawTextW error %u\n", GetLastError()); + ok(textheight, "DrawTextW error %u\n", GetLastError()); ok(0 == rect.left, "expected 0, got %d\n", rect.left); ok(0 == rect.right, "expected 0, got %d\n", rect.right); ok(0 == rect.top, "expected 0, got %d\n", rect.top); - todo_wine ok(rect.bottom, "rect.bottom should not be 0\n"); + ok(rect.bottom, "rect.bottom should not be 0\n"); } SelectObject(hdc, hOldFont); @@ -306,13 +674,13 @@ static void test_DrawState(void) SetLastError(0xdeadbeef); ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, strlen(text), 0, 0, 10, 10, DST_TEXT); - ok(!ret, "DrawState succeeded\n"); + ok(!ret || broken(ret) /* win98 */, "DrawState succeeded\n"); ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError()); SetLastError(0xdeadbeef); ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, 0, 0, 0, 10, 10, DST_TEXT); - ok(!ret, "DrawState succeeded\n"); + ok(!ret || broken(ret) /* win98 */, "DrawState succeeded\n"); ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError()); ReleaseDC(hwnd, hdc); diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index db1de113700..1b9d7291f03 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -49,6 +49,8 @@ static BOOL (WINAPI *pGetWindowInfo)(HWND,WINDOWINFO*); static UINT (WINAPI *pGetWindowModuleFileNameA)(HWND,LPSTR,UINT); static BOOL (WINAPI *pGetLayeredWindowAttributes)(HWND,COLORREF*,BYTE*,DWORD*); static BOOL (WINAPI *pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD); +static BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR,LPMONITORINFO); +static HMONITOR (WINAPI *pMonitorFromPoint)(POINT,DWORD); static BOOL test_lbuttondown_flag; static HWND hwndMessage; @@ -4906,6 +4908,192 @@ static void test_layered_window(void) DestroyWindow( hwnd ); } +static MONITORINFO mi; + +static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + switch (msg) + { + case WM_NCCREATE: + { + CREATESTRUCTA *cs = (CREATESTRUCTA *)lp; + trace("WM_NCCREATE: rect %d,%d-%d,%d\n", cs->x, cs->y, cs->cx, cs->cy); + ok(cs->x == mi.rcMonitor.left && cs->y == mi.rcMonitor.top && + cs->cx == mi.rcMonitor.right && cs->cy == mi.rcMonitor.bottom, + "expected %d,%d-%d,%d, got %d,%d-%d,%d\n", + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + cs->x, cs->y, cs->cx, cs->cy); + break; + } + case WM_GETMINMAXINFO: + { + MINMAXINFO *minmax = (MINMAXINFO *)lp; + dump_minmax_info(minmax); + ok(minmax->ptMaxPosition.x <= mi.rcMonitor.left, "%d <= %d\n", minmax->ptMaxPosition.x, mi.rcMonitor.left); + ok(minmax->ptMaxPosition.y <= mi.rcMonitor.top, "%d <= %d\n", minmax->ptMaxPosition.y, mi.rcMonitor.top); + ok(minmax->ptMaxSize.x >= mi.rcMonitor.right, "%d >= %d\n", minmax->ptMaxSize.x, mi.rcMonitor.right); + ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%d >= %d\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom); + break; + } + } + return DefWindowProc(hwnd, msg, wp, lp); +} + +static void test_fullscreen(void) +{ + static const DWORD t_style[] = { + WS_OVERLAPPED, WS_POPUP, WS_CHILD, WS_THICKFRAME, WS_DLGFRAME + }; + static const DWORD t_ex_style[] = { + 0, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW + }; + WNDCLASS cls; + HWND hwnd; + int i, j; + POINT pt; + RECT rc; + HMONITOR hmon; + LRESULT ret; + + if (!pGetMonitorInfoA || !pMonitorFromPoint) + { + win_skip("GetMonitorInfoA or MonitorFromPoint are not available on this platform\n"); + return; + } + + pt.x = pt.y = 0; + SetLastError(0xdeadbeef); + hmon = pMonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY); + ok(hmon != 0, "MonitorFromPoint error %u\n", GetLastError()); + + mi.cbSize = sizeof(mi); + SetLastError(0xdeadbeef); + ret = pGetMonitorInfoA(hmon, &mi); + ok(ret, "GetMonitorInfo error %u\n", GetLastError()); + trace("monitor (%d,%d-%d,%d), work (%d,%d-%d,%d)\n", + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom); + + cls.style = 0; + cls.lpfnWndProc = fullscreen_wnd_proc; + cls.cbClsExtra = 0; + cls.cbWndExtra = 0; + cls.hInstance = GetModuleHandle(0); + cls.hIcon = 0; + cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hbrBackground = GetStockObject(WHITE_BRUSH); + cls.lpszMenuName = NULL; + cls.lpszClassName = "fullscreen_class"; + RegisterClass(&cls); + + for (i = 0; i < sizeof(t_style)/sizeof(t_style[0]); i++) + { + DWORD style, ex_style; + + /* avoid a WM interaction */ + assert(!(t_style[i] & WS_VISIBLE)); + + for (j = 0; j < sizeof(t_ex_style)/sizeof(t_ex_style[0]); j++) + { + int fixup; + + style = t_style[i]; + ex_style = t_ex_style[j]; + + hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + GetDesktopWindow(), 0, GetModuleHandle(0), NULL); + ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + GetWindowRect(hwnd, &rc); + trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && + rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + DestroyWindow(hwnd); + + style = t_style[i] | WS_MAXIMIZE; + hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + GetDesktopWindow(), 0, GetModuleHandle(0), NULL); + ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + GetWindowRect(hwnd, &rc); + trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && + rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + DestroyWindow(hwnd); + + style = t_style[i] | WS_MAXIMIZE | WS_CAPTION; + hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + GetDesktopWindow(), 0, GetModuleHandle(0), NULL); + ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + GetWindowRect(hwnd, &rc); + trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && + rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + DestroyWindow(hwnd); + + style = t_style[i] | WS_CAPTION | WS_MAXIMIZEBOX; + hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + GetDesktopWindow(), 0, GetModuleHandle(0), NULL); + ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + GetWindowRect(hwnd, &rc); + trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && + rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + DestroyWindow(hwnd); + + style = t_style[i] | WS_MAXIMIZE | WS_CAPTION | WS_MAXIMIZEBOX; + hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + GetDesktopWindow(), 0, GetModuleHandle(0), NULL); + ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + GetWindowRect(hwnd, &rc); + trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + /* Windows makes a maximized window slightly larger (to hide the borders?) */ + fixup = min(abs(rc.left), abs(rc.top)); + InflateRect(&rc, -fixup, -fixup); + /* FIXME: this doesn't work correctly in Wine for child windows yet */ + if (style & WS_CHILD) + todo_wine + ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && + rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + else + ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && + rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + DestroyWindow(hwnd); + + style = t_style[i] | WS_MAXIMIZE | WS_MAXIMIZEBOX; + hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, + mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, + GetDesktopWindow(), 0, GetModuleHandle(0), NULL); + ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); + GetWindowRect(hwnd, &rc); + trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + /* Windows makes a maximized window slightly larger (to hide the borders?) */ + fixup = min(abs(rc.left), abs(rc.top)); + InflateRect(&rc, -fixup, -fixup); + if (style & (WS_CHILD | WS_POPUP)) + ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && + rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + else + ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && + rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, + "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); + DestroyWindow(hwnd); + } + } + + UnregisterClass("MinMax_WndClass", GetModuleHandle(0)); +} + START_TEST(win) { HMODULE user32 = GetModuleHandleA( "user32.dll" ); @@ -4914,6 +5102,8 @@ START_TEST(win) pGetWindowModuleFileNameA = (void *)GetProcAddress( user32, "GetWindowModuleFileNameA" ); pGetLayeredWindowAttributes = (void *)GetProcAddress( user32, "GetLayeredWindowAttributes" ); pSetLayeredWindowAttributes = (void *)GetProcAddress( user32, "SetLayeredWindowAttributes" ); + pGetMonitorInfoA = (void *)GetProcAddress( user32, "GetMonitorInfoA" ); + pMonitorFromPoint = (void *)GetProcAddress( user32, "MonitorFromPoint" ); if (!RegisterWindowClasses()) assert(0); @@ -4936,6 +5126,7 @@ START_TEST(win) our_pid = GetWindowThreadProcessId(hwndMain, NULL); /* Add the tests below this line */ + test_fullscreen(); test_hwnd_message(); test_nonclient_area(hwndMain); test_params(); diff --git a/dlls/user32/text.c b/dlls/user32/text.c index da3444de5fe..b09d085bccb 100644 --- a/dlls/user32/text.c +++ b/dlls/user32/text.c @@ -862,7 +862,25 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count, if (dtp) TRACE("Params: iTabLength=%d, iLeftMargin=%d, iRightMargin=%d\n", dtp->iTabLength, dtp->iLeftMargin, dtp->iRightMargin); - if (!str || count == 0) return 0; + if (!str) return 0; + + strPtr = str; + + if (flags & DT_SINGLELINE) + flags &= ~DT_WORDBREAK; + + GetTextMetricsW(hdc, &tm); + if (flags & DT_EXTERNALLEADING) + lh = tm.tmHeight + tm.tmExternalLeading; + else + lh = tm.tmHeight; + + if (str[0] && count == 0) + return lh; + + if (dtp && dtp->cbSize != sizeof(DRAWTEXTPARAMS)) + return 0; + if (count == -1) { count = strlenW(str); @@ -871,21 +889,14 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count, if( flags & DT_CALCRECT) { rect->right = rect->left; - rect->bottom = rect->top; + if( flags & DT_SINGLELINE) + rect->bottom = rect->top + lh; + else + rect->bottom = rect->top; } - return 0; + return lh; } } - strPtr = str; - - if (flags & DT_SINGLELINE) - flags &= ~DT_WORDBREAK; - - GetTextMetricsW(hdc, &tm); - if (flags & DT_EXTERNALLEADING) - lh = tm.tmHeight + tm.tmExternalLeading; - else - lh = tm.tmHeight; if (dtp) { @@ -1031,14 +1042,30 @@ INT WINAPI DrawTextExA( HDC hdc, LPSTR str, INT count, UINT cp; if (!count) return 0; + if (!str && count > 0) return 0; if( !str || ((count == -1) && !(count = strlen(str)))) { + int lh; + TEXTMETRICA tm; + + if (dtp && dtp->cbSize != sizeof(DRAWTEXTPARAMS)) + return 0; + + GetTextMetricsA(hdc, &tm); + if (flags & DT_EXTERNALLEADING) + lh = tm.tmHeight + tm.tmExternalLeading; + else + lh = tm.tmHeight; + if( flags & DT_CALCRECT) { rect->right = rect->left; - rect->bottom = rect->top; + if( flags & DT_SINGLELINE) + rect->bottom = rect->top + lh; + else + rect->bottom = rect->top; } - return 0; + return lh; } cp = GdiGetCodePage( hdc ); wcount = MultiByteToWideChar( cp, 0, str, count, NULL, 0 ); @@ -1081,6 +1108,7 @@ INT WINAPI DrawTextW( HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags ) DRAWTEXTPARAMS dtp; memset (&dtp, 0, sizeof(dtp)); + dtp.cbSize = sizeof(dtp); if (flags & DT_TABSTOP) { dtp.iTabLength = (flags >> 8) & 0xff; @@ -1097,6 +1125,7 @@ INT WINAPI DrawTextA( HDC hdc, LPCSTR str, INT count, LPRECT rect, UINT flags ) DRAWTEXTPARAMS dtp; memset (&dtp, 0, sizeof(dtp)); + dtp.cbSize = sizeof(dtp); if (flags & DT_TABSTOP) { dtp.iTabLength = (flags >> 8) & 0xff; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index cbe844a8553..4f5005cf32a 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -654,8 +654,8 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, MINMAXINFO MinMax; HMONITOR monitor; INT xinc, yinc; - LONG style = GetWindowLongA( hwnd, GWL_STYLE ); - LONG exstyle = GetWindowLongA( hwnd, GWL_EXSTYLE ); + LONG style = GetWindowLongW( hwnd, GWL_STYLE ); + LONG exstyle = GetWindowLongW( hwnd, GWL_EXSTYLE ); RECT rc; WND *win; @@ -725,21 +725,30 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos, if ((monitor = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY ))) { + RECT rc_work; MONITORINFO mon_info; mon_info.cbSize = sizeof(mon_info); GetMonitorInfoW( monitor, &mon_info ); + rc_work = mon_info.rcMonitor; + + if (style & WS_MAXIMIZEBOX) + { + if ((style & WS_CAPTION) == WS_CAPTION || !(style & (WS_CHILD | WS_POPUP))) + rc_work = mon_info.rcWork; + } + if (MinMax.ptMaxSize.x == GetSystemMetrics(SM_CXSCREEN) + 2 * xinc && MinMax.ptMaxSize.y == GetSystemMetrics(SM_CYSCREEN) + 2 * yinc) { - MinMax.ptMaxSize.x = (mon_info.rcWork.right - mon_info.rcWork.left) + 2 * xinc; - MinMax.ptMaxSize.y = (mon_info.rcWork.bottom - mon_info.rcWork.top) + 2 * yinc; + MinMax.ptMaxSize.x = (rc_work.right - rc_work.left) + 2 * xinc; + MinMax.ptMaxSize.y = (rc_work.bottom - rc_work.top) + 2 * yinc; } if (MinMax.ptMaxPosition.x == -xinc && MinMax.ptMaxPosition.y == -yinc) { - MinMax.ptMaxPosition.x = mon_info.rcWork.left - xinc; - MinMax.ptMaxPosition.y = mon_info.rcWork.top - yinc; + MinMax.ptMaxPosition.x = rc_work.left - xinc; + MinMax.ptMaxPosition.y = rc_work.top - yinc; } } diff --git a/dlls/version/info.c b/dlls/version/info.c index 395895b58ca..51e25b3e219 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -664,6 +664,7 @@ static const VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( const VS_VERSION if (!strncmpiW( child->szKey, szKey, cbKey ) && !child->szKey[cbKey]) return child; + if (!(child->wLength)) return NULL; child = VersionInfo32_Next( child ); } diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index bfa2ce2c3d6..d8ac3eaec8a 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -83,9 +83,11 @@ static void context_apply_attachment_filter_states(IWineD3DDevice *iface, IWineD /* Update base texture states array */ if (SUCCEEDED(IWineD3DSurface_GetContainer(surface, &IID_IWineD3DBaseTexture, (void **)&texture_impl))) { - if (texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] != WINED3DTEXF_POINT) + if (texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] != WINED3DTEXF_POINT + || texture_impl->baseTexture.states[WINED3DTEXSTA_MIPFILTER] != WINED3DTEXF_NONE) { texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; + texture_impl->baseTexture.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; update_minfilter = TRUE; } @@ -1231,7 +1233,6 @@ static WineD3DContext *findThreadContextForSwapChain(IWineD3DSwapChain *swapchai *****************************************************************************/ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, DWORD tid) { IWineD3DSwapChain *swapchain = NULL; - HRESULT hr; BOOL readTexture = wined3d_settings.offscreen_rendering_mode != ORM_FBO && This->render_offscreen; WineD3DContext *context = This->activeContext; BOOL oldRenderOffscreen = This->render_offscreen; @@ -1253,8 +1254,7 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf } } - hr = IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **) &swapchain); - if(hr == WINED3D_OK && swapchain) { + if (SUCCEEDED(IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **)&swapchain))) { TRACE("Rendering onscreen\n"); context = findThreadContextForSwapChain(swapchain, tid); @@ -1411,11 +1411,9 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf static void apply_draw_buffer(IWineD3DDeviceImpl *This, IWineD3DSurface *target, BOOL blit) { - HRESULT hr; IWineD3DSwapChain *swapchain; - hr = IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **)&swapchain); - if (SUCCEEDED(hr)) + if (SUCCEEDED(IWineD3DSurface_GetContainer(target, &IID_IWineD3DSwapChain, (void **)&swapchain))) { IWineD3DSwapChain_Release((IUnknown *)swapchain); glDrawBuffer(surface_get_gl_buffer(target, swapchain)); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b90ac1d7b2a..1a0d3f405b8 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1550,8 +1550,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic /** FIXME: Handle stencil appropriately via EnableAutoDepthStencil / AutoDepthStencilFormat **/ object->context = HeapAlloc(GetProcessHeap(), 0, sizeof(object->context)); - if(!object->context) - return E_OUTOFMEMORY; + if(!object->context) { + ERR("Failed to create the context array\n"); + hr = E_OUTOFMEMORY; + goto error; + } object->num_contexts = 1; if(surface_type == SURFACE_OPENGL) { @@ -1677,7 +1680,7 @@ error: HeapFree(GetProcessHeap(), 0, object->backBuffer); object->backBuffer = NULL; } - if(object->context[0]) + if(object->context && object->context[0]) DestroyContext(This, object->context[0]); if(object->frontBuffer) { IWineD3DSurface_GetParent(object->frontBuffer, &bufferParent); @@ -5176,8 +5179,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa LEAVE_GL(); - IWineD3DSurface_GetContainer( (IWineD3DSurface *) target, &IID_IWineD3DSwapChain, (void **)&swapchain); - if (swapchain) { + if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)target, &IID_IWineD3DSwapChain, (void **)&swapchain))) { if (target == (IWineD3DSurfaceImpl*) swapchain->frontBuffer) { glFlush(); } diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index aa3a3d477e4..41e3e783ea9 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -673,7 +673,6 @@ void depth_blt(IWineD3DDevice *iface, GLuint texture, GLsizei w, GLsizei h) { GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); glBindTexture(GL_TEXTURE_2D, texture); - glEnable(GL_TEXTURE_2D); This->shader_backend->shader_select_depth_blt(iface); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c22a54749ae..94fecbc8b9f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -712,7 +712,6 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v return; } - IWineD3DSurface_GetContainer((IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&swapchain); /* Activate the surface. Set it up for blitting now, although not necessarily needed for LockRect. * Certain graphics drivers seem to dislike some enabled states when reading from opengl, the blitting usage * should help here. Furthermore unlockrect will need the context set up for blitting. The context manager will find @@ -725,14 +724,8 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v * There is no need to keep track of the current read buffer or reset it, every part of the code * that reads sets the read buffer as desired. */ - if(!swapchain) { - /* Locking the primary render target which is not on a swapchain(=offscreen render target). - * Read from the back buffer - */ - TRACE("Locking offscreen render target\n"); - glReadBuffer(myDevice->offscreenBuffer); - srcIsUpsideDown = TRUE; - } else { + if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&swapchain))) + { GLenum buffer = surface_get_gl_buffer((IWineD3DSurface *) This, (IWineD3DSwapChain *)swapchain); TRACE("Locking %#x buffer\n", buffer); glReadBuffer(buffer); @@ -740,6 +733,13 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); srcIsUpsideDown = FALSE; + } else { + /* Locking the primary render target which is not on a swapchain(=offscreen render target). + * Read from the back buffer + */ + TRACE("Locking offscreen render target\n"); + glReadBuffer(myDevice->offscreenBuffer); + srcIsUpsideDown = TRUE; } /* TODO: Get rid of the extra rectangle comparison and construction of a full surface rectangle */ @@ -910,7 +910,6 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This) d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb); - IWineD3DSurface_GetContainer((IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&swapchain); /* Activate the surface to read from. In some situations it isn't the currently active target(e.g. backbuffer * locking during offscreen rendering). RESOURCELOAD is ok because glCopyTexSubImage2D isn't affected by any * states in the stateblock, and no driver was found yet that had bugs in that regard. @@ -925,19 +924,20 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This) * There is no need to keep track of the current read buffer or reset it, every part of the code * that reads sets the read buffer as desired. */ - if(!swapchain) { - /* Locking the primary render target which is not on a swapchain(=offscreen render target). - * Read from the back buffer - */ - TRACE("Locking offscreen render target\n"); - glReadBuffer(device->offscreenBuffer); - } else { + if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)This, &IID_IWineD3DSwapChain, (void **)&swapchain))) + { GLenum buffer = surface_get_gl_buffer((IWineD3DSurface *) This, (IWineD3DSwapChain *)swapchain); TRACE("Locking %#x buffer\n", buffer); glReadBuffer(buffer); checkGLcall("glReadBuffer"); IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); + } else { + /* Locking the primary render target which is not on a swapchain(=offscreen render target). + * Read from the back buffer + */ + TRACE("Locking offscreen render target\n"); + glReadBuffer(device->offscreenBuffer); } if(!(This->Flags & SFLAG_ALLOCATED)) { @@ -1170,7 +1170,7 @@ lock_end: IWineD3DSurface_AddDirtyRect(iface, pRect); /** Dirtify Container if needed */ - if (WINED3D_OK == IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&pBaseTexture) && pBaseTexture != NULL) { + if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&pBaseTexture))) { TRACE("Making container dirty\n"); IWineD3DBaseTexture_SetDirty(pBaseTexture, TRUE); IWineD3DBaseTexture_Release(pBaseTexture); @@ -1194,19 +1194,18 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm ActivateContext(myDevice, (IWineD3DSurface *) This, CTXUSAGE_BLIT); ENTER_GL(); - IWineD3DSurface_GetContainer((IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&swapchain); - if(!swapchain) { - /* Primary offscreen render target */ - TRACE("Offscreen render target\n"); - glDrawBuffer(myDevice->offscreenBuffer); - checkGLcall("glDrawBuffer(myDevice->offscreenBuffer)"); - } else { + if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)This, &IID_IWineD3DSwapChain, (void **)&swapchain))) { GLenum buffer = surface_get_gl_buffer((IWineD3DSurface *) This, (IWineD3DSwapChain *)swapchain); TRACE("Unlocking %#x buffer\n", buffer); glDrawBuffer(buffer); checkGLcall("glDrawBuffer"); IWineD3DSwapChain_Release((IWineD3DSwapChain *)swapchain); + } else { + /* Primary offscreen render target */ + TRACE("Offscreen render target\n"); + glDrawBuffer(myDevice->offscreenBuffer); + checkGLcall("glDrawBuffer(myDevice->offscreenBuffer)"); } glGetIntegerv(GL_PACK_SWAP_BYTES, &prev_store); @@ -2217,7 +2216,6 @@ static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, CONVERT_TYPES conve GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, device->paletteConversionShader)); GL_EXTCALL(glActiveTextureARB(GL_TEXTURE1)); - glEnable(GL_TEXTURE_1D); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -2379,8 +2377,6 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface) { ENTER_GL(); - glEnable(This->glDescription.target); - if (!This->glDescription.level) { if (!This->glDescription.textureName) { glGenTextures(1, &This->glDescription.textureName); @@ -2452,7 +2448,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, const ch GLint prevRead; ENTER_GL(); TRACE("(%p) Reading render target into texture\n", This); - glEnable(GL_TEXTURE_2D); glGenTextures(1, &tmpTexture); glBindTexture(GL_TEXTURE_2D, tmpTexture); @@ -2818,10 +2813,6 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D IWineD3DSurface_PreLoad((IWineD3DSurface *) This); ENTER_GL(); - /* TODO: Do we need GL_TEXTURE_2D enabled fpr copyteximage? */ - glEnable(This->glDescription.target); - checkGLcall("glEnable(This->glDescription.target)"); - /* Bind the target texture */ glBindTexture(This->glDescription.target, This->glDescription.textureName); checkGLcall("glBindTexture"); @@ -2891,10 +2882,6 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D } vcheckGLcall("glCopyTexSubImage2D"); - /* Leave the opengl state valid for blitting */ - glDisable(This->glDescription.target); - checkGLcall("glDisable(This->glDescription.target)"); - LEAVE_GL(); } @@ -4140,10 +4127,10 @@ struct coords { static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT *rect_in) { struct coords coords[4]; RECT rect; - IWineD3DSwapChain *swapchain = NULL; - IWineD3DBaseTexture *texture = NULL; - HRESULT hr; + IWineD3DSwapChain *swapchain; + IWineD3DBaseTexture *texture; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; + GLenum bind_target; if(rect_in) { rect = *rect_in; @@ -4154,148 +4141,130 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT rect.bottom = This->currentDesc.Height; } - ActivateContext(device, (IWineD3DSurface*)This, CTXUSAGE_BLIT); - ENTER_GL(); - - if(This->glDescription.target == GL_TEXTURE_RECTANGLE_ARB) { - glEnable(GL_TEXTURE_RECTANGLE_ARB); - checkGLcall("glEnable(GL_TEXTURE_RECTANGLE_ARB)"); - glBindTexture(GL_TEXTURE_RECTANGLE_ARB, This->glDescription.textureName); - checkGLcall("GL_TEXTURE_RECTANGLE_ARB, This->glDescription.textureName)"); - glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - - coords[0].x = rect.left; - coords[0].z = 0; - - coords[1].x = rect.left; - coords[1].z = 0; + switch(This->glDescription.target) + { + case GL_TEXTURE_2D: + bind_target = GL_TEXTURE_2D; - coords[2].x = rect.right; - coords[2].z = 0; + coords[0].x = (float)rect.left / This->pow2Width; + coords[0].y = (float)rect.top / This->pow2Height; + coords[0].z = 0; - coords[3].x = rect.right; - coords[3].z = 0; + coords[1].x = (float)rect.left / This->pow2Width; + coords[1].y = (float)rect.bottom / This->pow2Height; + coords[1].z = 0; - coords[0].y = rect.top; - coords[1].y = rect.bottom; - coords[2].y = rect.bottom; - coords[3].y = rect.top; - } else if(This->glDescription.target == GL_TEXTURE_2D) { - glEnable(GL_TEXTURE_2D); - checkGLcall("glEnable(GL_TEXTURE_2D)"); - glBindTexture(GL_TEXTURE_2D, This->glDescription.textureName); - checkGLcall("GL_TEXTURE_2D, This->glDescription.textureName)"); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); + coords[2].x = (float)rect.right / This->pow2Width; + coords[2].y = (float)rect.bottom / This->pow2Height; + coords[2].z = 0; - coords[0].x = (float)rect.left / This->pow2Width; - coords[0].z = 0; + coords[3].x = (float)rect.right / This->pow2Width; + coords[3].y = (float)rect.top / This->pow2Height; + coords[3].z = 0; + break; - coords[1].x = (float)rect.left / This->pow2Width; - coords[1].z = 0; + case GL_TEXTURE_RECTANGLE_ARB: + bind_target = GL_TEXTURE_RECTANGLE_ARB; + coords[0].x = rect.left; coords[0].y = rect.top; coords[0].z = 0; + coords[1].x = rect.left; coords[1].y = rect.bottom; coords[1].z = 0; + coords[2].x = rect.right; coords[2].y = rect.bottom; coords[2].z = 0; + coords[3].x = rect.right; coords[3].y = rect.top; coords[3].z = 0; + break; - coords[2].x = (float)rect.right / This->pow2Width; - coords[2].z = 0; + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + coords[0].x = 1; coords[0].y = -1; coords[0].z = 1; + coords[1].x = 1; coords[1].y = 1; coords[1].z = 1; + coords[2].x = 1; coords[2].y = 1; coords[2].z = -1; + coords[3].x = 1; coords[3].y = -1; coords[3].z = -1; + break; - coords[3].x = (float)rect.right / This->pow2Width; - coords[3].z = 0; + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + coords[0].x = -1; coords[0].y = -1; coords[0].z = 1; + coords[1].x = -1; coords[1].y = 1; coords[1].z = 1; + coords[2].x = -1; coords[2].y = 1; coords[2].z = -1; + coords[3].x = -1; coords[3].y = -1; coords[3].z = -1; + break; - coords[0].y = (float)rect.top / This->pow2Height; - coords[1].y = (float)rect.bottom / This->pow2Height; - coords[2].y = (float)rect.bottom / This->pow2Height; - coords[3].y = (float)rect.top / This->pow2Height; - } else { - /* Must be a cube map */ - glEnable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glEnable(GL_TEXTURE_CUBE_MAP_ARB)"); - glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, This->glDescription.textureName); - checkGLcall("GL_TEXTURE_CUBE_MAP_ARB, This->glDescription.textureName)"); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + coords[0].x = -1; coords[0].y = 1; coords[0].z = 1; + coords[1].x = 1; coords[1].y = 1; coords[1].z = 1; + coords[2].x = 1; coords[2].y = 1; coords[2].z = -1; + coords[3].x = -1; coords[3].y = 1; coords[3].z = -1; + break; - switch(This->glDescription.target) { - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - coords[0].x = 1; coords[0].y = -1; coords[0].z = 1; - coords[1].x = 1; coords[1].y = 1; coords[1].z = 1; - coords[2].x = 1; coords[2].y = 1; coords[2].z = -1; - coords[3].x = 1; coords[3].y = -1; coords[3].z = -1; - break; + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + coords[0].x = -1; coords[0].y = -1; coords[0].z = 1; + coords[1].x = 1; coords[1].y = -1; coords[1].z = 1; + coords[2].x = 1; coords[2].y = -1; coords[2].z = -1; + coords[3].x = -1; coords[3].y = -1; coords[3].z = -1; + break; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - coords[0].x = -1; coords[0].y = -1; coords[0].z = 1; - coords[1].x = -1; coords[1].y = 1; coords[1].z = 1; - coords[2].x = -1; coords[2].y = 1; coords[2].z = -1; - coords[3].x = -1; coords[3].y = -1; coords[3].z = -1; - break; + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + coords[0].x = -1; coords[0].y = -1; coords[0].z = 1; + coords[1].x = 1; coords[1].y = -1; coords[1].z = 1; + coords[2].x = 1; coords[2].y = -1; coords[2].z = 1; + coords[3].x = -1; coords[3].y = -1; coords[3].z = 1; + break; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - coords[0].x = -1; coords[0].y = 1; coords[0].z = 1; - coords[1].x = 1; coords[1].y = 1; coords[1].z = 1; - coords[2].x = 1; coords[2].y = 1; coords[2].z = -1; - coords[3].x = -1; coords[3].y = 1; coords[3].z = -1; - break; + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + bind_target = GL_TEXTURE_CUBE_MAP_ARB; + coords[0].x = -1; coords[0].y = -1; coords[0].z = -1; + coords[1].x = 1; coords[1].y = -1; coords[1].z = -1; + coords[2].x = 1; coords[2].y = -1; coords[2].z = -1; + coords[3].x = -1; coords[3].y = -1; coords[3].z = -1; + break; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - coords[0].x = -1; coords[0].y = -1; coords[0].z = 1; - coords[1].x = 1; coords[1].y = -1; coords[1].z = 1; - coords[2].x = 1; coords[2].y = -1; coords[2].z = -1; - coords[3].x = -1; coords[3].y = -1; coords[3].z = -1; - break; + default: + ERR("Unexpected texture target %#x\n", This->glDescription.target); + return; + } - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - coords[0].x = -1; coords[0].y = -1; coords[0].z = 1; - coords[1].x = 1; coords[1].y = -1; coords[1].z = 1; - coords[2].x = 1; coords[2].y = -1; coords[2].z = 1; - coords[3].x = -1; coords[3].y = -1; coords[3].z = 1; - break; + ActivateContext(device, (IWineD3DSurface*)This, CTXUSAGE_BLIT); + ENTER_GL(); - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - coords[0].x = -1; coords[0].y = -1; coords[0].z = -1; - coords[1].x = 1; coords[1].y = -1; coords[1].z = -1; - coords[2].x = 1; coords[2].y = -1; coords[2].z = -1; - coords[3].x = -1; coords[3].y = -1; coords[3].z = -1; - break; + glEnable(bind_target); + checkGLcall("glEnable(bind_target)"); + glBindTexture(bind_target, This->glDescription.textureName); + checkGLcall("bind_target, This->glDescription.textureName)"); + glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + checkGLcall("glTexParameteri"); + glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + checkGLcall("glTexParameteri"); - default: - ERR("Unexpected texture target\n"); - LEAVE_GL(); - return; - } + if (device->render_offscreen) + { + LONG tmp = rect.top; + rect.top = rect.bottom; + rect.bottom = tmp; } glBegin(GL_QUADS); glTexCoord3fv(&coords[0].x); - glVertex2i(rect.left, device->render_offscreen ? rect.bottom : rect.top); + glVertex2i(rect.left, rect.top); glTexCoord3fv(&coords[1].x); - glVertex2i(rect.left, device->render_offscreen ? rect.top : rect.bottom); + glVertex2i(rect.left, rect.bottom); glTexCoord3fv(&coords[2].x); - glVertex2i(rect.right, device->render_offscreen ? rect.top : rect.bottom); + glVertex2i(rect.right, rect.bottom); glTexCoord3fv(&coords[3].x); - glVertex2i(rect.right, device->render_offscreen ? rect.bottom : rect.top); + glVertex2i(rect.right, rect.top); glEnd(); checkGLcall("glEnd"); - if(This->glDescription.target != GL_TEXTURE_2D) { - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); - } else { - glDisable(GL_TEXTURE_2D); - checkGLcall("glDisable(GL_TEXTURE_2D)"); - } + glDisable(bind_target); + checkGLcall("glDisable(bind_target)"); + LEAVE_GL(); - hr = IWineD3DSurface_GetContainer((IWineD3DSurface*)This, &IID_IWineD3DSwapChain, (void **) &swapchain); - if(hr == WINED3D_OK && swapchain) { + if(SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface*)This, &IID_IWineD3DSwapChain, (void **) &swapchain))) + { /* Make sure to flush the buffers. This is needed in apps like Red Alert II and Tiberian SUN that use multiple WGL contexts. */ if(((IWineD3DSwapChainImpl*)swapchain)->frontBuffer == (IWineD3DSurface*)This || ((IWineD3DSwapChainImpl*)swapchain)->num_contexts >= 2) @@ -4306,8 +4275,8 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT /* We changed the filtering settings on the texture. Inform the container about this to get the filters * reset properly next draw */ - hr = IWineD3DSurface_GetContainer((IWineD3DSurface*)This, &IID_IWineD3DBaseTexture, (void **) &texture); - if(hr == WINED3D_OK && texture) { + if(SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface*)This, &IID_IWineD3DBaseTexture, (void **) &texture))) + { ((IWineD3DBaseTextureImpl *) texture)->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; ((IWineD3DBaseTextureImpl *) texture)->baseTexture.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; ((IWineD3DBaseTextureImpl *) texture)->baseTexture.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 6e015341d43..910db0cdd13 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -192,8 +192,8 @@ IWineGDISurfaceImpl_UnlockRect(IWineD3DSurface *iface) #endif /* Tell the swapchain to update the screen */ - IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **) &swapchain); - if(swapchain) { + if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) + { x11_copy_to_screen(swapchain, &This->lockedRect); IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); } @@ -225,8 +225,8 @@ IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSwapChainImpl *swapchain = NULL; HRESULT hr; - IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **) &swapchain); - if(!swapchain) { + if(FAILED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) + { ERR("Flipped surface is not on a swapchain\n"); return WINEDDERR_NOTFLIPPABLE; } @@ -481,8 +481,8 @@ HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface) { /* Update the image because of the palette change. Some games like e.g Red Alert call SetEntries a lot to implement fading. */ /* Tell the swapchain to update the screen */ - IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **) &swapchain); - if(swapchain) { + if (SUCCEEDED(IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain))) + { x11_copy_to_screen(swapchain, NULL); IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain); } diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 08b543dcfff..ea8a6a3d961 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -242,16 +242,6 @@ static const WORD main_key_vkey_dvorak[MAIN_LEN] = /* If Wine fails to match your new table, use WINEDEBUG=+key to find out why */ /* Remember to also add your new table to the layout index table far below! */ -/*** German Logitech Desktop Pro keyboard layout */ -static const char main_key_DE_logitech[MAIN_LEN][4] = -{ - "^\xb0","1!","2\"","3\xa7","4$","5%","6&","7/{","8([","9)]","0=}","\xdf?\\","'`", - "qQ@","wW","eE","rR","tT","zZ","uU","iI","oO","pP","\xfc\xdc","+*~", - "aA","sS","dD","fF","gG","hH","jJ","kK","lL","\xf6\xd6","\xe4\xc4","#'", - "yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", - "<>|" -}; - /*** United States keyboard layout (mostly contributed by Uwe Bonnes) */ static const char main_key_US[MAIN_LEN][4] = { @@ -311,10 +301,32 @@ static const char main_key_IS[MAIN_LEN][4] = "<>" }; +/* All german keyb layout tables have the acute/apostrophe symbol next to + * the BACKSPACE key removed (replaced with NULL which is ignored by the + * detection code). + * This was done because the mapping of the acute (and apostrophe) is done + * differently in various xkb-data/xkeyboard-config versions. Some replace + * the acute with a normal apostrophe, so that the apostrophe is found twice + * on the keyboard (one next to BACKSPACE and one next to ENTER). + * Others put the acute and grave accents on the key left of BACKSPACE. + * More information on the fd.o bugtracker: + * https://bugs.freedesktop.org/show_bug.cgi?id=11514 + */ + +/*** German Logitech Desktop Pro keyboard layout */ +static const char main_key_DE_logitech[MAIN_LEN][4] = +{ + "^\xb0","1!","2\"","3\xa7","4$","5%","6&","7/{","8([","9)]","0=}","\xdf?\\","\0`", + "qQ@","wW","eE","rR","tT","zZ","uU","iI","oO","pP","\xfc\xdc","+*~", + "aA","sS","dD","fF","gG","hH","jJ","kK","lL","\xf6\xd6","\xe4\xc4","#'", + "yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", + "<>|" +}; + /*** German keyboard layout (setxkbmap de) */ static const char main_key_DE[MAIN_LEN][4] = { - "^°","1!","2\"","3§","4$","5%","6&","7/","8(","9)","0=","ß?","´`", + "^°","1!","2\"","3§","4$","5%","6&","7/","8(","9)","0=","ß?","\0`", "qQ","wW","eE","rR","tT","zZ","uU","iI","oO","pP","üÜ","+*", "aA","sS","dD","fF","gG","hH","jJ","kK","lL","öÖ","äÄ","#'", "yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", @@ -324,7 +336,7 @@ static const char main_key_DE[MAIN_LEN][4] = /*** German keyboard layout without dead keys */ static const char main_key_DE_nodead[MAIN_LEN][4] = { - "^°","1!","2\"","3§","4$","5%","6&","7/{","8([","9)]","0=}","ß?\\","´", + "^°","1!","2\"","3§","4$","5%","6&","7/{","8([","9)]","0=}","ß?\\","", "qQ","wW","eE","rR","tT","zZ","uU","iI","oO","pP","üÜ","+*~", "aA","sS","dD","fF","gG","hH","jJ","kK","lL","öÖ","äÄ","#'", "yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", @@ -334,7 +346,7 @@ static const char main_key_DE_nodead[MAIN_LEN][4] = /*** German keyboard layout without dead keys 105 Keys (contributed by Matthias Fechner)*/ static const char main_key_DE_nodead_105[MAIN_LEN][4] = { - "^°","1!","2\"²","3§³","4$","5%","6&","7/{","8([","9)]","0=}","ß?\\","'`", + "^°","1!","2\"²","3§³","4$","5%","6&","7/{","8([","9)]","0=}","ß?\\","\0`", "qQ@","wW","eE","rR","tT","zZ","uU","iI","oO","pP","üÜ","+*~", "aA","sS","dD","fF","gG","hH","jJ","kK","lL","öÖ","äÄ","#'", "<>|","yY","xX","cC","vV","bB","nN","mM",",;",".:","-_", diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 3f6d1310c32..bf1a9b69dec 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2106,6 +2106,7 @@ void flush_gl_drawable(X11DRV_PDEVICE *physDev) * flush the display make sure we copy up-to-date data */ wine_tsx11_lock(); XFlush(gdi_display); + XSetFunction(gdi_display, physDev->gc, GXcopy); XCopyArea(gdi_display, src, physDev->drawable, physDev->gc, 0, 0, w, h, physDev->dc_rect.left, physDev->dc_rect.top); wine_tsx11_unlock(); diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 0cdbfb3f845..8729df3835c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1380,31 +1380,6 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr) WININET_Release(&lpwhr->lpHttpSession->hdr); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszVersion); - HeapFree(GetProcessHeap(), 0, lpwhr->lpszStatusText); - - for (i = 0; i < lpwhr->nCustHeaders; i++) - { - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszField); - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue); - } - - HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders); - HeapFree(GetProcessHeap(), 0, lpwhr); -} - -static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) -{ - LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr; - - TRACE("%p\n",lpwhr); - - if (!NETCON_connected(&lpwhr->netConnection)) - return; - if (lpwhr->pAuthInfo) { if (SecIsValidHandle(&lpwhr->pAuthInfo->ctx)) @@ -1417,6 +1392,7 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) HeapFree(GetProcessHeap(), 0, lpwhr->pAuthInfo); lpwhr->pAuthInfo = NULL; } + if (lpwhr->pProxyAuthInfo) { if (SecIsValidHandle(&lpwhr->pProxyAuthInfo->ctx)) @@ -1430,6 +1406,31 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) lpwhr->pProxyAuthInfo = NULL; } + HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath); + HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb); + HeapFree(GetProcessHeap(), 0, lpwhr->lpszRawHeaders); + HeapFree(GetProcessHeap(), 0, lpwhr->lpszVersion); + HeapFree(GetProcessHeap(), 0, lpwhr->lpszStatusText); + + for (i = 0; i < lpwhr->nCustHeaders; i++) + { + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszField); + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue); + } + + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders); + HeapFree(GetProcessHeap(), 0, lpwhr); +} + +static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr) +{ + LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr; + + TRACE("%p\n",lpwhr); + + if (!NETCON_connected(&lpwhr->netConnection)) + return; + INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_CLOSING_CONNECTION, 0, 0); diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index b027c1ab9ce..277ea23422e 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2024,6 +2024,8 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer, DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) { + static BOOL warn = TRUE; + switch(option) { case INTERNET_OPTION_REQUEST_FLAGS: TRACE("INTERNET_OPTION_REQUEST_FLAGS\n"); @@ -2050,8 +2052,11 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) return ERROR_SUCCESS; case INTERNET_OPTION_CONNECTED_STATE: - FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n"); + if (warn) { + FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n"); + warn = FALSE; + } if (*size < sizeof(ULONG)) return ERROR_INSUFFICIENT_BUFFER; diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 77f39bbf625..79e96a301fa 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -33,7 +33,6 @@ #ifdef HAVE_SYS_TIME_H # include #endif -#include #ifdef HAVE_SYS_SOCKET_H # include #endif @@ -58,9 +57,6 @@ #undef FAR #undef DSA #endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #include #include diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 93752bd1e91..e01ef20baac 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -1287,6 +1287,8 @@ static const char notokmsg[] = static const char noauthmsg[] = "HTTP/1.1 401 Unauthorized\r\n" "Server: winetest\r\n" +"Connection: close\r\n" +"WWW-Authenticate: Basic realm=\"placebo\"\r\n" "\r\n"; static const char proxymsg[] = @@ -1838,6 +1840,35 @@ static void test_cookie_header(int port) InternetCloseHandle(ses); } +static void test_basic_authentication(int port) +{ + HINTERNET session, connect, request; + DWORD size, status; + BOOL ret; + + session = InternetOpen("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); + ok(session != NULL, "InternetOpen failed\n"); + + connect = InternetConnect(session, "localhost", port, "user", "pwd", INTERNET_SERVICE_HTTP, 0, 0); + ok(connect != NULL, "InternetConnect failed\n"); + + request = HttpOpenRequest(connect, NULL, "/test3", NULL, NULL, NULL, 0, 0); + ok(request != NULL, "HttpOpenRequest failed\n"); + + ret = HttpSendRequest(request, NULL, 0, NULL, 0); + ok(ret, "HttpSendRequest failed %u\n", GetLastError()); + + status = 0; + size = sizeof(status); + ret = HttpQueryInfo( request, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL ); + ok(ret, "HttpQueryInfo failed\n"); + ok(status == 200, "request failed with status %u\n", status); + + InternetCloseHandle(request); + InternetCloseHandle(connect); + InternetCloseHandle(session); +} + static void test_http_connection(void) { struct server_info si; @@ -1864,6 +1895,7 @@ static void test_http_connection(void) test_connection_header(si.port); test_http1_1(si.port); test_cookie_header(si.port); + test_basic_authentication(si.port); /* send the basic request again to shutdown the server thread */ test_basic_request(si.port, "GET", "/quit"); diff --git a/dlls/winmm/tests/mixer.c b/dlls/winmm/tests/mixer.c index 25711b7e787..a31761a5667 100644 --- a/dlls/winmm/tests/mixer.c +++ b/dlls/winmm/tests/mixer.c @@ -379,8 +379,9 @@ static void mixer_test_deviceA(int device) "mixerOpen: MMSYSERR_NOERROR expected, got %s\n",mmsys_error(rc)); if (rc==MMSYSERR_NOERROR) { rc=mixerOpen(&mix, device, 0, 0, CALLBACK_FUNCTION); - ok(rc==MMSYSERR_INVALFLAG, - "mixerOpen: MMSYSERR_INVALFLAG expected, got %s\n", mmsys_error(rc)); + ok(rc==MMSYSERR_INVALFLAG + || rc==MMSYSERR_NOTSUPPORTED, /* 98/ME */ + "mixerOpen: MMSYSERR_INVALFLAG or MMSYSERR_NOTSUPPORTED expected, got %s\n", mmsys_error(rc)); for (d=0;d #endif #include -#include +#ifdef HAVE_DIRENT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif diff --git a/documentation/README.ja b/documentation/README.ja new file mode 100644 index 00000000000..02f365eb040 --- /dev/null +++ b/documentation/README.ja @@ -0,0 +1,190 @@ +1. はじめに + +Wineは(DOS、Windows 3.x や Win32 実行可能ファイルを含む)Microsoft +WindowsプログラムをUnix上で実行できるようにするプログラムです。 +Microsoft Windowsバイナリを読み込んで実行するプログラムローダと、 +UnixやX11同等物を使ってWindows APIの呼び出しを実装する(Winelibと呼ばれる) +ライブラリから成ります。ライブラリはWin32のコードをネイティブな +Unix実行可能ファイルに移植するのにも使えます。 + +Wineはフリーソフトウェアで、GNU LGPLのもとでリリースされています。 +詳細についてはLICENSEというファイルを参照してください。 + + +2. クイックスタート + +ソースからコンパイルするときにはいつでも、Wineをビルドしインストールするのに +Wine Installerを使うことが推奨されます。(このファイル[訳注: README.jaではなく +READMEというファイル]を含む)Wineソースのトップレベルディレクトリから、 +以下を実行してください: + +./tools/wineinstall + +"wine program"のようにプログラムを実行してください。更なる情報や +問題解決については、このファイルの残りの部分、Wineのmanページや、 +特にhttp://www.winehq.orgで見つかる豊富な情報を読んでください。 + + +3. 要件 + +Wineをコンパイルし実行するには、以下のうち一つを持っていなければなりません: + + Linux バージョン2.0.36以上 + FreeBSD 7.0以上 + Solaris x86 9以上 + NetBSD-current + Mac OS X 10.4以上 + +動作するためにWineにはカーネルレベルのスレッドのサポートが必要なので、 +以上で触れたオペレーティングシステムだけがサポートされます。 +カーネルスレッドをサポートする他のオペレーティングシステムは +将来サポートされるかもしれません。 + +Linux情報: + Linux 2.2.xでまだ動作するはずであり、Linux2.0.xでまだ動作する + かもしれないとはいえ(古い2.0.xバージョンにはスレッド関連のクラッシュが + あります)、2.4.xや2.6.xのような現在のカーネルを使うことが最適です。 + +FreeBSD情報: + FreeBSD 7.0以前のバージョン上でWineは次第に正しく動作しなくなるでしょう。 + FreeBSD 6.3にはWineを実行できるようにするパッチが利用できます。 + 詳細についてはを参照してください。 + +Solaris情報: + GNUツールチェーン(gcc、gasなど)でWineをビルドする必要がある可能性が + 最も高いでしょう。警告 : gccがgasを使うことが、gasをインストールすることに + よって保証されるわけでは*ありません*。gasのインストール後にgccを + 再コンパイルするか、cc、asやldをgnuツールにシンボリックリンクすることが + 必要だと言われています。 + +NetBSD情報: + USER_LDT、SYSVSHM、SYSVSEMやSYSVMSGオプションがカーネルで有効になっている + かどうかを確認してください。 + +Mac OS X情報: + x86上で正しくビルドするにはXcode 2.4以上が必要です。 + + +サポートされたファイルシステム: + Wineはほとんどのファイルシステム上で動作するはずです。Sambaを通して + アクセスしたファイルを使っていくつかの互換性問題が報告されています。同様に、 + NTFSはいくつかのアプリケーションで必要なすべてのファイルシステム情報を + 提供しません。ext3のようなネイティブなLinuxファイルシステムを使うことが + 推奨されます。 + +基本的な要件: + X11開発includeファイルをインストールする必要があります + (Debianではxlib6g-devでRed HatではXFree86-develと呼ばれます + [訳注: 最近のディストリビューションでは別のパッケージで置き換えられています]) + + もちろん"make"も必要です(大概はGNU make)。 + + flexバージョン2.5以降とbisonも必要です。 + +オプションのサポートライブラリ: + オプションのライブラリがシステム上に見つからなかったときに情報を表示します。 + インストールすべきパッケージについてのヒントについては + http://wiki.winehq.org/Recommended_Packagesを参照してください。 + + 64ビットプラットフォーム上では、これらのライブラリの32ビットバージョンを + インストールするようにしなければなりません; 詳細については + http://wiki.winehq.org/WineOn64bitを参照してください。 + +4. コンパイル + +wineinstallを使わないことを選択した場合、Wineをビルドするには以下のコマンドを +実行してください: + +./configure +make depend +make + +これによって"wine"というプログラムと多数のサポートライブラリやバイナリが +ビルドされます。"wine"というプログラムはWindows実行可能ファイルを読み込み +実行します。"libwine" ("Winelib") というライブラリはUnixのもとでWindowsの +ソースコードをコンパイルしリンクするのに使えます。 + +コンパイル設定オプションを見るには、./configure --helpを行なってください。 + +パッチファイルを使うことで新しいリリースにアップグレードするには、 +はじめにリリースのトップレベルディレクトリ(このREADME +[訳注: README.jaではなくREADME]を含むディレクトリ)にcdしてください。 +そして"make clean"を行ない、以下のようにしてリリースにパッチを当ててください: + + bunzip2 -c patch-file | patch -p1 + +ここで"patch-file"は(wine-1.0.x.diff.bz2のような)パッチファイルの名前です。 +そうすると"./configure"を再実行でき、"make depend && make"を行なえます。 + + +5. 設定 + +いったんWineが正しくビルドされると、"make install"を行なえます。 +これによりwine実行可能ファイル、Wine manページやいくつかの必要なファイルが +インストールされます。 + +まず、衝突するあらゆる前のWineインストールをアンインストールするのを +忘れないでください。インストール前に"dpkg -r wine"または"rpm -e wine" +または"make uninstall"を試してください。 + +いったんインストールされると、"winecfg"設定ツールを実行できます。 +設定のヒントについてはhttp://www.winehq.org/におけるサポート領域を +参照してください。 + + +6. プログラムの実行 + +Wineを起動するとき、実行可能ファイルのパス全体またはファイル名のみを +指定できます。 + +例えば、メモ帳を実行するには: + + wine notepad (設定ファイルで指定された、ファイルを検索するための + wine notepad.exe 検索パスを使う) + + wine c:\\windows\\notepad.exe (DOSファイル名の文法を使う) + + wine ~/.wine/drive_c/windows/notepad.exe (Unixファイル名の文法を使う) + + wine notepad.exe /parameter1 -parameter2 parameter3 + (パラメータを付けてプログラムを呼ぶ) + +Wineはまだ完成していないので、いくつかのプログラムはクラッシュする +かもしれません。そのようなクラッシュでは、問題を調査して修正できるように +デバッガに放り込むことになるでしょう。これのやりかたについて詳しくは +Wine Developer's Guide(Wine開発者のガイド)のデバッグの節を調べてください。 + + +7. 更なる情報の取得 + +WWW: Wineについてのたくさんの情報がhttp://www.winehq.org/にある + WineHQから入手できます。多様なWineガイド、アプリケーションデータベース、 + バグ追跡。これはおそらく最良の出発点です。 + +FAQ: Wine FAQはhttp://www.winehq.org/FAQにあります + +Usenet: comp.emulators.ms-windows.wine上でWine関連の問題を議論し助けを + 得られます。 + +バグ: http://bugs.winehq.orgにあるWine Bugzillaでバグを報告してください。 + バグ報告を投稿する前に問題がすでにあるのかどうかを調べるために + bugzillaデータベースを検索してください。comp.emulators.ms-windows.wineに + バグを投稿することもできます。 + +IRC: irc.freenode.net上のチャンネル#WineHQでオンラインヘルプを利用できます。 + +GIT: 現在のWine開発ツリーはGITを通して入手できます。 + 詳細についてはhttp://www.winehq.org/site/gitに行ってください。 + +メーリングリスト: + Wineユーザと開発者のためのいくつかのメーリングリストがあります。 + 詳細についてはhttp://www.winehq.org/forumsを参照してください。 + +Wiki: Wine Wikiはhttp://wiki.winehq.orgにあります + +何かを追加するか、バグを修正するならば、次のリリースに含めるために +('diff -u'形式で)パッチをwine-patches@winehq.orgのリストに送ってください。 + +-- +Alexandre Julliard +julliard@winehq.org diff --git a/include/Makefile.in b/include/Makefile.in index 9fc327afaea..453d5286118 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -447,6 +447,7 @@ SRCDIR_INCLUDES = \ winternl.h \ wintrust.h \ winuser.h \ + winuser.rh \ winver.h \ wmistr.h \ wnaspi32.h \ diff --git a/include/config.h.in b/include/config.h.in index 3566a9453f7..016ee8ecd1d 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -258,6 +258,9 @@ /* Define to 1 if you have the `isinf' function. */ #undef HAVE_ISINF +/* Define to 1 if you have the `isnan' function. */ +#undef HAVE_ISNAN + /* Define to 1 if you have the header file. */ #undef HAVE_JACK_JACK_H diff --git a/include/dxgi.idl b/include/dxgi.idl index 85f561f65f7..e82c5be555f 100644 --- a/include/dxgi.idl +++ b/include/dxgi.idl @@ -17,3 +17,43 @@ */ import "dxgitype.idl"; + +[ + object, + local, + uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e) +] +interface IDXGIObject : IUnknown +{ + HRESULT SetPrivateData( + [in] REFGUID guid, + [in] UINT data_size, + [in] const void *data + ); + HRESULT SetPrivateDataInterface( + [in] REFGUID guid, + [in] const IUnknown *object + ); + HRESULT GetPrivateData( + [in] REFGUID guid, + [in, out] UINT data_size, + [out] void *data + ); + HRESULT GetParent( + [in] REFIID riid, + [out] void **parent + ); +} + +[ + object, + local, + uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6) +] +interface IDXGIDeviceSubObject : IDXGIObject +{ + HRESULT GetDevice( + [in] REFIID riid, + [out] void **device + ); +} diff --git a/include/mscat.h b/include/mscat.h index f5e9f0f7b7d..e48120765f8 100644 --- a/include/mscat.h +++ b/include/mscat.h @@ -49,7 +49,7 @@ typedef struct CRYPTCATMEMBER_ { BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD); -BOOL WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD); +HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD); BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE,DWORD*,BYTE*,DWORD); HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN,BYTE*,DWORD,DWORD,HCATINFO*); BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD); diff --git a/include/shlguid.h b/include/shlguid.h index d9685e61786..d7c2b55d188 100644 --- a/include/shlguid.h +++ b/include/shlguid.h @@ -153,4 +153,12 @@ DEFINE_GUID(CLSID_CAnchorBrowsePropertyPage, 0x3050F3BB, 0x98B5, 0x11CF, 0xBB,0x DEFINE_GUID(CLSID_CDocBrowsePropertyPage, 0x3050F3B4, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); DEFINE_GUID(CLSID_CImageBrowsePropertyPage, 0x3050F3B3, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); +DEFINE_GUID(VID_LargeIcons, 0x0057d0e0, 0x3573, 0x11cf, 0xae, 0x69, 0x08, 0x00, 0x2b, 0x2e, 0x12, 0x62); +DEFINE_GUID(VID_SmallIcons, 0x089000c0, 0x3573, 0x11cf, 0xae, 0x69, 0x08, 0x00, 0x2b, 0x2e, 0x12, 0x62); +DEFINE_GUID(VID_List, 0x0e1fa5e0, 0x3573, 0x11cf, 0xae, 0x69, 0x08, 0x00, 0x2b, 0x2e, 0x12, 0x62); +DEFINE_GUID(VID_Details, 0x137e7700, 0x3573, 0x11cf, 0xae, 0x69, 0x08, 0x00, 0x2b, 0x2e, 0x12, 0x62); +DEFINE_GUID(VID_Thumbnails, 0x8bebb290, 0x52d0, 0x11d0, 0xb7, 0xf4, 0x00, 0xc0, 0x4f, 0xd7, 0x06, 0xec); +DEFINE_GUID(VID_Tile, 0x65f125e5, 0x7be1, 0x4810, 0xba, 0x9d, 0xd2, 0x71, 0xc8, 0x43, 0x2c, 0xe3); +DEFINE_GUID(VID_ThumbStrip, 0x8eefa624, 0xd1e9, 0x445b, 0x94, 0xb7, 0x74, 0xfb, 0xce, 0x2e, 0xa1, 0x1a); + #endif /* __WINE_SHLGUID_H */ diff --git a/include/shlobj.h b/include/shlobj.h index 5ed49782f38..64800235657 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -277,8 +277,6 @@ typedef struct * IShellView interface */ -typedef GUID SHELLVIEWID; - #define FCIDM_SHVIEWFIRST 0x0000 /* undocumented */ #define FCIDM_SHVIEW_ARRANGE 0x7001 diff --git a/include/shobjidl.idl b/include/shobjidl.idl index 95e532cdecc..156d146c47b 100644 --- a/include/shobjidl.idl +++ b/include/shobjidl.idl @@ -461,6 +461,44 @@ interface IShellView : IOleWindow [out, iid_is(riid)] void **ppv); } +[ + object, + uuid(88e39e80-3578-11cf-ae69-08002b2e1262), + pointer_default(unique) +] +interface IShellView2 : IShellView +{ + typedef GUID SHELLVIEWID; +cpp_quote("#include ") + typedef struct _SV2CVW2_PARAMS + { + DWORD cbSize; + IShellView *psvPrev; + LPCFOLDERSETTINGS pfs; + IShellBrowser *psbOwner; + RECT *prcView; + SHELLVIEWID const *pvid; + HWND hwndView; + } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS; +cpp_quote("#include ") + + HRESULT GetView( + [in, out] SHELLVIEWID *view_guid, + [in] ULONG view_type + ); + HRESULT CreateViewWindow2( + [in] LPSV2CVW2_PARAMS view_params + ); + HRESULT HandleRename( + [in] LPCITEMIDLIST new_pidl + ); + HRESULT SelectAndPositionItem( + [in] LPCITEMIDLIST item, + [in] UINT flags, + [in] POINT *point + ); +} + /***************************************************************************** * IShellBrowser interface diff --git a/include/wine/port.h b/include/wine/port.h index 4f58de8ccb0..4f9f8ab539d 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -303,6 +303,10 @@ pid_t gettid(void); int isinf(double x); #endif +#ifndef HAVE_ISNAN +int isnan(double x); +#endif + #ifndef HAVE_LSTAT int lstat(const char *file_name, struct stat *buf); #endif /* HAVE_LSTAT */ diff --git a/include/wingdi.h b/include/wingdi.h index 14c307d83f7..322a2673373 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -392,6 +392,7 @@ DECL_WINELIB_TYPE_AW(LOGCOLORSPACE) #define R2_MERGEPENNOT 14 #define R2_MERGEPEN 15 #define R2_WHITE 16 +#define R2_LAST 16 #define MAKEROP4(fore,back) (DWORD)((((back)<<8)&0xFF000000)|(fore)) diff --git a/include/winresrc.h b/include/winresrc.h index 51ab5bc4020..380525c7edb 100644 --- a/include/winresrc.h +++ b/include/winresrc.h @@ -35,7 +35,7 @@ #define _WIN32_WINNT 0x0500 #endif -/* FIXME: #include */ +#include /* FIXME: #include */ /* FIXME: #include */ /* FIXME: #include */ diff --git a/include/winuser.rh b/include/winuser.rh new file mode 100644 index 00000000000..c4c8875d0dc --- /dev/null +++ b/include/winuser.rh @@ -0,0 +1,210 @@ +/* + * Copyright (C) the Wine project + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* Window Styles */ +#define WS_OVERLAPPED 0x00000000L +#define WS_POPUP 0x80000000L +#define WS_CHILD 0x40000000L +#define WS_MINIMIZE 0x20000000L +#define WS_VISIBLE 0x10000000L +#define WS_DISABLED 0x08000000L +#define WS_CLIPSIBLINGS 0x04000000L +#define WS_CLIPCHILDREN 0x02000000L +#define WS_MAXIMIZE 0x01000000L +#define WS_CAPTION 0x00C00000L +#define WS_BORDER 0x00800000L +#define WS_DLGFRAME 0x00400000L +#define WS_VSCROLL 0x00200000L +#define WS_HSCROLL 0x00100000L +#define WS_SYSMENU 0x00080000L +#define WS_THICKFRAME 0x00040000L +#define WS_GROUP 0x00020000L +#define WS_TABSTOP 0x00010000L +#define WS_MINIMIZEBOX 0x00020000L +#define WS_MAXIMIZEBOX 0x00010000L +#define WS_TILED WS_OVERLAPPED +#define WS_ICONIC WS_MINIMIZE +#define WS_SIZEBOX WS_THICKFRAME +#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME| WS_MINIMIZEBOX | WS_MAXIMIZEBOX) +#define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU) +#define WS_CHILDWINDOW (WS_CHILD) +#define WS_TILEDWINDOW (WS_OVERLAPPEDWINDOW) + +/* Window extended styles */ +#define WS_EX_DLGMODALFRAME 0x00000001L +#define WS_EX_DRAGDETECT 0x00000002L +#define WS_EX_NOPARENTNOTIFY 0x00000004L +#define WS_EX_TOPMOST 0x00000008L +#define WS_EX_ACCEPTFILES 0x00000010L +#define WS_EX_TRANSPARENT 0x00000020L +#define WS_EX_MDICHILD 0x00000040L +#define WS_EX_TOOLWINDOW 0x00000080L +#define WS_EX_WINDOWEDGE 0x00000100L +#define WS_EX_CLIENTEDGE 0x00000200L +#define WS_EX_CONTEXTHELP 0x00000400L +#define WS_EX_RIGHT 0x00001000L +#define WS_EX_LEFT 0x00000000L +#define WS_EX_RTLREADING 0x00002000L +#define WS_EX_LTRREADING 0x00000000L +#define WS_EX_LEFTSCROLLBAR 0x00004000L +#define WS_EX_RIGHTSCROLLBAR 0x00000000L +#define WS_EX_CONTROLPARENT 0x00010000L +#define WS_EX_STATICEDGE 0x00020000L +#define WS_EX_APPWINDOW 0x00040000L +#define WS_EX_LAYERED 0x00080000L +#define WS_EX_NOINHERITLAYOUT 0x00100000L +#define WS_EX_LAYOUTRTL 0x00400000L +#define WS_EX_COMPOSITED 0x02000000L +#define WS_EX_NOACTIVATE 0x08000000L + +#define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE|WS_EX_CLIENTEDGE) +#define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST) + +/* Button control styles */ +#define BS_PUSHBUTTON 0x00000000L +#define BS_DEFPUSHBUTTON 0x00000001L +#define BS_CHECKBOX 0x00000002L +#define BS_AUTOCHECKBOX 0x00000003L +#define BS_RADIOBUTTON 0x00000004L +#define BS_3STATE 0x00000005L +#define BS_AUTO3STATE 0x00000006L +#define BS_GROUPBOX 0x00000007L +#define BS_USERBUTTON 0x00000008L +#define BS_AUTORADIOBUTTON 0x00000009L +#define BS_OWNERDRAW 0x0000000BL +#define BS_LEFTTEXT 0x00000020L +#define BS_RIGHTBUTTON BS_LEFTTEXT + +#define BS_TEXT 0x00000000L +#define BS_ICON 0x00000040L +#define BS_BITMAP 0x00000080L +#define BS_LEFT 0x00000100L +#define BS_RIGHT 0x00000200L +#define BS_CENTER 0x00000300L +#define BS_TOP 0x00000400L +#define BS_BOTTOM 0x00000800L +#define BS_VCENTER 0x00000C00L +#define BS_PUSHLIKE 0x00001000L +#define BS_MULTILINE 0x00002000L +#define BS_NOTIFY 0x00004000L +#define BS_FLAT 0x00008000L + +/* Combo box styles */ +#define CBS_SIMPLE 0x0001L +#define CBS_DROPDOWN 0x0002L +#define CBS_DROPDOWNLIST 0x0003L +#define CBS_OWNERDRAWFIXED 0x0010L +#define CBS_OWNERDRAWVARIABLE 0x0020L +#define CBS_AUTOHSCROLL 0x0040L +#define CBS_OEMCONVERT 0x0080L +#define CBS_SORT 0x0100L +#define CBS_HASSTRINGS 0x0200L +#define CBS_NOINTEGRALHEIGHT 0x0400L +#define CBS_DISABLENOSCROLL 0x0800L + +#define CBS_UPPERCASE 0x2000L +#define CBS_LOWERCASE 0x4000L + +/* Dialog styles */ +#define DS_ABSALIGN 0x0001 +#define DS_SYSMODAL 0x0002 +#define DS_3DLOOK 0x0004 /* win95 */ +#define DS_FIXEDSYS 0x0008 /* win95 */ +#define DS_NOFAILCREATE 0x0010 /* win95 */ +#define DS_LOCALEDIT 0x0020 +#define DS_SETFONT 0x0040 +#define DS_MODALFRAME 0x0080 +#define DS_NOIDLEMSG 0x0100 +#define DS_SETFOREGROUND 0x0200 /* win95 */ +#define DS_CONTROL 0x0400 /* win95 */ +#define DS_CENTER 0x0800 /* win95 */ +#define DS_CENTERMOUSE 0x1000 /* win95 */ +#define DS_CONTEXTHELP 0x2000 /* win95 */ +#define DS_USEPIXELS 0x8000 +#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS) + +/* Edit control styles */ +#define ES_LEFT 0x00000000 +#define ES_CENTER 0x00000001 +#define ES_RIGHT 0x00000002 +#define ES_MULTILINE 0x00000004 +#define ES_UPPERCASE 0x00000008 +#define ES_LOWERCASE 0x00000010 +#define ES_PASSWORD 0x00000020 +#define ES_AUTOVSCROLL 0x00000040 +#define ES_AUTOHSCROLL 0x00000080 +#define ES_NOHIDESEL 0x00000100 +#define ES_COMBO 0x00000200 /* Undocumented. Parent is a combobox */ +#define ES_OEMCONVERT 0x00000400 +#define ES_READONLY 0x00000800 +#define ES_WANTRETURN 0x00001000 +#define ES_NUMBER 0x00002000 + +/* Listbox styles */ +#define LBS_NOTIFY 0x0001 +#define LBS_SORT 0x0002 +#define LBS_NOREDRAW 0x0004 +#define LBS_MULTIPLESEL 0x0008 +#define LBS_OWNERDRAWFIXED 0x0010 +#define LBS_OWNERDRAWVARIABLE 0x0020 +#define LBS_HASSTRINGS 0x0040 +#define LBS_USETABSTOPS 0x0080 +#define LBS_NOINTEGRALHEIGHT 0x0100 +#define LBS_MULTICOLUMN 0x0200 +#define LBS_WANTKEYBOARDINPUT 0x0400 +#define LBS_EXTENDEDSEL 0x0800 +#define LBS_DISABLENOSCROLL 0x1000 +#define LBS_NODATA 0x2000 +#define LBS_NOSEL 0x4000 +#define LBS_COMBOBOX 0x8000 +#define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) + +/* Static Control Styles */ +#define SS_LEFT 0x00000000L +#define SS_CENTER 0x00000001L +#define SS_RIGHT 0x00000002L +#define SS_ICON 0x00000003L +#define SS_BLACKRECT 0x00000004L +#define SS_GRAYRECT 0x00000005L +#define SS_WHITERECT 0x00000006L +#define SS_BLACKFRAME 0x00000007L +#define SS_GRAYFRAME 0x00000008L +#define SS_WHITEFRAME 0x00000009L +#define SS_USERITEM 0x0000000AL +#define SS_SIMPLE 0x0000000BL +#define SS_LEFTNOWORDWRAP 0x0000000CL +#define SS_OWNERDRAW 0x0000000DL +#define SS_BITMAP 0x0000000EL +#define SS_ENHMETAFILE 0x0000000FL +#define SS_ETCHEDHORZ 0x00000010L +#define SS_ETCHEDVERT 0x00000011L +#define SS_ETCHEDFRAME 0x00000012L +#define SS_TYPEMASK 0x0000001FL + +#define SS_REALSIZECONTROL 0x00000040L +#define SS_NOPREFIX 0x00000080L +#define SS_NOTIFY 0x00000100L +#define SS_CENTERIMAGE 0x00000200L +#define SS_RIGHTJUST 0x00000400L +#define SS_REALSIZEIMAGE 0x00000800L +#define SS_SUNKEN 0x00001000L +#define SS_EDITCONTROL 0x00002000L +#define SS_ENDELLIPSIS 0x00004000L +#define SS_PATHELLIPSIS 0x00008000L +#define SS_WORDELLIPSIS 0x0000C000L +#define SS_ELLIPSISMASK 0x0000C000L diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 1d048d04c10..68dc8f12702 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -16,6 +16,7 @@ C_SRCS = \ gettid.c \ interlocked.c \ isinf.c \ + isnan.c \ lstat.c \ memcpy_unaligned.c \ memmove.c \ diff --git a/include/dxgi.idl b/libs/port/isnan.c similarity index 71% copy from include/dxgi.idl copy to libs/port/isnan.c index 85f561f65f7..b2a1be65429 100644 --- a/include/dxgi.idl +++ b/libs/port/isnan.c @@ -1,5 +1,7 @@ /* - * Copyright 2007 Andras Kovacs + * isnan function + * + * Copyright 2008 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,4 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -import "dxgitype.idl"; +#include "config.h" +#include "wine/port.h" + +#ifndef HAVE_ISNAN + +#ifdef HAVE_IEEEFP_H +#include + +int isnan(double x) +{ + return isnand(x); +} + +#else +#error No isnan() implementation available. +#endif + +#endif /* HAVE_ISNAN */ diff --git a/programs/oleview/tree.c b/programs/oleview/tree.c index a5ba1124a6b..70391d7166d 100644 --- a/programs/oleview/tree.c +++ b/programs/oleview/tree.c @@ -271,7 +271,7 @@ static void AddCOMandAll(void) { i++; - if(RegEnumKey(hKey, i, valName, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hKey, i, valName, sizeof(valName)/sizeof(valName[0])) != ERROR_SUCCESS) break; if(RegOpenKey(hKey, valName, &hCurKey) != ERROR_SUCCESS) continue; @@ -300,7 +300,7 @@ static void AddCOMandAll(void) if(RegOpenKey(hCurKey, wszImplementedCategories, &hInfo) == ERROR_SUCCESS) { - if(RegEnumKey(hInfo, 0, wszComp, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hInfo, 0, wszComp, sizeof(wszComp)/sizeof(wszComp[0])) != ERROR_SUCCESS) break; RegCloseKey(hInfo); @@ -355,7 +355,7 @@ static void AddApplicationID(void) { i++; - if(RegEnumKey(hKey, i, valName, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hKey, i, valName, sizeof(valName)/sizeof(valName[0])) != ERROR_SUCCESS) break; if(RegOpenKey(hKey, valName, &hCurKey) != ERROR_SUCCESS) continue; @@ -400,7 +400,7 @@ static void AddTypeLib(void) { i++; - if(RegEnumKey(hKey, i, valParent, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hKey, i, valParent, sizeof(valParent)/sizeof(valParent[0])) != ERROR_SUCCESS) break; if(RegOpenKey(hKey, valParent, &hCurKey) != ERROR_SUCCESS) continue; @@ -409,7 +409,7 @@ static void AddTypeLib(void) { j++; - if(RegEnumKey(hCurKey, j, valName, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hCurKey, j, valName, sizeof(valName)/sizeof(valName[0])) != ERROR_SUCCESS) break; if(RegOpenKey(hCurKey, valName, &hInfoKey) != ERROR_SUCCESS) continue; @@ -466,7 +466,7 @@ static void AddInterfaces(void) { i++; - if(RegEnumKey(hKey, i, valName, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hKey, i, valName, sizeof(valName)/sizeof(valName[0])) != ERROR_SUCCESS) break; if(RegOpenKey(hKey, valName, &hCurKey) != ERROR_SUCCESS) continue; @@ -511,7 +511,7 @@ static void AddComponentCategories(void) { i++; - if(RegEnumKey(hKey, i, valName, -1) != ERROR_SUCCESS) break; + if(RegEnumKey(hKey, i, valName, sizeof(valName)/sizeof(valName[0])) != ERROR_SUCCESS) break; if(RegOpenKey(hKey, valName, &hCurKey) != ERROR_SUCCESS) continue; diff --git a/programs/regedit/Ru.rc b/programs/regedit/Ru.rc index 02d5886f00b..4be900eafef 100644 --- a/programs/regedit/Ru.rc +++ b/programs/regedit/Ru.rc @@ -49,7 +49,7 @@ BEGIN MENUITEM "&Ñòðîêîâîå çíà÷åíèå", ID_EDIT_NEW_STRINGVALUE MENUITEM "&Áèíàðíîå çíà÷åíèå", ID_EDIT_NEW_BINARYVALUE MENUITEM "&DWORD çíà÷åíèå", ID_EDIT_NEW_DWORDVALUE - MENUITEM "&Ìíîãî-ñòðîêîâîå çíà÷åíèå", ID_EDIT_NEW_MULTI_STRINGVALUE + MENUITEM "&Ìíîãîñòðîêîâîå çíà÷åíèå", ID_EDIT_NEW_MULTI_STRINGVALUE END MENUITEM SEPARATOR MENUITEM "&Óäàëèòü\tDel", ID_EDIT_DELETE @@ -100,7 +100,7 @@ BEGIN MENUITEM "&Ñòðîêîâîå çíà÷åíèå", ID_EDIT_NEW_STRINGVALUE MENUITEM "&Áèíàðíîå çíà÷åíèå", ID_EDIT_NEW_BINARYVALUE MENUITEM "&DWORD çíà÷åíèå", ID_EDIT_NEW_DWORDVALUE - MENUITEM "&Ìíîãî-ñòðîêîâîå çíà÷åíèå", ID_EDIT_NEW_MULTI_STRINGVALUE + MENUITEM "&Ìíîãîñòðîêîâîå çíà÷åíèå", ID_EDIT_NEW_MULTI_STRINGVALUE END MENUITEM SEPARATOR MENUITEM "&Óäàëèòü\tDel", ID_EDIT_DELETE @@ -211,7 +211,7 @@ END IDD_EDIT_MULTI_STRING DIALOG DISCARDABLE 22, 17, 210, 175 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "Èçìåíèòü ìíîãî-ñòðîêîâûå äàííûå" +CAPTION "Èçìåíèòü ìíîãîñòðîêîâûå äàííûå" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Íàçâàíèå çíà÷åíèÿ:",IDC_STATIC,5,5,119,8 @@ -240,7 +240,7 @@ END STRINGTABLE DISCARDABLE BEGIN - ID_REGISTRY_MENU "Ñîäåðæèò êîìàíäû äëÿ ðàáîòû ñ ðåãèñòðîì â öåëîì" + ID_REGISTRY_MENU "Ñîäåðæèò êîìàíäû äëÿ ðàáîòû ñ ðååñòðîì â öåëîì" ID_EDIT_MENU "Ñîäåðæèò êîìàíäû äëÿ ðåäàêòèðîâàíèÿ çíà÷åíèé èëè êëþ÷åé" ID_VIEW_MENU "Ñîäåðæèò êîìàíäû äëÿ íàñòðîéêè îêíà ðååñòðà" ID_FAVORITES_MENU "Ñîäåðæèò êîìàíäû äëÿ äîñòóïà ê ÷àñòî èñïîëüçóåìûì êëþ÷àì" @@ -255,7 +255,7 @@ BEGIN ID_EDIT_NEW_STRINGVALUE "Äîáàâëÿåò íîâîå ñòðîêîâîå çíà÷åíèå" ID_EDIT_NEW_BINARYVALUE "Äîáàâëÿåò íîâîå áèíàðíîå çíà÷åíèå" ID_EDIT_NEW_DWORDVALUE "Äîáàâëÿåò íîâîå DWORD-çíà÷åíèå" - ID_EDIT_NEW_MULTI_STRINGVALUE "Äîáàâëÿåò íîâîå ìíîãî-ñòðîêîâîå çíà÷åíèå" + ID_EDIT_NEW_MULTI_STRINGVALUE "Äîáàâëÿåò íîâîå ìíîãîñòðîêîâîå çíà÷åíèå" ID_REGISTRY_IMPORTREGISTRYFILE "Èìïîðòèðóåò òåêñòîâîé ôàéë â ðååñòð" ID_REGISTRY_EXPORTREGISTRYFILE "Ýêñïîðòèðóåò âåñü ðååñòð èëè åãî ÷àñòü â òåêñòîâîé ôàéë" diff --git a/programs/winecfg/drive.c b/programs/winecfg/drive.c index dd3befd6034..15164269b6a 100644 --- a/programs/winecfg/drive.c +++ b/programs/winecfg/drive.c @@ -87,20 +87,20 @@ long drive_available_mask(char letter) return result; } -BOOL add_drive(const char letter, const char *targetpath, const char *label, const char *serial, unsigned int type) +BOOL add_drive(char letter, const char *targetpath, const WCHAR *label, DWORD serial, DWORD type) { int driveIndex = letter_to_index(letter); if(drives[driveIndex].in_use) return FALSE; - WINE_TRACE("letter == '%c', unixpath == '%s', label == '%s', serial == '%s', type == %d\n", - letter, targetpath, label, serial, type); + WINE_TRACE("letter == '%c', unixpath == '%s', label == %s, serial == %08x, type == %d\n", + letter, targetpath, wine_dbgstr_w(label), serial, type); drives[driveIndex].letter = toupper(letter); drives[driveIndex].unixpath = strdupA(targetpath); - drives[driveIndex].label = strdupA(label); - drives[driveIndex].serial = strdupA(serial); + drives[driveIndex].label = strdupW(label); + drives[driveIndex].serial = serial; drives[driveIndex].type = type; drives[driveIndex].in_use = TRUE; @@ -114,9 +114,7 @@ void delete_drive(struct drive *d) d->unixpath = NULL; HeapFree(GetProcessHeap(), 0, d->label); d->label = NULL; - HeapFree(GetProcessHeap(), 0, d->serial); - d->serial = NULL; - + d->serial = 0; d->in_use = FALSE; } @@ -179,39 +177,43 @@ static DWORD get_drive_type( char letter ) } -static void set_drive_label( char letter, const char *label ) +static void set_drive_label( char letter, const WCHAR *label ) { - char device[] = "a:\\"; /* SetVolumeLabel() requires a trailing slash */ + static const WCHAR emptyW[1]; + WCHAR device[] = {'a',':','\\',0}; /* SetVolumeLabel() requires a trailing slash */ device[0] = letter; - if(!SetVolumeLabel(device, label)) + if (!label) label = emptyW; + if(!SetVolumeLabelW(device, label)) { - WINE_WARN("unable to set volume label for devicename of '%s', label of '%s'\n", - device, label); + WINE_WARN("unable to set volume label for devicename of %s, label of %s\n", + wine_dbgstr_w(device), wine_dbgstr_w(label)); PRINTERROR(); } else { - WINE_TRACE(" set volume label for devicename of '%s', label of '%s'\n", - device, label); + WINE_TRACE(" set volume label for devicename of %s, label of %s\n", + wine_dbgstr_w(device), wine_dbgstr_w(label)); } } /* set the drive serial number via a .windows-serial file */ -static void set_drive_serial( char letter, const char *serial ) +static void set_drive_serial( char letter, DWORD serial ) { char filename[] = "a:\\.windows-serial"; HANDLE hFile; filename[0] = letter; - WINE_TRACE("Putting serial number of '%s' into file '%s'\n", serial, filename); + WINE_TRACE("Putting serial number of %08x into file '%s'\n", serial, filename); hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile != INVALID_HANDLE_VALUE) { DWORD w; - WriteFile(hFile, serial, strlen(serial), &w, NULL); - WriteFile(hFile, "\n", 1, &w, NULL); + char buffer[16]; + + sprintf( buffer, "%X\n", serial ); + WriteFile(hFile, buffer, strlen(buffer), &w, NULL); CloseHandle(hFile); } } @@ -262,7 +264,7 @@ BOOL moveDrive(struct drive *pSrc, struct drive *pDst) /* Load currently defined drives into the drives array */ void load_drives(void) { - char *devices, *dev; + WCHAR *devices, *dev; int len; int drivecount = 0, i; int retval; @@ -273,85 +275,62 @@ void load_drives(void) WINE_TRACE("\n"); /* setup the drives array */ - dev = devices = HeapAlloc(GetProcessHeap(), 0, arraysize); - len = GetLogicalDriveStrings(arraysize, devices); + dev = devices = HeapAlloc(GetProcessHeap(), 0, arraysize * sizeof(WCHAR)); + len = GetLogicalDriveStringsW(arraysize, devices); /* make all devices unused */ for (i = 0; i < 26; i++) { drives[i].letter = 'A' + i; drives[i].in_use = FALSE; + drives[i].serial = 0; HeapFree(GetProcessHeap(), 0, drives[i].unixpath); drives[i].unixpath = NULL; HeapFree(GetProcessHeap(), 0, drives[i].label); drives[i].label = NULL; - - HeapFree(GetProcessHeap(), 0, drives[i].serial); - drives[i].serial = NULL; } /* work backwards through the result of GetLogicalDriveStrings */ while (len) { - char volname[512]; /* volume name */ + WCHAR volname[512]; /* volume name */ DWORD serial; - char serialstr[256]; - char rootpath[256]; char simplepath[3]; - int pathlen; char targetpath[256]; char *c; - *devices = toupper(*devices); - - WINE_TRACE("devices == '%s'\n", devices); + WINE_TRACE("devices == %s\n", wine_dbgstr_w(devices)); volname[0] = 0; - retval = GetVolumeInformation(devices, - volname, - sizeof(volname), - &serial, - NULL, - NULL, - NULL, - 0); + retval = GetVolumeInformationW(devices, volname, sizeof(volname)/sizeof(WCHAR), + &serial, NULL, NULL, NULL, 0); if(!retval) { - WINE_ERR("GetVolumeInformation() for '%s' failed, setting serial to 0\n", devices); + WINE_ERR("GetVolumeInformation() for %s failed, setting serial to 0\n", + wine_dbgstr_w(devices)); PRINTERROR(); serial = 0; } WINE_TRACE("serial: '0x%X'\n", serial); - /* build rootpath for GetDriveType() */ - lstrcpynA(rootpath, devices, sizeof(rootpath)); - pathlen = strlen(rootpath); - - /* ensure that we have a backslash on the root path */ - if ((rootpath[pathlen - 1] != '\\') && (pathlen < sizeof(rootpath))) - { - rootpath[pathlen] = '\\'; - rootpath[pathlen + 1] = 0; - } - /* QueryDosDevice() requires no trailing backslash */ - lstrcpynA(simplepath, devices, 3); + simplepath[0] = devices[0]; + simplepath[1] = ':'; + simplepath[2] = 0; QueryDosDevice(simplepath, targetpath, sizeof(targetpath)); /* targetpath may have forward slashes rather than backslashes, so correct */ c = targetpath; do if (*c == '\\') *c = '/'; while (*c++); - snprintf(serialstr, sizeof(serialstr), "%X", serial); - WINE_TRACE("serialstr: '%s'\n", serialstr); - add_drive(*devices, targetpath, volname, serialstr, get_drive_type(devices[0]) ); + add_drive(*devices, targetpath, volname, serial, get_drive_type(devices[0]) ); - len -= strlen(devices); - devices += strlen(devices); + len -= lstrlenW(devices); + devices += lstrlenW(devices); /* skip over any nulls */ while ((*devices == 0) && (len)) @@ -386,7 +365,7 @@ void load_drives(void) buff[cnt] = '\0'; WINE_TRACE("found broken symlink %s -> %s\n", path, buff); - add_drive('A' + i, buff, "", "0", DRIVE_UNKNOWN); + add_drive('A' + i, buff, NULL, 0, DRIVE_UNKNOWN); drivecount++; } @@ -405,12 +384,8 @@ void apply_drive_changes(void) CHAR devicename[4]; CHAR targetpath[256]; BOOL foundDrive; - CHAR volumeNameBuffer[512]; + WCHAR volumeNameBuffer[512]; DWORD serialNumber; - DWORD maxComponentLength; - DWORD fileSystemFlags; - CHAR fileSystemName[128]; - char newSerialNumberText[32]; int retval; BOOL defineDevice; @@ -439,17 +414,12 @@ void apply_drive_changes(void) /* if we found a drive and have a drive then compare things */ if(foundDrive && drives[i].in_use) { + WCHAR deviceW[4] = {'a',':','\\',0}; WINE_TRACE("drives[i].letter: '%c'\n", drives[i].letter); - snprintf(devicename, sizeof(devicename), "%c:\\", 'A' + i); - retval = GetVolumeInformation(devicename, - volumeNameBuffer, - sizeof(volumeNameBuffer), - &serialNumber, - &maxComponentLength, - &fileSystemFlags, - fileSystemName, - sizeof(fileSystemName)); + deviceW[0] = 'A' + i; + retval = GetVolumeInformationW(deviceW, volumeNameBuffer, sizeof(volumeNameBuffer)/sizeof(WCHAR), + &serialNumber, NULL, NULL, NULL, 0 ); if(!retval) { WINE_TRACE(" GetVolumeInformation() for '%s' failed\n", devicename); @@ -514,11 +484,10 @@ void apply_drive_changes(void) } } - if (drives[i].label && strcmp(drives[i].label, volumeNameBuffer)) + if (!drives[i].label || lstrcmpW(drives[i].label, volumeNameBuffer)) set_drive_label( drives[i].letter, drives[i].label ); - snprintf(newSerialNumberText, sizeof(newSerialNumberText), "%X", serialNumber); - if (drives[i].serial && drives[i].serial[0] && strcmp(drives[i].serial, newSerialNumberText)) + if (drives[i].serial != serialNumber) set_drive_serial( drives[i].letter, drives[i].serial ); set_drive_type( drives[i].letter, drives[i].type ); diff --git a/programs/winecfg/drivedetect.c b/programs/winecfg/drivedetect.c index e8c843a430d..8b9911a3c85 100644 --- a/programs/winecfg/drivedetect.c +++ b/programs/winecfg/drivedetect.c @@ -22,21 +22,22 @@ #include "config.h" #include "wine/port.h" -#include -#include - -#include "winecfg.h" - #include #ifdef HAVE_MNTENT_H #include #endif #include #include - #include +#include #include +#include +#include + +#include "winecfg.h" +#include "resource.h" + WINE_DEFAULT_DEBUG_CHANNEL(winecfg); @@ -233,7 +234,7 @@ static void ensure_root_is_mapped(void) { if (!drives[letter - 'A'].in_use) { - add_drive(letter, "/", "System", "0", DRIVE_FIXED); + add_drive(letter, "/", NULL, 0, DRIVE_FIXED); WINE_TRACE("allocated drive %c as the root drive\n", letter); break; } @@ -262,7 +263,7 @@ static void ensure_home_is_mapped(void) { if (!drives[letter - 'A'].in_use) { - add_drive(letter, home, "Home", "0", DRIVE_FIXED); + add_drive(letter, home, NULL, 0, DRIVE_FIXED); WINE_TRACE("allocated drive %c as the user's home directory\n", letter); break; } @@ -287,7 +288,10 @@ static void ensure_drive_c_is_mapped(void) if (stat(drive_c_dir, &buf) == 0) { - add_drive('C', "../drive_c", "Virtual Windows Drive", "0", DRIVE_FIXED); + WCHAR label[64]; + LoadStringW (GetModuleHandle (NULL), IDS_SYSTEM_DRIVE_LABEL, label, + sizeof(label)/sizeof(label[0])); + add_drive('C', "../drive_c", label, 0, DRIVE_FIXED); } else { @@ -324,7 +328,6 @@ int autodetect_drives(void) while ((ent = getmntent(fstab))) { char letter; - char label[256]; int type; WINE_TRACE("ent->mnt_dir=%s\n", ent->mnt_dir); @@ -350,14 +353,10 @@ int autodetect_drives(void) fclose(fstab); return FALSE; } - - strcpy(label, "Drive X"); - label[6] = letter; - - WINE_TRACE("adding drive %c for %s, type %s with label %s\n", letter, ent->mnt_dir, ent->mnt_type,label); - add_drive(letter, ent->mnt_dir, label, "0", type); - + WINE_TRACE("adding drive %c for %s, type %s\n", letter, ent->mnt_dir, ent->mnt_type); + add_drive(letter, ent->mnt_dir, NULL, 0, type); + /* working_mask is a map of the drive letters still available. */ working_mask &= ~DRIVE_MASK_BIT(letter); } diff --git a/programs/winecfg/driveui.c b/programs/winecfg/driveui.c index fb37a20a7a6..61fba5f6fb0 100644 --- a/programs/winecfg/driveui.c +++ b/programs/winecfg/driveui.c @@ -33,6 +33,7 @@ #include #include +#include #include #include "winecfg.h" @@ -311,12 +312,12 @@ static void on_add_click(HWND dialog) if (new == 'C') { - char label[64]; - LoadStringA (GetModuleHandle (NULL), IDS_SYSTEM_DRIVE_LABEL, label, - sizeof(label)/sizeof(label[0])); - add_drive(new, "../drive_c", label, "", DRIVE_FIXED); + WCHAR label[64]; + LoadStringW (GetModuleHandle (NULL), IDS_SYSTEM_DRIVE_LABEL, label, + sizeof(label)/sizeof(label[0])); + add_drive(new, "../drive_c", label, 0, DRIVE_FIXED); } - else add_drive(new, "/", "", "", DRIVE_UNKNOWN); + else add_drive(new, "/", NULL, 0, DRIVE_UNKNOWN); fill_drives_list(dialog); @@ -375,10 +376,10 @@ static void on_remove_click(HWND dialog) static void update_controls(HWND dialog) { + static const WCHAR emptyW[1]; char *path; unsigned int type; - char *label; - char *serial; + char serial[16]; const char *device; int i, selection = -1; LVITEM item; @@ -433,11 +434,10 @@ static void update_controls(HWND dialog) EnableWindow( GetDlgItem( dialog, IDC_COMBO_TYPE ), (current_drive->letter != 'C') ); /* removeable media properties */ - label = current_drive->label; - set_text(dialog, IDC_EDIT_LABEL, label); + set_textW(dialog, IDC_EDIT_LABEL, current_drive->label ? current_drive->label : emptyW); /* set serial edit text */ - serial = current_drive->serial; + sprintf( serial, "%X", current_drive->serial ); set_text(dialog, IDC_EDIT_SERIAL, serial); /* TODO: get the device here to put into the edit box */ @@ -482,13 +482,11 @@ static void on_edit_changed(HWND dialog, WORD id) { case IDC_EDIT_LABEL: { - char *label; - - label = get_text(dialog, id); + WCHAR *label = get_textW(dialog, id); HeapFree(GetProcessHeap(), 0, current_drive->label); - current_drive->label = label ? label : strdupA(""); + current_drive->label = label; - WINE_TRACE("set label to %s\n", current_drive->label); + WINE_TRACE("set label to %s\n", wine_dbgstr_w(current_drive->label)); /* enable the apply button */ SendMessage(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0); @@ -518,10 +516,9 @@ static void on_edit_changed(HWND dialog, WORD id) char *serial; serial = get_text(dialog, id); - HeapFree(GetProcessHeap(), 0, current_drive->serial); - current_drive->serial = serial ? serial : strdupA(""); + current_drive->serial = strtoul( serial, NULL, 16 ); - WINE_TRACE("set serial to %s\n", current_drive->serial); + WINE_TRACE("set serial to %08x\n", current_drive->serial); /* enable the apply button */ SendMessage(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0); @@ -753,15 +750,12 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam) case IDC_RADIO_ASSIGN: { - char *str; - - str = get_text(dialog, IDC_EDIT_LABEL); + WCHAR *str = get_textW(dialog, IDC_EDIT_LABEL); HeapFree(GetProcessHeap(), 0, current_drive->label); - current_drive->label = str ? str : strdupA(""); + current_drive->label = str; - str = get_text(dialog, IDC_EDIT_SERIAL); - HeapFree(GetProcessHeap(), 0, current_drive->serial); - current_drive->serial = str ? str : strdupA(""); + str = get_textW(dialog, IDC_EDIT_SERIAL); + current_drive->serial = strtoulW( str, NULL, 16 ); /* TODO: we don't have a device at this point */ diff --git a/programs/winecfg/winecfg.h b/programs/winecfg/winecfg.h index f18b75cea04..91cb7b31e77 100644 --- a/programs/winecfg/winecfg.h +++ b/programs/winecfg/winecfg.h @@ -97,8 +97,8 @@ struct drive { char letter; char *unixpath; - char *label; - char *serial; + WCHAR *label; + DWORD serial; DWORD type; /* one of the DRIVE_ constants from winbase.h */ BOOL in_use; @@ -107,7 +107,7 @@ struct drive #define DRIVE_MASK_BIT(B) (1 << (toupper(B) - 'A')) long drive_available_mask(char letter); -BOOL add_drive(const char letter, const char *targetpath, const char *label, const char *serial, unsigned int type); +BOOL add_drive(char letter, const char *targetpath, const WCHAR *label, DWORD serial, DWORD type); void delete_drive(struct drive *pDrive); void apply_drive_changes(void); BOOL browse_for_unix_folder(HWND dialog, WCHAR *pszPath); diff --git a/programs/wordpad/Da.rc b/programs/wordpad/Da.rc index 7b0ad62a935..0ae3e2991c5 100644 --- a/programs/wordpad/Da.rc +++ b/programs/wordpad/Da.rc @@ -164,8 +164,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Liniebrydning", 0, 10, 10, 130, 85 - RADIOBUTTON "Bryd tekst efter v&indusbredden", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Bryd tekst efter &margen", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Bryd tekst efter v&indusbredden", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Bryd tekst efter &margen", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Værktøjslinier", 0, 150, 10, 120, 85 CHECKBOX "&Værktøjslinie", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formatteringlinie", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/De.rc b/programs/wordpad/De.rc index 01580842261..69244f60462 100644 --- a/programs/wordpad/De.rc +++ b/programs/wordpad/De.rc @@ -166,8 +166,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Zeilenumbruch", 0, 10, 10, 130, 85 - RADIOBUTTON "&Am Fenster umbrechen", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "A&m Lineal umbrechen", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "&Am Fenster umbrechen", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "A&m Lineal umbrechen", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Symbolleisten", 0, 150, 10, 120, 85 CHECKBOX "&Symbolleiste", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formatierungsleiste", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/En.rc b/programs/wordpad/En.rc index be4ccc93c5e..c3ae2f920a8 100644 --- a/programs/wordpad/En.rc +++ b/programs/wordpad/En.rc @@ -164,8 +164,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Line wrapping", 0, 10, 10, 130, 85 - RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "&No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Toolbars", 0, 150, 10, 120, 85 CHECKBOX "&Toolbar", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formatbar", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Fr.rc b/programs/wordpad/Fr.rc index 8a409d9601a..c423a7f1b4a 100644 --- a/programs/wordpad/Fr.rc +++ b/programs/wordpad/Fr.rc @@ -164,8 +164,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Enveloppement de ligne", 0, 10, 10, 170, 85 - RADIOBUTTON "Enveloppe le texte à partir de la bordure de fenêtre", IDC_PAGEFMT_WW, 18, 25, 145, 15 - RADIOBUTTON "Enveloppe le texte à partir de la &marge", IDC_PAGEFMT_WM, 18, 45, 145, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 145, 15 + RADIOBUTTON "Enveloppe le texte à partir de la bordure de fenêtre", IDC_PAGEFMT_WW, 18, 45, 145, 15 + RADIOBUTTON "Enveloppe le texte à partir de la &marge", IDC_PAGEFMT_WM, 18, 65, 145, 15 GROUPBOX "Barres d'outils", 0, 170, 10, 120, 85 CHECKBOX "&Barre d'outils", IDC_PAGEFMT_TB, 180, 20, 80, 15 CHECKBOX "Barre de &format", IDC_PAGEFMT_FB, 180, 38, 80, 15 diff --git a/programs/wordpad/Hu.rc b/programs/wordpad/Hu.rc index b5ea2d7360c..78f069b59df 100644 --- a/programs/wordpad/Hu.rc +++ b/programs/wordpad/Hu.rc @@ -164,8 +164,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Line wrapping", 0, 10, 10, 130, 85 - RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Toolbars", 0, 150, 10, 120, 85 CHECKBOX "&Toolbar", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formatbar", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Ja.rc b/programs/wordpad/Ja.rc index 9245f5e033f..9b004856735 100644 --- a/programs/wordpad/Ja.rc +++ b/programs/wordpad/Ja.rc @@ -167,8 +167,9 @@ CAPTION "" FONT 9, "MS Shell Dlg" BEGIN GROUPBOX "行の折り返し", 0, 10, 10, 130, 85 - RADIOBUTTON "ウィンドウの境界で折り返す(&W)", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "マージンで折り返す(&M)", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "ウィンドウの境界で折り返す(&W)", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "マージンで折り返す(&M)", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "ツールバー", 0, 150, 10, 120, 85 CHECKBOX "ツールバー(&T)", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "書式バー(&F)", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Ko.rc b/programs/wordpad/Ko.rc index 11c894287d7..9fcb72512ea 100644 --- a/programs/wordpad/Ko.rc +++ b/programs/wordpad/Ko.rc @@ -166,8 +166,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "ÁÙ ³Ñ±â±â", 0, 10, 10, 130, 85 - RADIOBUTTON "â °¡ÀåÀÚ¸®¼­ ±Û ³Ñ±â±â(&W)", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "°¡ÀåÀÚ¸®¿¡¼­ ÁÙ ³Ñ±â±â(&M)", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "â °¡ÀåÀÚ¸®¼­ ±Û ³Ñ±â±â(&W)", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "°¡ÀåÀÚ¸®¿¡¼­ ÁÙ ³Ñ±â±â(&M)", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX " µµ±¸¹Ù", 0, 150, 10, 120, 85 CHECKBOX "µµ±¸¹Ù(&T)", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "Çü½Ä¹Ù(&F)", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Nl.rc b/programs/wordpad/Nl.rc index 73da63f28dd..0a53658eb85 100644 --- a/programs/wordpad/Nl.rc +++ b/programs/wordpad/Nl.rc @@ -165,8 +165,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Regel afbreken", 0, 10, 10, 130, 85 - RADIOBUTTON "Breek tekst af bij &venster rand", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Breek tekst af bij de &marge", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Breek tekst af bij &venster rand", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Breek tekst af bij de &marge", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Toolbars", 0, 150, 10, 120, 85 CHECKBOX "&Toolbalk", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formaatbalk", IDC_PAGEFMT_FB, 160, 38, 80, 15 @@ -239,4 +240,5 @@ BEGIN STRING_WRITE_ACCESS_DENIED, "Onvoldoende rechten om het bestand op te slaan." STRING_OPEN_FAILED, "Bestand kon niet geopend worden." STRING_OPEN_ACCESS_DENIED, "Onvoldoende rechten om het bestand te openen." + STRING_PRINTING_NOT_IMPLEMENTED, "Printen is nog niet geimplementeerd" END diff --git a/programs/wordpad/No.rc b/programs/wordpad/No.rc index 5a3be26d136..b162926c666 100644 --- a/programs/wordpad/No.rc +++ b/programs/wordpad/No.rc @@ -164,8 +164,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Linjebryting", 0, 10, 10, 130, 85 - RADIOBUTTON "Bryt tekst etter v&indusbredden", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Bryt tekst etter &margen", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Bryt tekst etter v&indusbredden", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Bryt tekst etter &margen", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Verktøylinjer", 0, 150, 10, 120, 85 CHECKBOX "&Verktøylinje", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formatlinje", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Pl.rc b/programs/wordpad/Pl.rc index 444faf85b71..7c6cdaa341b 100644 --- a/programs/wordpad/Pl.rc +++ b/programs/wordpad/Pl.rc @@ -165,8 +165,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Zawijanie wierszy", 0, 10, 10, 130, 85 - RADIOBUTTON "Zawijaj do &brzegu okna", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Zawijaj do &marginesu", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Zawijaj do &brzegu okna", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Zawijaj do &marginesu", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Paski narzêdzi", 0, 150, 10, 120, 85 CHECKBOX "Pasek &narzêdzi", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "Pasek &formatu", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Ru.rc b/programs/wordpad/Ru.rc index 0d040b743e5..76285548ace 100644 --- a/programs/wordpad/Ru.rc +++ b/programs/wordpad/Ru.rc @@ -164,8 +164,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Ïåðåíîñ ïî ñëîâàì", 0, 10, 10, 130, 85 - RADIOBUTTON " ãðàíèöàõ &îêíà", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON " ãðàíèöàõ &ïîëåé", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON " ãðàíèöàõ &îêíà", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON " ãðàíèöàõ &ïîëåé", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Ïàíåëè", 0, 150, 10, 120, 85 CHECKBOX "&Èíñòðóìåíòîâ", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Ôîðìàòèðîâàíèÿ", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Si.rc b/programs/wordpad/Si.rc index 5242c211899..448541e25e0 100644 --- a/programs/wordpad/Si.rc +++ b/programs/wordpad/Si.rc @@ -166,8 +166,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Prelom vrstic", 0, 10, 10, 130, 85 - RADIOBUTTON "Prelomi besedilo na robu o&kna", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Prelomi besedilo na robu &papirja", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Prelomi besedilo na robu o&kna", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Prelomi besedilo na robu &papirja", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Orodne vrstice", 0, 150, 10, 120, 85 CHECKBOX "O&rodna vrstica", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "O&blikovna vrstica", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Tr.rc b/programs/wordpad/Tr.rc index e8bf6a69515..f03b68d4afd 100644 --- a/programs/wordpad/Tr.rc +++ b/programs/wordpad/Tr.rc @@ -166,8 +166,9 @@ Caption "" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Line wrapping", 0, 10, 10, 130, 85 - RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "Toolbars", 0, 150, 10, 120, 85 CHECKBOX "&Toolbar", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "&Formatbar", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/Zh.rc b/programs/wordpad/Zh.rc index 6b19a3d7358..3b873165558 100644 --- a/programs/wordpad/Zh.rc +++ b/programs/wordpad/Zh.rc @@ -169,8 +169,9 @@ Caption "" FONT 9, "MS Song" BEGIN GROUPBOX "自动换行", 0, 10, 10, 130, 85 - RADIOBUTTON "按视窗宽度(&W)", IDC_PAGEFMT_WW, 18, 25, 117, 15 - RADIOBUTTON "按纸张宽度(&M)", IDC_PAGEFMT_WM, 18, 45, 117, 15 + RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15 + RADIOBUTTON "按视窗宽度(&W)", IDC_PAGEFMT_WW, 18, 45, 117, 15 + RADIOBUTTON "按纸张宽度(&M)", IDC_PAGEFMT_WM, 18, 65, 117, 15 GROUPBOX "工具栏", 0, 150, 10, 120, 85 CHECKBOX "工具栏(&T)", IDC_PAGEFMT_TB, 160, 20, 80, 15 CHECKBOX "格式工具栏(&F)", IDC_PAGEFMT_FB, 160, 38, 80, 15 diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c index 3e181b04daf..ee35d4a69fe 100644 --- a/programs/wordpad/print.c +++ b/programs/wordpad/print.c @@ -179,25 +179,35 @@ static RECT get_print_rect(HDC hdc) void target_device(HWND hMainWnd, DWORD wordWrap) { HWND hEditorWnd = GetDlgItem(hMainWnd, IDC_EDITOR); - HDC hdc = make_dc(); - int width = 0; if(wordWrap == ID_WORDWRAP_MARGIN) { + int width = 0; + LRESULT result; + HDC hdc = make_dc(); RECT rc = get_print_rect(hdc); + width = rc.right - rc.left; + if(!hdc) + { + HDC hMaindc = GetDC(hMainWnd); + hdc = CreateCompatibleDC(hMaindc); + ReleaseDC(hMainWnd, hMaindc); + } + result = SendMessageW(hEditorWnd, EM_SETTARGETDEVICE, (WPARAM)hdc, width); + DeleteDC(hdc); + if (result) + return; + /* otherwise EM_SETTARGETDEVICE failed, so fall back on wrapping + * to window using the NULL DC. */ } - if(!hdc) - { - HDC hMaindc = GetDC(hMainWnd); - hdc = CreateCompatibleDC(hMaindc); - ReleaseDC(hMainWnd, hMaindc); + if (wordWrap != ID_WORDWRAP_NONE) { + SendMessageW(hEditorWnd, EM_SETTARGETDEVICE, 0, 0); + } else { + SendMessageW(hEditorWnd, EM_SETTARGETDEVICE, 0, 1); } - SendMessageW(hEditorWnd, EM_SETTARGETDEVICE, (WPARAM)hdc, width); - - DeleteDC(hdc); } static LPWSTR dialog_print_to_file(HWND hMainWnd) diff --git a/programs/wordpad/registry.c b/programs/wordpad/registry.c index 28508decbc8..c7edc5b1e50 100644 --- a/programs/wordpad/registry.c +++ b/programs/wordpad/registry.c @@ -78,7 +78,7 @@ static LRESULT registry_get_handle(HKEY *hKey, LPDWORD action, LPCWSTR subKey) void registry_set_options(HWND hMainWnd) { - HKEY hKey; + HKEY hKey = 0; DWORD action; if(registry_get_handle(&hKey, &action, key_options) == ERROR_SUCCESS) @@ -101,7 +101,7 @@ void registry_set_options(HWND hMainWnd) void registry_read_winrect(RECT* rc) { - HKEY hKey; + HKEY hKey = 0; DWORD size = sizeof(RECT); if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS || @@ -119,7 +119,7 @@ void registry_read_winrect(RECT* rc) void registry_read_maximized(DWORD *bMaximized) { - HKEY hKey; + HKEY hKey = 0; DWORD size = sizeof(DWORD); if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS || @@ -318,8 +318,8 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd) (lstrlenW(pFiles[i])+1)*sizeof(WCHAR)); } } + RegCloseKey(hKey); } - RegCloseKey(hKey); registry_read_filelist(hMainWnd); } @@ -335,9 +335,10 @@ void registry_read_options(void) if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS) registry_read_pagemargins(NULL); else + { registry_read_pagemargins(hKey); - - RegCloseKey(hKey); + RegCloseKey(hKey); + } } static void registry_read_formatopts(int index, LPCWSTR key, DWORD barState[], DWORD wordWrap[]) @@ -366,7 +367,7 @@ static void registry_read_formatopts(int index, LPCWSTR key, DWORD barState[], D if(index == reg_formatindex(SF_RTF)) wordWrap[index] = ID_WORDWRAP_WINDOW; else if(index == reg_formatindex(SF_TEXT)) - wordWrap[index] = ID_WORDWRAP_WINDOW; /* FIXME: should be ID_WORDWRAP_NONE once we support it */ + wordWrap[index] = ID_WORDWRAP_NONE; RegCloseKey(hKey); } diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 39a52bf9fd2..754ae50a9cd 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -980,13 +980,15 @@ static INT_PTR CALLBACK formatopts_proc(HWND hWnd, UINT message, WPARAM wParam, sprintf(id, "%d\n", (int)ps->lParam); SetWindowTextA(hIdWnd, id); - if(wordWrap[ps->lParam] == ID_WORDWRAP_WINDOW) + if(wordWrap[ps->lParam] == ID_WORDWRAP_NONE) + wrap = IDC_PAGEFMT_WN; + else if(wordWrap[ps->lParam] == ID_WORDWRAP_WINDOW) wrap = IDC_PAGEFMT_WW; else if(wordWrap[ps->lParam] == ID_WORDWRAP_MARGIN) wrap = IDC_PAGEFMT_WM; if(wrap != -1) - CheckRadioButton(hWnd, IDC_PAGEFMT_WW, + CheckRadioButton(hWnd, IDC_PAGEFMT_WN, IDC_PAGEFMT_WM, wrap); if(barState[ps->lParam] & (1 << BANDID_TOOLBAR)) @@ -1003,9 +1005,10 @@ static INT_PTR CALLBACK formatopts_proc(HWND hWnd, UINT message, WPARAM wParam, case WM_COMMAND: switch(LOWORD(wParam)) { + case IDC_PAGEFMT_WN: case IDC_PAGEFMT_WW: case IDC_PAGEFMT_WM: - CheckRadioButton(hWnd, IDC_PAGEFMT_WW, IDC_PAGEFMT_WM, + CheckRadioButton(hWnd, IDC_PAGEFMT_WN, IDC_PAGEFMT_WM, LOWORD(wParam)); break; @@ -1029,7 +1032,9 @@ static INT_PTR CALLBACK formatopts_proc(HWND hWnd, UINT message, WPARAM wParam, GetWindowTextA(hIdWnd, sid, 4); id = atoi(sid); - if(IsDlgButtonChecked(hWnd, IDC_PAGEFMT_WW)) + if(IsDlgButtonChecked(hWnd, IDC_PAGEFMT_WN)) + wordWrap[id] = ID_WORDWRAP_NONE; + else if(IsDlgButtonChecked(hWnd, IDC_PAGEFMT_WW)) wordWrap[id] = ID_WORDWRAP_WINDOW; else if(IsDlgButtonChecked(hWnd, IDC_PAGEFMT_WM)) wordWrap[id] = ID_WORDWRAP_MARGIN; @@ -1819,7 +1824,7 @@ static LRESULT OnCreate( HWND hWnd ) hEditorWnd = CreateWindowExW(WS_EX_CLIENTEDGE, wszRichEditClass, NULL, WS_CHILD|WS_VISIBLE|ES_SELECTIONBAR|ES_MULTILINE|ES_AUTOVSCROLL - |ES_WANTRETURN|WS_VSCROLL|ES_NOHIDESEL, + |ES_WANTRETURN|WS_VSCROLL|ES_NOHIDESEL|WS_HSCROLL, 0, 0, 1000, 100, hWnd, (HMENU)IDC_EDITOR, hInstance, NULL); if (!hEditorWnd) diff --git a/programs/wordpad/wordpad.h b/programs/wordpad/wordpad.h index 6a1bcfb025a..8126fdd6d77 100644 --- a/programs/wordpad/wordpad.h +++ b/programs/wordpad/wordpad.h @@ -114,9 +114,10 @@ #define IDC_PAGEFMT_FB 101 #define IDC_PAGEFMT_RU 102 #define IDC_PAGEFMT_SB 103 -#define IDC_PAGEFMT_WW 104 -#define IDC_PAGEFMT_WM 105 -#define IDC_PAGEFMT_ID 106 +#define IDC_PAGEFMT_WN 104 +#define IDC_PAGEFMT_WW 105 +#define IDC_PAGEFMT_WM 106 +#define IDC_PAGEFMT_ID 107 #define ID_DATETIME 1600 #define ID_PARAFORMAT 1601 diff --git a/programs/write/write.c b/programs/write/write.c index f60d40c2f09..80123552d45 100644 --- a/programs/write/write.c +++ b/programs/write/write.c @@ -45,6 +45,8 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar if (!CreateProcessW(path, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &stinf, &info)) goto failed; + CloseHandle(info.hProcess); + CloseHandle(info.hThread); return 0; failed: diff --git a/tools/make_makefiles b/tools/make_makefiles index 143805bafe2..bd0f2559120 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -491,11 +491,14 @@ sub update_includes() { if ($incl =~ /(.*)\//) { $subdirs{$1} = 1; } next if ($incl =~ /^wine\// && !$exported_wine_headers{$incl}); + next if ($incl =~ /\.in$/); if ($incl =~ /stdole2\.idl$/) { push @tlb_srcs, $incl; } elsif ($private_idl_headers{$incl}) { push @h_srcs, $incl; } elsif ($incl =~ /\.h$/) { push @h_srcs, $incl; } + elsif ($incl =~ /\.rh$/) { push @h_srcs, $incl; } elsif ($incl =~ /\.inl$/) { push @h_srcs, $incl; } elsif ($incl =~ /\.idl$/) { push @idl_srcs, $incl; } + else { die "unknown file $incl in include dir"; } } replace_in_file( "include/Makefile.in", '^IDL_H_SRCS\s*=', '^INSTALLDIRS', "IDL_H_SRCS = \\\n\t", diff --git a/tools/runtest b/tools/runtest index 65022f141cb..ad8ef72b66d 100755 --- a/tools/runtest +++ b/tools/runtest @@ -48,7 +48,7 @@ platform=$WINETEST_PLATFORM WINETEST_DEBUG=${WINETEST_DEBUG:-1} # parse command-line options -while [ "$#" -gt 1 ]; do +while [ "$#" -gt 0 ]; do case "$1" in -h) usage @@ -76,7 +76,7 @@ while [ "$#" -gt 1 ]; do shift; topobjdir="$1" if [ ! -d "$topobjdir" ]; then usage; fi ;; - --) + *) break ;; esac diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker index 91ea656a31d..957e2322d6d 100755 --- a/tools/winapi/msvcmaker +++ b/tools/winapi/msvcmaker @@ -271,6 +271,26 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { $idl_h_files = [sort(@{$vars{IDL_H_SRCS}})]; } + my $idl_c_files = []; + if(exists($vars{IDL_C_SRCS})) { + $idl_c_files = [sort(@{$vars{IDL_C_SRCS}})]; + } + + my $idl_s_files = []; + if(exists($vars{IDL_S_SRCS})) { + $idl_s_files = [sort(@{$vars{IDL_S_SRCS}})]; + } + + my $idl_p_files = []; + if(exists($vars{IDL_P_SRCS})) { + $idl_p_files = [sort(@{$vars{IDL_P_SRCS}})]; + } + + my $idl_tlb_files = []; + if(exists($vars{IDL_TLB_SRCS})) { + $idl_tlb_files = [sort(@{$vars{IDL_TLB_SRCS}})]; + } + my $extradefs; if(exists($vars{EXTRADEFS})) { $extradefs = $vars{EXTRADEFS}; @@ -321,6 +341,10 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { $modules{$module}{resource_files} = $local_resource_files; $modules{$module}{imports} = []; $modules{$module}{idl_h_files} = $local_idl_h_files; + $modules{$module}{idl_c_files} = []; + $modules{$module}{idl_s_files} = []; + $modules{$module}{idl_p_files} = []; + $modules{$module}{idl_tlb_files} = []; $modules{$module}{extradefs} = $extradefs if $extradefs; } } @@ -336,6 +360,10 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { $modules{$module}{resource_files} = $resource_files; $modules{$module}{imports} = [@imports]; $modules{$module}{idl_h_files} = $idl_h_files; + $modules{$module}{idl_c_files} = $idl_c_files; + $modules{$module}{idl_s_files} = $idl_s_files; + $modules{$module}{idl_p_files} = $idl_p_files; + $modules{$module}{idl_tlb_files} = $idl_tlb_files; $modules{$module}{extradefs} = $extradefs if $extradefs; } @@ -412,6 +440,10 @@ foreach my $dsp_file (keys(%wine_test_dsp_files)) { $modules{$module}{resource_files} = $resource_files; $modules{$module}{imports} = [@imports]; $modules{$module}{idl_h_files} = []; + $modules{$module}{idl_c_files} = []; + $modules{$module}{idl_s_files} = []; + $modules{$module}{idl_p_files} = []; + $modules{$module}{idl_tlb_files} = []; $modules{$module}{tests} = [@tests]; } @@ -440,6 +472,52 @@ foreach my $module (@modules) { replace_file("$wine_dir/$dsp_file", \&_generate_dsp, $module); } +sub output_dsp_idl_rules($$$) { + my $wine_include_dir = shift; + my $ext = shift; + my @idl_src_files = @{(shift)}; + + foreach my $idl_src_file (@idl_src_files) { + $idl_src_file =~ s%/%\\%g; + if($idl_src_file !~ /^\./) { + $idl_src_file = ".\\$idl_src_file"; + } + + print OUT "# Begin Source File\r\n"; + print OUT "\r\n"; + + print OUT "SOURCE=$idl_src_file\r\n"; + + my $basename = $idl_src_file; + $basename =~ s/\.idl$//; + + print OUT "# PROP Ignore_Default_Tool 1\r\n"; + print OUT "# Begin Custom Build\r\n"; + print OUT "InputPath=$idl_src_file\r\n"; + print OUT "\r\n"; + print OUT "BuildCmds= \\\r\n"; + print OUT "\tmidl /nologo /I $wine_include_dir $idl_src_file "; + if ($ext eq ".h") { + print OUT "/client none /server none /notlb /h "; + } elsif ($ext eq "_c.c") { + print OUT "/server none /notlb /cstub "; + } elsif ($ext eq "_s.c") { + print OUT "/client none /notlb /sstub "; + } elsif ($ext eq "_p.c") { + print OUT "/client none /server none /notlb /proxy "; + } elsif ($ext eq ".tlb") { + print OUT "/client none /server none /tlb "; + } + print OUT "$basename$ext\r\n"; + print OUT "\r\n"; + print OUT "\"$basename$ext\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\r\n"; + print OUT " \$(BuildCmds)\r\n"; + print OUT "# End Custom Build\r\n"; + + print OUT "# End Source File\r\n"; + } +} + sub _generate_dsp($$) { local *OUT = shift; @@ -478,6 +556,10 @@ sub _generate_dsp($$) { my @header_files = @{$modules{$module}{header_files}}; my @resource_files = @{$modules{$module}{resource_files}}; my @idl_h_files = @{$modules{$module}{idl_h_files}}; + my @idl_c_files = @{$modules{$module}{idl_c_files}}; + my @idl_s_files = @{$modules{$module}{idl_s_files}}; + my @idl_p_files = @{$modules{$module}{idl_p_files}}; + my @idl_tlb_files = @{$modules{$module}{idl_tlb_files}}; if ($project !~ /^wine(?:build|runtests|test)?$/ && $project !~ /^(?:gdi32)_.+?$/ && @@ -514,6 +596,12 @@ sub _generate_dsp($$) { push @_cfgs, "$cfg Release"; } @cfgs = @_cfgs; + } else { + my @_cfgs; + foreach my $cfg (@cfgs) { + push @_cfgs, "$cfg Debug"; + } + @cfgs = @_cfgs; } if (!$no_msvc_headers) { @@ -902,32 +990,13 @@ sub _generate_dsp($$) { print OUT "# End Source File\r\n"; } - foreach my $idl_h_file (@idl_h_files) { - $idl_h_file =~ s%/%\\%g; - if($idl_h_file !~ /^\./) { - $idl_h_file = ".\\$idl_h_file"; - } - - print OUT "# Begin Source File\r\n"; - print OUT "\r\n"; - - print OUT "SOURCE=$idl_h_file\r\n"; - - my $basename = $idl_h_file; - $basename =~ s/\.idl$//; - - print OUT "# PROP Ignore_Default_Tool 1\r\n"; - print OUT "# Begin Custom Build\r\n"; - print OUT "InputPath=$idl_h_file\r\n"; - print OUT "\r\n"; - print OUT "BuildCmds= \\\r\n"; - print OUT "\tmidl /nologo /I $wine_include_dir /client none /server none /notlb $idl_h_file /h $basename.h\r\n"; - print OUT "\r\n"; - print OUT "\"$basename.h\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\r\n"; - print OUT " \$(BuildCmds)\r\n"; - print OUT "# End Custom Build\r\n"; - - print OUT "# End Source File\r\n"; + output_dsp_idl_rules $wine_include_dir, ".h", \@idl_h_files; + output_dsp_idl_rules $wine_include_dir, "_c.c", \@idl_c_files; + output_dsp_idl_rules $wine_include_dir, "_s.c", \@idl_s_files; + output_dsp_idl_rules $wine_include_dir, "_p.c", \@idl_p_files; + # Hack - stdole2.idl cannot be compiled with midl + if($project ne "include") { + output_dsp_idl_rules $wine_include_dir, ".tlb", \@idl_tlb_files; } print OUT "# End Group\r\n"; -- 2.11.4.GIT