ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2005
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
28 participants
703 discussions
Start a n
N
ew thread
[royce] 12944: support for <if> tag
by royce@svn.reactos.com
support for <if> tag .PHONY must be output before the target gets defined Modified: branches/xmlbuildsystem/reactos/ReactOS.xml Modified: branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h _____ Modified: branches/xmlbuildsystem/reactos/ReactOS.xml --- branches/xmlbuildsystem/reactos/ReactOS.xml 2005-01-12 05:01:49 UTC (rev 12943) +++ branches/xmlbuildsystem/reactos/ReactOS.xml 2005-01-12 06:02:58 UTC (rev 12944) @@ -6,9 +6,18 @@ <xi:include href="config.template.xml" /> </xi:fallback> </xi:include> + <define name="_M_IX86" /> + <if property="dbg" value="true"> + <define name="dbg_or_kdbg" value="true" /> + </if> + <if property="kdbg" value="true"> + <define name="dbg_or_kdbg" value="true" /> + </if> + <include>include</include> <include>w32api/include</include> + <directory name="tools"> <xi:include href="tools/tools.xml" /> </directory> _____ Modified: branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml --- branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml 2005-01-12 05:01:49 UTC (rev 12943) +++ branches/xmlbuildsystem/reactos/ntoskrnl/ntoskrnl.xml 2005-01-12 06:02:58 UTC (rev 12944) @@ -41,10 +41,9 @@ <file>rtlfunc.c</file> </directory> <directory name="dbg"> - <!-- <if property="arch" value="i386"> <directory name="i386"> - <if property="kdbg" value="true"> + <if property="kdbg" value="1"> <group> <file>i386-dis.c</file> <file>kdb_help.S</file> @@ -52,36 +51,17 @@ </if> </directory> </if> - --> - <!-- - <if property="kdbg" value="true"> - <group> - <file>kdb.c</file> - <file>kdb_keyboard.c</file> - <file>kdb_serial.c</file> - <file>rdebug.c</file> - <file>profile.c</file> - </group> + <if property="kdbg" value="1"> + <file>kdb.c</file> + <file>kdb_keyboard.c</file> + <file>kdb_serial.c</file> + <file>rdebug.c</file> + <file>profile.c</file> </if> - --> - <or> - <!-- - <if property="kdbg" value="true"> - <group> - <file>kdb_stabs.c</file> - <file>kdb_symbols.c</file> - </group> - </if> - --> - <!-- - <if property="dbg" value="true"> - <group> - <file>kdb_stabs.c</file> - <file>kdb_symbols.c</file> - </group> - </if> - --> - </or> + <if property="dbg_or_kdbg" value="true"> + <file>kdb_stabs.c</file> + <file>kdb_symbols.c</file> + </if> <file>dbgctrl.c</file> <file>errinfo.c</file> <file>print.c</file> _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-01-12 05:01:49 UTC (rev 12943) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-01-12 06:02:58 UTC (rev 12944) @@ -237,12 +237,14 @@ void MingwModuleHandler::GenerateGccModuleIncludeVariable ( const Module& module ) const { +#if 0 string name ( module.name + "_CFLAGS" ); fprintf ( fMakefile, "%s := %s %s\n", name.c_str(), - GenerateGccDefineParameters(module).c_str(), + GenerateGccDefineParameters(module).c_str(), GenerateGccIncludeParameters(module).c_str() ); +#endif } string @@ -258,73 +260,174 @@ return parameters; } -string -MingwModuleHandler::GenerateGccParameters ( const Module& module ) const +void +MingwModuleHandler::GenerateMacros ( + const Module& module, + const char* op, + const vector<File*>& files, + const vector<Include*>* includes, + const vector<Define*>& defines, + const string& cflags_macro, + const string& nasmflags_macro, + const string& objs_macro) const { - return ssprintf(" $(%s_CFLAGS)", module.name.c_str()); + size_t i; + + if ( (includes && includes->size()) || defines.size() ) + { + fprintf ( + fMakefile, + "%s %s", + cflags_macro.c_str(), + op ); + if ( includes ) + for ( i = 0; i < includes->size(); i++ ) + fprintf ( + fMakefile, + " -I%s", + (*includes)[i]->directory.c_str() ); + for ( i = 0; i < module.defines.size(); i++ ) + { + Define& d = *module.defines[i]; + fprintf ( + fMakefile, + " -D%s", + d.name.c_str() ); + if ( d.value.size() ) + fprintf ( + fMakefile, + "=%s", + d.value.c_str() ); + } + fprintf ( fMakefile, "\n" ); + } + + if ( files.size() ) + { + fprintf ( + fMakefile, + "%s %s", + objs_macro.c_str(), + op ); + for ( i = 0; i < files.size(); i++ ) + { + fprintf ( + fMakefile, + "%s%s", + ( i%10 == 9 ? "\\\n\t" : " " ), + GetObjectFilename(files[i]->name).c_str() ); + } + fprintf ( fMakefile, "\n" ); + } } -string -MingwModuleHandler::GenerateNasmParameters ( const Module& module ) const +void +MingwModuleHandler::GenerateMacros ( + const Module& module, + const string& cflags_macro, + const string& nasmflags_macro, + const string& objs_macro) const { - return ""; + GenerateMacros ( + module, + "=", + module.files, + &module.includes, + module.defines, + cflags_macro, + nasmflags_macro, + objs_macro ); + fprintf ( fMakefile, "\n" ); + + for ( size_t i = 0; i < module.ifs.size(); i++ ) + { + If& rIf = *module.ifs[i]; + if ( rIf.defines.size() || rIf.files.size() ) + { + fprintf ( + fMakefile, + "ifeq ($(%s),\"%s\")\n", + rIf.property.c_str(), + rIf.value.c_str() ); + GenerateMacros ( + module, + "+=", + rIf.files, + NULL, + rIf.defines, + cflags_macro, + nasmflags_macro, + objs_macro ); + fprintf ( + fMakefile, + "endif\n\n" ); + } + } } string MingwModuleHandler::GenerateGccCommand ( const Module& module, - const string& sourceFilename, - const string& cc ) const + const string& sourceFilename, + const string& cc, + const string& cflagsMacro ) const { string objectFilename = GetObjectFilename ( sourceFilename ); return ssprintf ( "%s -c %s -o %s %s\n", cc.c_str (), sourceFilename.c_str (), objectFilename.c_str (), - GenerateGccParameters ( module ).c_str () ); + cflagsMacro.c_str () ); } string MingwModuleHandler::GenerateGccAssemblerCommand ( const Module& module, - const string& sourceFilename, - const string& cc ) const + const string& sourceFilename, + const string& cc, + const string& cflagsMacro ) const { string objectFilename = GetObjectFilename ( sourceFilename ); return ssprintf ( "%s -x assembler-with-cpp -c %s -o %s -D__ASM__ %s\n", - cc.c_str (), - sourceFilename.c_str (), - objectFilename.c_str (), - GenerateGccParameters ( module ).c_str () ); + cc.c_str (), + sourceFilename.c_str (), + objectFilename.c_str (), + cflagsMacro.c_str () ); } string MingwModuleHandler::GenerateNasmCommand ( const Module& module, - const string& sourceFilename ) const + const string& sourceFilename, + const string& nasmflagsMacro ) const { string objectFilename = GetObjectFilename ( sourceFilename ); return ssprintf ( "%s -f win32 %s -o %s %s\n", "nasm", sourceFilename.c_str (), objectFilename.c_str (), - GenerateNasmParameters ( module ).c_str () ); + nasmflagsMacro.c_str () ); } string MingwModuleHandler::GenerateCommand ( const Module& module, - const string& sourceFilename, - const string& cc ) const + const string& sourceFilename, + const string& cc, + const string& cflagsMacro, + const string& nasmflagsMacro ) const { string extension = GetExtension ( sourceFilename ); if ( extension == ".c" || extension == ".C" ) return GenerateGccCommand ( module, sourceFilename, - cc ); + cc, + cflagsMacro ); else if ( extension == ".s" || extension == ".S" ) return GenerateGccAssemblerCommand ( module, sourceFilename, - cc ); + cc, + cflagsMacro ); else if ( extension == ".asm" || extension == ".ASM" ) return GenerateNasmCommand ( module, - sourceFilename ); + sourceFilename, + nasmflagsMacro ); throw InvalidOperationException ( __FILE__, __LINE__, @@ -335,16 +438,17 @@ void MingwModuleHandler::GenerateObjectFileTargets ( const Module& module, - const string& cc) const + const vector<File*>& files, + const string& cc, + const string& cflagsMacro, + const string& nasmflagsMacro ) const { - if ( module.files.size () == 0 ) + if ( files.size () == 0 ) return; - - GenerateGccModuleIncludeVariable ( module ); - for ( size_t i = 0; i < module.files.size (); i++ ) + for ( size_t i = 0; i < files.size (); i++ ) { - string sourceFilename = module.files[i]->name; + string sourceFilename = files[i]->name; string objectFilename = GetObjectFilename ( sourceFilename ); fprintf ( fMakefile, "%s: %s\n", @@ -354,60 +458,78 @@ "\t%s\n", GenerateCommand ( module, sourceFilename, - cc ).c_str () ); + cc, + cflagsMacro, + nasmflagsMacro ).c_str () ); } fprintf ( fMakefile, "\n" ); } void -MingwModuleHandler::GenerateObjectFileTargetsHost ( const Module& module ) const +MingwModuleHandler::GenerateObjectFileTargets ( const Module& module, + const string& cc, + const string& cflagsMacro, + const string& nasmflagsMacro ) const { - GenerateObjectFileTargets ( module, - "${host_gcc}" ); + GenerateObjectFileTargets ( module, module.files, cc, cflagsMacro, nasmflagsMacro ); + for ( size_t i = 0; i < module.ifs.size(); i++ ) + GenerateObjectFileTargets ( module, module.ifs[i]->files, cc, cflagsMacro, nasmflagsMacro ); } void -MingwModuleHandler::GenerateObjectFileTargetsTarget ( const Module& module ) const -{ - GenerateObjectFileTargets ( module, - "${gcc}" ); -} - -void MingwModuleHandler::GenerateArchiveTarget ( const Module& module, - const string& ar ) const + const string& ar, + const string& objs_macro ) const { string archiveFilename = GetModuleArchiveFilename ( module ); string sourceFilenames = GetSourceFilenames ( module ); - string objectsMacro = GenerateObjectList ( module ); fprintf ( fMakefile, "%s: %s\n", archiveFilename.c_str (), - objectsMacro.c_str ()); + objs_macro.c_str ()); fprintf ( fMakefile, "\t%s -rc %s %s\n\n", ar.c_str (), archiveFilename.c_str (), - objectsMacro.c_str ()); + objs_macro.c_str ()); } void -MingwModuleHandler::GenerateArchiveTargetHost ( const Module& module ) const +MingwModuleHandler::GenerateMacrosAndTargets ( + const Module& module, + const string& cc, + const string& ar ) const { - GenerateArchiveTarget ( module, - "${host_ar}" ); + string cflagsMacro = ssprintf("%s_CFLAGS",module.name.c_str()); + string nasmflagsMacro = ssprintf("%s_NASMFLAGS",module.name.c_str()); + string objectsMacro = ssprintf("%s_OBJS",module.name.c_str()); + + GenerateMacros ( module, cflagsMacro, nasmflagsMacro, objectsMacro ); + + // future references to the macros will be to get their values + cflagsMacro = ssprintf("$(%s)",cflagsMacro.c_str()); + nasmflagsMacro = ssprintf("$(%s)",nasmflagsMacro.c_str()); + objectsMacro = ssprintf("$(%s)",objectsMacro.c_str()); + + GenerateArchiveTarget ( module, ar, objectsMacro ); + GenerateObjectFileTargets ( module, cc, cflagsMacro, nasmflagsMacro ); } void -MingwModuleHandler::GenerateArchiveTargetTarget ( const Module& module ) const +MingwModuleHandler::GenerateMacrosAndTargetsHost ( const Module& module ) const { - GenerateArchiveTarget ( module, - "${ar}" ); + GenerateMacrosAndTargets ( module, "${host_gcc}", "${host_ar}" ); } +void +MingwModuleHandler::GenerateMacrosAndTargetsTarget ( const Module& module ) const +{ + GenerateMacrosAndTargets ( module, "${gcc}", "${ar}" ); +} + string MingwModuleHandler::GetInvocationDependencies ( const Module& module ) const { @@ -514,30 +636,39 @@ } fprintf ( fMakefile, + ".PHONY: %s\n\n", + preconditionDependenciesName.c_str () ); + fprintf ( fMakefile, "%s: %s\n\n", preconditionDependenciesName.c_str (), dependencies.c_str () ); - fprintf ( fMakefile, - "%s: %s\n\n", - sourceFilenames.c_str (), - preconditionDependenciesName.c_str ()); - fprintf ( fMakefile, - ".PHONY: %s\n\n", - preconditionDependenciesName.c_str () ); + const char* p = sourceFilenames.c_str(); + const char* end = p + strlen(p); + while ( p < end ) + { + const char* p2 = &p[512]; + if ( p2 > end ) + p2 = end; + while ( p2 > p && !isspace(*p2) ) + --p2; + if ( p == p2 ) + { + p2 = strpbrk ( p, " \t" ); + if ( !p2 ) + p2 = end; + } + fprintf ( fMakefile, + "%.*s: %s\n", + p2-p, + p, + preconditionDependenciesName.c_str ()); + p = p2; + p += strspn ( p, " \t" ); + } + fprintf ( fMakefile, "\n" ); } -string MingwModuleHandler::GenerateObjectList ( const Module& module ) const -{ - string macro ( ssprintf("%s_OBJS",module.name.c_str()) ); - fprintf ( - fMakefile, - "%s = %s\n", - macro.c_str(), - GetObjectFilenames(module).c_str() ); - return ssprintf("$(%s)",macro.c_str()); -} - static MingwBuildToolModuleHandler buildtool_handler; MingwBuildToolModuleHandler::MingwBuildToolModuleHandler() @@ -562,11 +693,10 @@ target.c_str (), archiveFilename.c_str () ); fprintf ( fMakefile, - "\t${host_gcc} -o %s %s\n", + "\t${host_gcc} -o %s %s\n\n", target.c_str (), archiveFilename.c_str () ); - GenerateArchiveTargetHost ( module ); - GenerateObjectFileTargetsHost ( module ); + GenerateMacrosAndTargetsHost ( module ); } static MingwKernelModuleHandler kernelmodule_handler; @@ -628,11 +758,10 @@ archiveFilename.c_str (), importLibraryDependencies.c_str () ); fprintf ( fMakefile, - "\t${rm} %s\n", + "\t${rm} %s\n\n", temp_exp.c_str () ); - GenerateArchiveTargetTarget ( module ); - GenerateObjectFileTargetsTarget ( module ); + GenerateMacrosAndTargetsTarget ( module ); } @@ -654,8 +783,7 @@ void MingwStaticLibraryModuleHandler::GenerateStaticLibraryModuleTarget ( const Module& module ) { - GenerateArchiveTargetTarget ( module ); - GenerateObjectFileTargetsTarget ( module ); + GenerateMacrosAndTargetsTarget ( module ); } @@ -703,17 +831,16 @@ importLibraryDependencies.c_str () ); fprintf ( fMakefile, - "\t${gcc} -Wl,--subsystem,native -Wl,--entry,_DriverEntry@8 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -mdll -o %s %s %s\n", + "\t${gcc} -Wl,--subsystem,native -Wl,--entry,_DriverEntry@8 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -mdll -o %s %s %s\n\n", target.c_str (), archiveFilename.c_str (), importLibraryDependencies.c_str () ); - GenerateArchiveTargetTarget ( module ); - GenerateObjectFileTargetsTarget ( module ); + GenerateMacrosAndTargetsTarget ( module ); } else { - fprintf ( fMakefile, "%s:\n\n", + fprintf ( fMakefile, "%s:\n", target.c_str ()); fprintf ( fMakefile, ".PHONY: %s\n\n", target.c_str ()); @@ -765,13 +892,12 @@ importLibraryDependencies.c_str () ); fprintf ( fMakefile, - "\t${gcc} -Wl,--subsystem,native -Wl,--entry,_DllMainCRTStartup@12 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -nostdlib -mdll -o %s %s %s\n", + "\t${gcc} -Wl,--subsystem,native -Wl,--entry,_DllMainCRTStartup@12 -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -nostdlib -mdll -o %s %s %s\n\n", target.c_str (), archiveFilename.c_str (), importLibraryDependencies.c_str () ); - GenerateArchiveTargetTarget ( module ); - GenerateObjectFileTargetsTarget ( module ); + GenerateMacrosAndTargetsTarget ( module ); } else { _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-01-12 05:01:49 UTC (rev 12943) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .h 2005-01-12 06:02:58 UTC (rev 12944) @@ -30,15 +30,15 @@ std::string GetObjectFilename ( const std::string& sourceFilename ) const; std::string GetObjectFilenames ( const Module& module ) const; - void GenerateObjectFileTargetsHost ( const Module& module ) const; - void GenerateObjectFileTargetsTarget ( const Module& module ) const; - void GenerateArchiveTargetHost ( const Module& module ) const; - void GenerateArchiveTargetTarget ( const Module& module ) const; + void GenerateMacrosAndTargetsHost ( const Module& module ) const; + void GenerateMacrosAndTargetsTarget ( const Module& module ) const; std::string GetInvocationDependencies ( const Module& module ) const; std::string GetInvocationParameters ( const Invoke& invoke ) const; void GenerateInvocations ( const Module& module ) const; void GeneratePreconditionDependencies ( const Module& module ) const; - std::string GenerateObjectList ( const Module& module ) const; + std::string GenerateMacros ( const Module& module, + const std::string& cflags_macro, + const std::string& objs_macro ) const; static FILE* fMakefile; private: std::string ConcatenatePaths ( const std::string& path1, @@ -46,25 +46,53 @@ std::string GenerateGccDefineParametersFromVector ( const std::vector<Define*>& defines ) const; std::string GenerateGccDefineParameters ( const Module& module ) const; std::string GenerateGccIncludeParametersFromVector ( const std::vector<Include*>& includes ) const; + void GenerateMacros ( const Module& module, + const char* op, + const std::vector<File*>& files, + const std::vector<Include*>* includes, + const std::vector<Define*>& defines, + const std::string& cflags_macro, + const std::string& nasmflags_macro, + const std::string& objs_macro) const; + void GenerateMacros ( const Module& module, + const std::string& cflags_macro, + const std::string& nasmflags_macro, + const std::string& objs_macro) const; void GenerateGccModuleIncludeVariable ( const Module& module ) const; std::string GenerateGccIncludeParameters ( const Module& module ) const; std::string GenerateGccParameters ( const Module& module ) const; std::string GenerateNasmParameters ( const Module& module ) const; std::string GenerateGccCommand ( const Module& module, const std::string& sourceFilename, - const std::string& cc ) const; + const std::string& cc, + const std::string& cflagsMacro ) const; std::string GenerateGccAssemblerCommand ( const Module& module, const std::string& sourceFilename, - const std::string& cc ) const; + const std::string& cc, + const std::string& cflagsMacro ) const; std::string GenerateNasmCommand ( const Module& module, - const std::string& sourceFilename ) const; + const std::string& sourceFilename, + const std::string& nasmflagsMacro ) const; std::string GenerateCommand ( const Module& module, const std::string& sourceFilename, - const std::string& cc ) const; + const std::string& cc, + const std::string& cflagsMacro, + const std::string& nasmflagsMacro ) const; void GenerateObjectFileTargets ( const Module& module, - const std::string& cc ) const; + const std::vector<File*>& files, + const std::string& cc, + const std::string& cflagsMacro, + const std::string& nasmflagsMacro ) const; + void GenerateObjectFileTargets ( const Module& module, + const std::string& cc, + const std::string& cflagsMacro, + const std::string& nasmflagsMacro ) const; void GenerateArchiveTarget ( const Module& module, - const std::string& ar ) const; + const std::string& ar, + const std::string& objs_macro ) const; + void GenerateMacrosAndTargets ( const Module& module, + const std::string& cc, + const std::string& ar ) const; std::string GetPreconditionDependenciesName ( const Module& module ) const; }; _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp 2005-01-12 05:01:49 UTC (rev 12943) +++ branches/xmlbuildsystem/reactos/tools/rbuild/module.cpp 2005-01-12 06:02:58 UTC (rev 12944) @@ -63,6 +63,8 @@ delete invocations[i]; for ( i = 0; i < dependencies.size(); i++ ) delete dependencies[i]; + for ( i = 0; i < ifs.size(); i++ ) + delete ifs[i]; } void @@ -83,21 +85,32 @@ invocations[i]->ProcessXML (); for ( i = 0; i < dependencies.size(); i++ ) dependencies[i]->ProcessXML (); + for ( i = 0; i < ifs.size(); i++ ) + ifs[i]->ProcessXML(); } void Module::ProcessXMLSubElement ( const XMLElement& e, - const string& path ) + const string& path, + If* pIf /*= NULL*/ ) { bool subs_invalid = false; string subpath ( path ); if ( e.name == "file" && e.value.size () > 0 ) { - files.push_back ( new File ( FixSeparator ( path + CSEP + e.value ) ) ); + File* pFile = new File ( FixSeparator ( path + CSEP + e.value ) ); + if ( pIf ) + pIf->files.push_back ( pFile ); + else + files.push_back ( pFile ); subs_invalid = true; } else if ( e.name == "library" && e.value.size () ) { + if ( pIf ) + throw InvalidBuildFileException ( + e.location, + "<library> is not a valid sub-element of <if>" ); libraries.push_back ( new Library ( e, *this, e.value ) ); subs_invalid = true; } @@ -109,36 +122,66 @@ } else if ( e.name == "include" ) { + if ( pIf ) + throw InvalidBuildFileException ( + e.location, + "<include> is not a valid sub-element of <if>" ); includes.push_back ( new Include ( project, this, e ) ); subs_invalid = true; } else if ( e.name == "define" ) { - defines.push_back ( new Define ( project, this, e ) ); + Define* pDefine = new Define ( project, this, e ); + if ( pIf ) + pIf->defines.push_back ( pDefine ); + else + defines.push_back ( pDefine ); subs_invalid = true; } else if ( e.name == "invoke" ) { + if ( pIf ) + throw InvalidBuildFileException ( + e.location, + "<invoke> is not a valid sub-element of <if>" ); invocations.push_back ( new Invoke ( e, *this ) ); subs_invalid = false; } else if ( e.name == "dependency" ) { + if ( pIf ) + throw InvalidBuildFileException ( + e.location, + "<dependency> is not a valid sub-element of <if>" ); dependencies.push_back ( new Dependency ( e, *this ) ); subs_invalid = true; } else if ( e.name == "importlibrary" ) { + if ( pIf ) + throw InvalidBuildFileException ( + e.location, + "<importlibrary> is not a valid sub-element of <if>" ); + if ( importLibrary ) + throw InvalidBuildFileException ( + e.location, + "Only one <importlibrary> is valid per module" ); importLibrary = new ImportLibrary ( e, *this ); subs_invalid = true; } + else if ( e.name == "if" ) + { + pIf = new If ( e, *this ); + ifs.push_back ( pIf ); + subs_invalid = false; + } if ( subs_invalid && e.subElements.size() > 0 ) throw InvalidBuildFileException ( e.location, "<%s> cannot have sub-elements", e.name.c_str() ); for ( size_t i = 0; i < e.subElements.size (); i++ ) - ProcessXMLSubElement ( *e.subElements[i], subpath ); + ProcessXMLSubElement ( *e.subElements[i], subpath, pIf ); } ModuleType @@ -188,14 +231,23 @@ string Module::GetDependencyPath () const { - if ( type == KernelModeDLL ) + switch ( type ) + { + case KernelModeDLL: return ssprintf ( "dk%snkm%slib%slib%s.a", SSEP, SSEP, SSEP, name.c_str () ); - else - return GetPath (); + case NativeDLL: + return ssprintf ( "dk%sw32%slib%slib%s.a", + SSEP, + SSEP, + SSEP, + name.c_str () ); + default: + return GetPath(); + } } string @@ -425,5 +477,36 @@ att = _node.GetAttribute ( "definition", true ); assert (att); - definition = att->value; + definition = FixSeparator(att->value); } + + +If::If ( const XMLElement& node_, const Module& module_ ) + : node(node_), module(module_) +{ + const XMLAttribute* att; + + att = node.GetAttribute ( "property", true ); + assert(att); + property = att->value; + + att = node.GetAttribute ( "value", true ); + assert(att); + value = att->value; +} + +If::~If () +{ + size_t i; + for ( i = 0; i < files.size(); i++ ) + delete files[i]; + for ( i = 0; i < defines.size(); i++ ) + delete defines[i]; + for ( i = 0; i < ifs.size(); i++ ) + delete ifs[i]; +} + +void +If::ProcessXML() +{ +} _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-12 05:01:49 UTC (rev 12943) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-01-12 06:02:58 UTC (rev 12944) @@ -31,6 +31,7 @@ class InvokeFile; class Dependency; class ImportLibrary; +class If; class Project { @@ -86,6 +87,7 @@ std::vector<Define*> defines; std::vector<Invoke*> invocations; std::vector<Dependency*> dependencies; + std::vector<If*> ifs; Module ( const Project& project, const XMLElement& moduleNode, @@ -104,7 +106,8 @@ private: std::string GetDefaultModuleExtension () const; void ProcessXMLSubElement ( const XMLElement& e, - const std::string& path ); + const std::string& path, + If* pIf = NULL ); }; @@ -239,6 +242,23 @@ void ProcessXML (); }; +class If +{ +public: + const XMLElement& node; + const Module& module; + std::string property, value; + std::vector<File*> files; + std::vector<Define*> defines; + std::vector<If*> ifs; + + If ( const XMLElement& node_, + const Module& module_ ); + ~If(); + + void ProcessXML(); +}; + extern std::string FixSeparator ( const std::string& s );
19 years, 10 months
1
0
0
0
[royce] 12943: bugfix - patch by filip navara
by royce@svn.reactos.com
bugfix - patch by filip navara Modified: branches/xmlbuildsystem/reactos/tools/rbuild/makefile _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/makefile --- branches/xmlbuildsystem/reactos/tools/rbuild/makefile 2005-01-11 23:31:58 UTC (rev 12942) +++ branches/xmlbuildsystem/reactos/tools/rbuild/makefile 2005-01-12 05:01:49 UTC (rev 12943) @@ -5,12 +5,12 @@ all: $(TARGET) BACKEND_MINGW_BASE_OBJECTS = \ - backend/mingw/mingw.cpp \ - backend/mingw/modulehandler.cpp + backend/mingw/mingw.o \ + backend/mingw/modulehandler.o BACKEND_BASE_OBJECTS = \ $(BACKEND_MINGW_BASE_OBJECTS) \ - backend/backend.cpp + backend/backend.o BASE_OBJECTS = \ $(BACKEND_BASE_OBJECTS) \
19 years, 10 months
1
0
0
0
[gdalsnes] 12942: -move alert stuff into own file
by gdalsnes@svn.reactos.com
-move alert stuff into own file -only use Thread->Alerted[0]. Alerted[1] is not used. -misc Modified: trunk/reactos/ntoskrnl/Makefile Added: trunk/reactos/ntoskrnl/ke/alert.c Modified: trunk/reactos/ntoskrnl/ke/apc.c Modified: trunk/reactos/ntoskrnl/ps/thread.c _____ Modified: trunk/reactos/ntoskrnl/Makefile --- trunk/reactos/ntoskrnl/Makefile 2005-01-11 23:19:40 UTC (rev 12941) +++ trunk/reactos/ntoskrnl/Makefile 2005-01-11 23:31:58 UTC (rev 12942) @@ -121,6 +121,7 @@ ke/spinlock.o \ ke/timer.o \ ke/wait.o \ + ke/alert.o # Memory Manager (Mm) OBJECTS_MM = \ _____ Added: trunk/reactos/ntoskrnl/ke/alert.c --- trunk/reactos/ntoskrnl/ke/alert.c 2005-01-11 23:19:40 UTC (rev 12941) +++ trunk/reactos/ntoskrnl/ke/alert.c 2005-01-11 23:31:58 UTC (rev 12942) @@ -0,0 +1,166 @@ +/* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/alert.c + * PURPOSE: Alerts + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + * PORTABILITY: Unchecked + * UPDATE HISTORY: + * Created 22/05/98 + */ + +/* INCLUDES *****************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <internal/debug.h> + +/* GLOBALS *******************************************************************/ + + +/* FUNCTIONS *****************************************************************/ + + +BOOLEAN +STDCALL +KeTestAlertThread(IN KPROCESSOR_MODE AlertMode) +/* + * FUNCTION: Tests whether there are any pending APCs for the current thread + * and if so the APCs will be delivered on exit from kernel mode + */ +{ + KIRQL OldIrql; + PKTHREAD Thread = KeGetCurrentThread(); + BOOLEAN OldState; + + ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); + + OldIrql = KeAcquireDispatcherDatabaseLock(); + KiAcquireSpinLock(&Thread->ApcQueueLock); + + /* NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of + * alerts _do_ seem useless. -Gunnar + */ + OldState = Thread->Alerted[0]; + + /* If the Thread is Alerted, Clear it */ + if (OldState) { + Thread->Alerted[0] = FALSE; + } else if ((AlertMode == UserMode) && (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) { + /* If the mode is User and the Queue isn't empty, set Pending */ + Thread->ApcState.UserApcPending = TRUE; + } + + KiReleaseSpinLock(&Thread->ApcQueueLock); + KeReleaseDispatcherDatabaseLock(OldIrql); + return OldState; +} + + +VOID +KeAlertThread(PKTHREAD Thread, KPROCESSOR_MODE AlertMode) +{ + KIRQL oldIrql; + + + oldIrql = KeAcquireDispatcherDatabaseLock(); + + + /* Return if thread is already alerted. + * NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of + * alerts _do_ seem useless. -Gunnar + */ + if (Thread->Alerted[0] == FALSE) + { + Thread->Alerted[0] = TRUE; + + if (Thread->State == THREAD_STATE_BLOCKED && + Thread->WaitMode == AlertMode && + Thread->Alertable) + { + KiAbortWaitThread(Thread, STATUS_ALERTED); + } + } + + KeReleaseDispatcherDatabaseLock(oldIrql); + +} + + +/* + * + * NOT EXPORTED + */ +NTSTATUS STDCALL +NtAlertResumeThread(IN HANDLE ThreadHandle, + OUT PULONG SuspendCount) +{ + UNIMPLEMENTED; + return(STATUS_NOT_IMPLEMENTED); + +} + +/* + * @implemented + * + * EXPORTED + */ +NTSTATUS STDCALL +NtAlertThread (IN HANDLE ThreadHandle) +{ + PETHREAD Thread; + NTSTATUS Status; + + Status = ObReferenceObjectByHandle(ThreadHandle, + THREAD_SUSPEND_RESUME, + PsThreadType, + ExGetPreviousMode(), + (PVOID*)&Thread, + NULL); + if (!NT_SUCCESS(Status)) + { + return(Status); + } + + /* FIXME: should we always use UserMode here, even if the ntoskrnl exported + * ZwAlertThread was called? + * -Gunnar + */ + KeAlertThread((PKTHREAD)Thread, UserMode); + + ObDereferenceObject(Thread); + return(STATUS_SUCCESS); +} + + +/* + * NOT EXPORTED + */ +NTSTATUS +STDCALL +NtTestAlert(VOID) +{ + /* Check and Alert Thread if needed */ + if (KeTestAlertThread(KeGetPreviousMode())) { + return STATUS_ALERTED; + } else { + return STATUS_SUCCESS; + } +} _____ Modified: trunk/reactos/ntoskrnl/ke/apc.c --- trunk/reactos/ntoskrnl/ke/apc.c 2005-01-11 23:19:40 UTC (rev 12941) +++ trunk/reactos/ntoskrnl/ke/apc.c 2005-01-11 23:31:58 UTC (rev 12942) @@ -262,37 +262,6 @@ return(TRUE); } -BOOLEAN -STDCALL -KeTestAlertThread(IN KPROCESSOR_MODE AlertMode) -/* - * FUNCTION: Tests whether there are any pending APCs for the current thread - * and if so the APCs will be delivered on exit from kernel mode - */ -{ - KIRQL OldIrql; - PKTHREAD Thread = KeGetCurrentThread(); - BOOLEAN OldState; - - ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); - - OldIrql = KeAcquireDispatcherDatabaseLock(); - KiAcquireSpinLock(&Thread->ApcQueueLock); - - OldState = Thread->Alerted[(int)AlertMode]; - - /* If the Thread is Alerted, Clear it */ - if (OldState) { - Thread->Alerted[(int)AlertMode] = FALSE; - } else if ((AlertMode == UserMode) && (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) { - /* If the mode is User and the Queue isn't empty, set Pending */ - Thread->ApcState.UserApcPending = TRUE; - } - - KiReleaseSpinLock(&Thread->ApcQueueLock); - KeReleaseDispatcherDatabaseLock(OldIrql); - return OldState; -} /* * @implemented @@ -615,17 +584,6 @@ return Status; } -NTSTATUS -STDCALL -NtTestAlert(VOID) -{ - /* Check and Alert Thread if needed */ - if (KeTestAlertThread(KeGetPreviousMode())) { - return STATUS_ALERTED; - } else { - return STATUS_SUCCESS; - } -} static inline VOID RepairList(PLIST_ENTRY Original, PLIST_ENTRY Copy, _____ Modified: trunk/reactos/ntoskrnl/ps/thread.c --- trunk/reactos/ntoskrnl/ps/thread.c 2005-01-11 23:19:40 UTC (rev 12941) +++ trunk/reactos/ntoskrnl/ps/thread.c 2005-01-11 23:31:58 UTC (rev 12942) @@ -477,6 +477,8 @@ VOID PsUnblockThread(PETHREAD Thread, PNTSTATUS WaitStatus) { + ASSERT(Thread->WaitBlockList == NULL); + if (THREAD_STATE_TERMINATED_1 == Thread->Tcb.State || THREAD_STATE_TERMINATED_2 == Thread->Tcb.State) { @@ -965,44 +967,7 @@ } -NTSTATUS STDCALL -NtAlertResumeThread(IN HANDLE ThreadHandle, - OUT PULONG SuspendCount) -{ - UNIMPLEMENTED; - return(STATUS_NOT_IMPLEMENTED); -} - - -NTSTATUS STDCALL -NtAlertThread (IN HANDLE ThreadHandle) -{ - PETHREAD Thread; - NTSTATUS Status; - NTSTATUS ThreadStatus; - KIRQL oldIrql; - - Status = ObReferenceObjectByHandle(ThreadHandle, - THREAD_SUSPEND_RESUME, - PsThreadType, - UserMode, - (PVOID*)&Thread, - NULL); - if (Status != STATUS_SUCCESS) - { - return(Status); - } - - ThreadStatus = STATUS_ALERTED; - oldIrql = KeAcquireDispatcherDatabaseLock(); - (VOID)PsUnblockThread(Thread, &ThreadStatus); - KeReleaseDispatcherDatabaseLock(oldIrql); - - ObDereferenceObject(Thread); - return(STATUS_SUCCESS); -} - /********************************************************************** * NtOpenThread/4 *
19 years, 10 months
1
0
0
0
[gvg] 12941: Sync to Wine-20050111:
by gvg@svn.reactos.com
Sync to Wine-20050111: Mike McCormack <mike(a)codeweavers.com> - Add proxy authentication dialog. Michael Stefaniuc <mstefani(a)redhat.de> - Do not check for non NULL pointer before HeapFree'ing it. It's redundant. Modified: trunk/reactos/lib/mpr/mpr.rc Modified: trunk/reactos/lib/mpr/mpr_En.rc Modified: trunk/reactos/lib/mpr/mprres.h Modified: trunk/reactos/lib/mpr/nps.c Modified: trunk/reactos/lib/mpr/wnet.c _____ Modified: trunk/reactos/lib/mpr/mpr.rc --- trunk/reactos/lib/mpr/mpr.rc 2005-01-11 23:17:12 UTC (rev 12940) +++ trunk/reactos/lib/mpr/mpr.rc 2005-01-11 23:19:40 UTC (rev 12941) @@ -19,6 +19,7 @@ */ #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "mprres.h" #include "version.rc" _____ Modified: trunk/reactos/lib/mpr/mpr_En.rc --- trunk/reactos/lib/mpr/mpr_En.rc 2005-01-11 23:17:12 UTC (rev 12940) +++ trunk/reactos/lib/mpr/mpr_En.rc 2005-01-11 23:19:40 UTC (rev 12941) @@ -24,3 +24,23 @@ { IDS_ENTIRENETWORK "Entire Network" } + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter Network Password" +FONT 8, "Helv" +{ + LTEXT "Please enter your username and password:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 +/* LTEXT "Realm", -1, 40, 46, 50, 10 */ + LTEXT "User", -1, 40, 66, 50, 10 + LTEXT "Password", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Save this password (Insecure)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} _____ Modified: trunk/reactos/lib/mpr/mprres.h --- trunk/reactos/lib/mpr/mprres.h 2005-01-11 23:17:12 UTC (rev 12940) +++ trunk/reactos/lib/mpr/mprres.h 2005-01-11 23:19:40 UTC (rev 12941) @@ -20,4 +20,13 @@ #define IDS_ENTIRENETWORK 1 +#define IDD_PROXYDLG 0x400 + +#define IDC_PROXY 0x401 +#define IDC_REALM 0x402 +#define IDC_USERNAME 0x403 +#define IDC_PASSWORD 0x404 +#define IDC_SAVEPASSWORD 0x405 +#define IDC_EXPLAIN 0x406 + #endif /* ndef __WINE_MPRRES_H__ */ _____ Modified: trunk/reactos/lib/mpr/nps.c --- trunk/reactos/lib/mpr/nps.c 2005-01-11 23:17:12 UTC (rev 12940) +++ trunk/reactos/lib/mpr/nps.c 2005-01-11 23:19:40 UTC (rev 12941) @@ -2,6 +2,7 @@ * MPR Network Provider Services functions * * Copyright 1999 Ulrich Weigand + * Copyright 2004 Mike McCormack for CodeWeavers Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,24 +19,109 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include <stdarg.h> #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "winnetwk.h" #include "netspi.h" #include "wine/debug.h" +#include "winerror.h" WINE_DEFAULT_DEBUG_CHANNEL(mpr); +#include "wine/unicode.h" +#include "mprres.h" + +/********************************************************************** * + * NPS_ProxyPasswordDialog + */ +static INT_PTR WINAPI NPS_ProxyPasswordDialog( + HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + HWND hitem; + LPAUTHDLGSTRUCTA lpAuthDlgStruct; + + if( uMsg == WM_INITDIALOG ) + { + TRACE("WM_INITDIALOG (%08lx)\n", lParam); + + /* save the parameter list */ + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam; + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); + + if( lpAuthDlgStruct->lpExplainText ) + { + hitem = GetDlgItem( hdlg, IDC_EXPLAIN ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText ); + } + + /* extract the Realm from the proxy response and show it */ + if( lpAuthDlgStruct->lpResource ) + { + hitem = GetDlgItem( hdlg, IDC_REALM ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpResource ); + } + + return TRUE; + } + + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA ); + + switch( uMsg ) + { + case WM_COMMAND: + if( wParam == IDOK ) + { + WCHAR username[0x20], password[0x20]; + + username[0] = 0; + hitem = GetDlgItem( hdlg, IDC_USERNAME ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); + + password[0] = 0; + hitem = GetDlgItem( hdlg, IDC_PASSWORD ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); + + EndDialog( hdlg, WN_SUCCESS ); + return TRUE; + } + if( wParam == IDCANCEL ) + { + EndDialog( hdlg, WN_CANCEL ); + return TRUE; + } + break; + } + return FALSE; +} + /***************************************************************** * NPSAuthenticationDialogA [MPR.@] */ DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct ) { - FIXME( "(%p): stub\n", lpAuthDlgStruct ); - return WN_NOT_SUPPORTED; + HMODULE hwininet = GetModuleHandleA( "mpr.dll" ); + + TRACE("%p\n", lpAuthDlgStruct); + + if( !lpAuthDlgStruct ) + return WN_BAD_POINTER; + if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct ) + return WN_BAD_POINTER; + + TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource, + lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); + + return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), + lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, + (LPARAM) lpAuthDlgStruct ); } /***************************************************************** _____ Modified: trunk/reactos/lib/mpr/wnet.c --- trunk/reactos/lib/mpr/wnet.c 2005-01-11 23:17:12 UTC (rev 12940) +++ trunk/reactos/lib/mpr/wnet.c 2005-01-11 23:19:40 UTC (rev 12941) @@ -198,8 +198,7 @@ { WARN("Provider %s didn't export NPGetCaps\n", debugstr_w(provider)); - if (name) - HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, name); FreeLibrary(hLib); } } @@ -312,8 +311,7 @@ HeapFree(GetProcessHeap(), 0, providerTable->table[i].name); FreeModule(providerTable->table[i].hLib); } - if (providerTable->entireNetwork) - HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); + HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); HeapFree(GetProcessHeap(), 0, providerTable); providerTable = NULL; } @@ -372,8 +370,7 @@ { if (lpNet) { - if (lpNet->lpRemoteName) - HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); + HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); HeapFree(GetProcessHeap(), 0, lpNet); } }
19 years, 10 months
1
0
0
0
[gvg] 12940: Wine-20050111 vendor drop
by gvg@svn.reactos.com
Wine-20050111 vendor drop Added: vendor/wine/dlls/mpr/Wine-20050111/ Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr.rc Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr_En.rc Modified: vendor/wine/dlls/mpr/Wine-20050111/mprres.h Modified: vendor/wine/dlls/mpr/Wine-20050111/nps.c Modified: vendor/wine/dlls/mpr/Wine-20050111/wnet.c Modified: vendor/wine/dlls/mpr/current/mpr.rc Modified: vendor/wine/dlls/mpr/current/mpr_En.rc Modified: vendor/wine/dlls/mpr/current/mprres.h Modified: vendor/wine/dlls/mpr/current/nps.c Modified: vendor/wine/dlls/mpr/current/wnet.c _____ Copied: vendor/wine/dlls/mpr/Wine-20050111 (from rev 12927, vendor/wine/dlls/mpr/current) _____ Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr.rc --- vendor/wine/dlls/mpr/current/mpr.rc 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/mpr.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -19,6 +19,7 @@ */ #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "mprres.h" #include "version.rc" _____ Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr_En.rc --- vendor/wine/dlls/mpr/current/mpr_En.rc 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/mpr_En.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -24,3 +24,23 @@ { IDS_ENTIRENETWORK "Entire Network" } + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter Network Password" +FONT 8, "Helv" +{ + LTEXT "Please enter your username and password:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 +/* LTEXT "Realm", -1, 40, 46, 50, 10 */ + LTEXT "User", -1, 40, 66, 50, 10 + LTEXT "Password", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Save this password (Insecure)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} _____ Modified: vendor/wine/dlls/mpr/Wine-20050111/mprres.h --- vendor/wine/dlls/mpr/current/mprres.h 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/mprres.h 2005-01-11 23:17:12 UTC (rev 12940) @@ -20,4 +20,13 @@ #define IDS_ENTIRENETWORK 1 +#define IDD_PROXYDLG 0x400 + +#define IDC_PROXY 0x401 +#define IDC_REALM 0x402 +#define IDC_USERNAME 0x403 +#define IDC_PASSWORD 0x404 +#define IDC_SAVEPASSWORD 0x405 +#define IDC_EXPLAIN 0x406 + #endif /* ndef __WINE_MPRRES_H__ */ _____ Modified: vendor/wine/dlls/mpr/Wine-20050111/nps.c --- vendor/wine/dlls/mpr/current/nps.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/nps.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -2,6 +2,7 @@ * MPR Network Provider Services functions * * Copyright 1999 Ulrich Weigand + * Copyright 2004 Mike McCormack for CodeWeavers Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,24 +19,109 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include <stdarg.h> #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "winnetwk.h" #include "netspi.h" #include "wine/debug.h" +#include "winerror.h" WINE_DEFAULT_DEBUG_CHANNEL(mpr); +#include "wine/unicode.h" +#include "mprres.h" + +/********************************************************************** * + * NPS_ProxyPasswordDialog + */ +static INT_PTR WINAPI NPS_ProxyPasswordDialog( + HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + HWND hitem; + LPAUTHDLGSTRUCTA lpAuthDlgStruct; + + if( uMsg == WM_INITDIALOG ) + { + TRACE("WM_INITDIALOG (%08lx)\n", lParam); + + /* save the parameter list */ + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam; + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); + + if( lpAuthDlgStruct->lpExplainText ) + { + hitem = GetDlgItem( hdlg, IDC_EXPLAIN ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText ); + } + + /* extract the Realm from the proxy response and show it */ + if( lpAuthDlgStruct->lpResource ) + { + hitem = GetDlgItem( hdlg, IDC_REALM ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpResource ); + } + + return TRUE; + } + + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA ); + + switch( uMsg ) + { + case WM_COMMAND: + if( wParam == IDOK ) + { + WCHAR username[0x20], password[0x20]; + + username[0] = 0; + hitem = GetDlgItem( hdlg, IDC_USERNAME ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); + + password[0] = 0; + hitem = GetDlgItem( hdlg, IDC_PASSWORD ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); + + EndDialog( hdlg, WN_SUCCESS ); + return TRUE; + } + if( wParam == IDCANCEL ) + { + EndDialog( hdlg, WN_CANCEL ); + return TRUE; + } + break; + } + return FALSE; +} + /***************************************************************** * NPSAuthenticationDialogA [MPR.@] */ DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct ) { - FIXME( "(%p): stub\n", lpAuthDlgStruct ); - return WN_NOT_SUPPORTED; + HMODULE hwininet = GetModuleHandleA( "mpr.dll" ); + + TRACE("%p\n", lpAuthDlgStruct); + + if( !lpAuthDlgStruct ) + return WN_BAD_POINTER; + if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct ) + return WN_BAD_POINTER; + + TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource, + lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); + + return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), + lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, + (LPARAM) lpAuthDlgStruct ); } /***************************************************************** _____ Modified: vendor/wine/dlls/mpr/Wine-20050111/wnet.c --- vendor/wine/dlls/mpr/current/wnet.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/wnet.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -197,8 +197,7 @@ { WARN("Provider %s didn't export NPGetCaps\n", debugstr_w(provider)); - if (name) - HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, name); FreeLibrary(hLib); } } @@ -311,8 +310,7 @@ HeapFree(GetProcessHeap(), 0, providerTable->table[i].name); FreeModule(providerTable->table[i].hLib); } - if (providerTable->entireNetwork) - HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); + HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); HeapFree(GetProcessHeap(), 0, providerTable); providerTable = NULL; } @@ -371,8 +369,7 @@ { if (lpNet) { - if (lpNet->lpRemoteName) - HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); + HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); HeapFree(GetProcessHeap(), 0, lpNet); } } _____ Modified: vendor/wine/dlls/mpr/current/mpr.rc --- vendor/wine/dlls/mpr/current/mpr.rc 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/mpr.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -19,6 +19,7 @@ */ #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "mprres.h" #include "version.rc" _____ Modified: vendor/wine/dlls/mpr/current/mpr_En.rc --- vendor/wine/dlls/mpr/current/mpr_En.rc 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/mpr_En.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -24,3 +24,23 @@ { IDS_ENTIRENETWORK "Entire Network" } + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter Network Password" +FONT 8, "Helv" +{ + LTEXT "Please enter your username and password:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 +/* LTEXT "Realm", -1, 40, 46, 50, 10 */ + LTEXT "User", -1, 40, 66, 50, 10 + LTEXT "Password", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Save this password (Insecure)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} _____ Modified: vendor/wine/dlls/mpr/current/mprres.h --- vendor/wine/dlls/mpr/current/mprres.h 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/mprres.h 2005-01-11 23:17:12 UTC (rev 12940) @@ -20,4 +20,13 @@ #define IDS_ENTIRENETWORK 1 +#define IDD_PROXYDLG 0x400 + +#define IDC_PROXY 0x401 +#define IDC_REALM 0x402 +#define IDC_USERNAME 0x403 +#define IDC_PASSWORD 0x404 +#define IDC_SAVEPASSWORD 0x405 +#define IDC_EXPLAIN 0x406 + #endif /* ndef __WINE_MPRRES_H__ */ _____ Modified: vendor/wine/dlls/mpr/current/nps.c --- vendor/wine/dlls/mpr/current/nps.c 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/nps.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -2,6 +2,7 @@ * MPR Network Provider Services functions * * Copyright 1999 Ulrich Weigand + * Copyright 2004 Mike McCormack for CodeWeavers Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,24 +19,109 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include <stdarg.h> #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "winnetwk.h" #include "netspi.h" #include "wine/debug.h" +#include "winerror.h" WINE_DEFAULT_DEBUG_CHANNEL(mpr); +#include "wine/unicode.h" +#include "mprres.h" + +/********************************************************************** * + * NPS_ProxyPasswordDialog + */ +static INT_PTR WINAPI NPS_ProxyPasswordDialog( + HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + HWND hitem; + LPAUTHDLGSTRUCTA lpAuthDlgStruct; + + if( uMsg == WM_INITDIALOG ) + { + TRACE("WM_INITDIALOG (%08lx)\n", lParam); + + /* save the parameter list */ + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam; + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); + + if( lpAuthDlgStruct->lpExplainText ) + { + hitem = GetDlgItem( hdlg, IDC_EXPLAIN ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText ); + } + + /* extract the Realm from the proxy response and show it */ + if( lpAuthDlgStruct->lpResource ) + { + hitem = GetDlgItem( hdlg, IDC_REALM ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpResource ); + } + + return TRUE; + } + + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA ); + + switch( uMsg ) + { + case WM_COMMAND: + if( wParam == IDOK ) + { + WCHAR username[0x20], password[0x20]; + + username[0] = 0; + hitem = GetDlgItem( hdlg, IDC_USERNAME ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); + + password[0] = 0; + hitem = GetDlgItem( hdlg, IDC_PASSWORD ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); + + EndDialog( hdlg, WN_SUCCESS ); + return TRUE; + } + if( wParam == IDCANCEL ) + { + EndDialog( hdlg, WN_CANCEL ); + return TRUE; + } + break; + } + return FALSE; +} + /***************************************************************** * NPSAuthenticationDialogA [MPR.@] */ DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct ) { - FIXME( "(%p): stub\n", lpAuthDlgStruct ); - return WN_NOT_SUPPORTED; + HMODULE hwininet = GetModuleHandleA( "mpr.dll" ); + + TRACE("%p\n", lpAuthDlgStruct); + + if( !lpAuthDlgStruct ) + return WN_BAD_POINTER; + if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct ) + return WN_BAD_POINTER; + + TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource, + lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); + + return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), + lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, + (LPARAM) lpAuthDlgStruct ); } /***************************************************************** _____ Modified: vendor/wine/dlls/mpr/current/wnet.c --- vendor/wine/dlls/mpr/current/wnet.c 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/wnet.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -197,8 +197,7 @@ { WARN("Provider %s didn't export NPGetCaps\n", debugstr_w(provider)); - if (name) - HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, name); FreeLibrary(hLib); } } @@ -311,8 +310,7 @@ HeapFree(GetProcessHeap(), 0, providerTable->table[i].name); FreeModule(providerTable->table[i].hLib); } - if (providerTable->entireNetwork) - HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); + HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); HeapFree(GetProcessHeap(), 0, providerTable); providerTable = NULL; } @@ -371,8 +369,7 @@ { if (lpNet) { - if (lpNet->lpRemoteName) - HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); + HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); HeapFree(GetProcessHeap(), 0, lpNet); } }
19 years, 10 months
1
0
0
0
[gvg] 12939: Wine-20051011 vendor drop
by gvg@svn.reactos.com
Wine-20051011 vendor drop Added: vendor/wine/dlls/icmp/Wine-20050111/ _____ Copied: vendor/wine/dlls/icmp/Wine-20050111 (from rev 12927, vendor/wine/dlls/icmp/current)
19 years, 10 months
1
0
0
0
[gvg] 12938: Wine-20050111 vendor drop
by gvg@svn.reactos.com
Wine-20050111 vendor drop Added: vendor/wine/dlls/dinput8/Wine-20050111/ _____ Copied: vendor/wine/dlls/dinput8/Wine-20050111 (from rev 12927, vendor/wine/dlls/dinput8/current)
19 years, 10 months
1
0
0
0
[gvg] 12937: Sync to Wine-20050111:
by gvg@svn.reactos.com
Sync to Wine-20050111: Michael Stefaniuc <mstefani(a)redhat.de> - Do not check for non NULL pointer before HeapFree'ing it. It's redundant. Christian Costa <titan.costa(a)wanadoo.fr> - Handle device class in DX8 enumeration (found by Robert Reif). - Fixed remaining DX8 device types. - Factorized a bit GetCapabilities for keyboard and mouse. - Fixed enumeration of joysticks in DX8. - Fixed some traces. Francois Gouget <fgouget(a)free.fr> - Assorted spelling fixes. Neil Olver <olver(a)math.mcgill.ca> - The flag for a mouse button down in the structure returned by GetDeviceState should be 0x80 (only the high bit set), not 0xff. Modified: trunk/reactos/lib/dinput/dinput_main.c Modified: trunk/reactos/lib/dinput/joystick_linux.c Modified: trunk/reactos/lib/dinput/joystick_linuxinput.c Modified: trunk/reactos/lib/dinput/keyboard.c Modified: trunk/reactos/lib/dinput/mouse.c _____ Modified: trunk/reactos/lib/dinput/dinput_main.c --- trunk/reactos/lib/dinput/dinput_main.c 2005-01-11 23:06:20 UTC (rev 12936) +++ trunk/reactos/lib/dinput/dinput_main.c 2005-01-11 23:11:18 UTC (rev 12937) @@ -744,13 +744,13 @@ HRESULT WINAPI DINPUT_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { - TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) { *ppv = (LPVOID)&DINPUT_CF; IClassFactory_AddRef((IClassFactory*)*ppv); return S_OK; } - FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } _____ Modified: trunk/reactos/lib/dinput/joystick_linux.c --- trunk/reactos/lib/dinput/joystick_linux.c 2005-01-11 23:06:20 UTC (rev 12936) +++ trunk/reactos/lib/dinput/joystick_linux.c 2005-01-11 23:11:18 UTC (rev 12937) @@ -157,7 +157,9 @@ return FALSE; } - if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { + if ((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8))) { /* check whether we have a joystick */ sprintf(dev, "%s%d", JOYDEV, id); if ((fd = open(dev,O_RDONLY)) < 0) { @@ -205,7 +207,9 @@ return FALSE; } - if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { + if ((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8))) { /* check whether we have a joystick */ sprintf(dev, "%s%d", JOYDEV, id); if ((fd = open(dev,O_RDONLY)) < 0) { @@ -552,7 +556,10 @@ newDevice->devcaps.dwSize = sizeof(newDevice->devcaps); newDevice->devcaps.dwFlags = DIDC_ATTACHED; - newDevice->devcaps.dwDevType = DIDEVTYPE_JOYSTICK; + if (newDevice->dinput->version >= 8) + newDevice->devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + newDevice->devcaps.dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); newDevice->devcaps.dwFFSamplePeriod = 0; newDevice->devcaps.dwFFMinTimeResolution = 0; newDevice->devcaps.dwFirmwareRevision = 0; @@ -573,18 +580,12 @@ FAILED: hr = DIERR_OUTOFMEMORY; FAILED1: - if (newDevice->axis_map) - HeapFree(GetProcessHeap(),0,newDevice->axis_map); - if (newDevice->name) - HeapFree(GetProcessHeap(),0,newDevice->name); - if (newDevice->props) - HeapFree(GetProcessHeap(),0,newDevice->props); - if (newDevice->user_df->rgodf) - HeapFree(GetProcessHeap(),0,newDevice->user_df->rgodf); - if (newDevice->user_df) - HeapFree(GetProcessHeap(),0,newDevice->user_df); - if (newDevice) - HeapFree(GetProcessHeap(),0,newDevice); + HeapFree(GetProcessHeap(),0,newDevice->axis_map); + HeapFree(GetProcessHeap(),0,newDevice->name); + HeapFree(GetProcessHeap(),0,newDevice->props); + HeapFree(GetProcessHeap(),0,newDevice->user_df->rgodf); + HeapFree(GetProcessHeap(),0,newDevice->user_df); + HeapFree(GetProcessHeap(),0,newDevice); *pdev = 0; return hr; @@ -671,16 +672,13 @@ return ref; /* Free the device name */ - if (This->name) - HeapFree(GetProcessHeap(),0,This->name); + HeapFree(GetProcessHeap(),0,This->name); /* Free the axis map */ - if (This->axis_map) - HeapFree(GetProcessHeap(),0,This->axis_map); + HeapFree(GetProcessHeap(),0,This->axis_map); /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); /* Free the DataFormat */ HeapFree(GetProcessHeap(), 0, This->user_df->rgodf); @@ -764,12 +762,9 @@ FAILED: WARN("out of memory\n"); - if (new_props) - HeapFree(GetProcessHeap(),0,new_props); - if (new_rgodf) - HeapFree(GetProcessHeap(),0,new_rgodf); - if (new_df) - HeapFree(GetProcessHeap(),0,new_df); + HeapFree(GetProcessHeap(),0,new_props); + HeapFree(GetProcessHeap(),0,new_rgodf); + HeapFree(GetProcessHeap(),0,new_df); return DIERR_OUTOFMEMORY; } @@ -1580,10 +1575,7 @@ pdidi->guidInstance = GUID_Joystick; pdidi->guidProduct = DInput_Wine_Joystick_GUID; /* we only support traditional joysticks for now */ - if (This->dinput->version >= 8) - pdidi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - pdidi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + pdidi->dwDevType = This->devcaps.dwDevType; strcpy(pdidi->tszInstanceName, "Joystick"); strcpy(pdidi->tszProductName, This->name); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3A)) { @@ -1618,10 +1610,7 @@ pdidi->guidInstance = GUID_Joystick; pdidi->guidProduct = DInput_Wine_Joystick_GUID; /* we only support traditional joysticks for now */ - if (This->dinput->version >= 8) - pdidi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - pdidi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + pdidi->dwDevType = This->devcaps.dwDevType; MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, pdidi->tszInstanceName, MAX_PATH); MultiByteToWideChar(CP_ACP, 0, This->name, -1, pdidi->tszProductName, MAX_PATH); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3W)) { _____ Modified: trunk/reactos/lib/dinput/joystick_linuxinput.c --- trunk/reactos/lib/dinput/joystick_linuxinput.c 2005-01-11 23:06:20 UTC (rev 12936) +++ trunk/reactos/lib/dinput/joystick_linuxinput.c 2005-01-11 23:11:18 UTC (rev 12937) @@ -175,8 +175,10 @@ if (id != 0) return FALSE; - if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK)) - return FALSE; + if (!((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8)))) + return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) return FALSE; @@ -211,8 +213,10 @@ if (id != 0) return FALSE; - if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK)) - return FALSE; + if (!((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8)))) + return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) return FALSE; @@ -229,7 +233,10 @@ lpddi->guidProduct = DInput_Wine_Joystick_GUID; lpddi->guidFFDriver = GUID_NULL; - lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL<<8); + if (version >= 8) + lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, lpddi->tszInstanceName, MAX_PATH); /* ioctl JSIOCGNAME(len) */ @@ -339,8 +346,7 @@ return ref; /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); /* Free the DataFormat */ HeapFree(GetProcessHeap(), 0, This->df); @@ -756,7 +762,10 @@ wasacquired = 0; } lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK; + if (This->dinput->version >= 8) + lpDIDevCaps->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); axes=0; for (i=0;i<ABS_MAX;i++) if (test_bit(This->absbits,i)) axes++; _____ Modified: trunk/reactos/lib/dinput/keyboard.c --- trunk/reactos/lib/dinput/keyboard.c 2005-01-11 23:06:20 UTC (rev 12936) +++ trunk/reactos/lib/dinput/keyboard.c 2005-01-11 23:11:18 UTC (rev 12937) @@ -266,7 +266,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_KEYBOARD) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 8))) { TRACE("Enumerating the Keyboard device\n"); fill_keyboard_dideviceinstanceA(lpddi, version); @@ -284,7 +284,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_KEYBOARD) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 8))) { TRACE("Enumerating the Keyboard device\n"); fill_keyboard_dideviceinstanceW(lpddi, version); @@ -387,8 +387,7 @@ #endif /* Free the data queue */ - if (This->buffer != NULL) - HeapFree(GetProcessHeap(),0,This->buffer); + HeapFree(GetProcessHeap(),0,This->buffer); DeleteCriticalSection(&(This->crit)); @@ -649,36 +648,34 @@ LPDIRECTINPUTDEVICE8A iface, LPDIDEVCAPS lpDIDevCaps) { - SysKeyboardImpl *This = (SysKeyboardImpl *)iface; + SysKeyboardImpl *This = (SysKeyboardImpl *)iface; + DIDEVCAPS devcaps; - TRACE("(this=%p,%p)\n",This,lpDIDevCaps); + TRACE("(this=%p,%p)\n",This,lpDIDevCaps); - if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; + if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { + WARN("invalid parameter\n"); + return DIERR_INVALIDPARAM; + } + + devcaps.dwSize = lpDIDevCaps->dwSize; + devcaps.dwFlags = DIDC_ATTACHED; if (This->dinput->version >= 8) - lpDIDevCaps->dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); + devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); else - lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); - lpDIDevCaps->dwAxes = 0; - lpDIDevCaps->dwButtons = 256; - lpDIDevCaps->dwPOVs = 0; - lpDIDevCaps->dwFFSamplePeriod = 0; - lpDIDevCaps->dwFFMinTimeResolution = 0; - lpDIDevCaps->dwFirmwareRevision = 100; - lpDIDevCaps->dwHardwareRevision = 100; - lpDIDevCaps->dwFFDriverVersion = 0; - } else if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS_DX3)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); - lpDIDevCaps->dwAxes = 0; - lpDIDevCaps->dwButtons = 256; - lpDIDevCaps->dwPOVs = 0; - } else { - WARN("invalid parameter\n"); - return DIERR_INVALIDPARAM; - } + devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); + devcaps.dwAxes = 0; + devcaps.dwButtons = 256; + devcaps.dwPOVs = 0; + devcaps.dwFFSamplePeriod = 0; + devcaps.dwFFMinTimeResolution = 0; + devcaps.dwFirmwareRevision = 100; + devcaps.dwHardwareRevision = 100; + devcaps.dwFFDriverVersion = 0; - return DI_OK; + memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); + + return DI_OK; } /*********************************************************************** ******* _____ Modified: trunk/reactos/lib/dinput/mouse.c --- trunk/reactos/lib/dinput/mouse.c 2005-01-11 23:06:20 UTC (rev 12936) +++ trunk/reactos/lib/dinput/mouse.c 2005-01-11 23:11:18 UTC (rev 12937) @@ -220,7 +220,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_MOUSE) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 8))) { TRACE("Enumerating the mouse device\n"); fill_mouse_dideviceinstanceA(lpddi, version); @@ -238,7 +238,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_MOUSE) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 8))) { TRACE("Enumerating the mouse device\n"); fill_mouse_dideviceinstanceW(lpddi, version); @@ -351,8 +351,7 @@ return ref; /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); #ifndef __REACTOS__ if (This->hook) { @@ -458,7 +457,7 @@ /* Only allow mouse events every 10 ms. * This is to allow the cursor to start acceleration before * the warps happen. But if it involves a mouse button event we - * allow it since we don't want to loose the clicks. + * allow it since we don't want to lose the clicks. */ if (((GetCurrentTime() - last_event) < 10) && wparam == WM_MOUSEMOVE) @@ -527,9 +526,9 @@ switch(wparam) { case WM_LBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[0] = 0xFF; + This->m_state.rgbButtons[0] = 0x80; break; case WM_LBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x00, @@ -537,9 +536,9 @@ This->m_state.rgbButtons[0] = 0x00; break; case WM_RBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[1] = 0xFF; + This->m_state.rgbButtons[1] = 0x80; break; case WM_RBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x00, @@ -547,9 +546,9 @@ This->m_state.rgbButtons[1] = 0x00; break; case WM_MBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[2] = 0xFF; + This->m_state.rgbButtons[2] = 0x80; break; case WM_MBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x00, @@ -1115,33 +1114,31 @@ LPDIDEVCAPS lpDIDevCaps) { SysMouseImpl *This = (SysMouseImpl *)iface; - + DIDEVCAPS devcaps; + TRACE("(this=%p,%p)\n",This,lpDIDevCaps); - - if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - if (This->dinput->version >= 8) - lpDIDevCaps->dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); - else - lpDIDevCaps->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); - lpDIDevCaps->dwAxes = 3; - lpDIDevCaps->dwButtons = 3; - lpDIDevCaps->dwPOVs = 0; - lpDIDevCaps->dwFFSamplePeriod = 0; - lpDIDevCaps->dwFFMinTimeResolution = 0; - lpDIDevCaps->dwFirmwareRevision = 100; - lpDIDevCaps->dwHardwareRevision = 100; - lpDIDevCaps->dwFFDriverVersion = 0; - } else if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS_DX3)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); - lpDIDevCaps->dwAxes = 3; - lpDIDevCaps->dwButtons = 3; - lpDIDevCaps->dwPOVs = 0; - } else { + + if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { WARN("invalid parameter\n"); return DIERR_INVALIDPARAM; } + + devcaps.dwSize = lpDIDevCaps->dwSize; + devcaps.dwFlags = DIDC_ATTACHED; + if (This->dinput->version >= 8) + devcaps.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); + else + devcaps.dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); + devcaps.dwAxes = 3; + devcaps.dwButtons = 3; + devcaps.dwPOVs = 0; + devcaps.dwFFSamplePeriod = 0; + devcaps.dwFFMinTimeResolution = 0; + devcaps.dwFirmwareRevision = 100; + devcaps.dwHardwareRevision = 100; + devcaps.dwFFDriverVersion = 0; + + memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); return DI_OK; }
19 years, 10 months
1
0
0
0
[gvg] 12936: Wine-20051011 vendor drop
by gvg@svn.reactos.com
Wine-20051011 vendor drop Added: vendor/wine/dlls/dinput/Wine-20050111/ Modified: vendor/wine/dlls/dinput/Wine-20050111/dinput_main.c Modified: vendor/wine/dlls/dinput/Wine-20050111/joystick_linux.c Modified: vendor/wine/dlls/dinput/Wine-20050111/joystick_linuxinput.c Modified: vendor/wine/dlls/dinput/Wine-20050111/keyboard.c Modified: vendor/wine/dlls/dinput/Wine-20050111/mouse.c Modified: vendor/wine/dlls/dinput/current/dinput_main.c Modified: vendor/wine/dlls/dinput/current/joystick_linux.c Modified: vendor/wine/dlls/dinput/current/joystick_linuxinput.c Modified: vendor/wine/dlls/dinput/current/keyboard.c Modified: vendor/wine/dlls/dinput/current/mouse.c _____ Copied: vendor/wine/dlls/dinput/Wine-20050111 (from rev 12927, vendor/wine/dlls/dinput/current) _____ Modified: vendor/wine/dlls/dinput/Wine-20050111/dinput_main.c --- vendor/wine/dlls/dinput/current/dinput_main.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/dinput/Wine-20050111/dinput_main.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -704,13 +704,13 @@ HRESULT WINAPI DINPUT_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { - TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) { *ppv = (LPVOID)&DINPUT_CF; IClassFactory_AddRef((IClassFactory*)*ppv); return S_OK; } - FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } _____ Modified: vendor/wine/dlls/dinput/Wine-20050111/joystick_linux.c --- vendor/wine/dlls/dinput/current/joystick_linux.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/dinput/Wine-20050111/joystick_linux.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -157,7 +157,9 @@ return FALSE; } - if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { + if ((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8))) { /* check whether we have a joystick */ sprintf(dev, "%s%d", JOYDEV, id); if ((fd = open(dev,O_RDONLY)) < 0) { @@ -205,7 +207,9 @@ return FALSE; } - if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { + if ((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8))) { /* check whether we have a joystick */ sprintf(dev, "%s%d", JOYDEV, id); if ((fd = open(dev,O_RDONLY)) < 0) { @@ -552,7 +556,10 @@ newDevice->devcaps.dwSize = sizeof(newDevice->devcaps); newDevice->devcaps.dwFlags = DIDC_ATTACHED; - newDevice->devcaps.dwDevType = DIDEVTYPE_JOYSTICK; + if (newDevice->dinput->version >= 8) + newDevice->devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + newDevice->devcaps.dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); newDevice->devcaps.dwFFSamplePeriod = 0; newDevice->devcaps.dwFFMinTimeResolution = 0; newDevice->devcaps.dwFirmwareRevision = 0; @@ -573,18 +580,12 @@ FAILED: hr = DIERR_OUTOFMEMORY; FAILED1: - if (newDevice->axis_map) - HeapFree(GetProcessHeap(),0,newDevice->axis_map); - if (newDevice->name) - HeapFree(GetProcessHeap(),0,newDevice->name); - if (newDevice->props) - HeapFree(GetProcessHeap(),0,newDevice->props); - if (newDevice->user_df->rgodf) - HeapFree(GetProcessHeap(),0,newDevice->user_df->rgodf); - if (newDevice->user_df) - HeapFree(GetProcessHeap(),0,newDevice->user_df); - if (newDevice) - HeapFree(GetProcessHeap(),0,newDevice); + HeapFree(GetProcessHeap(),0,newDevice->axis_map); + HeapFree(GetProcessHeap(),0,newDevice->name); + HeapFree(GetProcessHeap(),0,newDevice->props); + HeapFree(GetProcessHeap(),0,newDevice->user_df->rgodf); + HeapFree(GetProcessHeap(),0,newDevice->user_df); + HeapFree(GetProcessHeap(),0,newDevice); *pdev = 0; return hr; @@ -669,16 +670,13 @@ return ref; /* Free the device name */ - if (This->name) - HeapFree(GetProcessHeap(),0,This->name); + HeapFree(GetProcessHeap(),0,This->name); /* Free the axis map */ - if (This->axis_map) - HeapFree(GetProcessHeap(),0,This->axis_map); + HeapFree(GetProcessHeap(),0,This->axis_map); /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); /* Free the DataFormat */ HeapFree(GetProcessHeap(), 0, This->user_df->rgodf); @@ -762,12 +760,9 @@ FAILED: WARN("out of memory\n"); - if (new_props) - HeapFree(GetProcessHeap(),0,new_props); - if (new_rgodf) - HeapFree(GetProcessHeap(),0,new_rgodf); - if (new_df) - HeapFree(GetProcessHeap(),0,new_df); + HeapFree(GetProcessHeap(),0,new_props); + HeapFree(GetProcessHeap(),0,new_rgodf); + HeapFree(GetProcessHeap(),0,new_df); return DIERR_OUTOFMEMORY; } @@ -1578,10 +1573,7 @@ pdidi->guidInstance = GUID_Joystick; pdidi->guidProduct = DInput_Wine_Joystick_GUID; /* we only support traditional joysticks for now */ - if (This->dinput->version >= 8) - pdidi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - pdidi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + pdidi->dwDevType = This->devcaps.dwDevType; strcpy(pdidi->tszInstanceName, "Joystick"); strcpy(pdidi->tszProductName, This->name); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3A)) { @@ -1616,10 +1608,7 @@ pdidi->guidInstance = GUID_Joystick; pdidi->guidProduct = DInput_Wine_Joystick_GUID; /* we only support traditional joysticks for now */ - if (This->dinput->version >= 8) - pdidi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - pdidi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + pdidi->dwDevType = This->devcaps.dwDevType; MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, pdidi->tszInstanceName, MAX_PATH); MultiByteToWideChar(CP_ACP, 0, This->name, -1, pdidi->tszProductName, MAX_PATH); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3W)) { _____ Modified: vendor/wine/dlls/dinput/Wine-20050111/joystick_linuxinput.c --- vendor/wine/dlls/dinput/current/joystick_linuxinput.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/dinput/Wine-20050111/joystick_linuxinput.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -175,8 +175,10 @@ if (id != 0) return FALSE; - if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK)) - return FALSE; + if (!((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8)))) + return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) return FALSE; @@ -211,8 +213,10 @@ if (id != 0) return FALSE; - if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK)) - return FALSE; + if (!((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8)))) + return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) return FALSE; @@ -229,7 +233,10 @@ lpddi->guidProduct = DInput_Wine_Joystick_GUID; lpddi->guidFFDriver = GUID_NULL; - lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL<<8); + if (version >= 8) + lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, lpddi->tszInstanceName, MAX_PATH); /* ioctl JSIOCGNAME(len) */ @@ -339,8 +346,7 @@ return ref; /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); /* Free the DataFormat */ HeapFree(GetProcessHeap(), 0, This->df); @@ -756,7 +762,10 @@ wasacquired = 0; } lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK; + if (This->dinput->version >= 8) + lpDIDevCaps->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); axes=0; for (i=0;i<ABS_MAX;i++) if (test_bit(This->absbits,i)) axes++; _____ Modified: vendor/wine/dlls/dinput/Wine-20050111/keyboard.c --- vendor/wine/dlls/dinput/current/keyboard.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/dinput/Wine-20050111/keyboard.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -206,7 +206,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_KEYBOARD) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 8))) { TRACE("Enumerating the Keyboard device\n"); fill_keyboard_dideviceinstanceA(lpddi, version); @@ -224,7 +224,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_KEYBOARD) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 8))) { TRACE("Enumerating the Keyboard device\n"); fill_keyboard_dideviceinstanceW(lpddi, version); @@ -317,8 +317,7 @@ LeaveCriticalSection(&keyboard_crit); /* Free the data queue */ - if (This->buffer != NULL) - HeapFree(GetProcessHeap(),0,This->buffer); + HeapFree(GetProcessHeap(),0,This->buffer); DeleteCriticalSection(&(This->crit)); @@ -569,36 +568,34 @@ LPDIRECTINPUTDEVICE8A iface, LPDIDEVCAPS lpDIDevCaps) { - SysKeyboardImpl *This = (SysKeyboardImpl *)iface; + SysKeyboardImpl *This = (SysKeyboardImpl *)iface; + DIDEVCAPS devcaps; - TRACE("(this=%p,%p)\n",This,lpDIDevCaps); + TRACE("(this=%p,%p)\n",This,lpDIDevCaps); - if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; + if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { + WARN("invalid parameter\n"); + return DIERR_INVALIDPARAM; + } + + devcaps.dwSize = lpDIDevCaps->dwSize; + devcaps.dwFlags = DIDC_ATTACHED; if (This->dinput->version >= 8) - lpDIDevCaps->dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); + devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); else - lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); - lpDIDevCaps->dwAxes = 0; - lpDIDevCaps->dwButtons = 256; - lpDIDevCaps->dwPOVs = 0; - lpDIDevCaps->dwFFSamplePeriod = 0; - lpDIDevCaps->dwFFMinTimeResolution = 0; - lpDIDevCaps->dwFirmwareRevision = 100; - lpDIDevCaps->dwHardwareRevision = 100; - lpDIDevCaps->dwFFDriverVersion = 0; - } else if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS_DX3)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); - lpDIDevCaps->dwAxes = 0; - lpDIDevCaps->dwButtons = 256; - lpDIDevCaps->dwPOVs = 0; - } else { - WARN("invalid parameter\n"); - return DIERR_INVALIDPARAM; - } + devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); + devcaps.dwAxes = 0; + devcaps.dwButtons = 256; + devcaps.dwPOVs = 0; + devcaps.dwFFSamplePeriod = 0; + devcaps.dwFFMinTimeResolution = 0; + devcaps.dwFirmwareRevision = 100; + devcaps.dwHardwareRevision = 100; + devcaps.dwFFDriverVersion = 0; - return DI_OK; + memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); + + return DI_OK; } /*********************************************************************** ******* _____ Modified: vendor/wine/dlls/dinput/Wine-20050111/mouse.c --- vendor/wine/dlls/dinput/current/mouse.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/dinput/Wine-20050111/mouse.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -210,7 +210,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_MOUSE) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 8))) { TRACE("Enumerating the mouse device\n"); fill_mouse_dideviceinstanceA(lpddi, version); @@ -228,7 +228,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_MOUSE) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 8))) { TRACE("Enumerating the mouse device\n"); fill_mouse_dideviceinstanceW(lpddi, version); @@ -333,8 +333,7 @@ return ref; /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); if (This->hook) { UnhookWindowsHookEx( This->hook ); @@ -433,7 +432,7 @@ /* Only allow mouse events every 10 ms. * This is to allow the cursor to start acceleration before * the warps happen. But if it involves a mouse button event we - * allow it since we don't want to loose the clicks. + * allow it since we don't want to lose the clicks. */ if (((GetCurrentTime() - last_event) < 10) && wparam == WM_MOUSEMOVE) @@ -502,9 +501,9 @@ switch(wparam) { case WM_LBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[0] = 0xFF; + This->m_state.rgbButtons[0] = 0x80; break; case WM_LBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x00, @@ -512,9 +511,9 @@ This->m_state.rgbButtons[0] = 0x00; break; case WM_RBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[1] = 0xFF; + This->m_state.rgbButtons[1] = 0x80; break; case WM_RBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x00, @@ -522,9 +521,9 @@ This->m_state.rgbButtons[1] = 0x00; break; case WM_MBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[2] = 0xFF; + This->m_state.rgbButtons[2] = 0x80; break; case WM_MBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x00, @@ -923,33 +922,31 @@ LPDIDEVCAPS lpDIDevCaps) { SysMouseImpl *This = (SysMouseImpl *)iface; - + DIDEVCAPS devcaps; + TRACE("(this=%p,%p)\n",This,lpDIDevCaps); - - if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - if (This->dinput->version >= 8) - lpDIDevCaps->dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); - else - lpDIDevCaps->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); - lpDIDevCaps->dwAxes = 3; - lpDIDevCaps->dwButtons = 3; - lpDIDevCaps->dwPOVs = 0; - lpDIDevCaps->dwFFSamplePeriod = 0; - lpDIDevCaps->dwFFMinTimeResolution = 0; - lpDIDevCaps->dwFirmwareRevision = 100; - lpDIDevCaps->dwHardwareRevision = 100; - lpDIDevCaps->dwFFDriverVersion = 0; - } else if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS_DX3)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); - lpDIDevCaps->dwAxes = 3; - lpDIDevCaps->dwButtons = 3; - lpDIDevCaps->dwPOVs = 0; - } else { + + if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { WARN("invalid parameter\n"); return DIERR_INVALIDPARAM; } + + devcaps.dwSize = lpDIDevCaps->dwSize; + devcaps.dwFlags = DIDC_ATTACHED; + if (This->dinput->version >= 8) + devcaps.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); + else + devcaps.dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); + devcaps.dwAxes = 3; + devcaps.dwButtons = 3; + devcaps.dwPOVs = 0; + devcaps.dwFFSamplePeriod = 0; + devcaps.dwFFMinTimeResolution = 0; + devcaps.dwFirmwareRevision = 100; + devcaps.dwHardwareRevision = 100; + devcaps.dwFFDriverVersion = 0; + + memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); return DI_OK; } _____ Modified: vendor/wine/dlls/dinput/current/dinput_main.c --- vendor/wine/dlls/dinput/current/dinput_main.c 2005-01-11 23:05:16 UTC (rev 12935) +++ vendor/wine/dlls/dinput/current/dinput_main.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -704,13 +704,13 @@ HRESULT WINAPI DINPUT_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { - TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) { *ppv = (LPVOID)&DINPUT_CF; IClassFactory_AddRef((IClassFactory*)*ppv); return S_OK; } - FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } _____ Modified: vendor/wine/dlls/dinput/current/joystick_linux.c --- vendor/wine/dlls/dinput/current/joystick_linux.c 2005-01-11 23:05:16 UTC (rev 12935) +++ vendor/wine/dlls/dinput/current/joystick_linux.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -157,7 +157,9 @@ return FALSE; } - if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { + if ((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8))) { /* check whether we have a joystick */ sprintf(dev, "%s%d", JOYDEV, id); if ((fd = open(dev,O_RDONLY)) < 0) { @@ -205,7 +207,9 @@ return FALSE; } - if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { + if ((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8))) { /* check whether we have a joystick */ sprintf(dev, "%s%d", JOYDEV, id); if ((fd = open(dev,O_RDONLY)) < 0) { @@ -552,7 +556,10 @@ newDevice->devcaps.dwSize = sizeof(newDevice->devcaps); newDevice->devcaps.dwFlags = DIDC_ATTACHED; - newDevice->devcaps.dwDevType = DIDEVTYPE_JOYSTICK; + if (newDevice->dinput->version >= 8) + newDevice->devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + newDevice->devcaps.dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); newDevice->devcaps.dwFFSamplePeriod = 0; newDevice->devcaps.dwFFMinTimeResolution = 0; newDevice->devcaps.dwFirmwareRevision = 0; @@ -573,18 +580,12 @@ FAILED: hr = DIERR_OUTOFMEMORY; FAILED1: - if (newDevice->axis_map) - HeapFree(GetProcessHeap(),0,newDevice->axis_map); - if (newDevice->name) - HeapFree(GetProcessHeap(),0,newDevice->name); - if (newDevice->props) - HeapFree(GetProcessHeap(),0,newDevice->props); - if (newDevice->user_df->rgodf) - HeapFree(GetProcessHeap(),0,newDevice->user_df->rgodf); - if (newDevice->user_df) - HeapFree(GetProcessHeap(),0,newDevice->user_df); - if (newDevice) - HeapFree(GetProcessHeap(),0,newDevice); + HeapFree(GetProcessHeap(),0,newDevice->axis_map); + HeapFree(GetProcessHeap(),0,newDevice->name); + HeapFree(GetProcessHeap(),0,newDevice->props); + HeapFree(GetProcessHeap(),0,newDevice->user_df->rgodf); + HeapFree(GetProcessHeap(),0,newDevice->user_df); + HeapFree(GetProcessHeap(),0,newDevice); *pdev = 0; return hr; @@ -669,16 +670,13 @@ return ref; /* Free the device name */ - if (This->name) - HeapFree(GetProcessHeap(),0,This->name); + HeapFree(GetProcessHeap(),0,This->name); /* Free the axis map */ - if (This->axis_map) - HeapFree(GetProcessHeap(),0,This->axis_map); + HeapFree(GetProcessHeap(),0,This->axis_map); /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); /* Free the DataFormat */ HeapFree(GetProcessHeap(), 0, This->user_df->rgodf); @@ -762,12 +760,9 @@ FAILED: WARN("out of memory\n"); - if (new_props) - HeapFree(GetProcessHeap(),0,new_props); - if (new_rgodf) - HeapFree(GetProcessHeap(),0,new_rgodf); - if (new_df) - HeapFree(GetProcessHeap(),0,new_df); + HeapFree(GetProcessHeap(),0,new_props); + HeapFree(GetProcessHeap(),0,new_rgodf); + HeapFree(GetProcessHeap(),0,new_df); return DIERR_OUTOFMEMORY; } @@ -1578,10 +1573,7 @@ pdidi->guidInstance = GUID_Joystick; pdidi->guidProduct = DInput_Wine_Joystick_GUID; /* we only support traditional joysticks for now */ - if (This->dinput->version >= 8) - pdidi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - pdidi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + pdidi->dwDevType = This->devcaps.dwDevType; strcpy(pdidi->tszInstanceName, "Joystick"); strcpy(pdidi->tszProductName, This->name); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3A)) { @@ -1616,10 +1608,7 @@ pdidi->guidInstance = GUID_Joystick; pdidi->guidProduct = DInput_Wine_Joystick_GUID; /* we only support traditional joysticks for now */ - if (This->dinput->version >= 8) - pdidi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); - else - pdidi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); + pdidi->dwDevType = This->devcaps.dwDevType; MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, pdidi->tszInstanceName, MAX_PATH); MultiByteToWideChar(CP_ACP, 0, This->name, -1, pdidi->tszProductName, MAX_PATH); if (pdidi->dwSize > sizeof(DIDEVICEINSTANCE_DX3W)) { _____ Modified: vendor/wine/dlls/dinput/current/joystick_linuxinput.c --- vendor/wine/dlls/dinput/current/joystick_linuxinput.c 2005-01-11 23:05:16 UTC (rev 12935) +++ vendor/wine/dlls/dinput/current/joystick_linuxinput.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -175,8 +175,10 @@ if (id != 0) return FALSE; - if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK)) - return FALSE; + if (!((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8)))) + return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) return FALSE; @@ -211,8 +213,10 @@ if (id != 0) return FALSE; - if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK)) - return FALSE; + if (!((dwDevType == 0) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) || + (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 8)))) + return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) return FALSE; @@ -229,7 +233,10 @@ lpddi->guidProduct = DInput_Wine_Joystick_GUID; lpddi->guidFFDriver = GUID_NULL; - lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL<<8); + if (version >= 8) + lpddi->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); MultiByteToWideChar(CP_ACP, 0, "Joystick", -1, lpddi->tszInstanceName, MAX_PATH); /* ioctl JSIOCGNAME(len) */ @@ -339,8 +346,7 @@ return ref; /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); /* Free the DataFormat */ HeapFree(GetProcessHeap(), 0, This->df); @@ -756,7 +762,10 @@ wasacquired = 0; } lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK; + if (This->dinput->version >= 8) + lpDIDevCaps->dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); + else + lpDIDevCaps->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); axes=0; for (i=0;i<ABS_MAX;i++) if (test_bit(This->absbits,i)) axes++; _____ Modified: vendor/wine/dlls/dinput/current/keyboard.c --- vendor/wine/dlls/dinput/current/keyboard.c 2005-01-11 23:05:16 UTC (rev 12935) +++ vendor/wine/dlls/dinput/current/keyboard.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -206,7 +206,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_KEYBOARD) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 8))) { TRACE("Enumerating the Keyboard device\n"); fill_keyboard_dideviceinstanceA(lpddi, version); @@ -224,7 +224,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_KEYBOARD) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_KEYBOARD) || (dwDevType == DI8DEVTYPE_KEYBOARD)) && (version >= 8))) { TRACE("Enumerating the Keyboard device\n"); fill_keyboard_dideviceinstanceW(lpddi, version); @@ -317,8 +317,7 @@ LeaveCriticalSection(&keyboard_crit); /* Free the data queue */ - if (This->buffer != NULL) - HeapFree(GetProcessHeap(),0,This->buffer); + HeapFree(GetProcessHeap(),0,This->buffer); DeleteCriticalSection(&(This->crit)); @@ -569,36 +568,34 @@ LPDIRECTINPUTDEVICE8A iface, LPDIDEVCAPS lpDIDevCaps) { - SysKeyboardImpl *This = (SysKeyboardImpl *)iface; + SysKeyboardImpl *This = (SysKeyboardImpl *)iface; + DIDEVCAPS devcaps; - TRACE("(this=%p,%p)\n",This,lpDIDevCaps); + TRACE("(this=%p,%p)\n",This,lpDIDevCaps); - if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; + if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { + WARN("invalid parameter\n"); + return DIERR_INVALIDPARAM; + } + + devcaps.dwSize = lpDIDevCaps->dwSize; + devcaps.dwFlags = DIDC_ATTACHED; if (This->dinput->version >= 8) - lpDIDevCaps->dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); + devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8); else - lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); - lpDIDevCaps->dwAxes = 0; - lpDIDevCaps->dwButtons = 256; - lpDIDevCaps->dwPOVs = 0; - lpDIDevCaps->dwFFSamplePeriod = 0; - lpDIDevCaps->dwFFMinTimeResolution = 0; - lpDIDevCaps->dwFirmwareRevision = 100; - lpDIDevCaps->dwHardwareRevision = 100; - lpDIDevCaps->dwFFDriverVersion = 0; - } else if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS_DX3)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); - lpDIDevCaps->dwAxes = 0; - lpDIDevCaps->dwButtons = 256; - lpDIDevCaps->dwPOVs = 0; - } else { - WARN("invalid parameter\n"); - return DIERR_INVALIDPARAM; - } + devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8); + devcaps.dwAxes = 0; + devcaps.dwButtons = 256; + devcaps.dwPOVs = 0; + devcaps.dwFFSamplePeriod = 0; + devcaps.dwFFMinTimeResolution = 0; + devcaps.dwFirmwareRevision = 100; + devcaps.dwHardwareRevision = 100; + devcaps.dwFFDriverVersion = 0; - return DI_OK; + memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); + + return DI_OK; } /*********************************************************************** ******* _____ Modified: vendor/wine/dlls/dinput/current/mouse.c --- vendor/wine/dlls/dinput/current/mouse.c 2005-01-11 23:05:16 UTC (rev 12935) +++ vendor/wine/dlls/dinput/current/mouse.c 2005-01-11 23:06:20 UTC (rev 12936) @@ -210,7 +210,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_MOUSE) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 8))) { TRACE("Enumerating the mouse device\n"); fill_mouse_dideviceinstanceA(lpddi, version); @@ -228,7 +228,7 @@ if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 8)) || - ((dwDevType == DI8DEVTYPE_MOUSE) && (version >= 8))) { + (((dwDevType == DI8DEVCLASS_POINTER) || (dwDevType == DI8DEVTYPE_MOUSE)) && (version >= 8))) { TRACE("Enumerating the mouse device\n"); fill_mouse_dideviceinstanceW(lpddi, version); @@ -333,8 +333,7 @@ return ref; /* Free the data queue */ - if (This->data_queue != NULL) - HeapFree(GetProcessHeap(),0,This->data_queue); + HeapFree(GetProcessHeap(),0,This->data_queue); if (This->hook) { UnhookWindowsHookEx( This->hook ); @@ -433,7 +432,7 @@ /* Only allow mouse events every 10 ms. * This is to allow the cursor to start acceleration before * the warps happen. But if it involves a mouse button event we - * allow it since we don't want to loose the clicks. + * allow it since we don't want to lose the clicks. */ if (((GetCurrentTime() - last_event) < 10) && wparam == WM_MOUSEMOVE) @@ -502,9 +501,9 @@ switch(wparam) { case WM_LBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[0] = 0xFF; + This->m_state.rgbButtons[0] = 0x80; break; case WM_LBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x00, @@ -512,9 +511,9 @@ This->m_state.rgbButtons[0] = 0x00; break; case WM_RBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[1] = 0xFF; + This->m_state.rgbButtons[1] = 0x80; break; case WM_RBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x00, @@ -522,9 +521,9 @@ This->m_state.rgbButtons[1] = 0x00; break; case WM_MBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[2] = 0xFF; + This->m_state.rgbButtons[2] = 0x80; break; case WM_MBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x00, @@ -923,33 +922,31 @@ LPDIDEVCAPS lpDIDevCaps) { SysMouseImpl *This = (SysMouseImpl *)iface; - + DIDEVCAPS devcaps; + TRACE("(this=%p,%p)\n",This,lpDIDevCaps); - - if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - if (This->dinput->version >= 8) - lpDIDevCaps->dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); - else - lpDIDevCaps->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); - lpDIDevCaps->dwAxes = 3; - lpDIDevCaps->dwButtons = 3; - lpDIDevCaps->dwPOVs = 0; - lpDIDevCaps->dwFFSamplePeriod = 0; - lpDIDevCaps->dwFFMinTimeResolution = 0; - lpDIDevCaps->dwFirmwareRevision = 100; - lpDIDevCaps->dwHardwareRevision = 100; - lpDIDevCaps->dwFFDriverVersion = 0; - } else if (lpDIDevCaps->dwSize == sizeof(DIDEVCAPS_DX3)) { - lpDIDevCaps->dwFlags = DIDC_ATTACHED; - lpDIDevCaps->dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); - lpDIDevCaps->dwAxes = 3; - lpDIDevCaps->dwButtons = 3; - lpDIDevCaps->dwPOVs = 0; - } else { + + if ((lpDIDevCaps->dwSize != sizeof(DIDEVCAPS)) && (lpDIDevCaps->dwSize != sizeof(DIDEVCAPS_DX3))) { WARN("invalid parameter\n"); return DIERR_INVALIDPARAM; } + + devcaps.dwSize = lpDIDevCaps->dwSize; + devcaps.dwFlags = DIDC_ATTACHED; + if (This->dinput->version >= 8) + devcaps.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); + else + devcaps.dwDevType = DIDEVTYPE_MOUSE | (DIDEVTYPEMOUSE_TRADITIONAL << 8); + devcaps.dwAxes = 3; + devcaps.dwButtons = 3; + devcaps.dwPOVs = 0; + devcaps.dwFFSamplePeriod = 0; + devcaps.dwFFMinTimeResolution = 0; + devcaps.dwFirmwareRevision = 100; + devcaps.dwHardwareRevision = 100; + devcaps.dwFFDriverVersion = 0; + + memcpy(lpDIDevCaps, &devcaps, lpDIDevCaps->dwSize); return DI_OK; }
19 years, 10 months
1
0
0
0
[gvg] 12935: Sync to Wine-20050111:
by gvg@svn.reactos.com
Sync to Wine-20050111: Robert Shearman <rob(a)codeweavers.com> - Change dialog templates to not explicitly specify extended window styles for the static rects on the Page Setup dialog as the ones specified were wrong anyway. Dmitry Timoshkov <dmitry(a)codeweavers.com> - Replace 'All xxx pages' text in common print dialog by simple 'All'. Jose Manuel Ferrer Ortiz <jmfo1982(a)yahoo.es> - Updated Spanish resource. Jacek Caban <jack(a)itma.pwr.wroc.pl> - Moved save* strings to resources. - Moved string to resources. - Get rid of W->A calls. - Unicodified fontdlg. Eric Pouech <pouech-eric(a)wanadoo.fr> - Removed excessive statement (break after return or goto, not useful break, not needed vars...) Paul Vriens <Paul.Vriens(a)xs4all.nl> - use Interlocked* functions in AddRef and Release. - store the result of the Interlocked functions and use only this. Michael Stefaniuc <mstefani(a)redhat.de> - Do not check for non NULL pointer before HeapFree'ing it. It's redundant. Alexandre Julliard <julliard(a)winehq.org> - Janitorial: C booleans must not be compared against TRUE. Modified: trunk/reactos/lib/comdlg32/cdlg.h Modified: trunk/reactos/lib/comdlg32/cdlg_Cn.rc Modified: trunk/reactos/lib/comdlg32/cdlg_De.rc Modified: trunk/reactos/lib/comdlg32/cdlg_En.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Es.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Fr.rc Modified: trunk/reactos/lib/comdlg32/cdlg_It.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Nl.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Pl.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Pt.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Ru.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Si.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Sk.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Sv.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Th.rc Modified: trunk/reactos/lib/comdlg32/cdlg_Uk.rc Modified: trunk/reactos/lib/comdlg32/colordlg.c Modified: trunk/reactos/lib/comdlg32/filedlg.c Modified: trunk/reactos/lib/comdlg32/filedlg31.c Modified: trunk/reactos/lib/comdlg32/filedlgbrowser.c Modified: trunk/reactos/lib/comdlg32/filedlgbrowser.h Modified: trunk/reactos/lib/comdlg32/fontdlg.c Modified: trunk/reactos/lib/comdlg32/fontdlg16.c Modified: trunk/reactos/lib/comdlg32/printdlg.c _____ Modified: trunk/reactos/lib/comdlg32/cdlg.h --- trunk/reactos/lib/comdlg32/cdlg.h 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg.h 2005-01-11 23:05:16 UTC (rev 12935) @@ -93,7 +93,7 @@ #define PD32_DEFAULT_PRINTER 1582 #define PD32_NR_OF_DOCUMENTS_IN_QUEUE 1583 -#define PD32_PRINT_ALL_X_PAGES 1584 + #define PD32_MARGINS_IN_INCHES 1585 #define PD32_MARGINS_IN_MILIMETERS 1586 #define PD32_MILIMETERS 1587 @@ -145,6 +145,13 @@ #define IDS_COLOR_AQUA 1054 #define IDS_COLOR_WHITE 1055 +#define IDS_FONT_SIZE 1200 +#define IDS_SAVE_BUTTON 1201 +#define IDS_SAVE_IN 1202 +#define IDS_SAVE 1203 +#define IDS_SAVE_AS 1204 +#define IDS_OPEN_FILE 1205 + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -199,26 +206,25 @@ { HWND hWnd1; HWND hWnd2; - LPCHOOSEFONTA lpcf32a; + LPCHOOSEFONTW lpcf32w; int added; } CFn_ENUMSTRUCT, *LPCFn_ENUMSTRUCT; -INT AddFontFamily(const ENUMLOGFONTEXA *lpElfex, const NEWTEXTMETRICEXA *lpNTM, - UINT nFontType, LPCHOOSEFONTA lpcf, HWND hwnd, +INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, + UINT nFontType, LPCHOOSEFONTW lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e); -INT AddFontStyle(const ENUMLOGFONTEXA *lpElfex, const NEWTEXTMETRICEXA *metrics, - UINT nFontType, LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, +INT AddFontStyle(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *metrics, + UINT nFontType, LPCHOOSEFONTW lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg, BOOL iswin16); void _dump_cf_flags(DWORD cflags); LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, - LPCHOOSEFONTA lpcf); + LPCHOOSEFONTW lpcf); LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam); LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam); LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, - LPCHOOSEFONTA lpcf); + LPCHOOSEFONTW lpcf); LRESULT CFn_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam, - LPCHOOSEFONTA lpcf); -LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam); + LPCHOOSEFONTW lpcf); #endif /* _WINE_DLL_CDLG_H */ _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Cn.rc --- trunk/reactos/lib/comdlg32/cdlg_Cn.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Cn.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -300,9 +300,9 @@ CAPTION "Ò³ÃæÉèÖÃ" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Ö½ÕÅ", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "´óС(&S):", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -408,7 +408,6 @@ PD32_DEFAULT_PRINTER "Default Printer; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" - PD32_PRINT_ALL_X_PAGES "&All %d pages" PD32_MARGINS_IN_INCHES "Margins [inches]" PD32_MARGINS_IN_MILIMETERS "Margins [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_De.rc --- trunk/reactos/lib/comdlg32/cdlg_De.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_De.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -120,9 +120,9 @@ CAPTION "Seite einrichten" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papier", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Größe:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -402,7 +402,6 @@ PD32_DEFAULT_PRINTER "Standard Drucker; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Es sind %d Dokumente in der Queue" - PD32_PRINT_ALL_X_PAGES "&Alle %d Seiten" PD32_MARGINS_IN_INCHES "Ränder [inches/zoll]" PD32_MARGINS_IN_MILIMETERS "Ränder [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_En.rc --- trunk/reactos/lib/comdlg32/cdlg_En.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_En.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -300,9 +300,9 @@ CAPTION "Setup Page" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Paper", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Size:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -408,7 +408,6 @@ PD32_DEFAULT_PRINTER "Default Printer; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" - PD32_PRINT_ALL_X_PAGES "&All %d pages" PD32_MARGINS_IN_INCHES "Margins [inches]" PD32_MARGINS_IN_MILIMETERS "Margins [mm]" PD32_MILIMETERS "mm" @@ -461,6 +460,15 @@ IDS_COLOR_WHITE "White" } +STRINGTABLE DISCARDABLE +{ + IDS_FONT_SIZE "Select a font size between %d and %d points." + IDS_SAVE_BUTTON "&Save" + IDS_SAVE_IN "Save &in:" + IDS_SAVE "Save" + IDS_SAVE_AS "Save as" + IDS_OPEN_FILE "Open File" +} /****************************************************************/ /* English neutral resources _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Es.rc --- trunk/reactos/lib/comdlg32/cdlg_Es.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Es.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -1,6 +1,6 @@ /* * Copyright 1995 Jon Tombs - * Copyright 2004 José Manuel Ferrer Ortiz + * Copyright 2004, 2005 José Manuel Ferrer Ortiz * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -139,7 +139,7 @@ CHECKBOX "&Subrayado", chx2, 10,94,50,10, BS_AUTOCHECKBOX LTEXT "&Color:", stc4 ,6,110,30,9 COMBOBOX cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | - CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP + CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP GROUPBOX "Ejemplo",grp2,98,72,120,36,WS_GROUP CTEXT "AaBbYyZzÑñ",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE LTEXT "Codificación:",stc7 ,98,114,80,9 @@ -155,7 +155,7 @@ { LTEXT "Colores &básicos:", 1088, 4, 4, 140, 10 LTEXT "Colores person&alizados:", 1089, 4, 106, 140, 10 - LTEXT "Color|Sól&ido", 1090, 150, 151, 48, 10 + LTEXT "Color | Sól&ido", 1090, 150, 151, 48, 10 LTEXT "&Rojo:", 726 /*1094*/,249,126,24,10 EDITTEXT 706, 275,124,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP LTEXT "&Verde:",727/*1095*/,249,140,24,10 @@ -178,7 +178,7 @@ PUSHBUTTON "A&yuda", pshHelp,100,166, 44, 14 PUSHBUTTON "Añadir a &colores personalizados", 712/*1024*/, 152, 166, 142, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Definir colores personalizados >>", 719/*1025*/, 4, 150, 142, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "&i",713,300,200,4,14 /* just a dummy: 'i' is like &i in "sol&id" */ + PUSHBUTTON "&i",713,300,200,4,14 /* just a dummy: 'i' is like &i in "sol&id" */ } @@ -267,7 +267,7 @@ BEGIN DEFPUSHBUTTON "Aceptar",IDOK,180,156,48,14,WS_GROUP PUSHBUTTON "Cancelar",IDCANCEL,232,156,48,14 -/* PUSHBUTTON "Network...", psh5, 284,156,48,14 */ +/* PUSHBUTTON "Red...", psh5, 284,156,48,14 */ GROUPBOX "Impresora", grp4, 8, 4, 272,84, WS_GROUP PUSHBUTTON "&Propiedades", psh2, 212, 17, 60,14, WS_GROUP @@ -299,9 +299,9 @@ CAPTION "Página de configuración" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papel", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Tamaño:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -409,7 +409,6 @@ PD32_DEFAULT_PRINTER "Impresora por defecto; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Hay %d documentos en la cola" - PD32_PRINT_ALL_X_PAGES "&Todas las %d páginas" PD32_MARGINS_IN_INCHES "Márgenes [pulgadas]" PD32_MARGINS_IN_MILIMETERS "Márgenes [mm]" PD32_MILIMETERS "mm" @@ -418,7 +417,7 @@ PD32_PRINTER_STATUS_PAUSED "Pausada; " PD32_PRINTER_STATUS_ERROR "Error; " PD32_PRINTER_STATUS_PENDING_DELETION "Borrado pendiente; " - PD32_PRINTER_STATUS_PAPER_JAM "Paper jam; " + PD32_PRINTER_STATUS_PAPER_JAM "Papel atascado; " PD32_PRINTER_STATUS_PAPER_OUT "Sin papel; " PD32_PRINTER_STATUS_MANUAL_FEED "Ponga papel a mano; " PD32_PRINTER_STATUS_PAPER_PROBLEM "Problema con el papel; " @@ -451,7 +450,7 @@ IDS_COLOR_OLIVE "Oliva" IDS_COLOR_NAVY "Azul marino" IDS_COLOR_PURPLE "Morado" - IDS_COLOR_TEAL "Teal" + IDS_COLOR_TEAL "Turquesa" IDS_COLOR_GRAY "Gris" IDS_COLOR_SILVER "Plateado" IDS_COLOR_RED "Rojo" @@ -462,3 +461,8 @@ IDS_COLOR_AQUA "Agua" IDS_COLOR_WHITE "Blanco" } + +STRINGTABLE DISCARDABLE +{ + IDS_FONT_SIZE "Elija un tamaño de fuente entre %d and %d puntos." +} _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Fr.rc --- trunk/reactos/lib/comdlg32/cdlg_Fr.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Fr.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -303,9 +303,9 @@ CAPTION "Mise en page" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papier", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Taille:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -411,7 +411,6 @@ PD32_DEFAULT_PRINTER "Imprimante par défaut; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Il y a %d documents dans la file d'attente" - PD32_PRINT_ALL_X_PAGES "&Toutes les %d pages" PD32_MARGINS_IN_INCHES "Marges [pouces]" PD32_MARGINS_IN_MILIMETERS "Marges [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_It.rc --- trunk/reactos/lib/comdlg32/cdlg_It.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_It.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -300,9 +300,9 @@ CAPTION "Setup di Pagina" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Carta", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Dimensione:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -407,7 +407,6 @@ PD32_DEFAULT_PRINTER "Stampante predefinita; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Ci sono %d documenti nella coda di stampa" - PD32_PRINT_ALL_X_PAGES "&Tutte le %d pagine" PD32_MARGINS_IN_INCHES "Margini [pollici]" PD32_MARGINS_IN_MILIMETERS "Margini [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Nl.rc --- trunk/reactos/lib/comdlg32/cdlg_Nl.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Nl.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -251,7 +251,7 @@ EDITTEXT edt3, 240,106, 32,12, WS_GROUP | ES_NUMBER GROUPBOX "Afdrukbereik", grp1, 8,92, 144,64, WS_GROUP - CONTROL "&Alle xx", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,106,64,12 + CONTROL "&Alle", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,106,64,12 CONTROL "&Pagina's", rad3,"Button",BS_AUTORADIOBUTTON,16,122,36,12 CONTROL "Sele&ctie", rad2,"Button",BS_AUTORADIOBUTTON,16,138,64,12 EDITTEXT edt1, 74,122, 26,12, WS_GROUP | ES_NUMBER @@ -289,7 +289,6 @@ PD32_DEFAULT_PRINTER "Default Printer, " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Er staan %d documenten in de \ wachtrij" - PD32_PRINT_ALL_X_PAGES "&Alle %d pagina's" PD32_MARGINS_IN_INCHES "Marges [inch]" PD32_MARGINS_IN_MILIMETERS "Marges [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Pl.rc --- trunk/reactos/lib/comdlg32/cdlg_Pl.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Pl.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -302,9 +302,9 @@ CAPTION "Ustawienia Strony" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papier", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Rozmiar:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -405,7 +405,6 @@ PD32_DEFAULT_PRINTER "Domyolna Drukarka; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "W kolejce znajduj¹ siê %d dokumenty" - PD32_PRINT_ALL_X_PAGES "&Wszystkie %d strony" PD32_MARGINS_IN_INCHES "Marginesy [cale]" PD32_MARGINS_IN_MILIMETERS "Marginesy [mm]" PD32_MILIMETERS "mm" @@ -437,6 +436,16 @@ PD32_PRINTER_STATUS_POWER_SAVE "Tryb oszczêdzania energii; " } +STRINGTABLE DISCARDABLE +{ + IDS_FONT_SIZE "Wybierz czcionkê o rozmiarze pomiêdzy %d a %d punktami." + IDS_SAVE_BUTTON "&Zapisz" + IDS_SAVE_IN "Zapisz &w:" + IDS_SAVE "Zapisz" + IDS_SAVE_AS "Zapisz jako" + IDS_OPEN_FILE "Otwórz Plik" +} + STRINGTABLE DISCARDABLE /* Color names */ { IDS_COLOR_BLACK "Czarny" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Pt.rc --- trunk/reactos/lib/comdlg32/cdlg_Pt.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Pt.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -301,9 +301,9 @@ CAPTION "Configurações de Página" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papel", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Tamanho:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -407,7 +407,6 @@ PD32_DEFAULT_PRINTER "Impressora Padrão; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Existem %d documentos na fila" - PD32_PRINT_ALL_X_PAGES "&Todas %d páginas" PD32_MARGINS_IN_INCHES "Margens [polegadas]" PD32_MARGINS_IN_MILIMETERS "Margens [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Ru.rc --- trunk/reactos/lib/comdlg32/cdlg_Ru.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Ru.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -376,7 +376,6 @@ PD32_DEFAULT_PRINTER "Ïðèíòåð ïî óìîë÷àíèþ; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d äîêóìåíòîâ â î÷åðåäè" - PD32_PRINT_ALL_X_PAGES "&Âñå %d ñòðàíèö" PD32_MARGINS_IN_INCHES "Ãðàíèöû [äþéìû)" PD32_MARGINS_IN_MILIMETERS "Ãðàíèöû [ìì]" PD32_MILIMETERS "ìì" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Si.rc --- trunk/reactos/lib/comdlg32/cdlg_Si.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Si.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -300,9 +300,9 @@ CAPTION "Priprava strani" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papir", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "Veli&kost:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -405,7 +405,6 @@ PD32_DEFAULT_PRINTER "Privzeti tiskalnik; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d èakajoèih dok." - PD32_PRINT_ALL_X_PAGES "&Vse strani -- %d" PD32_MARGINS_IN_INCHES "Robovi [palci]" PD32_MARGINS_IN_MILIMETERS "Robovi [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Sk.rc --- trunk/reactos/lib/comdlg32/cdlg_Sk.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Sk.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -378,7 +378,6 @@ PD32_DEFAULT_PRINTER "Implicitná tlaèiareò; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in queue" - PD32_PRINT_ALL_X_PAGES "&Vsetky %d strany" PD32_MARGINS_IN_INCHES "Okraje [palce]" PD32_MARGINS_IN_MILIMETERS "Okraje [mm]" PD32_MILIMETERS "mm" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Sv.rc --- trunk/reactos/lib/comdlg32/cdlg_Sv.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Sv.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -293,9 +293,9 @@ CAPTION "Utskriftsformat" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papper", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "&Storlek:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160,CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -398,7 +398,6 @@ PD32_DEFAULT_PRINTER "Standardskrivare; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Det är %d dokument i kön" - PD32_PRINT_ALL_X_PAGES "&Alla %d sidor" PD32_MARGINS_IN_INCHES "Marginaler [inches]" PD32_MARGINS_IN_MILIMETERS "Marginaler [millimeter]" PD32_MILIMETERS "millimeter" _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Th.rc --- trunk/reactos/lib/comdlg32/cdlg_Th.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Th.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -297,9 +297,9 @@ CAPTION "»ÃѺáµè§" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "", rct1, 130, 0x00020006, 80, 8, 80, 80, SS_WHITERECT - CONTROL "", rct2, 130, 0x00020005, 160, 12, 4, 80, SS_GRAYRECT - CONTROL "", rct3, 130, 0x00020005, 84, 88, 80, 4, SS_GRAYRECT + CONTROL "", rct1, "Static", SS_WHITERECT, 80, 8, 80, 80 + CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 + CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "¡ÃдÒÉ", grp2, 8, 96, 224, 56, BS_GROUPBOX LTEXT "¢¹Ò´:", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL @@ -402,7 +402,6 @@ PD32_DEFAULT_PRINTER "à¤Ã×èͧ¾ÔÁ¾ì»¡µÔ; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "ÁÕ %d á¿éÁÃÍÍÂÙè" - PD32_PRINT_ALL_X_PAGES "·Ø¡ %d ˹éÒ" PD32_MARGINS_IN_INCHES "¢Íº¡ÃдÒÉ [¹ÔéÇ]" PD32_MARGINS_IN_MILIMETERS "¢Íº¡ÃдÒÉ [ÁÁ.]" PD32_MILIMETERS "ÁÁ." _____ Modified: trunk/reactos/lib/comdlg32/cdlg_Uk.rc --- trunk/reactos/lib/comdlg32/cdlg_Uk.rc 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/cdlg_Uk.rc 2005-01-11 23:05:16 UTC (rev 12935) @@ -376,7 +376,6 @@ PD32_DEFAULT_PRINTER "Ïðèíòåð çà îáóìîâëåííÿì; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "%d äîêóìåíò³â ó ÷åðç³" - PD32_PRINT_ALL_X_PAGES "&Âñ³ %d ñòîð³íîê" PD32_MARGINS_IN_INCHES "Ìåæ³ [äþéìè]" PD32_MARGINS_IN_MILIMETERS "Ìåæ³ [ìì]" PD32_MILIMETERS "ìì" _____ Modified: trunk/reactos/lib/comdlg32/colordlg.c --- trunk/reactos/lib/comdlg32/colordlg.c 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/colordlg.c 2005-01-11 23:05:16 UTC (rev 12935) @@ -1057,11 +1057,10 @@ */ LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam ) { - HDC hdc; PAINTSTRUCT ps; LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER); - hdc = BeginPaint(hDlg, &ps); + BeginPaint(hDlg, &ps); /* we have to paint dialog children except text and buttons */ CC_PaintPredefColorArray(hDlg, 6, 8); CC_PaintUserColorArray(hDlg, 2, 8, lpp->lpcc->lpCustColors); @@ -1072,7 +1071,7 @@ CC_PaintColorGraph(hDlg); EndPaint(hDlg, &ps); - return TRUE; + return TRUE; } /*********************************************************************** @@ -1289,7 +1288,8 @@ { HRSRC hResInfo; HGLOBAL hDlgTmpl; - if (!(hResInfo = FindResourceA(COMDLG32_hInstance, "CHOOSE_COLOR", (LPSTR)RT_DIALOG))) + static const WCHAR wszCHOOSE_COLOR[] = {'C','H','O','O','S','E','_','C','O','L','O','R',0}; + if (!(hResInfo = FindResourceW(COMDLG32_hInstance, wszCHOOSE_COLOR, (LPWSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; _____ Modified: trunk/reactos/lib/comdlg32/filedlg.c --- trunk/reactos/lib/comdlg32/filedlg.c 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/filedlg.c 2005-01-11 23:05:16 UTC (rev 12935) @@ -314,7 +314,7 @@ ZeroMemory(&fodInfos, sizeof(FileOpenDlgInfos)); /* Pass in the original ofn */ - fodInfos.ofnInfos = ofn; + fodInfos.ofnInfos = (LPOPENFILENAMEW)ofn; /* save current directory */ if (ofn->Flags & OFN_NOCHANGEDIR) @@ -445,13 +445,13 @@ { BOOL ret; FileOpenDlgInfos fodInfos; - LPSTR lpstrSavDir = NULL; + LPWSTR lpstrSavDir = NULL; /* Initialize FileOpenDlgInfos structure */ ZeroMemory(&fodInfos, sizeof(FileOpenDlgInfos)); /* Pass in the original ofn */ - fodInfos.ofnInfos = (LPOPENFILENAMEA) ofn; + fodInfos.ofnInfos = ofn; fodInfos.title = ofn->lpstrTitle; fodInfos.defext = ofn->lpstrDefExt; @@ -479,8 +479,8 @@ /* save current directory */ if (ofn->Flags & OFN_NOCHANGEDIR) { - lpstrSavDir = MemAlloc(MAX_PATH); - GetCurrentDirectoryA(MAX_PATH, lpstrSavDir); + lpstrSavDir = MemAlloc(MAX_PATH*sizeof(WCHAR)); + GetCurrentDirectoryW(MAX_PATH, lpstrSavDir); } fodInfos.unicode = TRUE; @@ -500,7 +500,7 @@ if (lpstrSavDir) { - SetCurrentDirectoryA(lpstrSavDir); + SetCurrentDirectoryW(lpstrSavDir); MemFree(lpstrSavDir); } @@ -729,12 +729,12 @@ hinst = fodInfos->ofnInfos->hInstance; if(fodInfos->unicode) { - LPOPENFILENAMEW ofn = (LPOPENFILENAMEW) fodInfos->ofnInfos; + LPOPENFILENAMEW ofn = fodInfos->ofnInfos; hRes = FindResourceW( hinst, ofn->lpTemplateName, (LPWSTR)RT_DIALOG); } else { - LPOPENFILENAMEA ofn = fodInfos->ofnInfos; + LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; hRes = FindResourceA( hinst, ofn->lpTemplateName, (LPSTR)RT_DIALOG); } if (!hRes) @@ -807,7 +807,7 @@ ofnNotify.hdr.hwndFrom=hwndParentDlg; ofnNotify.hdr.idFrom=0; ofnNotify.hdr.code = uCode; - ofnNotify.lpOFN = (LPOPENFILENAMEW) fodInfos->ofnInfos; + ofnNotify.lpOFN = fodInfos->ofnInfos; ofnNotify.pszFile = NULL; ret = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg,WM_NOTIFY,0,(LPARAM)&ofnNo tify); } @@ -817,7 +817,7 @@ ofnNotify.hdr.hwndFrom=hwndParentDlg; ofnNotify.hdr.idFrom=0; ofnNotify.hdr.code = uCode; - ofnNotify.lpOFN = fodInfos->ofnInfos; + ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos; ofnNotify.pszFile = NULL; ret = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg,WM_NOTIFY,0,(LPARAM)&ofnNo tify); } @@ -1164,7 +1164,9 @@ } else if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) { - SetWindowTextA(hwnd,"Save"); + WCHAR buf[16]; + LoadStringW(COMDLG32_hInstance, IDS_SAVE, buf, sizeof(buf)/sizeof(WCHAR)); + SetWindowTextW(hwnd, buf); } /* Initialise the file name edit control */ @@ -1388,11 +1390,14 @@ (rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom), SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER); } - /* change Open to Save FIXME: use resources */ + /* change Open to Save */ if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG) { - SetDlgItemTextA(hwnd,IDOK,"&Save"); - SetDlgItemTextA(hwnd,IDC_LOOKINSTATIC,"Save &in"); + WCHAR buf[16]; + LoadStringW(COMDLG32_hInstance, IDS_SAVE_BUTTON, buf, sizeof(buf)/sizeof(WCHAR)); + SetDlgItemTextW(hwnd, IDOK, buf); + LoadStringW(COMDLG32_hInstance, IDS_SAVE_IN, buf, sizeof(buf)/sizeof(WCHAR)); + SetDlgItemTextW(hwnd, IDC_LOOKINSTATIC, buf); } return 0; } @@ -1582,12 +1587,12 @@ if(fodInfos->unicode) { - LPOPENFILENAMEW ofn = (LPOPENFILENAMEW) fodInfos->ofnInfos; + LPOPENFILENAMEW ofn = fodInfos->ofnInfos; ofn->lpstrFile[0] = '\0'; } else { - LPOPENFILENAMEA ofn = fodInfos->ofnInfos; + LPOPENFILENAMEA ofn = (LPOPENFILENAMEA) fodInfos->ofnInfos; ofn->lpstrFile[0] = '\0'; } @@ -1640,13 +1645,13 @@ } if(fodInfos->unicode) { - LPOPENFILENAMEW ofn = (LPOPENFILENAMEW) fodInfos->ofnInfos; + LPOPENFILENAMEW ofn = fodInfos->ofnInfos; strcpyW( ofn->lpstrFile, lpstrPathSpec); memcpy( ofn->lpstrFile + nSizePath, lpstrFileList, sizeUsed*sizeof(WCHAR) ); } else { - LPOPENFILENAMEA ofn = fodInfos->ofnInfos; + LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; if (ofn->lpstrFile != NULL) { @@ -1684,14 +1689,14 @@ #define ONOPEN_SEARCH 3 static void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText) { - char strMsgTitle[MAX_PATH]; - char strMsgText [MAX_PATH]; + WCHAR strMsgTitle[MAX_PATH]; + WCHAR strMsgText [MAX_PATH]; if (idCaption) - LoadStringA(COMDLG32_hInstance, idCaption, strMsgTitle, sizeof(strMsgTitle)); + LoadStringW(COMDLG32_hInstance, idCaption, strMsgTitle, sizeof(strMsgTitle)/sizeof(WCHAR)); else strMsgTitle[0] = '\0'; - LoadStringA(COMDLG32_hInstance, idText, strMsgText, sizeof(strMsgText)); - MessageBoxA(hwnd,strMsgText, strMsgTitle, MB_OK | MB_ICONHAND); + LoadStringW(COMDLG32_hInstance, idText, strMsgText, sizeof(strMsgText)/sizeof(WCHAR)); + MessageBoxW(hwnd,strMsgText, strMsgTitle, MB_OK | MB_ICONHAND); } BOOL FILEDLG95_OnOpen(HWND hwnd) @@ -2027,7 +2032,7 @@ { if(fodInfos->unicode) { - LPOPENFILENAMEW ofn = (LPOPENFILENAMEW) fodInfos->ofnInfos; + LPOPENFILENAMEW ofn = fodInfos->ofnInfos; strncpyW(ofn->lpstrFile, lpstrPathAndFile, ofn->nMaxFile); if (ofn->Flags & OFN_ALLOWMULTISELECT) @@ -2035,7 +2040,7 @@ } else { - LPOPENFILENAMEA ofn = fodInfos->ofnInfos; + LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; WideCharToMultiByte(CP_ACP, 0, lpstrPathAndFile, -1, ofn->lpstrFile, ofn->nMaxFile, NULL, NULL); @@ -2058,12 +2063,12 @@ LPWSTR lpstrFileTitle = PathFindFileNameW(lpstrPathAndFile); if(fodInfos->unicode) { - LPOPENFILENAMEW ofn = (LPOPENFILENAMEW) fodInfos->ofnInfos; + LPOPENFILENAMEW ofn = fodInfos->ofnInfos; strncpyW(ofn->lpstrFileTitle, lpstrFileTitle, ofn->nMaxFileTitle); } else { - LPOPENFILENAMEA ofn = fodInfos->ofnInfos; + LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; WideCharToMultiByte(CP_ACP, 0, lpstrFileTitle, -1, ofn->lpstrFileTitle, ofn->nMaxFileTitle, NULL, NULL); } @@ -2072,7 +2077,7 @@ /* copy currently selected filter to lpstrCustomFilter */ if (fodInfos->ofnInfos->lpstrCustomFilter) { - LPOPENFILENAMEA ofn = fodInfos->ofnInfos; + LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos; int len = WideCharToMultiByte(CP_ACP, 0, fodInfos->ShellInfos.lpstrCurrentFilter, -1, NULL, 0, NULL, NULL); if (len + strlen(ofn->lpstrCustomFilter) + 1 <= ofn->nMaxCustFilter) @@ -3208,7 +3213,6 @@ if(!lpsf) { - HRESULT hRes; SHGetDesktopFolder(&lpsf); hRes = GetName(lpsf,pidl,dwFlags,lpstrFileName); IShellFolder_Release(lpsf); @@ -3358,10 +3362,7 @@ static void MemFree(void *mem) { - if(mem) - { - HeapFree(GetProcessHeap(),0,mem); - } + HeapFree(GetProcessHeap(),0,mem); } /* _____ Modified: trunk/reactos/lib/comdlg32/filedlg31.c --- trunk/reactos/lib/comdlg32/filedlg31.c 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/filedlg31.c 2005-01-11 23:05:16 UTC (rev 12935) @@ -586,11 +586,8 @@ static LRESULT FD31_FileTypeChange( PFD31_DATA lfs ) { LONG lRet; - WCHAR diskname[BUFFILE]; LPWSTR pstr; - diskname[0] = 0; - lRet = SendDlgItemMessageW(lfs->hwnd, cmb1, CB_GETCURSEL, 0, 0); if (lRet == LB_ERR) return TRUE; @@ -705,7 +702,6 @@ */ void FD31_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open) { - LPCSTR str; UNICODE_STRING usBuffer; ofnW->lStructSize = sizeof(OPENFILENAMEW); @@ -727,13 +723,18 @@ RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpstrInitialDir); ofnW->lpstrInitialDir = usBuffer.Buffer; } - if (ofnA->lpstrTitle) - str = ofnA->lpstrTitle; - else - /* Allocates default title (FIXME : get it from resource) */ - str = open ? "Open File" : "Save as"; - RtlCreateUnicodeStringFromAsciiz (&usBuffer,str); - ofnW->lpstrTitle = usBuffer.Buffer; + if (ofnA->lpstrTitle) { + RtlCreateUnicodeStringFromAsciiz (&usBuffer, ofnA->lpstrTitle); + ofnW->lpstrTitle = usBuffer.Buffer; + } else { + WCHAR buf[16]; + int len; + LoadStringW(COMDLG32_hInstance, open ? IDS_OPEN_FILE : IDS_SAVE_AS, + buf, sizeof(buf)/sizeof(WCHAR)); + len = lstrlenW(buf)+1; + ofnW->lpstrTitle = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + memcpy((void*)ofnW->lpstrTitle, buf, len*sizeof(WCHAR)); + } ofnW->Flags = ofnA->Flags; ofnW->nFileOffset = ofnA->nFileOffset; ofnW->nFileExtension = ofnA->nFileExtension; @@ -757,12 +758,12 @@ */ void FD31_FreeOfnW(LPOPENFILENAMEW ofnW) { - if (ofnW->lpstrFilter) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrFilter); - if (ofnW->lpstrCustomFilter) HeapFree(GetProcessHeap(), 0, ofnW->lpstrCustomFilter); - if (ofnW->lpstrFile) HeapFree(GetProcessHeap(), 0, ofnW->lpstrFile); - if (ofnW->lpstrFileTitle) HeapFree(GetProcessHeap(), 0, ofnW->lpstrFileTitle); - if (ofnW->lpstrInitialDir) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrInitialDir); - if (ofnW->lpstrTitle) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrTitle); + HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrFilter); + HeapFree(GetProcessHeap(), 0, ofnW->lpstrCustomFilter); + HeapFree(GetProcessHeap(), 0, ofnW->lpstrFile); + HeapFree(GetProcessHeap(), 0, ofnW->lpstrFileTitle); + HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrInitialDir); + HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrTitle); if ((ofnW->lpTemplateName) && (HIWORD(ofnW->lpTemplateName))) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpTemplateName); } _____ Modified: trunk/reactos/lib/comdlg32/filedlgbrowser.c --- trunk/reactos/lib/comdlg32/filedlgbrowser.c 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/filedlgbrowser.c 2005-01-11 23:05:16 UTC (rev 12935) @@ -216,10 +216,11 @@ ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface) { IShellBrowserImpl *This = (IShellBrowserImpl *)iface; + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p,%lu)\n", This, This->ref); + TRACE("(%p,%lu)\n", This, ref - 1); - return ++(This->ref); + return ref; } /*********************************************************************** *** @@ -228,16 +229,17 @@ ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface) { IShellBrowserImpl *This = (IShellBrowserImpl *)iface; + ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p,%lu)\n", This, This->ref); + TRACE("(%p,%lu)\n", This, ref + 1); - if (!--(This->ref)) + if (!ref) { COMDLG32_SHFree(This); TRACE("-- destroyed\n"); return 0; } - return This->ref; + return ref; } /* _____ Modified: trunk/reactos/lib/comdlg32/filedlgbrowser.h --- trunk/reactos/lib/comdlg32/filedlgbrowser.h 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/filedlgbrowser.h 2005-01-11 23:05:16 UTC (rev 12935) @@ -56,7 +56,7 @@ typedef struct { - LPOPENFILENAMEA ofnInfos; + LPOPENFILENAMEW ofnInfos; BOOL unicode; LPWSTR initdir; LPWSTR filename; _____ Modified: trunk/reactos/lib/comdlg32/fontdlg.c --- trunk/reactos/lib/comdlg32/fontdlg.c 2005-01-11 22:46:30 UTC (rev 12934) +++ trunk/reactos/lib/comdlg32/fontdlg.c 2005-01-11 23:05:16 UTC (rev 12935) @@ -36,7 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg); -#define WINE_FONTDATA "__WINE_FONTDLGDATA" +static const WCHAR strWineFontData[] = {'_','_','W','I','N','E','_','F','O','N','T','D','L','G','D','A','T','A' ,0}; +static const WCHAR strWineFontData_a[] = + {'_','_','W','I','N','E','_','F','O','N','T','D','L','G','D','A','T','A' ,'_','A',0}; +static const WCHAR chooseFontW[] = {'C','H','O','O','S','E','_','F','O','N','T',0}; #include "cdlg.h" @@ -44,12 +47,9 @@ static HIMAGELIST himlTT = 0; #define TTBITMAP_XSIZE 20 /* x-size of the bitmaps */ +INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam); -INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam); - /* There is a table here of all charsets, and the sample text for each. * There is a second table that translates a charset into an index into * the first table. @@ -168,8 +168,7 @@ HINSTANCE hDlginst; HGLOBAL hDlgTmpl; - static const WCHAR chooseFontW[] = {'C','H','O','O','S','E','_', - 'F','O','N','T',0}; + TRACE("(%p)\n", lpChFont); if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 ) { @@ -221,6 +220,8 @@ HINSTANCE hDlginst; HGLOBAL hDlgTmpl; + TRACE("(%p)\n", lpChFont); + if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 ) { template=(LPCVOID)lpChFont->hInstance; @@ -238,7 +239,7 @@ } else { hDlginst=COMDLG32_hInstance; - if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", (LPSTR)RT_DIALOG))) + if (!(hResInfo = FindResourceW(hDlginst, chooseFontW, (LPWSTR)RT_DIALOG))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); return FALSE; @@ -253,7 +254,6 @@ } if (TRACE_ON(commdlg)) _dump_cf_flags(lpChFont->Flags); - if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS )) FIXME(": unimplemented flag (ignored)\n"); @@ -261,7 +261,6 @@ lpChFont->hwndOwner, FormatCharDlgProcA, (LPARAM)lpChFont ); } - #define TEXT_EXTRAS 4 #define TEXT_COLORS 16 @@ -276,7 +275,7 @@ /*********************************************************************** * CFn_HookCallChk32 [internal] */ -static BOOL CFn_HookCallChk32(LPCHOOSEFONTA lpcf) +static BOOL CFn_HookCallChk32(LPCHOOSEFONTW lpcf) { if (lpcf) if(lpcf->Flags & CF_ENABLEHOOK) @@ -288,14 +287,14 @@ /*********************************************************************** ** * AddFontFamily [internal] */ -INT AddFontFamily(const ENUMLOGFONTEXA *lpElfex, const NEWTEXTMETRICEXA *lpNTM, - UINT nFontType, LPCHOOSEFONTA lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e) +INT AddFontFamily(const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *lpNTM, + UINT nFontType, LPCHOOSEFONTW lpcf, HWND hwnd, LPCFn_ENUMSTRUCT e) { int i; WORD w; - const LOGFONTA *lplf = &(lpElfex->elfLogFont); + const LOGFONTW *lplf = &(lpElfex->elfLogFont); - TRACE("font=%s (nFontType=%d)\n", lplf->lfFaceName,nFontType); + TRACE("font=%s (nFontType=%d)\n", debugstr_w(lplf->lfFaceName), nFontType); if (lpcf->Flags & CF_FIXEDPITCHONLY) if (!(lplf->lfPitchAndFamily & FIXED_PITCH)) @@ -309,14 +308,14 @@ if (e) e->added++; - i=SendMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)lplf->lfFaceName); + i=SendMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)lplf->lfFaceName); if (i == CB_ERR) { - i = SendMessageA(hwnd, CB_ADDSTRING, 0, (LPARAM)lplf->lfFaceName); + i = SendMessageW(hwnd, CB_ADDSTRING, 0, (LPARAM)lplf->lfFaceName); if( i != CB_ERR) { /* store some important font information */ w = (lplf->lfPitchAndFamily) << 8 | (HIWORD(lpNTM->ntmTm.ntmFlags) & 0xff); - SendMessageA(hwnd, CB_SETITEMDATA, i, MAKELONG(nFontType,w)); + SendMessageW(hwnd, CB_SETITEMDATA, i, MAKELONG(nFontType,w)); } } return 1; [truncated at 1000 lines; 1205 more skipped]
19 years, 10 months
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200